diff --git a/404.html b/404.html index a1e3b43..f17efdc 100644 --- a/404.html +++ b/404.html @@ -2,15 +2,15 @@ - -HappyView - - + +HappyView + + - + -
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

+
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

\ No newline at end of file diff --git a/assets/css/styles.8b9e8df6.css b/assets/css/styles.18b9c377.css similarity index 84% rename from assets/css/styles.8b9e8df6.css rename to assets/css/styles.18b9c377.css index e0facf2..4f8fa76 100644 --- a/assets/css/styles.8b9e8df6.css +++ b/assets/css/styles.18b9c377.css @@ -1 +1 @@ -code,pre{background-color:#f6f7f8}.card,kbd{background-color:#fff}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}html,pre code,table tr{background-color:transparent}a code,pre,table td,table th{color:inherit}blockquote,ol,pre,ul{margin:0 0 1rem}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color .2s cubic-bezier(.08,.52,.52,1)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton_gllP,html{-webkit-tap-highlight-color:transparent}.clean-list,.containsTaskList_mC6p,.details_lb9f>summary,.dropdown__menu,.menu__list{list-style:none}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}*{box-sizing:border-box}html{background-color:var(--ifm-background-color);color:#1c1e21;color:var(--ifm-font-color-base);--csstools-color-scheme--light:initial;color-scheme:light;color-scheme:var(--ifm-color-scheme);font:100%/1.65 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:1140px;max-width:var(--ifm-container-width);padding:0 1rem;padding:0 var(--ifm-spacing-horizontal);width:100%}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 -1rem;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_NmtK,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:100%;max-width:var(--ifm-col-width);padding:0 1rem;padding:0 var(--ifm-spacing-horizontal);width:100%}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:.4rem;border-radius:var(--ifm-code-border-radius);font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-family:var(--ifm-font-family-monospace);font-size:90%;font-size:var(--ifm-code-font-size);padding:.1rem;padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}pre{background-color:var(--ifm-pre-background);border-radius:.4rem;border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:90%/1.45 SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);margin:0 0 var(--ifm-spacing-vertical);padding:1rem;padding:var(--ifm-pre-padding)}pre code{border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid #ccd0d5;border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 #ccd0d5;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:#444950;color:var(--ifm-color-emphasis-800);font:80% SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:inherit;color:var(--ifm-heading-color);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-family:var(--ifm-heading-font-family);font-weight:700;font-weight:var(--ifm-heading-font-weight);line-height:1.25;line-height:var(--ifm-heading-line-height);margin:0 0 1rem;margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}a,a:hover{color:#3578e5}strong,table th{font-weight:700}h1{font-size:2rem;font-size:var(--ifm-h1-font-size)}h2{font-size:1.5rem;font-size:var(--ifm-h2-font-size)}h3{font-size:1.25rem;font-size:var(--ifm-h3-font-size)}h4{font-size:1rem;font-size:var(--ifm-h4-font-size)}h5{font-size:.875rem;font-size:var(--ifm-h5-font-size)}h6{font-size:.85rem;font-size:var(--ifm-h6-font-size)}.container_lyt7,.container_lyt7>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:1.25rem;margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:1rem;margin-top:var(--ifm-list-paragraph-margin)}.avatar__subtitle,.markdown li+li{margin-top:.25rem}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:2rem;padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:1rem;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid #dadde1;border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:rgba(0,0,0,.03);background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:1px solid #dadde1;border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:1px solid #dadde1;border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:.75rem;padding:var(--ifm-table-cell-padding)}table th{background-color:inherit;background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:none;-webkit-text-decoration:var(--ifm-link-decoration);text-decoration:var(--ifm-link-decoration);transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}a:hover{color:var(--ifm-link-hover-color);text-decoration:underline;-webkit-text-decoration:var(--ifm-link-hover-decoration);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){-webkit-text-decoration:none;text-decoration:none}p{margin:0 0 1.25rem;margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:2px solid #dadde1;border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:none;box-shadow:var(--ifm-blockquote-shadow);color:#444950;color:var(--ifm-blockquote-color);font-size:100%;font-size:var(--ifm-blockquote-font-size);margin:0 0 var(--ifm-spacing-vertical);padding:0 1rem;padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:#bec3c9;background-color:var(--ifm-hr-background-color);border:0;height:1px;height:var(--ifm-hr-height);margin:1.5rem 0;margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:0 1px 2px 0 rgba(0,0,0,.1)!important;box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:0 5px 40px rgba(0,0,0,.2)!important;box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1)!important;box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary{color:#3578e5;color:var(--ifm-color-primary)}.text--secondary{color:#ebedf0;color:var(--ifm-color-secondary)}.text--success{color:#00a400;color:var(--ifm-color-success)}.text--info{color:#54c7ec;color:var(--ifm-color-info)}.text--warning{color:#ffba00;color:var(--ifm-color-warning)}.text--danger{color:#fa383e;color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_Gvgb,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:300;font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:400;font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:500;font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:700;font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.badge{background-color:inherit}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:0 solid;border-color:inherit;border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:5px;border-left-width:var(--ifm-alert-border-left-width);border-radius:.4rem;border-radius:var(--ifm-alert-border-radius);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-alert-shadow);padding:1rem;padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 .875rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:-1rem -1rem 0 0;margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:inherit;text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:1rem;-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:1rem;column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:3rem;height:var(--ifm-avatar-photo-size);overflow:hidden;width:3rem;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:inherit;text-align:var(--ifm-avatar-intro-alignment)}.avatar__name{font:700 1rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.badge,.button{font-weight:700;display:inline-block}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:1px solid;border-color:inherit;border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:.4rem;border-radius:var(--ifm-badge-border-radius);color:#fff;color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:.25rem .5rem;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:#000;color:var(--ifm-color-black)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item{display:inline-block}.breadcrumbs__item:not(:last-child):after{background:url('data:image/svg+xml;utf8,') 50%;background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:none;filter:var(--ifm-breadcrumb-separator-filter);height:.625rem;height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 .5rem;margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:.625rem;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);color:#3578e5;color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:1.5rem;border-radius:var(--ifm-breadcrumb-border-radius);color:#1c1e21;color:var(--ifm-font-color-base);display:inline-block;font-size:1rem;font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:.4rem .8rem;padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:background,color;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default)}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs__link:any-link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:inherit;background-color:var(--ifm-button-background-color);border:1px solid;border-color:inherit;border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:.4rem;border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:.875rem;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:.375rem 1.5rem;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:.2s;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:#fff;color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:#3578e5;color:var(--ifm-link-color);text-decoration:none;-webkit-text-decoration:var(--ifm-link-decoration);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:#3578e5;color:var(--ifm-link-hover-color);text-decoration:underline;-webkit-text-decoration:var(--ifm-link-hover-decoration);text-decoration:var(--ifm-link-hover-decoration)}.dropdown__link--active,.dropdown__link:hover,.menu__link:hover,.navbar__brand:hover,.navbar__link--active,.navbar__link:hover,.pagination-nav__link:hover,.pagination__link:hover,.tag_zVej:hover{-webkit-text-decoration:none;text-decoration:none}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:#1c1e21;color:var(--ifm-color-gray-900)}.button.button--secondary.button--outline:not(.button--active):not(:hover){color:#1c1e21;color:var(--ifm-font-color-base)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:2px;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:.8rem;border-radius:var(--ifm-card-border-radius);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:1rem;padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:1rem;padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:.5rem 0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:.5rem;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:.5rem;margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid #dadde1;border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:#525860;color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:#3578e5;color:var(--ifm-color-primary);-webkit-text-decoration:none;text-decoration:none}.close{color:#000;color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:700;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity .2s cubic-bezier(.08,.52,.52,1);transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown,.menu{font-weight:500}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_Tfdd:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:#fff;background-color:var(--ifm-dropdown-background-color);border-radius:.4rem;border-radius:var(--ifm-global-radius);box-shadow:0 5px 40px rgba(0,0,0,.2);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% + .05rem);top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:100;z-index:var(--ifm-z-index-dropdown)}.dropdown__link{border-radius:.25rem;color:#1c1e21;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:rgba(0,0,0,.05);background-color:var(--ifm-dropdown-hover-background-color);color:#1c1e21;color:var(--ifm-dropdown-link-color)}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";display:inline-block;margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:#f5f6f7;background-color:var(--ifm-footer-background-color);color:inherit;color:var(--ifm-footer-color);padding:2rem;padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:#606770;color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:#3578e5;color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 .5rem;margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:min(30rem,90vw);max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:inherit;color:var(--ifm-footer-title-color);font:700 1rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:1rem;margin-bottom:var(--ifm-heading-margin-bottom)}.docItemContainer_Djhp article>:first-child,.docItemContainer_Djhp header+*,.footer__item{margin-top:0}.admonitionContent_BuS1>:last-child,.collapsibleContent_i85q p:last-child,.details_lb9f>summary>p:last-child,.footer__items{margin-bottom:0}.codeBlockStandalone_MEMb,[type=checkbox]{padding:0}.hero{align-items:center;background-color:#fff;background-color:var(--ifm-hero-background-color);color:#444950;color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu{font-weight:var(--ifm-font-weight-semibold);overflow-x:hidden}.menu__list{margin:0;padding-left:0}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:.75rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);width:1.25rem;content:""}.details_lb9f[data-collapsed=false].isBrowser_bmU9>summary:before,.details_lb9f[open]:not(.isBrowser_bmU9)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{border-radius:.25rem;display:flex;flex-wrap:wrap;position:relative;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:rgba(0,0,0,.05);background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;border-radius:.25rem;display:flex;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{flex:1;line-height:1.25;padding:.375rem .75rem;padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__link,.menu__link:hover{color:#606770;color:var(--ifm-menu-color)}.menu__link:hover{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.menu__link--sublist-caret:after{background:url('data:image/svg+xml;utf8,') 50%/2rem 2rem;background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:none;filter:var(--ifm-menu-link-sublist-icon-filter);margin-left:auto;min-width:1.25rem;transition:transform .2s linear;transition:transform var(--ifm-transition-fast) linear}.menu__link--active,.menu__link--active:hover{color:#3578e5;color:var(--ifm-menu-color-active)}.menu__link--active:not(.menu__link--sublist){background-color:rgba(0,0,0,.05);background-color:var(--ifm-menu-color-background-active)}.menu__caret{padding:.375rem .75rem;padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__caret:before{background:url('data:image/svg+xml;utf8,') 50%/2rem 2rem;background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:none;filter:var(--ifm-menu-link-sublist-icon-filter);transition:transform .2s linear;transition:transform var(--ifm-transition-fast) linear}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:#fff;background-color:var(--ifm-navbar-background-color);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-navbar-shadow);height:3.75rem;height:var(--ifm-navbar-height);padding:.5rem 1rem;padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:200;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;color:#1c1e21;color:var(--ifm-navbar-link-color);display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:#3578e5;color:var(--ifm-navbar-link-hover-color)}.announcementBarContent_xLdY,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__item{display:inline-block;padding:.25rem .75rem;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link{color:#1c1e21;color:var(--ifm-navbar-link-color);font-weight:500;font-weight:var(--ifm-font-weight-semibold)}.navbar__link--active,.navbar__link:hover{color:#3578e5;color:var(--ifm-navbar-link-hover-color)}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:#fff;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url('data:image/svg+xml;utf8,') .75rem/1rem 1rem no-repeat #ebedf0;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:#444950;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:#bec3c9;color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:#bec3c9;color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:#fff;background-color:var(--ifm-navbar-background-color);box-shadow:0 5px 40px rgba(0,0,0,.2);box-shadow:var(--ifm-global-shadow-md);overflow-x:hidden;position:fixed;transform:translate3d(-100%,0,0);transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,visibility,transform;width:83vw;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:3.75rem;height:var(--ifm-navbar-height);padding:.5rem 1rem;padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - 3.75rem);height:calc(100% - var(--ifm-navbar-height));transition:transform .2s ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(-83vw,0,0);transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:83vw;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:rgba(0,0,0,.05);background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:700;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:.2em;-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:.2em;column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:1rem;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:.25rem;padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:#3578e5;color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:rgba(0,0,0,.05);background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:.4rem;border-radius:var(--ifm-pagination-border-radius);color:#1c1e21;color:var(--ifm-font-color-base);display:inline-block;padding:.25rem 1rem;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav{display:grid;grid-gap:1rem;grid-gap:var(--ifm-spacing-horizontal);gap:1rem;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid #dadde1;border:1px solid var(--ifm-color-emphasis-300);border-radius:.4rem;border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:1.25;line-height:var(--ifm-heading-line-height);padding:1rem;padding:var(--ifm-global-spacing);transition:border-color .2s cubic-bezier(.08,.52,.52,1);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:#3578e5;border-color:var(--ifm-pagination-nav-color-hover)}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:1rem;font-size:var(--ifm-h4-font-size);font-weight:700;font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:#525860;color:var(--ifm-color-content-secondary);font-size:.875rem;font-size:var(--ifm-h5-font-size);font-weight:500;font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills{display:flex;gap:.125rem;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;font-weight:700;font-weight:var(--ifm-font-weight-bold);padding:.25rem 1rem;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_mC6p>li)>.containsTaskList_mC6p{padding-left:0}.pills__item--active{color:#3578e5;color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:rgba(0,0,0,.05);background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:#525860;color:var(--ifm-tabs-color);display:flex;font-weight:700;font-weight:var(--ifm-font-weight-bold);margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:.4rem;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:1rem;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color .2s cubic-bezier(.08,.52,.52,1);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:#3578e5;border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:#3578e5;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:rgba(0,0,0,.05);background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}.tag_zVej{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag_zVej:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_sFm0{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_h2kH{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_h2kH:after,.tagWithCount_h2kH:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_h2kH:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_h2kH:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_h2kH span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_jXut{display:inline}.tag_QGVx{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Z9Sw{margin-right:.3em;vertical-align:sub}.lastUpdated_JAkA{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton_TO0P{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton_TO0P:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_MG3E:after,.tocCollapsibleExpanded_sAul{transform:none}.tocCollapsible_ETCw{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_vkbj>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_vkbj ul li{margin:.4rem .8rem}.tocCollapsibleContent_vkbj a{display:block}.tableOfContents_bqdL{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_sjWU{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_sjWU:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_xfvO{opacity:1;transform:scale(1);visibility:visible}body:not(.navigation-with-keyboard) :not(input):focus{outline:0}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_YfHR,.sidebarLogo_isFc,.themedComponent_mlkZ,.toggleIcon_g3eP,html[data-announcement-bar-initially-dismissed=true] .announcementBar_mb4j{display:none}.skipToContent_fXgn{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_fXgn:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_CVFx{line-height:0;padding:0}.content_knG7{font-size:85%;padding:5px 0;text-align:center}.content_knG7 a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.announcementBar_mb4j{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:auto;height:var(--docusaurus-announcement-bar-height)}.buttonGroup_M5ko button,.codeBlockContainer_Ckt0{background:var(--prism-background-color);color:var(--prism-color)}.announcementBarPlaceholder_vyr4{flex:0 0 10px}.announcementBarClose_gvF7{align-self:stretch;flex:0 0 30px}.toggle_vylO{height:2rem;width:2rem}.toggleButton_gllP{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton_gllP:hover{background:var(--ifm-color-emphasis-200)}[data-theme-choice=dark] .darkToggleIcon_wfgR,[data-theme-choice=light] .lightToggleIcon_pyhR,[data-theme-choice=system] .systemToggleIcon_QzmC,[data-theme=dark] .themedComponent--dark_xIcU,[data-theme=light] .themedComponent--light_NVdE,html:not([data-theme]) .themedComponent--light_NVdE{display:initial}.toggleButtonDisabled_aARS{cursor:not-allowed}.darkNavbarColorModeToggle_X3D1:hover{background:var(--ifm-color-gray-800)}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_PEFL{display:none;margin:0}.categoryLinkLabel_W154,.linkLabel_WmDU{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.iconExternalLink_nPIU{margin-left:.3rem}.linkLabel_WmDU{line-clamp:2;-webkit-line-clamp:2}.categoryLink_byQd{overflow:hidden}.menu__link--sublist-caret:after{margin-left:var(--ifm-menu-link-padding-vertical)}.categoryLinkLabel_W154{flex:1;line-clamp:2;-webkit-line-clamp:2}.docMainContainer_TBSr,.docRoot_UBD9{display:flex;width:100%}.docsWrapper_hBAB{display:flex;flex:1 0 auto}.anchorTargetStickyNavbar_Vzrq{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorTargetHideOnScrollNavbar_vjPI{scroll-margin-top:.5rem}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.footerLogoLink_BH7S:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.codeBlockContainer_Ckt0{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlock_bY9V{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockLines_e6Vv{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_o6Pm{display:table;padding:var(--ifm-pre-padding) 0}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:#484d5b;background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_lJS_{counter-increment:line-count;display:table-row}.codeLineNumber_Tfdd{background:var(--ifm-pre-background);display:table-cell;left:0;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%;word-wrap:normal}.codeLineNumber_Tfdd:before{content:counter(line-count);opacity:.4}.codeLineContent_feaV{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_Vdqa{opacity:1!important}.copyButtonIcons_IEyt{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_TrPX,.copyButtonSuccessIcon_cVMy{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_cVMy{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_Vdqa .copyButtonIcon_TrPX{opacity:0;transform:scale(.33)}.copyButtonCopied_Vdqa .copyButtonSuccessIcon_cVMy{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_b1P5{height:1.2rem;width:1.2rem}.wordWrapButtonEnabled_uzNF .wordWrapButtonIcon_b1P5{color:var(--ifm-color-primary)}.buttonGroup_M5ko{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup_M5ko button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup_M5ko button:focus-visible,.buttonGroup_M5ko button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_M5ko button{opacity:.4}.codeBlockContent_QJqH{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_OeMC{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlockTitle_OeMC+.codeBlockContent_QJqH .codeBlock_a8dz{border-top-left-radius:0;border-top-right-radius:0}.details_lb9f{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_lb9f>summary{cursor:pointer;padding-left:1rem;position:relative}.details_lb9f>summary::-webkit-details-marker{display:none}.details_lb9f>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_i85q{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_b_Ee{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_ev3q{height:auto}.admonition_xJq3{margin-bottom:1em}.admonitionHeading_Gvgb{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_Gvgb:not(:last-child){margin-bottom:.3rem}.admonitionHeading_Gvgb code{text-transform:none}.admonitionIcon_Rf37{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_Rf37 svg{display:inline-block;fill:var(--ifm-alert-foreground-color);height:1.6em;width:1.6em}.dropdownNavbarItemMobile_J0Sd{cursor:pointer}.iconLanguage_nlXk{margin-right:5px;vertical-align:text-bottom}.navbarSearchContainer_Bca1:empty{display:none}.navbarHideable_m1mJ{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_jGov{transform:translate3d(0,calc(-100% - 2px),0)}.errorBoundaryError_a6uf{color:red;white-space:pre-wrap}.errorBoundaryFallback_VBag{color:red;padding:.55rem}.navbar__items--right>:last-child{padding-right:0}.footerLogoLink_BH7S{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.mainWrapper_z2l0{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.breadcrumbHomeIcon_YNFT{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer_Z_bl{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:997px){.lastUpdated_JAkA{text-align:right}.tocMobile_ITEo{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_gvF7,.announcementBarPlaceholder_vyr4{flex-basis:50px}.collapseSidebarButton_PEFL{background-color:transparent;background-color:var(--docusaurus-collapse-button-bg);border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_kv0_{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_i1dp,[dir=rtl] .collapseSidebarButtonIcon_kv0_{transform:rotate(0)}.collapseSidebarButton_PEFL:focus,.collapseSidebarButton_PEFL:hover{background-color:rgba(0,0,0,.1);background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_M9Kj{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_SIkG{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_SIkG{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_GW3s{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_njMd{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_wUlq{padding-top:0}.sidebarHidden_VK0M{opacity:0;visibility:hidden}.sidebarLogo_isFc{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);-webkit-text-decoration:none!important;text-decoration:none!important}.sidebarLogo_isFc img{height:2rem;margin-right:.5rem}.expandButton_TmdG{align-items:center;background-color:var(--docusaurus-collapse-button-bg);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}.expandButton_TmdG:focus,.expandButton_TmdG:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}[dir=rtl] .expandButtonIcon_i1dp{transform:rotate(180deg)}.docSidebarContainer_YfHR{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:300px;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_DPk8{cursor:pointer;width:30px;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_aRkj{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_TBSr{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_lQrH{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_JWYK{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_Bca1{padding:0 var(--ifm-navbar-item-padding-horizontal)}.docItemCol_VOVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:1320px;max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_DEke,.footer__link-separator,.navbar__item,.tableOfContents_bqdL{display:none}.footer__col{margin-bottom:3rem;margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:-moz-max-content;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_F8PC{padding:0 .3rem}.navbarSearchContainer_Bca1{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (hover:hover){.backToTopButton_sjWU:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:7px;height:var(--ifm-scrollbar-size);width:7px;width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:#f1f1f1;background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:silver;background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:#a7a7a7;background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media print{.announcementBar_mb4j,.footer,.menu,.navbar,.noPrint_WFHX,.pagination-nav,.table-of-contents,.tocMobile_ITEo{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_e6Vv{white-space:pre-wrap}} \ No newline at end of file +code,pre{background-color:#f6f7f8}.card,kbd{background-color:#fff}.markdown>h2,.markdown>h3,.markdown>h4,.markdown>h5,.markdown>h6{margin-bottom:calc(var(--ifm-heading-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown li,body{word-wrap:break-word}body,ol ol,ol ul,ul ol,ul ul{margin:0}pre,table{overflow:auto}html,pre code,table tr{background-color:transparent}a code,pre,table td,table th{color:inherit}blockquote,ol,pre,ul{margin:0 0 1rem}.button,code{vertical-align:middle}.button--outline.button--active,.button--outline:active,.button--outline:hover,:root{--ifm-button-color:var(--ifm-font-color-base-inverse)}.menu__link:hover,a{transition:color .2s cubic-bezier(.08,.52,.52,1)}.navbar--dark,:root{--ifm-navbar-link-hover-color:var(--ifm-color-primary)}:root,html[data-theme=dark]{--ifm-color-emphasis-500:var(--ifm-color-gray-500)}.toggleButton__Co1,html{-webkit-tap-highlight-color:transparent}.clean-list,.containsTaskList_pgAs,.details_XC5U>summary,.dropdown__menu,.menu__list{list-style:none}:root{--ifm-color-scheme:light;--ifm-dark-value:10%;--ifm-darker-value:15%;--ifm-darkest-value:30%;--ifm-light-value:15%;--ifm-lighter-value:30%;--ifm-lightest-value:50%;--ifm-contrast-background-value:90%;--ifm-contrast-foreground-value:70%;--ifm-contrast-background-dark-value:70%;--ifm-contrast-foreground-dark-value:90%;--ifm-color-primary:#3578e5;--ifm-color-secondary:#ebedf0;--ifm-color-success:#00a400;--ifm-color-info:#54c7ec;--ifm-color-warning:#ffba00;--ifm-color-danger:#fa383e;--ifm-color-primary-dark:#306cce;--ifm-color-primary-darker:#2d66c3;--ifm-color-primary-darkest:#2554a0;--ifm-color-primary-light:#538ce9;--ifm-color-primary-lighter:#72a1ed;--ifm-color-primary-lightest:#9abcf2;--ifm-color-primary-contrast-background:#ebf2fc;--ifm-color-primary-contrast-foreground:#102445;--ifm-color-secondary-dark:#d4d5d8;--ifm-color-secondary-darker:#c8c9cc;--ifm-color-secondary-darkest:#a4a6a8;--ifm-color-secondary-light:#eef0f2;--ifm-color-secondary-lighter:#f1f2f5;--ifm-color-secondary-lightest:#f5f6f8;--ifm-color-secondary-contrast-background:#fdfdfe;--ifm-color-secondary-contrast-foreground:#474748;--ifm-color-success-dark:#009400;--ifm-color-success-darker:#008b00;--ifm-color-success-darkest:#007300;--ifm-color-success-light:#26b226;--ifm-color-success-lighter:#4dbf4d;--ifm-color-success-lightest:#80d280;--ifm-color-success-contrast-background:#e6f6e6;--ifm-color-success-contrast-foreground:#003100;--ifm-color-info-dark:#4cb3d4;--ifm-color-info-darker:#47a9c9;--ifm-color-info-darkest:#3b8ba5;--ifm-color-info-light:#6ecfef;--ifm-color-info-lighter:#87d8f2;--ifm-color-info-lightest:#aae3f6;--ifm-color-info-contrast-background:#eef9fd;--ifm-color-info-contrast-foreground:#193c47;--ifm-color-warning-dark:#e6a700;--ifm-color-warning-darker:#d99e00;--ifm-color-warning-darkest:#b38200;--ifm-color-warning-light:#ffc426;--ifm-color-warning-lighter:#ffcf4d;--ifm-color-warning-lightest:#ffdd80;--ifm-color-warning-contrast-background:#fff8e6;--ifm-color-warning-contrast-foreground:#4d3800;--ifm-color-danger-dark:#e13238;--ifm-color-danger-darker:#d53035;--ifm-color-danger-darkest:#af272b;--ifm-color-danger-light:#fb565b;--ifm-color-danger-lighter:#fb7478;--ifm-color-danger-lightest:#fd9c9f;--ifm-color-danger-contrast-background:#ffebec;--ifm-color-danger-contrast-foreground:#4b1113;--ifm-color-white:#fff;--ifm-color-black:#000;--ifm-color-gray-0:var(--ifm-color-white);--ifm-color-gray-100:#f5f6f7;--ifm-color-gray-200:#ebedf0;--ifm-color-gray-300:#dadde1;--ifm-color-gray-400:#ccd0d5;--ifm-color-gray-500:#bec3c9;--ifm-color-gray-600:#8d949e;--ifm-color-gray-700:#606770;--ifm-color-gray-800:#444950;--ifm-color-gray-900:#1c1e21;--ifm-color-gray-1000:var(--ifm-color-black);--ifm-color-emphasis-0:var(--ifm-color-gray-0);--ifm-color-emphasis-100:var(--ifm-color-gray-100);--ifm-color-emphasis-200:var(--ifm-color-gray-200);--ifm-color-emphasis-300:var(--ifm-color-gray-300);--ifm-color-emphasis-400:var(--ifm-color-gray-400);--ifm-color-emphasis-600:var(--ifm-color-gray-600);--ifm-color-emphasis-700:var(--ifm-color-gray-700);--ifm-color-emphasis-800:var(--ifm-color-gray-800);--ifm-color-emphasis-900:var(--ifm-color-gray-900);--ifm-color-emphasis-1000:var(--ifm-color-gray-1000);--ifm-color-content:var(--ifm-color-emphasis-900);--ifm-color-content-inverse:var(--ifm-color-emphasis-0);--ifm-color-content-secondary:#525860;--ifm-background-color:transparent;--ifm-background-surface-color:var(--ifm-color-content-inverse);--ifm-global-border-width:1px;--ifm-global-radius:0.4rem;--ifm-hover-overlay:rgba(0,0,0,.05);--ifm-font-color-base:var(--ifm-color-content);--ifm-font-color-base-inverse:var(--ifm-color-content-inverse);--ifm-font-color-secondary:var(--ifm-color-content-secondary);--ifm-font-family-base:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--ifm-font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--ifm-font-size-base:100%;--ifm-font-weight-light:300;--ifm-font-weight-normal:400;--ifm-font-weight-semibold:500;--ifm-font-weight-bold:700;--ifm-font-weight-base:var(--ifm-font-weight-normal);--ifm-line-height-base:1.65;--ifm-global-spacing:1rem;--ifm-spacing-vertical:var(--ifm-global-spacing);--ifm-spacing-horizontal:var(--ifm-global-spacing);--ifm-transition-fast:200ms;--ifm-transition-slow:400ms;--ifm-transition-timing-default:cubic-bezier(0.08,0.52,0.52,1);--ifm-global-shadow-lw:0 1px 2px 0 rgba(0,0,0,.1);--ifm-global-shadow-md:0 5px 40px rgba(0,0,0,.2);--ifm-global-shadow-tl:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1);--ifm-z-index-dropdown:100;--ifm-z-index-fixed:200;--ifm-z-index-overlay:400;--ifm-container-width:1140px;--ifm-container-width-xl:1320px;--ifm-code-background:#f6f7f8;--ifm-code-border-radius:var(--ifm-global-radius);--ifm-code-font-size:90%;--ifm-code-padding-horizontal:0.1rem;--ifm-code-padding-vertical:0.1rem;--ifm-pre-background:var(--ifm-code-background);--ifm-pre-border-radius:var(--ifm-code-border-radius);--ifm-pre-color:inherit;--ifm-pre-line-height:1.45;--ifm-pre-padding:1rem;--ifm-heading-color:inherit;--ifm-heading-margin-top:0;--ifm-heading-margin-bottom:var(--ifm-spacing-vertical);--ifm-heading-font-family:var(--ifm-font-family-base);--ifm-heading-font-weight:var(--ifm-font-weight-bold);--ifm-heading-line-height:1.25;--ifm-h1-font-size:2rem;--ifm-h2-font-size:1.5rem;--ifm-h3-font-size:1.25rem;--ifm-h4-font-size:1rem;--ifm-h5-font-size:0.875rem;--ifm-h6-font-size:0.85rem;--ifm-image-alignment-padding:1.25rem;--ifm-leading-desktop:1.25;--ifm-leading:calc(var(--ifm-leading-desktop)*1rem);--ifm-list-left-padding:2rem;--ifm-list-margin:1rem;--ifm-list-item-margin:0.25rem;--ifm-list-paragraph-margin:1rem;--ifm-table-cell-padding:0.75rem;--ifm-table-background:transparent;--ifm-table-stripe-background:rgba(0,0,0,.03);--ifm-table-border-width:1px;--ifm-table-border-color:var(--ifm-color-emphasis-300);--ifm-table-head-background:inherit;--ifm-table-head-color:inherit;--ifm-table-head-font-weight:var(--ifm-font-weight-bold);--ifm-table-cell-color:inherit;--ifm-link-color:var(--ifm-color-primary);--ifm-link-decoration:none;--ifm-link-hover-color:var(--ifm-link-color);--ifm-link-hover-decoration:underline;--ifm-paragraph-margin-bottom:var(--ifm-leading);--ifm-blockquote-font-size:var(--ifm-font-size-base);--ifm-blockquote-border-left-width:2px;--ifm-blockquote-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-blockquote-padding-vertical:0;--ifm-blockquote-shadow:none;--ifm-blockquote-color:var(--ifm-color-emphasis-800);--ifm-blockquote-border-color:var(--ifm-color-emphasis-300);--ifm-hr-background-color:var(--ifm-color-emphasis-500);--ifm-hr-height:1px;--ifm-hr-margin-vertical:1.5rem;--ifm-scrollbar-size:7px;--ifm-scrollbar-track-background-color:#f1f1f1;--ifm-scrollbar-thumb-background-color:silver;--ifm-scrollbar-thumb-hover-background-color:#a7a7a7;--ifm-alert-background-color:inherit;--ifm-alert-border-color:inherit;--ifm-alert-border-radius:var(--ifm-global-radius);--ifm-alert-border-width:0px;--ifm-alert-border-left-width:5px;--ifm-alert-color:var(--ifm-font-color-base);--ifm-alert-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-alert-padding-vertical:var(--ifm-spacing-vertical);--ifm-alert-shadow:var(--ifm-global-shadow-lw);--ifm-avatar-intro-margin:1rem;--ifm-avatar-intro-alignment:inherit;--ifm-avatar-photo-size:3rem;--ifm-badge-background-color:inherit;--ifm-badge-border-color:inherit;--ifm-badge-border-radius:var(--ifm-global-radius);--ifm-badge-border-width:var(--ifm-global-border-width);--ifm-badge-color:var(--ifm-color-white);--ifm-badge-padding-horizontal:calc(var(--ifm-spacing-horizontal)*0.5);--ifm-badge-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-breadcrumb-border-radius:1.5rem;--ifm-breadcrumb-spacing:0.5rem;--ifm-breadcrumb-color-active:var(--ifm-color-primary);--ifm-breadcrumb-item-background-active:var(--ifm-hover-overlay);--ifm-breadcrumb-padding-horizontal:0.8rem;--ifm-breadcrumb-padding-vertical:0.4rem;--ifm-breadcrumb-size-multiplier:1;--ifm-breadcrumb-separator:url('data:image/svg+xml;utf8,');--ifm-breadcrumb-separator-filter:none;--ifm-breadcrumb-separator-size:0.5rem;--ifm-breadcrumb-separator-size-multiplier:1.25;--ifm-button-background-color:inherit;--ifm-button-border-color:var(--ifm-button-background-color);--ifm-button-border-width:var(--ifm-global-border-width);--ifm-button-font-weight:var(--ifm-font-weight-bold);--ifm-button-padding-horizontal:1.5rem;--ifm-button-padding-vertical:0.375rem;--ifm-button-size-multiplier:1;--ifm-button-transition-duration:var(--ifm-transition-fast);--ifm-button-border-radius:calc(var(--ifm-global-radius)*var(--ifm-button-size-multiplier));--ifm-button-group-spacing:2px;--ifm-card-background-color:var(--ifm-background-surface-color);--ifm-card-border-radius:calc(var(--ifm-global-radius)*2);--ifm-card-horizontal-spacing:var(--ifm-global-spacing);--ifm-card-vertical-spacing:var(--ifm-global-spacing);--ifm-toc-border-color:var(--ifm-color-emphasis-300);--ifm-toc-link-color:var(--ifm-color-content-secondary);--ifm-toc-padding-vertical:0.5rem;--ifm-toc-padding-horizontal:0.5rem;--ifm-dropdown-background-color:var(--ifm-background-surface-color);--ifm-dropdown-font-weight:var(--ifm-font-weight-semibold);--ifm-dropdown-link-color:var(--ifm-font-color-base);--ifm-dropdown-hover-background-color:var(--ifm-hover-overlay);--ifm-footer-background-color:var(--ifm-color-emphasis-100);--ifm-footer-color:inherit;--ifm-footer-link-color:var(--ifm-color-emphasis-700);--ifm-footer-link-hover-color:var(--ifm-color-primary);--ifm-footer-link-horizontal-spacing:0.5rem;--ifm-footer-padding-horizontal:calc(var(--ifm-spacing-horizontal)*2);--ifm-footer-padding-vertical:calc(var(--ifm-spacing-vertical)*2);--ifm-footer-title-color:inherit;--ifm-footer-logo-max-width:min(30rem,90vw);--ifm-hero-background-color:var(--ifm-background-surface-color);--ifm-hero-text-color:var(--ifm-color-emphasis-800);--ifm-menu-color:var(--ifm-color-emphasis-700);--ifm-menu-color-active:var(--ifm-color-primary);--ifm-menu-color-background-active:var(--ifm-hover-overlay);--ifm-menu-color-background-hover:var(--ifm-hover-overlay);--ifm-menu-link-padding-horizontal:0.75rem;--ifm-menu-link-padding-vertical:0.375rem;--ifm-menu-link-sublist-icon:url('data:image/svg+xml;utf8,');--ifm-menu-link-sublist-icon-filter:none;--ifm-navbar-background-color:var(--ifm-background-surface-color);--ifm-navbar-height:3.75rem;--ifm-navbar-item-padding-horizontal:0.75rem;--ifm-navbar-item-padding-vertical:0.25rem;--ifm-navbar-link-color:var(--ifm-font-color-base);--ifm-navbar-link-active-color:var(--ifm-link-color);--ifm-navbar-padding-horizontal:var(--ifm-spacing-horizontal);--ifm-navbar-padding-vertical:calc(var(--ifm-spacing-vertical)*0.5);--ifm-navbar-shadow:var(--ifm-global-shadow-lw);--ifm-navbar-search-input-background-color:var(--ifm-color-emphasis-200);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-800);--ifm-navbar-search-input-placeholder-color:var(--ifm-color-emphasis-500);--ifm-navbar-search-input-icon:url('data:image/svg+xml;utf8,');--ifm-navbar-sidebar-width:83vw;--ifm-pagination-border-radius:var(--ifm-global-radius);--ifm-pagination-color-active:var(--ifm-color-primary);--ifm-pagination-font-size:1rem;--ifm-pagination-item-active-background:var(--ifm-hover-overlay);--ifm-pagination-page-spacing:0.2em;--ifm-pagination-padding-horizontal:calc(var(--ifm-spacing-horizontal)*1);--ifm-pagination-padding-vertical:calc(var(--ifm-spacing-vertical)*0.25);--ifm-pagination-nav-border-radius:var(--ifm-global-radius);--ifm-pagination-nav-color-hover:var(--ifm-color-primary);--ifm-pills-color-active:var(--ifm-color-primary);--ifm-pills-color-background-active:var(--ifm-hover-overlay);--ifm-pills-spacing:0.125rem;--ifm-tabs-color:var(--ifm-font-color-secondary);--ifm-tabs-color-active:var(--ifm-color-primary);--ifm-tabs-color-active-border:var(--ifm-tabs-color-active);--ifm-tabs-padding-horizontal:1rem;--ifm-tabs-padding-vertical:1rem;--docusaurus-progress-bar-color:var(--ifm-color-primary);--docusaurus-tag-list-border:var(--ifm-color-emphasis-300);--docusaurus-announcement-bar-height:auto;--docusaurus-collapse-button-bg:transparent;--docusaurus-collapse-button-bg-hover:rgba(0,0,0,.1);--doc-sidebar-width:300px;--doc-sidebar-hidden-width:30px}.badge--danger,.badge--info,.badge--primary,.badge--secondary,.badge--success,.badge--warning{--ifm-badge-border-color:var(--ifm-badge-background-color)}.button--link,.button--outline{--ifm-button-background-color:transparent}*{box-sizing:border-box}html{background-color:var(--ifm-background-color);color:#1c1e21;color:var(--ifm-font-color-base);--csstools-color-scheme--light:initial;color-scheme:light;color-scheme:var(--ifm-color-scheme);font:100%/1.65 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:var(--ifm-font-size-base)/var(--ifm-line-height-base) var(--ifm-font-family-base);-webkit-font-smoothing:antialiased;text-rendering:optimizelegibility;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%}iframe{border:0;color-scheme:auto}.container{margin:0 auto;max-width:1140px;max-width:var(--ifm-container-width);padding:0 1rem;padding:0 var(--ifm-spacing-horizontal);width:100%}.container--fluid{max-width:inherit}.row{display:flex;flex-wrap:wrap;margin:0 -1rem;margin:0 calc(var(--ifm-spacing-horizontal)*-1)}.margin-bottom--none,.margin-vert--none,.markdown>:last-child{margin-bottom:0!important}.margin-top--none,.margin-vert--none{margin-top:0!important}.row--no-gutters{margin-left:0;margin-right:0}.margin-horiz--none,.margin-right--none{margin-right:0!important}.row--no-gutters>.col{padding-left:0;padding-right:0}.row--align-top{align-items:flex-start}.row--align-bottom{align-items:flex-end}.menuExternalLink_dDEw,.row--align-center{align-items:center}.row--align-stretch{align-items:stretch}.row--align-baseline{align-items:baseline}.col{--ifm-col-width:100%;flex:1 0;margin-left:0;max-width:100%;max-width:var(--ifm-col-width);padding:0 1rem;padding:0 var(--ifm-spacing-horizontal);width:100%}.padding-bottom--none,.padding-vert--none{padding-bottom:0!important}.padding-top--none,.padding-vert--none{padding-top:0!important}.padding-horiz--none,.padding-left--none{padding-left:0!important}.padding-horiz--none,.padding-right--none{padding-right:0!important}.col[class*=col--]{flex:0 0 var(--ifm-col-width)}.col--1{--ifm-col-width:8.33333%}.col--offset-1{margin-left:8.33333%}.col--2{--ifm-col-width:16.66667%}.col--offset-2{margin-left:16.66667%}.col--3{--ifm-col-width:25%}.col--offset-3{margin-left:25%}.col--4{--ifm-col-width:33.33333%}.col--offset-4{margin-left:33.33333%}.col--5{--ifm-col-width:41.66667%}.col--offset-5{margin-left:41.66667%}.col--6{--ifm-col-width:50%}.col--offset-6{margin-left:50%}.col--7{--ifm-col-width:58.33333%}.col--offset-7{margin-left:58.33333%}.col--8{--ifm-col-width:66.66667%}.col--offset-8{margin-left:66.66667%}.col--9{--ifm-col-width:75%}.col--offset-9{margin-left:75%}.col--10{--ifm-col-width:83.33333%}.col--offset-10{margin-left:83.33333%}.col--11{--ifm-col-width:91.66667%}.col--offset-11{margin-left:91.66667%}.col--12{--ifm-col-width:100%}.col--offset-12{margin-left:100%}.margin-horiz--none,.margin-left--none{margin-left:0!important}.margin--none{margin:0!important}.margin-bottom--xs,.margin-vert--xs{margin-bottom:.25rem!important}.margin-top--xs,.margin-vert--xs{margin-top:.25rem!important}.margin-horiz--xs,.margin-left--xs{margin-left:.25rem!important}.margin-horiz--xs,.margin-right--xs{margin-right:.25rem!important}.margin--xs{margin:.25rem!important}.margin-bottom--sm,.margin-vert--sm{margin-bottom:.5rem!important}.margin-top--sm,.margin-vert--sm{margin-top:.5rem!important}.margin-horiz--sm,.margin-left--sm{margin-left:.5rem!important}.margin-horiz--sm,.margin-right--sm{margin-right:.5rem!important}.margin--sm{margin:.5rem!important}.margin-bottom--md,.margin-vert--md{margin-bottom:1rem!important}.margin-top--md,.margin-vert--md{margin-top:1rem!important}.margin-horiz--md,.margin-left--md{margin-left:1rem!important}.margin-horiz--md,.margin-right--md{margin-right:1rem!important}.margin--md{margin:1rem!important}.margin-bottom--lg,.margin-vert--lg{margin-bottom:2rem!important}.margin-top--lg,.margin-vert--lg{margin-top:2rem!important}.margin-horiz--lg,.margin-left--lg{margin-left:2rem!important}.margin-horiz--lg,.margin-right--lg{margin-right:2rem!important}.margin--lg{margin:2rem!important}.margin-bottom--xl,.margin-vert--xl{margin-bottom:5rem!important}.margin-top--xl,.margin-vert--xl{margin-top:5rem!important}.margin-horiz--xl,.margin-left--xl{margin-left:5rem!important}.margin-horiz--xl,.margin-right--xl{margin-right:5rem!important}.margin--xl{margin:5rem!important}.padding--none{padding:0!important}.padding-bottom--xs,.padding-vert--xs{padding-bottom:.25rem!important}.padding-top--xs,.padding-vert--xs{padding-top:.25rem!important}.padding-horiz--xs,.padding-left--xs{padding-left:.25rem!important}.padding-horiz--xs,.padding-right--xs{padding-right:.25rem!important}.padding--xs{padding:.25rem!important}.padding-bottom--sm,.padding-vert--sm{padding-bottom:.5rem!important}.padding-top--sm,.padding-vert--sm{padding-top:.5rem!important}.padding-horiz--sm,.padding-left--sm{padding-left:.5rem!important}.padding-horiz--sm,.padding-right--sm{padding-right:.5rem!important}.padding--sm{padding:.5rem!important}.padding-bottom--md,.padding-vert--md{padding-bottom:1rem!important}.padding-top--md,.padding-vert--md{padding-top:1rem!important}.padding-horiz--md,.padding-left--md{padding-left:1rem!important}.padding-horiz--md,.padding-right--md{padding-right:1rem!important}.padding--md{padding:1rem!important}.padding-bottom--lg,.padding-vert--lg{padding-bottom:2rem!important}.padding-top--lg,.padding-vert--lg{padding-top:2rem!important}.padding-horiz--lg,.padding-left--lg{padding-left:2rem!important}.padding-horiz--lg,.padding-right--lg{padding-right:2rem!important}.padding--lg{padding:2rem!important}.padding-bottom--xl,.padding-vert--xl{padding-bottom:5rem!important}.padding-top--xl,.padding-vert--xl{padding-top:5rem!important}.padding-horiz--xl,.padding-left--xl{padding-left:5rem!important}.padding-horiz--xl,.padding-right--xl{padding-right:5rem!important}.padding--xl{padding:5rem!important}code{background-color:var(--ifm-code-background);border:.1rem solid rgba(0,0,0,.1);border-radius:.4rem;border-radius:var(--ifm-code-border-radius);font-family:SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-family:var(--ifm-font-family-monospace);font-size:90%;font-size:var(--ifm-code-font-size);padding:.1rem;padding:var(--ifm-code-padding-vertical) var(--ifm-code-padding-horizontal)}pre{background-color:var(--ifm-pre-background);border-radius:.4rem;border-radius:var(--ifm-pre-border-radius);color:var(--ifm-pre-color);font:90%/1.45 SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font:var(--ifm-code-font-size)/var(--ifm-pre-line-height) var(--ifm-font-family-monospace);margin:0 0 var(--ifm-spacing-vertical);padding:1rem;padding:var(--ifm-pre-padding)}pre code{border:none;font-size:100%;line-height:inherit;padding:0}kbd{background-color:var(--ifm-color-emphasis-0);border:1px solid #ccd0d5;border:1px solid var(--ifm-color-emphasis-400);border-radius:.2rem;box-shadow:inset 0 -1px 0 #ccd0d5;box-shadow:inset 0 -1px 0 var(--ifm-color-emphasis-400);color:#444950;color:var(--ifm-color-emphasis-800);font:80% SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font:80% var(--ifm-font-family-monospace);padding:.15rem .3rem}h1,h2,h3,h4,h5,h6{color:inherit;color:var(--ifm-heading-color);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-family:var(--ifm-heading-font-family);font-weight:700;font-weight:var(--ifm-heading-font-weight);line-height:1.25;line-height:var(--ifm-heading-line-height);margin:0 0 1rem;margin:var(--ifm-heading-margin-top) 0 var(--ifm-heading-margin-bottom) 0}a,a:hover{color:#3578e5}strong,table th{font-weight:700}h1{font-size:2rem;font-size:var(--ifm-h1-font-size)}h2{font-size:1.5rem;font-size:var(--ifm-h2-font-size)}h3{font-size:1.25rem;font-size:var(--ifm-h3-font-size)}h4{font-size:1rem;font-size:var(--ifm-h4-font-size)}h5{font-size:.875rem;font-size:var(--ifm-h5-font-size)}h6{font-size:.85rem;font-size:var(--ifm-h6-font-size)}.container_VRXZ,.container_VRXZ>svg,img{max-width:100%}img[align=right]{padding-left:var(--image-alignment-padding)}img[align=left]{padding-right:var(--image-alignment-padding)}.markdown{--ifm-h1-vertical-rhythm-top:3;--ifm-h2-vertical-rhythm-top:2;--ifm-h3-vertical-rhythm-top:1.5;--ifm-heading-vertical-rhythm-top:1.25;--ifm-h1-vertical-rhythm-bottom:1.25;--ifm-heading-vertical-rhythm-bottom:1}.markdown:after,.markdown:before{content:"";display:table}.markdown:after{clear:both}.markdown h1:first-child{--ifm-h1-font-size:3rem;margin-bottom:calc(var(--ifm-h1-vertical-rhythm-bottom)*var(--ifm-leading))}.markdown>h2{--ifm-h2-font-size:2rem;margin-top:calc(var(--ifm-h2-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h3{--ifm-h3-font-size:1.5rem;margin-top:calc(var(--ifm-h3-vertical-rhythm-top)*var(--ifm-leading))}.markdown>h4,.markdown>h5,.markdown>h6{margin-top:calc(var(--ifm-heading-vertical-rhythm-top)*var(--ifm-leading))}.markdown>p,.markdown>pre,.markdown>ul{margin-bottom:1.25rem;margin-bottom:var(--ifm-leading)}.markdown li>p{margin-top:1rem;margin-top:var(--ifm-list-paragraph-margin)}.avatar__subtitle,.markdown li+li{margin-top:.25rem}.markdown li+li{margin-top:var(--ifm-list-item-margin)}ol,ul{margin:0 0 var(--ifm-list-margin);padding-left:2rem;padding-left:var(--ifm-list-left-padding)}ol ol,ul ol{list-style-type:lower-roman}ol ol ol,ol ul ol,ul ol ol,ul ul ol{list-style-type:lower-alpha}table{border-collapse:collapse;display:block;margin-bottom:1rem;margin-bottom:var(--ifm-spacing-vertical)}table thead tr{border-bottom:2px solid #dadde1;border-bottom:2px solid var(--ifm-table-border-color)}table thead,table tr:nth-child(2n){background-color:rgba(0,0,0,.03);background-color:var(--ifm-table-stripe-background)}table tr{background-color:var(--ifm-table-background);border-top:1px solid #dadde1;border-top:var(--ifm-table-border-width) solid var(--ifm-table-border-color)}table td,table th{border:1px solid #dadde1;border:var(--ifm-table-border-width) solid var(--ifm-table-border-color);padding:.75rem;padding:var(--ifm-table-cell-padding)}table th{background-color:inherit;background-color:var(--ifm-table-head-background);color:var(--ifm-table-head-color);font-weight:var(--ifm-table-head-font-weight)}table td{color:var(--ifm-table-cell-color)}strong{font-weight:var(--ifm-font-weight-bold)}a{color:var(--ifm-link-color);text-decoration:none;-webkit-text-decoration:var(--ifm-link-decoration);text-decoration:var(--ifm-link-decoration);transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}a:hover{color:var(--ifm-link-hover-color);text-decoration:underline;-webkit-text-decoration:var(--ifm-link-hover-decoration);text-decoration:var(--ifm-link-hover-decoration)}.button:hover,.text--no-decoration,.text--no-decoration:hover,a:not([href]){-webkit-text-decoration:none;text-decoration:none}p{margin:0 0 1.25rem;margin:0 0 var(--ifm-paragraph-margin-bottom)}blockquote{border-left:2px solid #dadde1;border-left:var(--ifm-blockquote-border-left-width) solid var(--ifm-blockquote-border-color);box-shadow:none;box-shadow:var(--ifm-blockquote-shadow);color:#444950;color:var(--ifm-blockquote-color);font-size:100%;font-size:var(--ifm-blockquote-font-size);margin:0 0 var(--ifm-spacing-vertical);padding:0 1rem;padding:var(--ifm-blockquote-padding-vertical) var(--ifm-blockquote-padding-horizontal)}blockquote>:first-child{margin-top:0}blockquote>:last-child{margin-bottom:0}hr{background-color:#bec3c9;background-color:var(--ifm-hr-background-color);border:0;height:1px;height:var(--ifm-hr-height);margin:1.5rem 0;margin:var(--ifm-hr-margin-vertical) 0}.shadow--lw{box-shadow:0 1px 2px 0 rgba(0,0,0,.1)!important;box-shadow:var(--ifm-global-shadow-lw)!important}.shadow--md{box-shadow:0 5px 40px rgba(0,0,0,.2)!important;box-shadow:var(--ifm-global-shadow-md)!important}.shadow--tl{box-shadow:0 12px 28px 0 rgba(0,0,0,.2),0 2px 4px 0 rgba(0,0,0,.1)!important;box-shadow:var(--ifm-global-shadow-tl)!important}.text--primary{color:#3578e5;color:var(--ifm-color-primary)}.text--secondary{color:#ebedf0;color:var(--ifm-color-secondary)}.text--success{color:#00a400;color:var(--ifm-color-success)}.text--info{color:#54c7ec;color:var(--ifm-color-info)}.text--warning{color:#ffba00;color:var(--ifm-color-warning)}.text--danger{color:#fa383e;color:var(--ifm-color-danger)}.text--center{text-align:center}.text--left{text-align:left}.text--justify{text-align:justify}.text--right{text-align:right}.text--capitalize{text-transform:capitalize}.text--lowercase{text-transform:lowercase}.admonitionHeading_d6Ef,.alert__heading,.text--uppercase{text-transform:uppercase}.text--light{font-weight:300;font-weight:var(--ifm-font-weight-light)}.text--normal{font-weight:400;font-weight:var(--ifm-font-weight-normal)}.text--semibold{font-weight:500;font-weight:var(--ifm-font-weight-semibold)}.text--bold{font-weight:700;font-weight:var(--ifm-font-weight-bold)}.text--italic{font-style:italic}.text--truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text--break{word-wrap:break-word!important;word-break:break-word!important}.clean-btn{background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;padding:0}.alert,.badge{background-color:inherit}.alert,.alert .close{color:var(--ifm-alert-foreground-color)}.clean-list{padding-left:0}.alert--primary{--ifm-alert-background-color:var(--ifm-color-primary-contrast-background);--ifm-alert-background-color-highlight:rgba(53,120,229,.15);--ifm-alert-foreground-color:var(--ifm-color-primary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-primary-dark)}.alert--secondary{--ifm-alert-background-color:var(--ifm-color-secondary-contrast-background);--ifm-alert-background-color-highlight:rgba(235,237,240,.15);--ifm-alert-foreground-color:var(--ifm-color-secondary-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-secondary-dark)}.alert--success{--ifm-alert-background-color:var(--ifm-color-success-contrast-background);--ifm-alert-background-color-highlight:rgba(0,164,0,.15);--ifm-alert-foreground-color:var(--ifm-color-success-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-success-dark)}.alert--info{--ifm-alert-background-color:var(--ifm-color-info-contrast-background);--ifm-alert-background-color-highlight:rgba(84,199,236,.15);--ifm-alert-foreground-color:var(--ifm-color-info-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-info-dark)}.alert--warning{--ifm-alert-background-color:var(--ifm-color-warning-contrast-background);--ifm-alert-background-color-highlight:rgba(255,186,0,.15);--ifm-alert-foreground-color:var(--ifm-color-warning-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-warning-dark)}.alert--danger{--ifm-alert-background-color:var(--ifm-color-danger-contrast-background);--ifm-alert-background-color-highlight:rgba(250,56,62,.15);--ifm-alert-foreground-color:var(--ifm-color-danger-contrast-foreground);--ifm-alert-border-color:var(--ifm-color-danger-dark)}.alert{--ifm-code-background:var(--ifm-alert-background-color-highlight);--ifm-link-color:var(--ifm-alert-foreground-color);--ifm-link-hover-color:var(--ifm-alert-foreground-color);--ifm-link-decoration:underline;--ifm-tabs-color:var(--ifm-alert-foreground-color);--ifm-tabs-color-active:var(--ifm-alert-foreground-color);--ifm-tabs-color-active-border:var(--ifm-alert-border-color);background-color:var(--ifm-alert-background-color);border:0 solid;border-color:inherit;border:var(--ifm-alert-border-width) solid var(--ifm-alert-border-color);border-left-width:5px;border-left-width:var(--ifm-alert-border-left-width);border-radius:.4rem;border-radius:var(--ifm-alert-border-radius);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-alert-shadow);padding:1rem;padding:var(--ifm-alert-padding-vertical) var(--ifm-alert-padding-horizontal)}.alert__heading{align-items:center;display:flex;font:700 .875rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family);margin-bottom:.5rem}.alert__icon{display:inline-flex;margin-right:.4em}.alert__icon svg{fill:var(--ifm-alert-foreground-color);stroke:var(--ifm-alert-foreground-color);stroke-width:0}.alert .close{margin:-1rem -1rem 0 0;margin:calc(var(--ifm-alert-padding-vertical)*-1) calc(var(--ifm-alert-padding-horizontal)*-1) 0 0;opacity:.75}.alert .close:focus,.alert .close:hover{opacity:1}.alert a{text-decoration-color:inherit;text-decoration-color:var(--ifm-alert-border-color)}.alert a:hover{text-decoration-thickness:2px}.avatar{-moz-column-gap:1rem;-moz-column-gap:var(--ifm-avatar-intro-margin);column-gap:1rem;column-gap:var(--ifm-avatar-intro-margin);display:flex}.avatar__photo{border-radius:50%;display:block;height:3rem;height:var(--ifm-avatar-photo-size);overflow:hidden;width:3rem;width:var(--ifm-avatar-photo-size)}.card--full-height,.navbar__logo img,body,html{height:100%}.avatar__photo--sm{--ifm-avatar-photo-size:2rem}.avatar__photo--lg{--ifm-avatar-photo-size:4rem}.avatar__photo--xl{--ifm-avatar-photo-size:6rem}.avatar__intro{display:flex;flex:1 1;flex-direction:column;justify-content:center;text-align:inherit;text-align:var(--ifm-avatar-intro-alignment)}.avatar__name{font:700 1rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base)}.badge,.button{font-weight:700;display:inline-block}.avatar--vertical{--ifm-avatar-intro-alignment:center;--ifm-avatar-intro-margin:0.5rem;align-items:center;flex-direction:column}.badge{background-color:var(--ifm-badge-background-color);border:1px solid;border-color:inherit;border:var(--ifm-badge-border-width) solid var(--ifm-badge-border-color);border-radius:.4rem;border-radius:var(--ifm-badge-border-radius);color:#fff;color:var(--ifm-badge-color);font-size:75%;font-weight:var(--ifm-font-weight-bold);line-height:1;padding:.25rem .5rem;padding:var(--ifm-badge-padding-vertical) var(--ifm-badge-padding-horizontal)}.badge--primary{--ifm-badge-background-color:var(--ifm-color-primary)}.badge--secondary{--ifm-badge-background-color:var(--ifm-color-secondary);color:#000;color:var(--ifm-color-black)}.badge--success{--ifm-badge-background-color:var(--ifm-color-success)}.badge--info{--ifm-badge-background-color:var(--ifm-color-info)}.badge--warning{--ifm-badge-background-color:var(--ifm-color-warning)}.badge--danger{--ifm-badge-background-color:var(--ifm-color-danger)}.breadcrumbs{margin-bottom:0;padding-left:0}.breadcrumbs__item{display:inline-block}.breadcrumbs__item:not(:last-child):after{background:url('data:image/svg+xml;utf8,') 50%;background:var(--ifm-breadcrumb-separator) center;content:" ";display:inline-block;filter:none;filter:var(--ifm-breadcrumb-separator-filter);height:.625rem;height:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier));margin:0 .5rem;margin:0 var(--ifm-breadcrumb-spacing);opacity:.5;width:.625rem;width:calc(var(--ifm-breadcrumb-separator-size)*var(--ifm-breadcrumb-size-multiplier)*var(--ifm-breadcrumb-separator-size-multiplier))}.breadcrumbs__item--active .breadcrumbs__link{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);color:#3578e5;color:var(--ifm-breadcrumb-color-active)}.breadcrumbs__link{border-radius:1.5rem;border-radius:var(--ifm-breadcrumb-border-radius);color:#1c1e21;color:var(--ifm-font-color-base);display:inline-block;font-size:1rem;font-size:calc(1rem*var(--ifm-breadcrumb-size-multiplier));padding:.4rem .8rem;padding:calc(var(--ifm-breadcrumb-padding-vertical)*var(--ifm-breadcrumb-size-multiplier)) calc(var(--ifm-breadcrumb-padding-horizontal)*var(--ifm-breadcrumb-size-multiplier));transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:background,color;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default)}.breadcrumbs__link:link:hover,.breadcrumbs__link:visited:hover,area[href].breadcrumbs__link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs__link:-moz-any-link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs__link:any-link:hover{background:rgba(0,0,0,.05);background:var(--ifm-breadcrumb-item-background-active);-webkit-text-decoration:none;text-decoration:none}.breadcrumbs--sm{--ifm-breadcrumb-size-multiplier:0.8}.breadcrumbs--lg{--ifm-breadcrumb-size-multiplier:1.2}.button{background-color:inherit;background-color:var(--ifm-button-background-color);border:1px solid;border-color:inherit;border:var(--ifm-button-border-width) solid var(--ifm-button-border-color);border-radius:.4rem;border-radius:var(--ifm-button-border-radius);cursor:pointer;font-size:.875rem;font-size:calc(.875rem*var(--ifm-button-size-multiplier));font-weight:var(--ifm-button-font-weight);line-height:1.5;padding:.375rem 1.5rem;padding:calc(var(--ifm-button-padding-vertical)*var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal)*var(--ifm-button-size-multiplier));text-align:center;transition-duration:.2s;transition-duration:var(--ifm-button-transition-duration);transition-property:color,background,border-color;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default);-webkit-user-select:none;-moz-user-select:none;user-select:none;white-space:nowrap}.button,.button:hover{color:#fff;color:var(--ifm-button-color)}.button--outline{--ifm-button-color:var(--ifm-button-border-color)}.button--outline:hover{--ifm-button-background-color:var(--ifm-button-border-color)}.button--link{--ifm-button-border-color:transparent;color:#3578e5;color:var(--ifm-link-color);text-decoration:none;-webkit-text-decoration:var(--ifm-link-decoration);text-decoration:var(--ifm-link-decoration)}.button--link.button--active,.button--link:active,.button--link:hover{color:#3578e5;color:var(--ifm-link-hover-color);text-decoration:underline;-webkit-text-decoration:var(--ifm-link-hover-decoration);text-decoration:var(--ifm-link-hover-decoration)}.dropdown__link--active,.dropdown__link:hover,.menu__link:hover,.navbar__brand:hover,.navbar__link--active,.navbar__link:hover,.pagination-nav__link:hover,.pagination__link:hover,.tag__zUQ:hover{-webkit-text-decoration:none;text-decoration:none}.button.disabled,.button:disabled,.button[disabled]{opacity:.65;pointer-events:none}.button--sm{--ifm-button-size-multiplier:0.8}.button--lg{--ifm-button-size-multiplier:1.35}.button--block{display:block;width:100%}.button.button--secondary{color:#1c1e21;color:var(--ifm-color-gray-900)}.button.button--secondary.button--outline:not(.button--active):not(:hover){color:#1c1e21;color:var(--ifm-font-color-base)}:where(.button--primary){--ifm-button-background-color:var(--ifm-color-primary);--ifm-button-border-color:var(--ifm-color-primary)}:where(.button--primary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-primary-dark);--ifm-button-border-color:var(--ifm-color-primary-dark)}.button--primary.button--active,.button--primary:active{--ifm-button-background-color:var(--ifm-color-primary-darker);--ifm-button-border-color:var(--ifm-color-primary-darker)}:where(.button--secondary){--ifm-button-background-color:var(--ifm-color-secondary);--ifm-button-border-color:var(--ifm-color-secondary)}:where(.button--secondary):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-secondary-dark);--ifm-button-border-color:var(--ifm-color-secondary-dark)}.button--secondary.button--active,.button--secondary:active{--ifm-button-background-color:var(--ifm-color-secondary-darker);--ifm-button-border-color:var(--ifm-color-secondary-darker)}:where(.button--success){--ifm-button-background-color:var(--ifm-color-success);--ifm-button-border-color:var(--ifm-color-success)}:where(.button--success):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-success-dark);--ifm-button-border-color:var(--ifm-color-success-dark)}.button--success.button--active,.button--success:active{--ifm-button-background-color:var(--ifm-color-success-darker);--ifm-button-border-color:var(--ifm-color-success-darker)}:where(.button--info){--ifm-button-background-color:var(--ifm-color-info);--ifm-button-border-color:var(--ifm-color-info)}:where(.button--info):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-info-dark);--ifm-button-border-color:var(--ifm-color-info-dark)}.button--info.button--active,.button--info:active{--ifm-button-background-color:var(--ifm-color-info-darker);--ifm-button-border-color:var(--ifm-color-info-darker)}:where(.button--warning){--ifm-button-background-color:var(--ifm-color-warning);--ifm-button-border-color:var(--ifm-color-warning)}:where(.button--warning):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-warning-dark);--ifm-button-border-color:var(--ifm-color-warning-dark)}.button--warning.button--active,.button--warning:active{--ifm-button-background-color:var(--ifm-color-warning-darker);--ifm-button-border-color:var(--ifm-color-warning-darker)}:where(.button--danger){--ifm-button-background-color:var(--ifm-color-danger);--ifm-button-border-color:var(--ifm-color-danger)}:where(.button--danger):not(.button--outline):hover{--ifm-button-background-color:var(--ifm-color-danger-dark);--ifm-button-border-color:var(--ifm-color-danger-dark)}.button--danger.button--active,.button--danger:active{--ifm-button-background-color:var(--ifm-color-danger-darker);--ifm-button-border-color:var(--ifm-color-danger-darker)}.button-group{display:inline-flex;gap:2px;gap:var(--ifm-button-group-spacing)}.button-group>.button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.button-group>.button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.button-group--block{display:flex;justify-content:stretch}.button-group--block>.button{flex-grow:1}.card{background-color:var(--ifm-card-background-color);border-radius:.8rem;border-radius:var(--ifm-card-border-radius);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-global-shadow-lw);display:flex;flex-direction:column;overflow:hidden}.card__image{padding-top:1rem;padding-top:var(--ifm-card-vertical-spacing)}.card__image:first-child{padding-top:0}.card__body,.card__footer,.card__header{padding:1rem;padding:var(--ifm-card-vertical-spacing) var(--ifm-card-horizontal-spacing)}.card__body:not(:last-child),.card__footer:not(:last-child),.card__header:not(:last-child){padding-bottom:0}.card__body>:last-child,.card__footer>:last-child,.card__header>:last-child{margin-bottom:0}.card__footer{margin-top:auto}.table-of-contents{font-size:.8rem;margin-bottom:0;padding:.5rem 0;padding:var(--ifm-toc-padding-vertical) 0}.table-of-contents,.table-of-contents ul{list-style:none;padding-left:.5rem;padding-left:var(--ifm-toc-padding-horizontal)}.table-of-contents li{margin:.5rem;margin:var(--ifm-toc-padding-vertical) var(--ifm-toc-padding-horizontal)}.table-of-contents__left-border{border-left:1px solid #dadde1;border-left:1px solid var(--ifm-toc-border-color)}.table-of-contents__link{color:#525860;color:var(--ifm-toc-link-color);display:block}.table-of-contents__link--active,.table-of-contents__link--active code,.table-of-contents__link:hover,.table-of-contents__link:hover code{color:#3578e5;color:var(--ifm-color-primary);-webkit-text-decoration:none;text-decoration:none}.close{color:#000;color:var(--ifm-color-black);float:right;font-size:1.5rem;font-weight:700;font-weight:var(--ifm-font-weight-bold);line-height:1;opacity:.5;padding:1rem;transition:opacity .2s cubic-bezier(.08,.52,.52,1);transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.dropdown,.menu{font-weight:500}.close:hover{opacity:.7}.close:focus,.theme-code-block-highlighted-line .codeLineNumber_aMvZ:before{opacity:.8}.dropdown{display:inline-flex;font-weight:var(--ifm-dropdown-font-weight);position:relative;vertical-align:top}.dropdown--hoverable:hover .dropdown__menu,.dropdown--show .dropdown__menu{opacity:1;pointer-events:all;transform:translateY(-1px);visibility:visible}#nprogress,.dropdown__menu,.navbar__item.dropdown .navbar__link:not([href]){pointer-events:none}.dropdown--right .dropdown__menu{left:inherit;right:0}.dropdown--nocaret .navbar__link:after{content:none!important}.dropdown__menu{background-color:#fff;background-color:var(--ifm-dropdown-background-color);border-radius:.4rem;border-radius:var(--ifm-global-radius);box-shadow:0 5px 40px rgba(0,0,0,.2);box-shadow:var(--ifm-global-shadow-md);left:0;max-height:80vh;min-width:10rem;opacity:0;overflow-y:auto;padding:.5rem;position:absolute;top:calc(100% + .05rem);top:calc(100% - var(--ifm-navbar-item-padding-vertical) + .3rem);transform:translateY(-.625rem);transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,transform,visibility;transition-timing-function:cubic-bezier(.08,.52,.52,1);transition-timing-function:var(--ifm-transition-timing-default);visibility:hidden;z-index:100;z-index:var(--ifm-z-index-dropdown)}.dropdown__link{border-radius:.25rem;color:#1c1e21;color:var(--ifm-dropdown-link-color);display:block;font-size:.875rem;margin-top:.2rem;padding:.25rem .5rem;white-space:nowrap}.dropdown__link--active,.dropdown__link:hover{background-color:rgba(0,0,0,.05);background-color:var(--ifm-dropdown-hover-background-color);color:#1c1e21;color:var(--ifm-dropdown-link-color)}.dropdown__link--active,.dropdown__link--active:hover{--ifm-dropdown-link-color:var(--ifm-link-color)}.dropdown>.navbar__link:after{border-color:currentcolor transparent;border-style:solid;border-width:.4em .4em 0;content:"";display:inline-block;margin-left:.3em;position:relative;top:2px;transform:translateY(-50%)}.footer{background-color:#f5f6f7;background-color:var(--ifm-footer-background-color);color:inherit;color:var(--ifm-footer-color);padding:2rem;padding:var(--ifm-footer-padding-vertical) var(--ifm-footer-padding-horizontal)}.footer--dark{--ifm-footer-background-color:#303846;--ifm-footer-color:var(--ifm-footer-link-color);--ifm-footer-link-color:var(--ifm-color-secondary);--ifm-footer-title-color:var(--ifm-color-white)}.footer__links{margin-bottom:1rem}.footer__link-item{color:#606770;color:var(--ifm-footer-link-color);line-height:2}.footer__link-item:hover{color:#3578e5;color:var(--ifm-footer-link-hover-color)}.footer__link-separator{margin:0 .5rem;margin:0 var(--ifm-footer-link-horizontal-spacing)}.footer__logo{margin-top:1rem;max-width:min(30rem,90vw);max-width:var(--ifm-footer-logo-max-width)}.footer__title{color:inherit;color:var(--ifm-footer-title-color);font:700 1rem/1.25 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif,BlinkMacSystemFont,Helvetica,Arial,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font:700 var(--ifm-h4-font-size)/var(--ifm-heading-line-height) var(--ifm-font-family-base);margin-bottom:1rem;margin-bottom:var(--ifm-heading-margin-bottom)}.docItemContainer_gUK8 article>:first-child,.docItemContainer_gUK8 header+*,.footer__item{margin-top:0}.admonitionContent__5gi>:last-child,.collapsibleContent_vBVi p:last-child,.details_XC5U>summary>p:last-child,.footer__items{margin-bottom:0}.codeBlockStandalone_gjRk,[type=checkbox]{padding:0}.hero{align-items:center;background-color:#fff;background-color:var(--ifm-hero-background-color);color:#444950;color:var(--ifm-hero-text-color);display:flex;padding:4rem 2rem}.hero--primary{--ifm-hero-background-color:var(--ifm-color-primary);--ifm-hero-text-color:var(--ifm-font-color-base-inverse)}.hero--dark{--ifm-hero-background-color:#303846;--ifm-hero-text-color:var(--ifm-color-white)}.hero__title{font-size:3rem}.hero__subtitle{font-size:1.5rem}.menu{font-weight:var(--ifm-font-weight-semibold);overflow-x:hidden}.menu__list{margin:0;padding-left:0}.menu__list .menu__list{flex:0 0 100%;margin-top:.25rem;padding-left:.75rem;padding-left:var(--ifm-menu-link-padding-horizontal)}.menu__list-item:not(:first-child){margin-top:.25rem}.menu__list-item--collapsed .menu__list{height:0;overflow:hidden}.menu__caret:before,.menu__link--sublist-caret:after{height:1.25rem;transform:rotate(180deg);width:1.25rem;content:""}.details_XC5U[data-collapsed=false].isBrowser_jVIb>summary:before,.details_XC5U[open]:not(.isBrowser_jVIb)>summary:before,.menu__list-item--collapsed .menu__caret:before,.menu__list-item--collapsed .menu__link--sublist:after{transform:rotate(90deg)}.menu__list-item-collapsible{border-radius:.25rem;display:flex;flex-wrap:wrap;position:relative;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.menu__caret:hover,.menu__link:hover,.menu__list-item-collapsible--active,.menu__list-item-collapsible:hover{background:rgba(0,0,0,.05);background:var(--ifm-menu-color-background-hover)}.menu__list-item-collapsible .menu__link--active,.menu__list-item-collapsible .menu__link:hover{background:none!important}.menu__caret,.menu__link{align-items:center;border-radius:.25rem;display:flex;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.navbar-sidebar,.navbar-sidebar__backdrop{bottom:0;opacity:0;transition-timing-function:ease-in-out;top:0;left:0;visibility:hidden}.menu__link{flex:1;line-height:1.25;padding:.375rem .75rem;padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__link,.menu__link:hover{color:#606770;color:var(--ifm-menu-color)}.menu__link:hover{transition:color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.menu__link--sublist-caret:after{background:url('data:image/svg+xml;utf8,') 50%/2rem 2rem;background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:none;filter:var(--ifm-menu-link-sublist-icon-filter);margin-left:auto;min-width:1.25rem;transition:transform .2s linear;transition:transform var(--ifm-transition-fast) linear}.menu__link--active,.menu__link--active:hover{color:#3578e5;color:var(--ifm-menu-color-active)}.menu__link--active:not(.menu__link--sublist){background-color:rgba(0,0,0,.05);background-color:var(--ifm-menu-color-background-active)}.menu__caret{padding:.375rem .75rem;padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu__caret:before{background:url('data:image/svg+xml;utf8,') 50%/2rem 2rem;background:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem;filter:none;filter:var(--ifm-menu-link-sublist-icon-filter);transition:transform .2s linear;transition:transform var(--ifm-transition-fast) linear}.navbar--dark,html[data-theme=dark]{--ifm-menu-link-sublist-icon-filter:invert(100%) sepia(94%) saturate(17%) hue-rotate(223deg) brightness(104%) contrast(98%)}.navbar{background-color:#fff;background-color:var(--ifm-navbar-background-color);box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-navbar-shadow);height:3.75rem;height:var(--ifm-navbar-height);padding:.5rem 1rem;padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar,.navbar>.container,.navbar>.container-fluid{display:flex}.navbar--fixed-top{position:sticky;top:0;z-index:200;z-index:var(--ifm-z-index-fixed)}.navbar__inner{display:flex;flex-wrap:wrap;justify-content:space-between;width:100%}.navbar__brand{align-items:center;color:#1c1e21;color:var(--ifm-navbar-link-color);display:flex;margin-right:1rem;min-width:0}.navbar__brand:hover{color:#3578e5;color:var(--ifm-navbar-link-hover-color)}.announcementBarContent_uG4Y,.navbar__title{flex:1 1 auto}.navbar__toggle{display:none;margin-right:.5rem}.navbar__logo{flex:0 0 auto;height:2rem;margin-right:.5rem}.navbar__items{align-items:center;display:flex;flex:1;min-width:0}.navbar__items--center{flex:0 0 auto}.navbar__items--center .navbar__brand{margin:0}.navbar__items--center+.navbar__items--right{flex:1}.navbar__items--right{flex:0 0 auto;justify-content:flex-end}.navbar__item{display:inline-block;padding:.25rem .75rem;padding:var(--ifm-navbar-item-padding-vertical) var(--ifm-navbar-item-padding-horizontal)}.navbar__link{color:#1c1e21;color:var(--ifm-navbar-link-color);font-weight:500;font-weight:var(--ifm-font-weight-semibold)}.navbar__link--active,.navbar__link:hover{color:#3578e5;color:var(--ifm-navbar-link-hover-color)}.navbar--dark,.navbar--primary{--ifm-menu-color:var(--ifm-color-gray-300);--ifm-navbar-link-color:var(--ifm-color-gray-100);--ifm-navbar-search-input-background-color:hsla(0,0%,100%,.1);--ifm-navbar-search-input-placeholder-color:hsla(0,0%,100%,.5);color:#fff;color:var(--ifm-color-white)}.navbar--dark{--ifm-navbar-background-color:#242526;--ifm-menu-color-background-active:hsla(0,0%,100%,.05);--ifm-navbar-search-input-color:var(--ifm-color-white)}.navbar--primary{--ifm-navbar-background-color:var(--ifm-color-primary);--ifm-navbar-link-hover-color:var(--ifm-color-white);--ifm-menu-color-active:var(--ifm-color-white);--ifm-navbar-search-input-color:var(--ifm-color-emphasis-500)}.navbar__search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:url('data:image/svg+xml;utf8,') .75rem/1rem 1rem no-repeat #ebedf0;background:var(--ifm-navbar-search-input-background-color) var(--ifm-navbar-search-input-icon) no-repeat .75rem center/1rem 1rem;border:none;border-radius:2rem;color:#444950;color:var(--ifm-navbar-search-input-color);cursor:text;display:inline-block;font-size:1rem;height:2rem;padding:0 .5rem 0 2.25rem;width:12.5rem}.navbar__search-input::-moz-placeholder{color:#bec3c9;color:var(--ifm-navbar-search-input-placeholder-color)}.navbar__search-input::placeholder{color:#bec3c9;color:var(--ifm-navbar-search-input-placeholder-color)}.navbar-sidebar{background-color:#fff;background-color:var(--ifm-navbar-background-color);box-shadow:0 5px 40px rgba(0,0,0,.2);box-shadow:var(--ifm-global-shadow-md);overflow-x:hidden;position:fixed;transform:translate3d(-100%,0,0);transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,visibility,transform;width:83vw;width:var(--ifm-navbar-sidebar-width)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar__items{transform:translateZ(0)}.navbar-sidebar--show .navbar-sidebar,.navbar-sidebar--show .navbar-sidebar__backdrop{opacity:1;visibility:visible}.navbar-sidebar__backdrop{background-color:rgba(0,0,0,.6);position:fixed;right:0;transition-duration:.2s;transition-duration:var(--ifm-transition-fast);transition-property:opacity,visibility}.navbar-sidebar__brand{align-items:center;box-shadow:0 1px 2px 0 rgba(0,0,0,.1);box-shadow:var(--ifm-navbar-shadow);display:flex;flex:1;height:3.75rem;height:var(--ifm-navbar-height);padding:.5rem 1rem;padding:var(--ifm-navbar-padding-vertical) var(--ifm-navbar-padding-horizontal)}.navbar-sidebar__items{display:flex;height:calc(100% - 3.75rem);height:calc(100% - var(--ifm-navbar-height));transition:transform .2s ease-in-out;transition:transform var(--ifm-transition-fast) ease-in-out}.navbar-sidebar__items--show-secondary{transform:translate3d(-83vw,0,0);transform:translate3d(calc((var(--ifm-navbar-sidebar-width))*-1),0,0)}.navbar-sidebar__item{flex-shrink:0;padding:.5rem;width:83vw;width:calc(var(--ifm-navbar-sidebar-width))}.navbar-sidebar__back{background:rgba(0,0,0,.05);background:var(--ifm-menu-color-background-active);font-size:15px;font-weight:700;font-weight:var(--ifm-button-font-weight);margin:0 0 .2rem -.5rem;padding:.6rem 1.5rem;position:relative;text-align:left;top:-.5rem;width:calc(100% + 1rem)}.navbar-sidebar__close{display:flex;margin-left:auto}.pagination{-moz-column-gap:.2em;-moz-column-gap:var(--ifm-pagination-page-spacing);column-gap:.2em;column-gap:var(--ifm-pagination-page-spacing);display:flex;font-size:1rem;font-size:var(--ifm-pagination-font-size);padding-left:0}.pagination--sm{--ifm-pagination-font-size:0.8rem;--ifm-pagination-padding-horizontal:0.8rem;--ifm-pagination-padding-vertical:0.2rem}.pagination--lg{--ifm-pagination-font-size:1.2rem;--ifm-pagination-padding-horizontal:1.2rem;--ifm-pagination-padding-vertical:0.3rem}.pagination__item{display:inline-flex}.pagination__item>span{padding:.25rem;padding:var(--ifm-pagination-padding-vertical)}.pagination__item--active .pagination__link{color:#3578e5;color:var(--ifm-pagination-color-active)}.pagination__item--active .pagination__link,.pagination__item:not(.pagination__item--active):hover .pagination__link{background:rgba(0,0,0,.05);background:var(--ifm-pagination-item-active-background)}.pagination__item--disabled,.pagination__item[disabled]{opacity:.25;pointer-events:none}.pagination__link{border-radius:.4rem;border-radius:var(--ifm-pagination-border-radius);color:#1c1e21;color:var(--ifm-font-color-base);display:inline-block;padding:.25rem 1rem;padding:var(--ifm-pagination-padding-vertical) var(--ifm-pagination-padding-horizontal);transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav{display:grid;grid-gap:1rem;grid-gap:var(--ifm-spacing-horizontal);gap:1rem;gap:var(--ifm-spacing-horizontal);grid-template-columns:repeat(2,1fr)}.pagination-nav__link{border:1px solid #dadde1;border:1px solid var(--ifm-color-emphasis-300);border-radius:.4rem;border-radius:var(--ifm-pagination-nav-border-radius);display:block;height:100%;line-height:1.25;line-height:var(--ifm-heading-line-height);padding:1rem;padding:var(--ifm-global-spacing);transition:border-color .2s cubic-bezier(.08,.52,.52,1);transition:border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.pagination-nav__link:hover{border-color:#3578e5;border-color:var(--ifm-pagination-nav-color-hover)}.pagination-nav__link--next{grid-column:2/3;text-align:right}.pagination-nav__label{font-size:1rem;font-size:var(--ifm-h4-font-size);font-weight:700;font-weight:var(--ifm-heading-font-weight);word-break:break-word}.pagination-nav__link--prev .pagination-nav__label:before{content:"« "}.pagination-nav__link--next .pagination-nav__label:after{content:" »"}.pagination-nav__sublabel{color:#525860;color:var(--ifm-color-content-secondary);font-size:.875rem;font-size:var(--ifm-h5-font-size);font-weight:500;font-weight:var(--ifm-font-weight-semibold);margin-bottom:.25rem}.pills{display:flex;gap:.125rem;gap:var(--ifm-pills-spacing);padding-left:0}.pills__item{border-radius:.5rem;cursor:pointer;display:inline-block;font-weight:700;font-weight:var(--ifm-font-weight-bold);padding:.25rem 1rem;transition:background .2s cubic-bezier(.08,.52,.52,1);transition:background var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs,:not(.containsTaskList_pgAs>li)>.containsTaskList_pgAs{padding-left:0}.pills__item--active{color:#3578e5;color:var(--ifm-pills-color-active)}.pills__item--active,.pills__item:not(.pills__item--active):hover{background:rgba(0,0,0,.05);background:var(--ifm-pills-color-background-active)}.pills--block{justify-content:stretch}.pills--block .pills__item{flex-grow:1;text-align:center}.tabs{color:#525860;color:var(--ifm-tabs-color);display:flex;font-weight:700;font-weight:var(--ifm-font-weight-bold);margin-bottom:0;overflow-x:auto}.tabs__item{border-bottom:3px solid transparent;border-radius:.4rem;border-radius:var(--ifm-global-radius);cursor:pointer;display:inline-flex;padding:1rem;padding:var(--ifm-tabs-padding-vertical) var(--ifm-tabs-padding-horizontal);transition:background-color .2s cubic-bezier(.08,.52,.52,1);transition:background-color var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.tabs__item--active{border-bottom-color:#3578e5;border-bottom-color:var(--ifm-tabs-color-active-border);border-bottom-left-radius:0;border-bottom-right-radius:0;color:#3578e5;color:var(--ifm-tabs-color-active)}.tabs__item:hover{background-color:rgba(0,0,0,.05);background-color:var(--ifm-hover-overlay)}.tabs--block{justify-content:stretch}.tabs--block .tabs__item{flex-grow:1;justify-content:center}html[data-theme=dark]{--ifm-color-scheme:dark;--ifm-color-emphasis-0:var(--ifm-color-gray-1000);--ifm-color-emphasis-100:var(--ifm-color-gray-900);--ifm-color-emphasis-200:var(--ifm-color-gray-800);--ifm-color-emphasis-300:var(--ifm-color-gray-700);--ifm-color-emphasis-400:var(--ifm-color-gray-600);--ifm-color-emphasis-600:var(--ifm-color-gray-400);--ifm-color-emphasis-700:var(--ifm-color-gray-300);--ifm-color-emphasis-800:var(--ifm-color-gray-200);--ifm-color-emphasis-900:var(--ifm-color-gray-100);--ifm-color-emphasis-1000:var(--ifm-color-gray-0);--ifm-background-color:#1b1b1d;--ifm-background-surface-color:#242526;--ifm-hover-overlay:hsla(0,0%,100%,.05);--ifm-color-content:#e3e3e3;--ifm-color-content-secondary:#fff;--ifm-breadcrumb-separator-filter:invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);--ifm-code-background:hsla(0,0%,100%,.1);--ifm-scrollbar-track-background-color:#444;--ifm-scrollbar-thumb-background-color:#686868;--ifm-scrollbar-thumb-hover-background-color:#7a7a7a;--ifm-table-stripe-background:hsla(0,0%,100%,.07);--ifm-toc-border-color:var(--ifm-color-emphasis-200);--ifm-color-primary-contrast-background:#102445;--ifm-color-primary-contrast-foreground:#ebf2fc;--ifm-color-secondary-contrast-background:#474748;--ifm-color-secondary-contrast-foreground:#fdfdfe;--ifm-color-success-contrast-background:#003100;--ifm-color-success-contrast-foreground:#e6f6e6;--ifm-color-info-contrast-background:#193c47;--ifm-color-info-contrast-foreground:#eef9fd;--ifm-color-warning-contrast-background:#4d3800;--ifm-color-warning-contrast-foreground:#fff8e6;--ifm-color-danger-contrast-background:#4b1113;--ifm-color-danger-contrast-foreground:#ffebec}#nprogress .bar{background:var(--docusaurus-progress-bar-color);height:2px;left:0;position:fixed;top:0;width:100%;z-index:1031}#nprogress .peg{box-shadow:0 0 10px var(--docusaurus-progress-bar-color),0 0 5px var(--docusaurus-progress-bar-color);height:100%;opacity:1;position:absolute;right:0;transform:rotate(3deg) translateY(-4px);width:100px}#__docusaurus-base-url-issue-banner-container,.docSidebarContainer_AIvH,.sidebarLogo_bQ7u,.themedComponent_EfZ_,.toggleIcon_IF_c,html[data-announcement-bar-initially-dismissed=true] .announcementBar_kOTg{display:none}.tag__zUQ{border:1px solid var(--docusaurus-tag-list-border);transition:border var(--ifm-transition-fast)}.tag__zUQ:hover{--docusaurus-tag-list-border:var(--ifm-link-color)}.tagRegular_QrVF{border-radius:var(--ifm-global-radius);font-size:90%;padding:.2rem .5rem .3rem}.tagWithCount_JHHL{align-items:center;border-left:0;display:flex;padding:0 .5rem 0 1rem;position:relative}.tagWithCount_JHHL:after,.tagWithCount_JHHL:before{border:1px solid var(--docusaurus-tag-list-border);content:"";position:absolute;top:50%;transition:inherit}.tagWithCount_JHHL:before{border-bottom:0;border-right:0;height:1.18rem;right:100%;transform:translate(50%,-50%) rotate(-45deg);width:1.18rem}.tagWithCount_JHHL:after{border-radius:50%;height:.5rem;left:0;transform:translateY(-50%);width:.5rem}.tagWithCount_JHHL span{background:var(--ifm-color-secondary);border-radius:var(--ifm-global-radius);color:var(--ifm-color-black);font-size:.7rem;line-height:1.2;margin-left:.3rem;padding:.1rem .4rem}.tags_y9FL{display:inline}.tag_LO49{display:inline-block;margin:0 .4rem .5rem 0}.iconEdit_Q3Kh{margin-right:.3em;vertical-align:sub}.lastUpdated_y2i3{font-size:smaller;font-style:italic;margin-top:.2rem}.tocCollapsibleButton__AHn{align-items:center;display:flex;font-size:inherit;justify-content:space-between;padding:.4rem .8rem;width:100%}.tocCollapsibleButton__AHn:after{background:var(--ifm-menu-link-sublist-icon) 50% 50%/2rem 2rem no-repeat;content:"";filter:var(--ifm-menu-link-sublist-icon-filter);height:1.25rem;transform:rotate(180deg);transition:transform var(--ifm-transition-fast);width:1.25rem}.tocCollapsibleButtonExpanded_EKZx:after,.tocCollapsibleExpanded_o46l{transform:none}.tocCollapsible_vaUl{background-color:var(--ifm-menu-color-background-active);border-radius:var(--ifm-global-radius);margin:1rem 0}.tocCollapsibleContent_rU4x>ul{border-left:none;border-top:1px solid var(--ifm-color-emphasis-300);font-size:15px;padding:.2rem 0}.tocCollapsibleContent_rU4x ul li{margin:.4rem .8rem}.tocCollapsibleContent_rU4x a{display:block}.tableOfContents_X45M{max-height:calc(100vh - var(--ifm-navbar-height) - 2rem);overflow-y:auto;position:sticky;top:calc(var(--ifm-navbar-height) + 1rem)}.backToTopButton_J6bC{background-color:var(--ifm-color-emphasis-200);border-radius:50%;bottom:1.3rem;box-shadow:var(--ifm-global-shadow-lw);height:3rem;opacity:0;position:fixed;right:1.3rem;transform:scale(0);transition:all var(--ifm-transition-fast) var(--ifm-transition-timing-default);visibility:hidden;width:3rem;z-index:calc(var(--ifm-z-index-fixed) - 1)}.backToTopButton_J6bC:after{background-color:var(--ifm-color-emphasis-1000);content:" ";display:inline-block;height:100%;-webkit-mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;mask:var(--ifm-menu-link-sublist-icon) 50%/2rem 2rem no-repeat;width:100%}.backToTopButtonShow_d6hM{opacity:1;transform:scale(1);visibility:visible}.skipToContent_hn_G{background-color:var(--ifm-background-surface-color);color:var(--ifm-color-emphasis-900);left:100%;padding:calc(var(--ifm-global-spacing)/2) var(--ifm-global-spacing);position:fixed;top:1rem;z-index:calc(var(--ifm-z-index-fixed) + 1)}.skipToContent_hn_G:focus{box-shadow:var(--ifm-global-shadow-md);left:1rem}.closeButton_aDnp{line-height:0;padding:0}.content_aTb_{font-size:85%;padding:5px 0;text-align:center}.content_aTb_ a{color:inherit;-webkit-text-decoration:underline;text-decoration:underline}.announcementBar_kOTg{align-items:center;background-color:var(--ifm-color-white);border-bottom:1px solid var(--ifm-color-emphasis-100);color:var(--ifm-color-black);display:flex;height:auto;height:var(--docusaurus-announcement-bar-height)}.buttonGroup_wZWc button,.codeBlockContainer_ei_j{background:var(--prism-background-color);color:var(--prism-color)}.announcementBarPlaceholder_Vkrq{flex:0 0 10px}.announcementBarClose_kag2{align-self:stretch;flex:0 0 30px}.toggle_pDN8{height:2rem;width:2rem}.toggleButton__Co1{align-items:center;border-radius:50%;display:flex;height:100%;justify-content:center;transition:background var(--ifm-transition-fast);width:100%}.toggleButton__Co1:hover{background:var(--ifm-color-emphasis-200)}[data-theme-choice=dark] .darkToggleIcon_O_bk,[data-theme-choice=light] .lightToggleIcon_z1QC,[data-theme-choice=system] .systemToggleIcon_SKeC,[data-theme=dark] .themedComponent--dark_UTRq,[data-theme=light] .themedComponent--light_EnZ3,html:not([data-theme]) .themedComponent--light_EnZ3{display:initial}.toggleButtonDisabled_pTNf{cursor:not-allowed}.darkNavbarColorModeToggle_QIye:hover{background:var(--ifm-color-gray-800)}[data-theme=dark]:root{--docusaurus-collapse-button-bg:hsla(0,0%,100%,.05);--docusaurus-collapse-button-bg-hover:hsla(0,0%,100%,.1)}.collapseSidebarButton_tDYz{display:none;margin:0}.categoryLinkLabel_ppUb,.linkLabel_GBZK{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical}.iconExternalLink_yqny{margin-left:.3rem}.linkLabel_GBZK{line-clamp:2;-webkit-line-clamp:2}.categoryLink_RHuM{overflow:hidden}.menu__link--sublist-caret:after{margin-left:var(--ifm-menu-link-padding-vertical)}.categoryLinkLabel_ppUb{flex:1;line-clamp:2;-webkit-line-clamp:2}.docMainContainer_Gcuv,.docRoot_mCS9{display:flex;width:100%}.docsWrapper_tjyD{display:flex;flex:1 0 auto}.hash-link{opacity:0;padding-left:.5rem;transition:opacity var(--ifm-transition-fast);-webkit-user-select:none;-moz-user-select:none;user-select:none}.hash-link:before{content:"#"}.footerLogoLink_OnIh:hover,.hash-link:focus,:hover>.hash-link{opacity:1}.anchorTargetStickyNavbar_zGuS{scroll-margin-top:calc(var(--ifm-navbar-height) + .5rem)}.anchorTargetHideOnScrollNavbar_K8Of{scroll-margin-top:.5rem}.codeBlockContainer_ei_j{border-radius:var(--ifm-code-border-radius);box-shadow:var(--ifm-global-shadow-lw);margin-bottom:var(--ifm-leading)}.codeBlock_NBAy{--ifm-pre-background:var(--prism-background-color);margin:0;padding:0}.codeBlockLines_AQpN{float:left;font:inherit;min-width:100%;padding:var(--ifm-pre-padding)}.codeBlockLinesWithNumbering_jsIC{display:table;padding:var(--ifm-pre-padding) 0}:where(:root){--docusaurus-highlighted-code-line-bg:#484d5b}:where([data-theme=dark]){--docusaurus-highlighted-code-line-bg:#646464}.theme-code-block-highlighted-line{background-color:#484d5b;background-color:var(--docusaurus-highlighted-code-line-bg);display:block;margin:0 calc(var(--ifm-pre-padding)*-1);padding:0 var(--ifm-pre-padding)}.codeLine_EWsE{counter-increment:line-count;display:table-row}.codeLineNumber_aMvZ{background:var(--ifm-pre-background);display:table-cell;left:0;padding:0 var(--ifm-pre-padding);position:sticky;text-align:right;width:1%;word-wrap:normal}.codeLineNumber_aMvZ:before{content:counter(line-count);opacity:.4}.codeLineContent_nU6k{padding-right:var(--ifm-pre-padding)}.theme-code-block:hover .copyButtonCopied_Goav{opacity:1!important}.copyButtonIcons_Tfbm{height:1.125rem;position:relative;width:1.125rem}.copyButtonIcon_VLBc,.copyButtonSuccessIcon_USTC{fill:currentColor;height:inherit;left:0;opacity:inherit;position:absolute;top:0;transition:all var(--ifm-transition-fast) ease;width:inherit}.copyButtonSuccessIcon_USTC{color:#00d600;left:50%;opacity:0;top:50%;transform:translate(-50%,-50%) scale(.33)}.copyButtonCopied_Goav .copyButtonIcon_VLBc{opacity:0;transform:scale(.33)}.copyButtonCopied_Goav .copyButtonSuccessIcon_USTC{opacity:1;transform:translate(-50%,-50%) scale(1);transition-delay:75ms}.wordWrapButtonIcon_gZW2{height:1.2rem;width:1.2rem}.wordWrapButtonEnabled_G6TK .wordWrapButtonIcon_gZW2{color:var(--ifm-color-primary)}.buttonGroup_wZWc{-moz-column-gap:.2rem;column-gap:.2rem;display:flex;position:absolute;right:calc(var(--ifm-pre-padding)/2);top:calc(var(--ifm-pre-padding)/2)}.buttonGroup_wZWc button{align-items:center;border:1px solid var(--ifm-color-emphasis-300);border-radius:var(--ifm-global-radius);display:flex;line-height:0;opacity:0;padding:.4rem;transition:opacity var(--ifm-transition-fast) ease-in-out}.buttonGroup_wZWc button:focus-visible,.buttonGroup_wZWc button:hover{opacity:1!important}.theme-code-block:hover .buttonGroup_wZWc button{opacity:.4}.codeBlockContent_p9UO{border-radius:inherit;direction:ltr;position:relative}.codeBlockTitle_Mi4j{border-bottom:1px solid var(--ifm-color-emphasis-300);border-top-left-radius:inherit;border-top-right-radius:inherit;font-size:var(--ifm-code-font-size);font-weight:500;padding:.75rem var(--ifm-pre-padding)}.codeBlockTitle_Mi4j+.codeBlockContent_p9UO .codeBlock_s9y_{border-top-left-radius:0;border-top-right-radius:0}.details_XC5U{--docusaurus-details-summary-arrow-size:0.38rem;--docusaurus-details-transition:transform 200ms ease;--docusaurus-details-decoration-color:grey}.details_XC5U>summary{cursor:pointer;padding-left:1rem;position:relative}.details_XC5U>summary::-webkit-details-marker{display:none}.details_XC5U>summary:before{border-color:transparent transparent transparent var(--docusaurus-details-decoration-color);border-style:solid;border-width:var(--docusaurus-details-summary-arrow-size);content:"";left:0;position:absolute;top:.45rem;transform:rotate(0);transform-origin:calc(var(--docusaurus-details-summary-arrow-size)/2) 50%;transition:var(--docusaurus-details-transition)}.collapsibleContent_vBVi{border-top:1px solid var(--docusaurus-details-decoration-color);margin-top:1rem;padding-top:1rem}.details_KlpA{--docusaurus-details-decoration-color:var(--ifm-alert-border-color);--docusaurus-details-transition:transform var(--ifm-transition-fast) ease;border:1px solid var(--ifm-alert-border-color);margin:0 0 var(--ifm-spacing-vertical)}.img_KzBV{height:auto}.admonition_Dpr7{margin-bottom:1em}.admonitionHeading_d6Ef{font:var(--ifm-heading-font-weight) var(--ifm-h5-font-size)/var(--ifm-heading-line-height) var(--ifm-heading-font-family)}.admonitionHeading_d6Ef:not(:last-child){margin-bottom:.3rem}.admonitionHeading_d6Ef code{text-transform:none}.admonitionIcon_epaQ{display:inline-block;margin-right:.4em;vertical-align:middle}.admonitionIcon_epaQ svg{display:inline-block;fill:var(--ifm-alert-foreground-color);height:1.6em;width:1.6em}.dropdownNavbarItemMobile_BOJ6{cursor:pointer}.iconLanguage_Ixml{margin-right:5px;vertical-align:text-bottom}.navbarSearchContainer_qQFS:empty{display:none}.navbarHideable_uLUf{transition:transform var(--ifm-transition-fast) ease}.navbarHidden_tObj{transform:translate3d(0,calc(-100% - 2px),0)}.navbar__items--right>:last-child{padding-right:0}.errorBoundaryError_M0dS{color:red;white-space:pre-wrap}.errorBoundaryFallback_ZUBw{color:red;padding:.55rem}.footerLogoLink_OnIh{opacity:.5;transition:opacity var(--ifm-transition-fast) var(--ifm-transition-timing-default)}.mainWrapper_NcQk{display:flex;flex:1 0 auto;flex-direction:column}.docusaurus-mt-lg{margin-top:3rem}#__docusaurus{display:flex;flex-direction:column;min-height:100%}.breadcrumbHomeIcon_ilNI{height:1.1rem;position:relative;top:1px;vertical-align:top;width:1.1rem}.breadcrumbsContainer__5rh{--ifm-breadcrumb-size-multiplier:0.8;margin-bottom:.8rem}@media (min-width:997px){.lastUpdated_y2i3{text-align:right}.tocMobile_CcuZ{display:none}:root{--docusaurus-announcement-bar-height:30px}.announcementBarClose_kag2,.announcementBarPlaceholder_Vkrq{flex-basis:50px}.collapseSidebarButton_tDYz{background-color:transparent;background-color:var(--docusaurus-collapse-button-bg);border:1px solid var(--ifm-toc-border-color);border-radius:0;bottom:0;display:block!important;height:40px;position:sticky}.collapseSidebarButtonIcon_QwEC{margin-top:4px;transform:rotate(180deg)}.expandButtonIcon_S1uq,[dir=rtl] .collapseSidebarButtonIcon_QwEC{transform:rotate(0)}.collapseSidebarButton_tDYz:focus,.collapseSidebarButton_tDYz:hover{background-color:rgba(0,0,0,.1);background-color:var(--docusaurus-collapse-button-bg-hover)}.menuHtmlItem_YuoQ{padding:var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal)}.menu_hz51{flex-grow:1;padding:.5rem}@supports (scrollbar-gutter:stable){.menu_hz51{padding:.5rem 0 .5rem .5rem;scrollbar-gutter:stable}}.menuWithAnnouncementBar_qGbW{margin-bottom:var(--docusaurus-announcement-bar-height)}.sidebar_TbVu{display:flex;flex-direction:column;height:100%;padding-top:var(--ifm-navbar-height);width:var(--doc-sidebar-width)}.sidebarWithHideableNavbar_ZSda{padding-top:0}.sidebarHidden_ZLUF{opacity:0;visibility:hidden}.sidebarLogo_bQ7u{align-items:center;color:inherit!important;display:flex!important;margin:0 var(--ifm-navbar-padding-horizontal);max-height:var(--ifm-navbar-height);min-height:var(--ifm-navbar-height);-webkit-text-decoration:none!important;text-decoration:none!important}.sidebarLogo_bQ7u img{height:2rem;margin-right:.5rem}.expandButton_Lgp_{align-items:center;background-color:var(--docusaurus-collapse-button-bg);display:flex;height:100%;justify-content:center;position:absolute;right:0;top:0;transition:background-color var(--ifm-transition-fast) ease;width:100%}.expandButton_Lgp_:focus,.expandButton_Lgp_:hover{background-color:var(--docusaurus-collapse-button-bg-hover)}[dir=rtl] .expandButtonIcon_S1uq{transform:rotate(180deg)}.docSidebarContainer_AIvH{border-right:1px solid var(--ifm-toc-border-color);clip-path:inset(0);display:block;margin-top:calc(var(--ifm-navbar-height)*-1);transition:width var(--ifm-transition-fast) ease;width:300px;width:var(--doc-sidebar-width);will-change:width}.docSidebarContainerHidden_aHtu{cursor:pointer;width:30px;width:var(--doc-sidebar-hidden-width)}.sidebarViewport_v5_F{height:100%;max-height:100vh;position:sticky;top:0}.docMainContainer_Gcuv{flex-grow:1;max-width:calc(100% - var(--doc-sidebar-width))}.docMainContainerEnhanced_siVg{max-width:calc(100% - var(--doc-sidebar-hidden-width))}.docItemWrapperEnhanced_tjkM{max-width:calc(var(--ifm-container-width) + var(--doc-sidebar-width))!important}.navbarSearchContainer_qQFS{padding:0 var(--ifm-navbar-item-padding-horizontal)}.docItemCol_SLVn{max-width:75%!important}}@media (min-width:1440px){.container{max-width:1320px;max-width:var(--ifm-container-width-xl)}}@media (max-width:996px){.col{--ifm-col-width:100%;flex-basis:100%;flex-basis:var(--ifm-col-width);margin-left:0}.footer{--ifm-footer-padding-horizontal:0}.colorModeToggle_WR5U,.footer__link-separator,.navbar__item,.tableOfContents_X45M{display:none}.footer__col{margin-bottom:3rem;margin-bottom:calc(var(--ifm-spacing-vertical)*3)}.footer__link-item{display:block;width:-moz-max-content;width:max-content}.hero{padding-left:0;padding-right:0}.navbar>.container,.navbar>.container-fluid{padding:0}.navbar__toggle{display:inherit}.navbar__search-input{width:9rem}.pills--block,.tabs--block{flex-direction:column}.docItemContainer_Rhht{padding:0 .3rem}.navbarSearchContainer_qQFS{position:absolute;right:var(--ifm-navbar-padding-horizontal)}}@media (max-width:576px){.markdown h1:first-child{--ifm-h1-font-size:2rem}.markdown>h2{--ifm-h2-font-size:1.5rem}.markdown>h3{--ifm-h3-font-size:1.25rem}}@media (hover:hover){.backToTopButton_J6bC:hover{background-color:var(--ifm-color-emphasis-300)}}@media (pointer:fine){.thin-scrollbar{scrollbar-width:thin}.thin-scrollbar::-webkit-scrollbar{height:7px;height:var(--ifm-scrollbar-size);width:7px;width:var(--ifm-scrollbar-size)}.thin-scrollbar::-webkit-scrollbar-track{background:#f1f1f1;background:var(--ifm-scrollbar-track-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb{background:silver;background:var(--ifm-scrollbar-thumb-background-color);border-radius:10px}.thin-scrollbar::-webkit-scrollbar-thumb:hover{background:#a7a7a7;background:var(--ifm-scrollbar-thumb-hover-background-color)}}@media (prefers-reduced-motion:reduce){:root{--ifm-transition-fast:0ms;--ifm-transition-slow:0ms}}@media print{.announcementBar_kOTg,.footer,.menu,.navbar,.noPrint_MdEK,.pagination-nav,.table-of-contents,.tocMobile_CcuZ{display:none}.tabs{page-break-inside:avoid}.codeBlockLines_AQpN{white-space:pre-wrap}} \ No newline at end of file diff --git a/assets/js/009f1e98.4381c598.js b/assets/js/009f1e98.4381c598.js deleted file mode 100644 index cc6c26a..0000000 --- a/assets/js/009f1e98.4381c598.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7715],{3511(e,t,n){n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>a,frontMatter:()=>s,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","source":"@site/docs/getting-started/configuration.md","sourceDirName":"getting-started","slug":"/getting-started/configuration","permalink":"/getting-started/configuration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Authentication","permalink":"/getting-started/authentication"},"next":{"title":"Dashboard","permalink":"/getting-started/dashboard"}}');var d=n(4848),i=n(8453);const s={},c="Configuration",o={},l=[{value:"Environment variables",id:"environment-variables",level:2},{value:"Example .env",id:"example-env",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t.header,{children:(0,d.jsx)(t.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,d.jsxs)(t.p,{children:["HappyView is configured via environment variables. A ",(0,d.jsx)(t.code,{children:".env"})," file in the project root is loaded automatically on startup. See ",(0,d.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Deployment"})," for local setup or ",(0,d.jsx)(t.a,{href:"/reference/production-deployment",children:"Production Deployment"})," for production setup."]}),"\n",(0,d.jsx)(t.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Variable"}),(0,d.jsx)(t.th,{children:"Required"}),(0,d.jsx)(t.th,{children:"Default"}),(0,d.jsx)(t.th,{children:"Description"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"DATABASE_URL"})}),(0,d.jsx)(t.td,{children:"yes"}),(0,d.jsx)(t.td,{children:"---"}),(0,d.jsx)(t.td,{children:"Postgres connection string"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"AIP_URL"})}),(0,d.jsx)(t.td,{children:"yes"}),(0,d.jsx)(t.td,{children:"---"}),(0,d.jsxs)(t.td,{children:[(0,d.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance URL for OAuth token validation"]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"HOST"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"0.0.0.0"})}),(0,d.jsx)(t.td,{children:"Bind host"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"PORT"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"3000"})}),(0,d.jsx)(t.td,{children:"Bind port"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"TAP_URL"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"http://localhost:2480"})}),(0,d.jsxs)(t.td,{children:[(0,d.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance URL for real-time record streaming and backfill"]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:"---"}),(0,d.jsx)(t.td,{children:"Shared secret for authenticating with Tap's admin endpoints"})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"RELAY_URL"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"https://bsky.network"})}),(0,d.jsxs)(t.td,{children:["Relay URL for ",(0,d.jsx)(t.a,{href:"/guides/backfill",children:"backfill"})," repo discovery"]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"PLC_URL"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"https://plc.directory"})}),(0,d.jsxs)(t.td,{children:[(0,d.jsx)(t.a,{href:"https://github.com/did-method-plc/did-method-plc",children:"PLC directory"})," URL for DID resolution"]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"EVENT_LOG_RETENTION_DAYS"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"30"})}),(0,d.jsxs)(t.td,{children:["Number of days to keep event logs before automatic cleanup. Set to ",(0,d.jsx)(t.code,{children:"0"})," to disable cleanup"]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"RUST_LOG"})}),(0,d.jsx)(t.td,{children:"no"}),(0,d.jsx)(t.td,{children:(0,d.jsx)(t.code,{children:"happyview=debug,tower_http=debug"})}),(0,d.jsxs)(t.td,{children:["Log filter (uses ",(0,d.jsx)(t.code,{children:"tracing_subscriber::EnvFilter"}),")"]})]})]})]}),"\n",(0,d.jsxs)(t.h2,{id:"example-env",children:["Example ",(0,d.jsx)(t.code,{children:".env"})]}),"\n",(0,d.jsx)(t.pre,{children:(0,d.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\n\n# Optional overrides\n# HOST=0.0.0.0\n# PORT=3000\n# TAP_URL=http://localhost:2480\n# TAP_ADMIN_PASSWORD=your-secret-here\n# RELAY_URL=https://bsky.network\n# PLC_URL=https://plc.directory\n# EVENT_LOG_RETENTION_DAYS=30\n# RUST_LOG=happyview=debug,tower_http=debug\n"})})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,d.jsx)(t,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}},8453(e,t,n){n.d(t,{R:()=>s,x:()=>c});var r=n(6540);const d={},i=r.createContext(d);function s(e){const t=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:s(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/009f1e98.79c081e2.js b/assets/js/009f1e98.79c081e2.js new file mode 100644 index 0000000..acd723a --- /dev/null +++ b/assets/js/009f1e98.79c081e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7715],{1823:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>a,frontMatter:()=>i,metadata:()=>d,toc:()=>l});const d=JSON.parse('{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","source":"@site/docs/getting-started/configuration.md","sourceDirName":"getting-started","slug":"/getting-started/configuration","permalink":"/getting-started/configuration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Production","permalink":"/reference/production-deployment"},"next":{"title":"Authentication","permalink":"/getting-started/authentication"}}');var r=n(199),s=n(2560);const i={},c="Configuration",o={},l=[{value:"Environment variables",id:"environment-variables",level:2},{value:"Example .env",id:"example-env",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,r.jsxs)(t.p,{children:["HappyView is configured via environment variables. A ",(0,r.jsx)(t.code,{children:".env"})," file in the project root is loaded automatically on startup. See ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Deployment"})," for local setup or ",(0,r.jsx)(t.a,{href:"/reference/production-deployment",children:"Production Deployment"})," for production setup."]}),"\n",(0,r.jsx)(t.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Variable"}),(0,r.jsx)(t.th,{children:"Required"}),(0,r.jsx)(t.th,{children:"Default"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"DATABASE_URL"})}),(0,r.jsx)(t.td,{children:"yes"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsxs)(t.td,{children:["Database connection string. SQLite (",(0,r.jsx)(t.code,{children:"sqlite://path/to/db?mode=rwc"}),") or Postgres (",(0,r.jsx)(t.code,{children:"postgres://user:pass@host/db"}),")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"DATABASE_BACKEND"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"auto-detected"}),(0,r.jsxs)(t.td,{children:["Force ",(0,r.jsx)(t.code,{children:"sqlite"})," or ",(0,r.jsx)(t.code,{children:"postgres"}),". Auto-detected from ",(0,r.jsx)(t.code,{children:"DATABASE_URL"})," scheme if not set"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"PUBLIC_URL"})}),(0,r.jsx)(t.td,{children:"yes"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsxs)(t.td,{children:["Public-facing URL for HappyView (used for OAuth callbacks, e.g. ",(0,r.jsx)(t.code,{children:"https://happyview.example.com"}),")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"SESSION_SECRET"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"dev default"}),(0,r.jsxs)(t.td,{children:["Secret key for signing session cookies (at least 64 characters). ",(0,r.jsx)(t.strong,{children:"Must be set in production"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"HOST"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"0.0.0.0"})}),(0,r.jsx)(t.td,{children:"Bind host"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"PORT"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"3000"})}),(0,r.jsx)(t.td,{children:"Bind port"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"JETSTREAM_URL"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"wss://jetstream1.us-east.bsky.network"})}),(0,r.jsx)(t.td,{children:"Jetstream WebSocket URL for real-time record streaming"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"RELAY_URL"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"https://bsky.network"})}),(0,r.jsxs)(t.td,{children:["Relay URL for ",(0,r.jsx)(t.a,{href:"/guides/backfill",children:"backfill"})," repo discovery"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"PLC_URL"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"https://plc.directory"})}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.a,{href:"https://github.com/did-method-plc/did-method-plc",children:"PLC directory"})," URL for DID resolution"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"STATIC_DIR"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"./web/out"})}),(0,r.jsx)(t.td,{children:"Directory containing the built dashboard static assets"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"EVENT_LOG_RETENTION_DAYS"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"30"})}),(0,r.jsxs)(t.td,{children:["Number of days to keep event logs before automatic cleanup. Set to ",(0,r.jsx)(t.code,{children:"0"})," to disable cleanup"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"TOKEN_ENCRYPTION_KEY"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsxs)(t.td,{children:["Base64-encoded 32-byte key for encrypting stored OAuth tokens. ",(0,r.jsx)(t.strong,{children:"Strongly recommended in production"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"DEFAULT_RATE_LIMIT_CAPACITY"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"100"})}),(0,r.jsx)(t.td,{children:"Default token bucket capacity used when registering a new API client"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"DEFAULT_RATE_LIMIT_REFILL_RATE"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"2.0"})}),(0,r.jsx)(t.td,{children:"Default token bucket refill rate (tokens/second) for new API clients"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"RUST_LOG"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"happyview=debug,tower_http=debug"})}),(0,r.jsxs)(t.td,{children:["Log filter (uses ",(0,r.jsx)(t.code,{children:"tracing_subscriber::EnvFilter"}),")"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"APP_NAME"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsx)(t.td,{children:"Application name shown on OAuth authorization screens. Overridden by database setting if set via admin API"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"LOGO_URI"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsx)(t.td,{children:"URL to application logo for OAuth screens. Overridden by database setting or logo upload"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"TOS_URI"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsx)(t.td,{children:"URL to terms of service. Overridden by database setting if set via admin API"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"POLICY_URI"})}),(0,r.jsx)(t.td,{children:"no"}),(0,r.jsx)(t.td,{children:"---"}),(0,r.jsx)(t.td,{children:"URL to privacy policy. Overridden by database setting if set via admin API"})]})]})]}),"\n",(0,r.jsxs)(t.h2,{id:"example-env",children:["Example ",(0,r.jsx)(t.code,{children:".env"})]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"# SQLite (default \u2014 zero setup required)\nDATABASE_URL=sqlite://data/happyview.db?mode=rwc\nPUBLIC_URL=http://localhost:3000\nSESSION_SECRET=change-me-in-production\n\n# Or use Postgres instead:\n# DATABASE_URL=postgres://happyview:happyview@localhost/happyview\n\n# Optional overrides\n# HOST=0.0.0.0\n# PORT=3000\n# JETSTREAM_URL=wss://jetstream1.us-east.bsky.network\n# RELAY_URL=https://bsky.network\n# PLC_URL=https://plc.directory\n# STATIC_DIR=./web/out\n# EVENT_LOG_RETENTION_DAYS=30\n# TOKEN_ENCRYPTION_KEY=base64-encoded-32-byte-key\n# DEFAULT_RATE_LIMIT_CAPACITY=100\n# DEFAULT_RATE_LIMIT_REFILL_RATE=2.0\n# RUST_LOG=happyview=debug,tower_http=debug\n# APP_NAME=My App\n# LOGO_URI=https://example.com/logo.png\n# TOS_URI=https://example.com/tos\n# POLICY_URI=https://example.com/privacy\n"})}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/getting-started/authentication",children:"Authentication"})," \u2014 set up OAuth and admin users"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/getting-started/dashboard",children:"Dashboard"})," \u2014 explore the admin dashboard"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/production-deployment",children:"Production deployment"})," \u2014 deploy HappyView to production"]}),"\n"]})]})}function a(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},2560:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>c});var d=n(63);const r={},s=d.createContext(r);function i(e){const t=d.useContext(s);return d.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),d.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0510ba17.e5e327f0.js b/assets/js/0510ba17.e5e327f0.js new file mode 100644 index 0000000..4856da0 --- /dev/null +++ b/assets/js/0510ba17.e5e327f0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3334],{8626:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"reference/admin/users","title":"Admin API: Users","description":"Manage admin users and their permissions. See the Permissions guide for available permissions and templates.","source":"@site/docs/reference/admin/users.md","sourceDirName":"reference/admin","slug":"/reference/admin/users","permalink":"/reference/admin/users","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"API Keys","permalink":"/reference/admin/api-keys"},"next":{"title":"Labelers","permalink":"/reference/admin/labelers"}}');var d=r(199),i=r(2560);const t={},c="Admin API: Users",l={},a=[{value:"Create a user",id:"create-a-user",level:2},{value:"List users",id:"list-users",level:2},{value:"Get a user",id:"get-a-user",level:2},{value:"Update user permissions",id:"update-user-permissions",level:2},{value:"Transfer super user",id:"transfer-super-user",level:2},{value:"Delete a user",id:"delete-a-user",level:2}];function o(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.header,{children:(0,d.jsx)(s.h1,{id:"admin-api-users",children:"Admin API: Users"})}),"\n",(0,d.jsxs)(s.p,{children:["Manage admin users and their permissions. See the ",(0,d.jsx)(s.a,{href:"/guides/permissions",children:"Permissions guide"})," for available permissions and templates."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(s.h2,{id:"create-a-user",children:"Create a user"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"POST /admin/users\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"users:create"})," permission. You cannot grant permissions you don't have yourself (escalation guard)."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/users \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "did": "did:plc:newuser",\n "template": "operator"\n }\'\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"did"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"yes"}),(0,d.jsx)(s.td,{children:"The atproto DID of the user to add"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"template"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"no"}),(0,d.jsxs)(s.td,{children:["Permission template: ",(0,d.jsx)(s.code,{children:"viewer"}),", ",(0,d.jsx)(s.code,{children:"operator"}),", ",(0,d.jsx)(s.code,{children:"manager"}),", or ",(0,d.jsx)(s.code,{children:"full_access"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"permissions"})}),(0,d.jsx)(s.td,{children:"string[]"}),(0,d.jsx)(s.td,{children:"no"}),(0,d.jsxs)(s.td,{children:["Explicit list of permissions to grant (used instead of or in addition to ",(0,d.jsx)(s.code,{children:"template"}),")"]})]})]})]}),"\n",(0,d.jsxs)(s.p,{children:["If neither ",(0,d.jsx)(s.code,{children:"template"})," nor ",(0,d.jsx)(s.code,{children:"permissions"})," is provided, the user is created with no permissions."]}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:newuser",\n "is_super": false,\n "permissions": ["lexicons:read", "records:read", "script-variables:read", "users:read", "api-keys:read", "api-keys:create", "api-keys:delete", "backfill:read", "backfill:create", "stats:read", "events:read"]\n}\n'})}),"\n",(0,d.jsx)(s.h2,{id:"list-users",children:"List users"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"GET /admin/users\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"users:read"})," permission."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl http://localhost:3000/admin/users -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:admin",\n "is_super": true,\n "permissions": ["lexicons:create", "lexicons:read", "lexicons:delete", "records:read", "records:delete", "records:delete-collection", "script-variables:create", "script-variables:read", "script-variables:delete", "users:create", "users:read", "users:update", "users:delete", "api-keys:create", "api-keys:read", "api-keys:delete", "backfill:create", "backfill:read", "stats:read", "events:read"],\n "created_at": "2025-01-01T00:00:00Z",\n "last_used_at": "2025-01-02T12:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(s.h2,{id:"get-a-user",children:"Get a user"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"GET /admin/users/{id}\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"users:read"})," permission."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000 -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})," with the same shape as a single item from the list response."]}),"\n",(0,d.jsx)(s.h2,{id:"update-user-permissions",children:"Update user permissions"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"PATCH /admin/users/{id}/permissions\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"users:update"})," permission. You cannot grant permissions you don't have yourself, and you cannot modify the super user's permissions."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X PATCH http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000/permissions \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "grant": ["lexicons:create", "lexicons:delete"],\n "revoke": ["records:delete"]\n }\'\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"grant"})}),(0,d.jsx)(s.td,{children:"string[]"}),(0,d.jsx)(s.td,{children:"no"}),(0,d.jsx)(s.td,{children:"Permissions to add"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"revoke"})}),(0,d.jsx)(s.td,{children:"string[]"}),(0,d.jsx)(s.td,{children:"no"}),(0,d.jsx)(s.td,{children:"Permissions to remove"})]})]})]}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})," with the updated user object."]}),"\n",(0,d.jsx)(s.h2,{id:"transfer-super-user",children:"Transfer super user"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"POST /admin/users/transfer-super\n"})}),"\n",(0,d.jsx)(s.p,{children:"Only the current super user can call this endpoint. Transfers super user status to another existing user."}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/users/transfer-super \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "target_user_id": "550e8400-e29b-41d4-a716-446655440000" }\'\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"target_user_id"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"yes"}),(0,d.jsx)(s.td,{children:"The ID of the user to receive super status"})]})})]}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(s.h2,{id:"delete-a-user",children:"Delete a user"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"DELETE /admin/users/{id}\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"users:delete"})," permission. You cannot delete the super user or yourself."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},2560:(e,s,r)=>{r.d(s,{R:()=>t,x:()=>c});var n=r(63);const d={},i=n.createContext(d);function t(e){const s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/09c1314d.df6dc576.js b/assets/js/09c1314d.df6dc576.js new file mode 100644 index 0000000..a60c07a --- /dev/null +++ b/assets/js/09c1314d.df6dc576.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6590],{2959:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>o});const i=JSON.parse('{"id":"reference/admin/lexicons","title":"Admin API: Lexicons","description":"Manage lexicons and network lexicons. See the Lexicons guide for background on how lexicons drive indexing and XRPC routing.","source":"@site/docs/reference/admin/lexicons.md","sourceDirName":"reference/admin","slug":"/reference/admin/lexicons","permalink":"/reference/admin/lexicons","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Overview","permalink":"/reference/admin-api"},"next":{"title":"Stats","permalink":"/reference/admin/stats"}}');var r=s(199),c=s(2560);const t={},d="Admin API: Lexicons",l={},o=[{value:"Upload / upsert a lexicon",id:"upload--upsert-a-lexicon",level:2},{value:"List lexicons",id:"list-lexicons",level:2},{value:"Get a lexicon",id:"get-a-lexicon",level:2},{value:"Delete a lexicon",id:"delete-a-lexicon",level:2},{value:"Network Lexicons",id:"network-lexicons",level:2},{value:"Add a network lexicon",id:"add-a-network-lexicon",level:3},{value:"List network lexicons",id:"list-network-lexicons",level:3},{value:"Remove a network lexicon",id:"remove-a-network-lexicon",level:3}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"admin-api-lexicons",children:"Admin API: Lexicons"})}),"\n",(0,r.jsxs)(n.p,{children:["Manage lexicons and network lexicons. See the ",(0,r.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons guide"})," for background on how lexicons drive indexing and XRPC routing."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"upload--upsert-a-lexicon",children:"Upload / upsert a lexicon"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/lexicons\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },\n "backfill": true,\n "target_collection": null\n }\'\n'})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"lexicon_json"})}),(0,r.jsx)(n.td,{children:"object"}),(0,r.jsx)(n.td,{children:"yes"}),(0,r.jsxs)(n.td,{children:["Raw lexicon JSON (must have ",(0,r.jsx)(n.code,{children:"lexicon: 1"})," and ",(0,r.jsx)(n.code,{children:"id"}),")"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"backfill"})}),(0,r.jsx)(n.td,{children:"boolean"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsxs)(n.td,{children:["Whether uploading triggers historical backfill (default ",(0,r.jsx)(n.code,{children:"true"}),")"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"target_collection"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"script"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsx)(n.td,{children:"Lua script for query/procedure endpoints"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"index_hook"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.a,{href:"/guides/index-hooks",children:"Index hook"})," Lua script for record lexicons"]})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"201 Created"})," (new) or ",(0,r.jsx)(n.code,{children:"200 OK"})," (upsert)"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": "xyz.statusphere.status",\n "revision": 1\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"list-lexicons",children:"List lexicons"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/lexicons\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "xyz.statusphere.status",\n "revision": 1,\n "lexicon_type": "record",\n "backfill": true,\n "created_at": "2025-01-01T00:00:00Z",\n "updated_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,r.jsx)(n.h2,{id:"get-a-lexicon",children:"Get a lexicon"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/lexicons/{id}\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})," with full lexicon details including raw JSON."]}),"\n",(0,r.jsx)(n.h2,{id:"delete-a-lexicon",children:"Delete a lexicon"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DELETE /admin/lexicons/{id}\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,r.jsx)(n.h2,{id:"network-lexicons",children:"Network Lexicons"}),"\n",(0,r.jsxs)(n.p,{children:["Network lexicons are fetched from the atproto network via DNS TXT resolution and kept updated via the Jetstream subscription. See ",(0,r.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for background."]}),"\n",(0,r.jsx)(n.h3,{id:"add-a-network-lexicon",children:"Add a network lexicon"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/network-lexicons\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "nsid": "xyz.statusphere.status",\n "target_collection": null\n }\'\n'})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"nsid"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"yes"}),(0,r.jsx)(n.td,{children:"The NSID of the lexicon to watch"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"target_collection"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "revision": 1\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"list-network-lexicons",children:"List network lexicons"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/network-lexicons\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/network-lexicons -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n {\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "target_collection": null,\n "last_fetched_at": "2025-01-01T00:00:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,r.jsx)(n.h3,{id:"remove-a-network-lexicon",children:"Remove a network lexicon"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DELETE /admin/network-lexicons/{nsid}\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \\\n -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Removes the network lexicon tracking and also deletes the lexicon from the ",(0,r.jsx)(n.code,{children:"lexicons"})," table and in-memory registry."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var i=s(63);const r={},c=i.createContext(r);function t(e){const n=i.useContext(c);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0a7e20de.0ed755f3.js b/assets/js/0a7e20de.0ed755f3.js new file mode 100644 index 0000000..b0ebd57 --- /dev/null +++ b/assets/js/0a7e20de.0ed755f3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5309],{2969:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>t,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"reference/lua/json-api","title":"JSON API","description":"The json global provides JSON serialization and deserialization. Available in queries, procedures, and index hooks.","source":"@site/docs/reference/lua/json-api.md","sourceDirName":"reference/lua","slug":"/reference/lua/json-api","permalink":"/reference/lua/json-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"atproto API","permalink":"/reference/lua/atproto-api"},"next":{"title":"Utility Globals","permalink":"/reference/lua/utility-globals"}}');var r=o(199),a=o(2560);const t={},i="JSON API",l={},c=[{value:"json.encode",id:"jsonencode",level:2},{value:"json.decode",id:"jsondecode",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"json-api",children:"JSON API"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"json"})," global provides JSON serialization and deserialization. Available in queries, procedures, and ",(0,r.jsx)(n.a,{href:"/guides/index-hooks",children:"index hooks"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"jsonencode",children:"json.encode"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:'local str = json.encode({ key = "value", items = { 1, 2, 3 } })\n-- \'{"key":"value","items":[1,2,3]}\'\n'})}),"\n",(0,r.jsx)(n.p,{children:"Converts a Lua table to a JSON string."}),"\n",(0,r.jsx)(n.h2,{id:"jsondecode",children:"json.decode"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-lua",children:'local tbl = json.decode(\'{"key": "value"}\')\n-- tbl.key == "value"\n'})}),"\n",(0,r.jsx)(n.p,{children:"Parses a JSON string into a Lua table. Returns an error if the input is not valid JSON."})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},2560:(e,n,o)=>{o.d(n,{R:()=>t,x:()=>i});var s=o(63);const r={},a=s.createContext(r);function t(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0eda1588.4f831c59.js b/assets/js/0eda1588.4f831c59.js new file mode 100644 index 0000000..92352b3 --- /dev/null +++ b/assets/js/0eda1588.4f831c59.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9329],{7045:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/admin/stats","title":"Admin API: Stats","description":"Record counts","source":"@site/docs/reference/admin/stats.md","sourceDirName":"reference/admin","slug":"/reference/admin/stats","permalink":"/reference/admin/stats","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lexicons","permalink":"/reference/admin/lexicons"},"next":{"title":"Backfill","permalink":"/reference/admin/backfill"}}');var r=t(199),c=t(2560);const o={},a="Admin API: Stats",i={},d=[{value:"Record counts",id:"record-counts",level:2}];function l(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"admin-api-stats",children:"Admin API: Stats"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"record-counts",children:"Record counts"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/stats\n"})}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "total_records": 12345,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(63);const r={},c=s.createContext(r);function o(e){const n=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/111eee19.94292821.js b/assets/js/111eee19.94292821.js deleted file mode 100644 index b45dd87..0000000 --- a/assets/js/111eee19.94292821.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8779],{9071(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","source":"@site/docs/reference/troubleshooting.md","sourceDirName":"reference","slug":"/reference/troubleshooting","permalink":"/reference/troubleshooting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Architecture","permalink":"/reference/architecture"},"next":{"title":"Production","permalink":"/reference/production-deployment"}}');var i=r(4848),o=r(8453);const t={},c="Troubleshooting",l={},d=[{value:"XRPC endpoint returns 404",id:"xrpc-endpoint-returns-404",level:2},{value:"Queries return empty results",id:"queries-return-empty-results",level:2},{value:"Procedure returns 401 Unauthorized",id:"procedure-returns-401-unauthorized",level:2},{value:"Admin endpoints return 403 Forbidden",id:"admin-endpoints-return-403-forbidden",level:2},{value:"Lua script errors",id:"lua-script-errors",level:2},{value:"Backfill job stuck in "pending" or "running"",id:"backfill-job-stuck-in-pending-or-running",level:2},{value:"Records not appearing in real time",id:"records-not-appearing-in-real-time",level:2},{value:"OAuth or login issues",id:"oauth-or-login-issues",level:2},{value:"Database connection errors",id:"database-connection-errors",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"troubleshooting",children:"Troubleshooting"})}),"\n",(0,i.jsx)(n.p,{children:"Common issues and how to resolve them."}),"\n",(0,i.jsx)(n.h2,{id:"xrpc-endpoint-returns-404",children:"XRPC endpoint returns 404"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"GET /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "method not found"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The lexicon hasn't been uploaded yet. Check with ",(0,i.jsx)(n.code,{children:"GET /admin/lexicons"})," or the ",(0,i.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The lexicon's ",(0,i.jsx)(n.code,{children:"defs.main.type"})," doesn't match the HTTP method. Queries are ",(0,i.jsx)(n.code,{children:"GET"}),", procedures are ",(0,i.jsx)(n.code,{children:"POST"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The NSID in the URL doesn't match the ",(0,i.jsx)(n.code,{children:"id"})," field in the uploaded lexicon JSON."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"queries-return-empty-results",children:"Queries return empty results"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": The XRPC query endpoint returns ",(0,i.jsx)(n.code,{children:'{"records": []}'})," even though records should exist."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The query lexicon is missing a ",(0,i.jsx)(n.code,{children:"target_collection"}),". Without it, the query doesn't know which records to read. See ",(0,i.jsx)(n.a,{href:"/guides/lexicons#target-collection",children:"Lexicons - target_collection"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The record-type lexicon hasn't finished backfilling. Check backfill status with ",(0,i.jsx)(n.code,{children:"GET /admin/backfill/status"})," or the dashboard."]}),"\n",(0,i.jsxs)(n.li,{children:["Records exist on the network but HappyView hasn't indexed them yet. Tap only picks up new events from when the collection filter was added. Use ",(0,i.jsx)(n.a,{href:"/guides/backfill",children:"backfill"})," for historical records."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"procedure-returns-401-unauthorized",children:"Procedure returns 401 Unauthorized"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"POST /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "..."}'})," with status 401."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.code,{children:"Authorization: Bearer "})," header is missing or malformed."]}),"\n",(0,i.jsxs)(n.li,{children:["The token has expired or is invalid. Tokens are validated against AIP's ",(0,i.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint."]}),"\n",(0,i.jsxs)(n.li,{children:["AIP is unreachable. Check that ",(0,i.jsx)(n.code,{children:"AIP_URL"})," is set correctly and the AIP service is running."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For AIP-specific issues, see the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"admin-endpoints-return-403-forbidden",children:"Admin endpoints return 403 Forbidden"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": Admin API calls return ",(0,i.jsx)(n.code,{children:'{"error": "forbidden"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Your DID is not in the admins table. Ask an existing admin to add you via ",(0,i.jsx)(n.code,{children:"POST /admin/admins"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"If this is a fresh deployment with no admins, the first authenticated request to any admin endpoint automatically bootstraps you as admin. Make sure you're sending a valid Bearer token."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": An XRPC endpoint returns ",(0,i.jsx)(n.code,{children:'{"error": "script execution failed"}'})," or ",(0,i.jsx)(n.code,{children:'{"error": "script exceeded execution time limit"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"What to do"}),":"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Check the server logs: the full error message is logged at error level but not exposed to the client."}),"\n",(0,i.jsxs)(n.li,{children:["Use ",(0,i.jsx)(n.code,{children:'log("message")'})," in your script to trace execution. Output appears in server logs at debug level (requires ",(0,i.jsx)(n.code,{children:"RUST_LOG"})," to include debug)."]}),"\n",(0,i.jsxs)(n.li,{children:["If you hit the execution limit, your script likely has an infinite loop or is processing too much data. See ",(0,i.jsx)(n.a,{href:"/guides/scripting#sandbox",children:"Lua Scripting - Sandbox"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for more."]}),"\n",(0,i.jsx)(n.h2,{id:"backfill-job-stuck-in-pending-or-running",children:'Backfill job stuck in "pending" or "running"'}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": A backfill job doesn't progress or stays in ",(0,i.jsx)(n.code,{children:"pending"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The backfill worker processes one job at a time. If another job is running, yours will wait."}),"\n",(0,i.jsxs)(n.li,{children:["The relay (",(0,i.jsx)(n.code,{children:"RELAY_URL"}),") may be unreachable or slow to respond. Check connectivity."]}),"\n",(0,i.jsx)(n.li,{children:"Individual PDS fetches can fail silently. The worker logs warnings and continues. Check server logs for details."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/guides/backfill",children:"Backfill"})," for how the process works."]}),"\n",(0,i.jsx)(n.h2,{id:"records-not-appearing-in-real-time",children:"Records not appearing in real time"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": New records created on the network don't show up in queries."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["HappyView receives real-time events via ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". Make sure Tap is running and connected to HappyView. See the ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for configuration."]}),"\n",(0,i.jsx)(n.li,{children:"No record-type lexicon exists for the collection. HappyView only indexes collections that have a corresponding record-type lexicon."}),"\n",(0,i.jsx)(n.li,{children:"The Tap connection hasn't synced the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"oauth-or-login-issues",children:"OAuth or login issues"}),"\n",(0,i.jsxs)(n.p,{children:["OAuth is handled entirely by ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),". If users can't log in or tokens aren't working:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Verify AIP is running and reachable at the configured ",(0,i.jsx)(n.code,{children:"AIP_URL"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Check that AIP has valid signing keys configured (",(0,i.jsx)(n.code,{children:"OAUTH_SIGNING_KEYS"}),")."]}),"\n",(0,i.jsx)(n.li,{children:"Check that both HappyView and AIP have public URLs assigned (required for OAuth callbacks)."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup and debugging."]}),"\n",(0,i.jsx)(n.h2,{id:"database-connection-errors",children:"Database connection errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": HappyView fails to start or returns 500 errors."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DATABASE_URL"})," is not set or points to an unreachable Postgres instance."]}),"\n",(0,i.jsx)(n.li,{children:"The database user doesn't have sufficient permissions. HappyView needs to create tables (migrations run automatically on startup)."}),"\n",(0,i.jsx)(n.li,{children:"Postgres version is too old. HappyView requires Postgres 17+."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for environment variable details."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453(e,n,r){r.d(n,{R:()=>t,x:()=>c});var s=r(6540);const i={},o=s.createContext(i);function t(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/111eee19.c36f8bff.js b/assets/js/111eee19.c36f8bff.js new file mode 100644 index 0000000..26b8ad3 --- /dev/null +++ b/assets/js/111eee19.c36f8bff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8779],{513:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","source":"@site/docs/reference/troubleshooting.md","sourceDirName":"reference","slug":"/reference/troubleshooting","permalink":"/reference/troubleshooting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Architecture","permalink":"/reference/architecture"}}');var i=n(199),t=n(2560);const o={},d="Troubleshooting",c={},l=[{value:"XRPC endpoint returns 404",id:"xrpc-endpoint-returns-404",level:2},{value:"Queries return empty results",id:"queries-return-empty-results",level:2},{value:"Procedure returns 401 Unauthorized",id:"procedure-returns-401-unauthorized",level:2},{value:"Admin endpoints return 403 Forbidden",id:"admin-endpoints-return-403-forbidden",level:2},{value:"Permission denied errors",id:"permission-denied-errors",level:2},{value:"Lua script errors",id:"lua-script-errors",level:2},{value:"Backfill job stuck in "pending" or "running"",id:"backfill-job-stuck-in-pending-or-running",level:2},{value:"Records not appearing in real time",id:"records-not-appearing-in-real-time",level:2},{value:"Lua script can't find records",id:"lua-script-cant-find-records",level:2},{value:"Plugin secrets not working",id:"plugin-secrets-not-working",level:2},{value:"OAuth or login issues",id:"oauth-or-login-issues",level:2},{value:"Third-party app can't authenticate",id:"third-party-app-cant-authenticate",level:2},{value:"Database connection errors",id:"database-connection-errors",level:2},{value:"Switching databases loses data",id:"switching-databases-loses-data",level:2},{value:"Jetstream disconnects frequently",id:"jetstream-disconnects-frequently",level:2}];function a(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"troubleshooting",children:"Troubleshooting"})}),"\n",(0,i.jsx)(s.p,{children:"Common issues and how to resolve them."}),"\n",(0,i.jsx)(s.h2,{id:"xrpc-endpoint-returns-404",children:"XRPC endpoint returns 404"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": ",(0,i.jsx)(s.code,{children:"GET /xrpc/your.method.name"})," returns ",(0,i.jsx)(s.code,{children:'{"error": "method not found"}'}),"."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The lexicon hasn't been uploaded yet. Check with ",(0,i.jsx)(s.code,{children:"GET /admin/lexicons"})," or the ",(0,i.jsx)(s.a,{href:"/getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["The lexicon's ",(0,i.jsx)(s.code,{children:"defs.main.type"})," doesn't match the HTTP method. Queries are ",(0,i.jsx)(s.code,{children:"GET"}),", procedures are ",(0,i.jsx)(s.code,{children:"POST"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["The NSID in the URL doesn't match the ",(0,i.jsx)(s.code,{children:"id"})," field in the uploaded lexicon JSON."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"queries-return-empty-results",children:"Queries return empty results"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": The XRPC query endpoint returns ",(0,i.jsx)(s.code,{children:'{"records": []}'})," even though records should exist."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The query lexicon is missing a ",(0,i.jsx)(s.code,{children:"target_collection"}),". Without it, the query doesn't know which records to read. See ",(0,i.jsx)(s.a,{href:"/guides/lexicons#target-collection",children:"Lexicons - target_collection"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["The record-type lexicon hasn't finished backfilling. Check backfill status with ",(0,i.jsx)(s.code,{children:"GET /admin/backfill/status"})," or the dashboard."]}),"\n",(0,i.jsxs)(s.li,{children:["Records exist on the network but HappyView hasn't indexed them yet. Jetstream only delivers events from after the collection was added to the filter. Use ",(0,i.jsx)(s.a,{href:"/guides/backfill",children:"backfill"})," to import historical records."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"procedure-returns-401-unauthorized",children:"Procedure returns 401 Unauthorized"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": ",(0,i.jsx)(s.code,{children:"POST /xrpc/your.method.name"})," returns ",(0,i.jsx)(s.code,{children:'{"error": "..."}'})," with status 401."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["No ",(0,i.jsx)(s.code,{children:"Authorization: DPoP"})," header or ",(0,i.jsx)(s.code,{children:"X-Client-Key"})," header is present."]}),"\n",(0,i.jsx)(s.li,{children:"The DPoP proof is invalid or expired."}),"\n",(0,i.jsx)(s.li,{children:"The API client key is not registered or is inactive."}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"admin-endpoints-return-403-forbidden",children:"Admin endpoints return 403 Forbidden"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": Admin API calls return ",(0,i.jsx)(s.code,{children:'{"error": "forbidden"}'}),"."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Your DID is not in the users table. Ask an existing user with ",(0,i.jsx)(s.code,{children:"users:create"})," permission to add you via ",(0,i.jsx)(s.code,{children:"POST /admin/users"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"If this is a fresh deployment with no users, the first authenticated request to any admin endpoint automatically bootstraps you as the super user. Make sure you're logged in via the dashboard or using a valid API key."}),"\n",(0,i.jsxs)(s.li,{children:["You may be in the users table but lack the required permission for the endpoint you're calling. Check your permissions with ",(0,i.jsx)(s.code,{children:"GET /admin/users"})," or ask a user with ",(0,i.jsx)(s.code,{children:"users:update"})," permission to grant the permission you need."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"permission-denied-errors",children:"Permission denied errors"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": Admin API calls return ",(0,i.jsx)(s.code,{children:'{"error": "insufficient permissions"}'})," with status 403, even though you can access other endpoints."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Your user account doesn't have the specific permission required by the endpoint. Each endpoint requires a specific permission \u2014 see the ",(0,i.jsx)(s.a,{href:"/reference/admin-api#permissions",children:"permissions table"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"If using an API key, the key's effective permissions are the intersection of the key's permissions and your user permissions. A key can never have more access than the user who created it."}),"\n",(0,i.jsxs)(s.li,{children:["Only the super user can call ",(0,i.jsx)(s.code,{children:"POST /admin/users/transfer-super"}),". This endpoint cannot be accessed with any permission \u2014 it requires super user status."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": An XRPC endpoint returns ",(0,i.jsx)(s.code,{children:'{"error": "script execution failed"}'})," or ",(0,i.jsx)(s.code,{children:'{"error": "script exceeded execution time limit"}'}),"."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"What to do"}),":"]}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsx)(s.li,{children:"Check the server logs: the full error message is logged at error level but not exposed to the client."}),"\n",(0,i.jsxs)(s.li,{children:["Use ",(0,i.jsx)(s.code,{children:'log("message")'})," in your script to trace execution. Output appears in server logs at debug level (requires ",(0,i.jsx)(s.code,{children:"RUST_LOG"})," to include debug)."]}),"\n",(0,i.jsxs)(s.li,{children:["If you hit the execution limit, your script likely has an infinite loop or is processing too much data. See ",(0,i.jsx)(s.a,{href:"/guides/scripting#sandbox",children:"Lua Scripting - Sandbox"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for more."]}),"\n",(0,i.jsx)(s.h2,{id:"backfill-job-stuck-in-pending-or-running",children:'Backfill job stuck in "pending" or "running"'}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": A backfill job doesn't progress or stays in ",(0,i.jsx)(s.code,{children:"pending"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"The backfill worker processes one job at a time. If another job is running, yours will wait."}),"\n",(0,i.jsxs)(s.li,{children:["The relay (",(0,i.jsx)(s.code,{children:"RELAY_URL"}),") may be unreachable or slow to respond. Check connectivity."]}),"\n",(0,i.jsx)(s.li,{children:"Individual PDS fetches can fail silently. The worker logs warnings and continues. Check server logs for details."}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/guides/backfill",children:"Backfill"})," for how the process works."]}),"\n",(0,i.jsx)(s.h2,{id:"records-not-appearing-in-real-time",children:"Records not appearing in real time"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": New records created on the network don't show up in queries."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["HappyView receives real-time events via ",(0,i.jsx)(s.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"}),". Verify the ",(0,i.jsx)(s.code,{children:"JETSTREAM_URL"})," is reachable and check server logs for ",(0,i.jsx)(s.code,{children:"jetstream.disconnected"})," events."]}),"\n",(0,i.jsx)(s.li,{children:"No record-type lexicon exists for the collection. HappyView only indexes collections that have a corresponding record-type lexicon."}),"\n",(0,i.jsx)(s.li,{children:"The Jetstream subscription hasn't reconnected with the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors."}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"lua-script-cant-find-records",children:"Lua script can't find records"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": ",(0,i.jsx)(s.code,{children:"db.query"})," or ",(0,i.jsx)(s.code,{children:"db.get"})," returns empty results inside a Lua script, even though the admin dashboard shows records exist."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"collection"})," global is only set when the lexicon has a ",(0,i.jsx)(s.code,{children:"target_collection"}),". If you're using ",(0,i.jsx)(s.code,{children:"db.raw"})," with a hardcoded collection name, double-check the spelling matches exactly."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"db.get"})," expects a full AT URI (",(0,i.jsx)(s.code,{children:"at://did:plc:abc/collection/rkey"}),"), not just an rkey."]}),"\n",(0,i.jsxs)(s.li,{children:["If querying by DID, make sure you're passing the full DID string including the ",(0,i.jsx)(s.code,{children:"did:plc:"})," or ",(0,i.jsx)(s.code,{children:"did:web:"})," prefix."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"plugin-secrets-not-working",children:"Plugin secrets not working"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": A plugin fails with authentication errors even though you've configured its secrets."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"TOKEN_ENCRYPTION_KEY"})," is not set. Plugin secrets are encrypted at rest and cannot be read without this key. See ",(0,i.jsx)(s.a,{href:"/guides/plugins#plugin-configuration",children:"Plugins - Configuration"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["If ",(0,i.jsx)(s.code,{children:"TOKEN_ENCRYPTION_KEY"})," changed since the secrets were saved, the existing encrypted values are unreadable. Re-enter the secrets via the dashboard or ",(0,i.jsx)(s.code,{children:"PUT /admin/plugins/{id}/secrets"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Environment variable secrets (",(0,i.jsx)(s.code,{children:"PLUGIN__"}),") are overridden by dashboard-configured secrets. If you've set both, the dashboard values take precedence."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"oauth-or-login-issues",children:"OAuth or login issues"}),"\n",(0,i.jsxs)(s.p,{children:["HappyView handles atproto OAuth internally via the ",(0,i.jsx)(s.code,{children:"atrium-oauth"})," library. If users can't log in:"]}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["Verify ",(0,i.jsx)(s.code,{children:"PUBLIC_URL"})," is set correctly and the URL is publicly accessible (required for OAuth callbacks)."]}),"\n",(0,i.jsx)(s.li,{children:"Check that the user's PDS authorization server is reachable."}),"\n",(0,i.jsxs)(s.li,{children:["Verify ",(0,i.jsx)(s.code,{children:"SESSION_SECRET"})," hasn't changed since sessions were created (changing it invalidates all existing dashboard sessions)."]}),"\n",(0,i.jsx)(s.li,{children:"Check server logs for OAuth-specific error messages."}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"third-party-app-cant-authenticate",children:"Third-party app can't authenticate"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": A third-party app using DPoP authentication gets 401 errors on XRPC endpoints."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The app hasn't registered an API client. Every XRPC request needs an ",(0,i.jsx)(s.code,{children:"X-Client-Key"})," header with a valid ",(0,i.jsx)(s.code,{children:"hvc_"}),"-prefixed client key. Register one via ",(0,i.jsx)(s.strong,{children:"Settings > API Clients"})," or ",(0,i.jsx)(s.code,{children:"POST /admin/api-clients"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"The DPoP proof is malformed or expired. Proofs include a timestamp and are valid for a short window."}),"\n",(0,i.jsxs)(s.li,{children:["The API client has been deactivated (",(0,i.jsx)(s.code,{children:"is_active: false"}),"). Re-enable it via the dashboard or ",(0,i.jsx)(s.code,{children:"PUT /admin/api-clients/{id}"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"database-connection-errors",children:"Database connection errors"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": HappyView fails to start or returns 500 errors."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"DATABASE_URL"})," is not set or points to an unreachable Postgres instance."]}),"\n",(0,i.jsx)(s.li,{children:"The database user doesn't have sufficient permissions. HappyView needs to create tables (migrations run automatically on startup)."}),"\n",(0,i.jsx)(s.li,{children:"Postgres version is too old. HappyView requires Postgres 17+."}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/getting-started/configuration",children:"Configuration"})," for environment variable details."]}),"\n",(0,i.jsx)(s.h2,{id:"switching-databases-loses-data",children:"Switching databases loses data"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": After changing ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," from SQLite to Postgres (or vice versa), all records, lexicons, and users are gone."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Explanation"}),": Each database is independent. Switching ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," points HappyView at a fresh database. Your old data is still in the previous database file or Postgres instance."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Recovery"}),": Re-upload your lexicons and run backfills to re-index records from the network. Admin settings, users, and API keys need to be re-created manually. See the ",(0,i.jsx)(s.a,{href:"/guides/sqlite-to-postgres-migration",children:"SQLite \u2192 Postgres"})," or ",(0,i.jsx)(s.a,{href:"/guides/postgres-to-sqlite-migration",children:"Postgres \u2192 SQLite"})," migration guides."]}),"\n",(0,i.jsx)(s.h2,{id:"jetstream-disconnects-frequently",children:"Jetstream disconnects frequently"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Symptom"}),": Server logs show repeated ",(0,i.jsx)(s.code,{children:"jetstream.disconnected"})," / ",(0,i.jsx)(s.code,{children:"jetstream.connected"})," events."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Network instability between HappyView and the Jetstream server. Verify ",(0,i.jsx)(s.code,{children:"JETSTREAM_URL"})," is reachable."]}),"\n",(0,i.jsxs)(s.li,{children:["The default Jetstream instance may be under heavy load. Consider pointing ",(0,i.jsx)(s.code,{children:"JETSTREAM_URL"})," at a different instance if available."]}),"\n",(0,i.jsx)(s.li,{children:"HappyView reconnects automatically and resumes from its last cursor, so brief disconnections don't cause data loss. Prolonged outages may require a backfill to catch up on missed records."}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},2560:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>d});var r=n(63);const i={},t=r.createContext(i);function o(e){const s=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function d(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1203.4c8aeaab.js b/assets/js/1203.4c8aeaab.js deleted file mode 100644 index 73103b3..0000000 --- a/assets/js/1203.4c8aeaab.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1203],{1203(t,e,i){i.d(e,{diagram:()=>I});var a=i(7633),n=i(797),s=i(451),r=function(){var t=(0,n.K2)(function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i},"o"),e=[1,3],i=[1,4],a=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,n.K2)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,n.K2)(function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" \u27f6 ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" \u27f6 ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:i,55:a,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:a,56:s,57:r},{18:e,26:9,27:2,28:i,55:a,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:a,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,n.K2)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,n.K2)(function(t){var e=this,i=[0],a=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=a.pop()||x.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,n.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,n.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,n.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,n.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,n.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,n.K2)(function(){return this._more=!0,this},"more"),reject:(0,n.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,n.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,n.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,n.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,n.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,n.K2)(function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},"test_match"),next:(0,n.K2)(function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,n.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,n.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,n.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,n.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,n.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,n.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,n.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)(function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,(0,n.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();r.parser=r;var o=r,l=(0,a.P$)(),h=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,n.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,n.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){n.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){n.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:r}=e,o=(0,s.m4Y)().domain([0,1]).range([a,r+a]),l=(0,s.m4Y)().domain([0,1]).range([i+n,n]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},c=class extends Error{static{(0,n.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function d(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function u(t){return!/^\d+$/.test(t)}function x(t){return!/^\d+px$/.test(t)}(0,n.K2)(d,"validateHexCode"),(0,n.K2)(u,"validateNumber"),(0,n.K2)(x,"validateSizeInPixels");var g=(0,a.D7)();function f(t){return(0,a.jZ)(t.trim(),g)}(0,n.K2)(f,"textSanitizer");var p=new h;function y(t){p.setData({quadrant1Text:f(t.text)})}function T(t){p.setData({quadrant2Text:f(t.text)})}function m(t){p.setData({quadrant3Text:f(t.text)})}function q(t){p.setData({quadrant4Text:f(t.text)})}function A(t){p.setData({xAxisLeftText:f(t.text)})}function _(t){p.setData({xAxisRightText:f(t.text)})}function b(t){p.setData({yAxisTopText:f(t.text)})}function S(t){p.setData({yAxisBottomText:f(t.text)})}function k(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(u(a))throw new c(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(d(a))throw new c(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(d(a))throw new c(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(x(a))throw new c(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function F(t,e,i,a,n){const s=k(n);p.addPoints([{x:i,y:a,text:f(t.text),className:e,...s}])}function P(t,e){p.addClass(t,k(e))}function C(t){p.setConfig({chartWidth:t})}function L(t){p.setConfig({chartHeight:t})}function v(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&p.setConfig(i),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:(0,a.ab)()}),p.build()}(0,n.K2)(y,"setQuadrant1Text"),(0,n.K2)(T,"setQuadrant2Text"),(0,n.K2)(m,"setQuadrant3Text"),(0,n.K2)(q,"setQuadrant4Text"),(0,n.K2)(A,"setXAxisLeftText"),(0,n.K2)(_,"setXAxisRightText"),(0,n.K2)(b,"setYAxisTopText"),(0,n.K2)(S,"setYAxisBottomText"),(0,n.K2)(k,"parseStyles"),(0,n.K2)(F,"addPoint"),(0,n.K2)(P,"addClass"),(0,n.K2)(C,"setWidth"),(0,n.K2)(L,"setHeight"),(0,n.K2)(v,"getQuadrantData");var I={parser:o,db:{setWidth:C,setHeight:L,setQuadrant1Text:y,setQuadrant2Text:T,setQuadrant3Text:m,setQuadrant4Text:q,setXAxisLeftText:A,setXAxisRightText:_,setYAxisTopText:b,setYAxisBottomText:S,parseStyles:k,addPoint:F,addClass:P,getQuadrantData:v,clear:(0,n.K2)(function(){p.clear(),(0,a.IU)()},"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,n.K2)((t,e,i,r)=>{function o(t){return"top"===t?"hanging":"middle"}function l(t){return"left"===t?"start":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,n.K2)(o,"getDominantBaseLine"),(0,n.K2)(l,"getTextAnchor"),(0,n.K2)(h,"getTransformation");const c=(0,a.D7)();n.Rm.debug("Rendering quadrant chart\n"+t);const d=c.securityLevel;let u;"sandbox"===d&&(u=(0,s.Ltv)("#i"+e));const x=("sandbox"===d?(0,s.Ltv)(u.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${e}"]`),g=x.append("g").attr("class","main"),f=c.quadrantChart?.chartWidth??500,p=c.quadrantChart?.chartHeight??500;(0,a.a$)(x,p,f,c.quadrantChart?.useMaxWidth??!0),x.attr("viewBox","0 0 "+f+" "+p),r.db.setHeight(p),r.db.setWidth(f);const y=r.db.getQuadrantData(),T=g.append("g").attr("class","quadrants"),m=g.append("g").attr("class","border"),q=g.append("g").attr("class","data-points"),A=g.append("g").attr("class","labels"),_=g.append("g").attr("class","title");y.title&&_.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",o(y.title.horizontalPos)).attr("text-anchor",l(y.title.verticalPos)).attr("transform",h(y.title)).text(y.title.text),y.borderLines&&m.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const b=T.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");b.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),b.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>h(t.text)).text(t=>t.text.text);A.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.horizontalPos)).attr("text-anchor",t=>l(t.verticalPos)).attr("transform",t=>h(t));const S=q.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");S.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),S.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>h(t.text))},"draw")},styles:(0,n.K2)(()=>"","styles")}}}]); \ No newline at end of file diff --git a/assets/js/121e86a6.4a23b8e6.js b/assets/js/121e86a6.4a23b8e6.js deleted file mode 100644 index c382147..0000000 --- a/assets/js/121e86a6.4a23b8e6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5011],{7544(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","source":"@site/docs/reference/scripts/get-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/get-record","permalink":"/reference/scripts/get-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Admin API","permalink":"/reference/admin-api"},"next":{"title":"Create Record","permalink":"/reference/scripts/create-record"}}');var s=n(4848),c=n(8453);const i={},o="Query: Get a Single Record",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"query-get-a-single-record",children:"Query: Get a Single Record"})}),"\n",(0,s.jsx)(r.p,{children:"Fetch a single record by its AT URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not params.uri then\n return { error = "uri parameter is required" }\n end\n\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n\n return { record = record }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Check that the ",(0,s.jsx)(r.code,{children:"uri"})," query parameter is present. Return a structured error if missing."]}),"\n",(0,s.jsxs)(r.li,{children:["Look up the record with ",(0,s.jsx)(r.a,{href:"/guides/scripting#dbget",children:(0,s.jsx)(r.code,{children:"db.get"})}),", which returns the record table or ",(0,s.jsx)(r.code,{children:"nil"}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return the record wrapped in an object."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling ",(0,s.jsx)(r.code,{children:"error()"}),", so the client gets a 200 with an error field it can handle gracefully rather than a 500."]})]})}function u(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>o});var t=n(6540);const s={},c=t.createContext(s);function i(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/121e86a6.7988cc8d.js b/assets/js/121e86a6.7988cc8d.js new file mode 100644 index 0000000..55b66e5 --- /dev/null +++ b/assets/js/121e86a6.7988cc8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5011],{4138:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","source":"@site/docs/reference/scripts/get-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/get-record","permalink":"/reference/scripts/get-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lua Scripting","permalink":"/guides/scripting"},"next":{"title":"Create Record","permalink":"/reference/scripts/create-record"}}');var s=n(199),c=n(2560);const i={},o="Query: Get a Single Record",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"query-get-a-single-record",children:"Query: Get a Single Record"})}),"\n",(0,s.jsx)(r.p,{children:"Fetch a single record by its AT URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not params.uri then\n return { error = "uri parameter is required" }\n end\n\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n\n return { record = record }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Check that the ",(0,s.jsx)(r.code,{children:"uri"})," query parameter is present. Return a structured error if missing."]}),"\n",(0,s.jsxs)(r.li,{children:["Look up the record with ",(0,s.jsx)(r.a,{href:"/reference/lua/database-api#dbget",children:(0,s.jsx)(r.code,{children:"db.get"})}),", which returns the record table or ",(0,s.jsx)(r.code,{children:"nil"}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return the record wrapped in an object."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling ",(0,s.jsx)(r.code,{children:"error()"}),", so the client gets a 200 with an error field it can handle gracefully rather than a 500."]})]})}function u(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>i,x:()=>o});var t=n(63);const s={},c=t.createContext(s);function i(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/125.6690f5ff.js b/assets/js/125.6690f5ff.js new file mode 100644 index 0000000..f150a30 --- /dev/null +++ b/assets/js/125.6690f5ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[125],{779:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(6063),n=s(9404);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},7330:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(8894),n=s(1485),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},3830:(t,e,s)=>{s.d(e,{P:()=>r});var i=s(5691),n=s(8894),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:c,height:l,x:h,y:d}=a(t,e);(0,i.a$)(t,l,c,r);const u=o(h,d,c,l,e);t.attr("viewBox",u),n.Rm.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),o=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},125:(t,e,s)=>{s.d(e,{diagram:()=>k});var i=s(7330),n=s(3830),r=s(163),a=(s(1562),s(2125),s(5707),s(3276),s(4061),s(7127),s(2101)),o=s(5691),c=s(8894),l=s(1485),h=s(779),d=s(9543),u=function(){var t=(0,c.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],s=[1,10],i=[1,11],n=[1,12],r=[1,13],a=[1,23],o=[1,24],l=[1,25],h=[1,26],d=[1,27],u=[1,19],y=[1,28],p=[1,29],_=[1,20],g=[1,18],b=[1,21],m=[1,22],f=[1,36],E=[1,37],k=[1,38],T=[1,39],O=[1,40],S=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],A=[1,45],N=[1,46],R=[1,55],I=[40,48,50,51,52,70,71],C=[1,66],$=[1,64],x=[1,61],v=[1,65],D=[1,67],w=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],L=[65,66,67,68,69],K=[1,84],M=[1,83],B=[1,81],F=[1,82],Y=[6,10,42,47],P=[6,10,13,41,42,47,48,49],z=[1,92],G=[1,91],U=[1,90],Z=[19,58],W=[1,101],j=[1,100],X=[19,58,60,62],V={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:(0,c.K2)(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:case 55:case 56:case 57:case 58:case 81:case 65:case 66:case 69:this.$=r[o];break;case 8:i.addEntity(r[o-4]),i.addEntity(r[o-2]),i.addRelationship(r[o-4],r[o],r[o-2],r[o-3]);break;case 9:i.addEntity(r[o-8]),i.addEntity(r[o-4]),i.addRelationship(r[o-8],r[o],r[o-4],r[o-5]),i.setClass([r[o-8]],r[o-6]),i.setClass([r[o-4]],r[o-2]);break;case 10:i.addEntity(r[o-6]),i.addEntity(r[o-2]),i.addRelationship(r[o-6],r[o],r[o-2],r[o-3]),i.setClass([r[o-6]],r[o-4]);break;case 11:i.addEntity(r[o-6]),i.addEntity(r[o-4]),i.addRelationship(r[o-6],r[o],r[o-4],r[o-5]),i.setClass([r[o-4]],r[o-2]);break;case 12:i.addEntity(r[o-3]),i.addAttributes(r[o-3],r[o-1]);break;case 13:i.addEntity(r[o-5]),i.addAttributes(r[o-5],r[o-1]),i.setClass([r[o-5]],r[o-3]);break;case 14:i.addEntity(r[o-2]);break;case 15:i.addEntity(r[o-4]),i.setClass([r[o-4]],r[o-2]);break;case 16:i.addEntity(r[o]);break;case 17:i.addEntity(r[o-2]),i.setClass([r[o-2]],r[o]);break;case 18:i.addEntity(r[o-6],r[o-4]),i.addAttributes(r[o-6],r[o-1]);break;case 19:i.addEntity(r[o-8],r[o-6]),i.addAttributes(r[o-8],r[o-1]),i.setClass([r[o-8]],r[o-3]);break;case 20:i.addEntity(r[o-5],r[o-3]);break;case 21:i.addEntity(r[o-7],r[o-5]),i.setClass([r[o-7]],r[o-2]);break;case 22:i.addEntity(r[o-3],r[o-1]);break;case 23:i.addEntity(r[o-5],r[o-3]),i.setClass([r[o-5]],r[o]);break;case 24:case 25:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=r[o-3],i.addClass(r[o-2],r[o-1]);break;case 37:case 38:case 59:case 67:case 43:this.$=[r[o]];break;case 39:case 40:this.$=r[o-2].concat([r[o]]);break;case 41:this.$=r[o-2],i.setClass(r[o-1],r[o]);break;case 42:this.$=r[o-3],i.addCssStyles(r[o-2],r[o-1]);break;case 44:case 68:r[o-2].push(r[o]),this.$=r[o-2];break;case 46:this.$=r[o-1]+r[o];break;case 54:case 79:case 80:case 70:this.$=r[o].replace(/"/g,"");break;case 60:r[o].push(r[o-1]),this.$=r[o];break;case 61:this.$={type:r[o-1],name:r[o]};break;case 62:this.$={type:r[o-2],name:r[o-1],keys:r[o]};break;case 63:this.$={type:r[o-2],name:r[o-1],comment:r[o]};break;case 64:this.$={type:r[o-3],name:r[o-2],keys:r[o-1],comment:r[o]};break;case 71:this.$={cardA:r[o],relType:r[o-1],cardB:r[o-2]};break;case 72:this.$=i.Cardinality.ZERO_OR_ONE;break;case 73:this.$=i.Cardinality.ZERO_OR_MORE;break;case 74:this.$=i.Cardinality.ONE_OR_MORE;break;case 75:this.$=i.Cardinality.ONLY_ONE;break;case 76:this.$=i.Cardinality.MD_PARENT;break;case 77:this.$=i.Identification.NON_IDENTIFYING;break;case 78:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:d,40:u,43:y,44:p,48:_,50:g,51:b,52:m},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:30,11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:o,35:l,36:h,37:d,40:u,43:y,44:p,48:_,50:g,51:b,52:m},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:f,66:E,67:k,68:T,69:O}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(S,[2,54]),t(S,[2,55]),t(S,[2,56]),t(S,[2,57]),t(S,[2,58]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:44,40:A,41:N},{16:47,40:A,41:N},{16:48,40:A,41:N},t(e,[2,4]),{11:49,40:u,48:_,50:g,51:b,52:m},{16:50,40:A,41:N},{18:51,19:[1,52],53:53,54:54,58:R},{11:56,40:u,48:_,50:g,51:b,52:m},{64:57,70:[1,58],71:[1,59]},t(I,[2,72]),t(I,[2,73]),t(I,[2,74]),t(I,[2,75]),t(I,[2,76]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:C,38:60,41:$,42:x,45:62,46:63,48:v,49:D},t(w,[2,37]),t(w,[2,38]),{16:68,40:A,41:N,42:x},{13:C,38:69,41:$,42:x,45:62,46:63,48:v,49:D},{13:[1,70],15:[1,71]},t(e,[2,17],{63:35,12:72,17:[1,73],42:x,65:f,66:E,67:k,68:T,69:O}),{19:[1,74]},t(e,[2,14]),{18:75,19:[2,59],53:53,54:54,58:R},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:f,66:E,67:k,68:T,69:O},t(L,[2,77]),t(L,[2,78]),{6:K,10:M,39:80,42:B,47:F},{40:[1,85],41:[1,86]},t(Y,[2,43],{46:87,13:C,41:$,48:v,49:D}),t(P,[2,45]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(e,[2,41],{42:x}),{6:K,10:M,39:88,42:B,47:F},{14:89,40:z,50:G,72:U},{16:93,40:A,41:N},{11:94,40:u,48:_,50:g,51:b,52:m},{18:95,19:[1,96],53:53,54:54,58:R},t(e,[2,12]),{19:[2,60]},t(Z,[2,61],{56:97,57:98,59:99,61:W,62:j}),t([19,58,61,62],[2,66]),t(e,[2,22],{15:[1,103],17:[1,102]}),t([40,48,50,51,52],[2,71]),t(e,[2,36]),{13:C,41:$,45:104,46:63,48:v,49:D},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(w,[2,39]),t(w,[2,40]),t(P,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,79]),t(e,[2,80]),t(e,[2,81]),{13:[1,105],42:x},{13:[1,107],15:[1,106]},{19:[1,108]},t(e,[2,15]),t(Z,[2,62],{57:109,60:[1,110],62:j}),t(Z,[2,63]),t(X,[2,67]),t(Z,[2,70]),t(X,[2,69]),{18:111,19:[1,112],53:53,54:54,58:R},{16:113,40:A,41:N},t(Y,[2,44],{46:87,13:C,41:$,48:v,49:D}),{14:114,40:z,50:G,72:U},{16:115,40:A,41:N},{14:116,40:z,50:G,72:U},t(e,[2,13]),t(Z,[2,64]),{59:117,61:W},{19:[1,118]},t(e,[2,20]),t(e,[2,23],{17:[1,119],42:x}),t(e,[2,11]),{13:[1,120],42:x},t(e,[2,10]),t(X,[2,68]),t(e,[2,18]),{18:121,19:[1,122],53:53,54:54,58:R},{14:123,40:z,50:G,72:U},{19:[1,124]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,o="",l=0,h=0,d=0,u=r.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var b=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(m,"lex");for(var f,E,k,T,O,S,A,N,R,I={};;){if(k=s[s.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==f&&(f=m()),T=a[k]&&a[k][f]),void 0===T||!T.length||!T[0]){var C="";for(S in R=[],a[k])this.terminals_[S]&&S>2&&R.push("'"+this.terminals_[S]+"'");C=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:g,expected:R})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+f);switch(T[0]){case 1:s.push(f),n.push(y.yytext),r.push(y.yylloc),s.push(T[1]),f=null,E?(f=E,E=null):(h=y.yyleng,o=y.yytext,l=y.yylineno,g=y.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[T[1]][1],I.$=n[n.length-A],I._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply(I,[o,h,l,p.yy,T[1],n,r].concat(u))))return O;A&&(s=s.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),s.push(this.productions_[T[1]][0]),n.push(I.$),r.push(I._$),N=a[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},Q=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 72;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 61;case 25:case 26:return 58;case 27:return 62;case 29:return this.popState(),19;case 30:case 77:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 64:return 65;case 42:case 43:case 44:case 52:case 54:case 66:return 67;case 47:case 48:case 49:case 50:case 51:case 53:case 65:return 66;case 55:case 56:case 58:case 59:case 60:case 63:return 68;case 57:return 51;case 61:return 52;case 62:return 48;case 67:return 69;case 68:case 71:case 72:case 73:return 70;case 69:case 70:return 71;case 74:return 41;case 75:return 47;case 76:return 40;case 78:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,74,75],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,76,77,78],inclusive:!0}}}}();function q(){this.yy={}}return V.lexer=Q,(0,c.K2)(q,"Parser"),q.prototype=V,V.Parser=q,new q}();u.parser=u;var y=u,p=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,c.K2)(()=>(0,o.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,c.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,o.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),c.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),c.Rm.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){const n=this.entities.get(t),r=this.entities.get(s);if(!n||!r)return;const a={entityA:n.id,roleA:e,entityB:r.id,relSpec:i};this.relationships.push(a),c.Rm.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s);if(!e||!t)return;for(const s of e)t.cssStyles.push(s)}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,o.IU)()}getData(){const t=[],e=[],s=(0,o.D7)();let i=0;for(const r of this.entities.keys()){const e=this.entities.get(r);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),e.colorIndex=i++,t.push(e))}let n=0;for(const r of this.relationships){const t={id:(0,a.rY)(r.entityA,r.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:r.entityA,end:r.entityB,label:r.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:r.relSpec.cardB.toLowerCase(),arrowTypeEnd:r.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==r.relSpec.relType?"solid":"dashed",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:"TB"}}},_={};(0,c.VA)(_,{draw:()=>g});var g=(0,c.K2)(async function(t,e,s,h){c.Rm.info("REF0:"),c.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:d,er:u,layout:y}=(0,o.D7)(),p=h.db.getData(),_=(0,i.A)(e,d);p.type=h.type,p.layoutAlgorithm=(0,r.q7)(y),p.config.flowchart.nodeSpacing=u?.nodeSpacing||140,p.config.flowchart.rankSpacing=u?.rankSpacing||80,p.direction=h.db.getDirection();const{config:g}=p,{look:b}=g;p.markers="neo"===b?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await(0,r.XX)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();const m=_.selectAll('[id*="-background"]');Array.from(m).length>0&&m.each(function(){const t=(0,l.Ltv)(this),e=t.attr("id").replace("-background",""),s=_.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}});a._K.insertTitle(_,"erDiagramTitleText",u?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.P)(_,8,"erDiagram",u?.useMaxWidth??!0)},"draw"),b=(0,c.K2)((t,e)=>{const s=h.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return d.A(i,n,r,e)},"fade"),m=new Set(["redux-color","redux-dark-color"]),f=(0,c.K2)(t=>{const{theme:e,look:s,bkgColorArray:i,borderColorArray:n}=t;if(!m.has(e))return"";const r=i?.length>0;let a="";for(let o=0;o{const{look:e,theme:s,erEdgeLabelBackground:i,strokeWidth:n}=t;return`\n ${f(t)}\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${m.has(s)&&i?i:b(t.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${m.has(s)&&i?i:t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${m.has(s)&&i?i:t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${"neo"===e?n:"1px"};\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: ${"neo"===e?n:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${b(t.tertiaryColor,.5)};\n }\n`},"getStyles"),k={parser:y,get db(){return new p},renderer:_,styles:E}}}]); \ No newline at end of file diff --git a/assets/js/1485.a2d3345d.js b/assets/js/1485.a2d3345d.js new file mode 100644 index 0000000..e6eb0e8 --- /dev/null +++ b/assets/js/1485.a2d3345d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1485],{1485:(t,n,e)=>{function i(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e=r)&&(e=r)}return e}function r(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let r of t)null!=(r=n(r,++i,t))&&(e>r||void 0===e&&r>=r)&&(e=r)}return e}function o(t){return t}e.d(n,{JLW:()=>la,l78:()=>v,tlR:()=>d,qrM:()=>Ta,Yu4:()=>Na,IA3:()=>Ca,Wi0:()=>$a,PGM:()=>Ea,OEq:()=>Da,y8u:()=>Ya,olC:()=>La,IrU:()=>za,oDi:()=>Ia,Q7f:()=>Ra,cVp:()=>Va,lUB:()=>pa,Lx9:()=>Wa,nVG:()=>iu,uxU:()=>ru,Xf2:()=>au,GZz:()=>hu,UPb:()=>lu,dyv:()=>cu,GPZ:()=>Ze,Sk5:()=>ti,bEH:()=>Di,n8j:()=>da,T9B:()=>i,jkA:()=>r,rLf:()=>ma,WH:()=>ji,m4Y:()=>xr,UMr:()=>Oi,w7C:()=>Ys,zt:()=>Hs,Ltv:()=>Ls,UAC:()=>Yr,DCK:()=>po,TUC:()=>Rr,Agd:()=>Pr,t6C:()=>$r,wXd:()=>Ur,ABi:()=>Or,Ui6:()=>no,rGn:()=>Br,ucG:()=>Er,YPH:()=>zr,Mol:()=>Xr,PGu:()=>jr,GuW:()=>Ir,hkb:()=>_i});var s=1,a=2,u=3,h=4,c=1e-6;function l(t){return"translate("+t+",0)"}function f(t){return"translate(0,"+t+")"}function _(t){return n=>+t(n)}function p(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),e=>+t(e)+n}function y(){return!this.__axis}function g(t,n){var e=[],i=null,r=null,g=6,d=6,v=3,x="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,m=t===s||t===h?-1:1,w=t===h||t===a?"x":"y",b=t===s||t===u?l:f;function M(l){var f=null==i?n.ticks?n.ticks.apply(n,e):n.domain():i,M=null==r?n.tickFormat?n.tickFormat.apply(n,e):o:r,T=Math.max(g,0)+v,k=n.range(),N=+k[0]+x,A=+k[k.length-1]+x,C=(n.bandwidth?p:_)(n.copy(),x),S=l.selection?l.selection():l,$=S.selectAll(".domain").data([null]),E=S.selectAll(".tick").data(f,n).order(),U=E.exit(),D=E.enter().append("g").attr("class","tick"),P=E.select("line"),F=E.select("text");$=$.merge($.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(D),P=P.merge(D.append("line").attr("stroke","currentColor").attr(w+"2",m*g)),F=F.merge(D.append("text").attr("fill","currentColor").attr(w,m*T).attr("dy",t===s?"0em":t===u?"0.71em":"0.32em")),l!==S&&($=$.transition(l),E=E.transition(l),P=P.transition(l),F=F.transition(l),U=U.transition(l).attr("opacity",c).attr("transform",function(t){return isFinite(t=C(t))?b(t+x):this.getAttribute("transform")}),D.attr("opacity",c).attr("transform",function(t){var n=this.parentNode.__axis;return b((n&&isFinite(n=n(t))?n:C(t))+x)})),U.remove(),$.attr("d",t===h||t===a?d?"M"+m*d+","+N+"H"+x+"V"+A+"H"+m*d:"M"+x+","+N+"V"+A:d?"M"+N+","+m*d+"V"+x+"H"+A+"V"+m*d:"M"+N+","+x+"H"+A),E.attr("opacity",1).attr("transform",function(t){return b(C(t)+x)}),P.attr(w+"2",m*g),F.attr(w,m*T).text(M),S.filter(y).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===a?"start":t===h?"end":"middle"),S.each(function(){this.__axis=C})}return M.scale=function(t){return arguments.length?(n=t,M):n},M.ticks=function(){return e=Array.from(arguments),M},M.tickArguments=function(t){return arguments.length?(e=null==t?[]:Array.from(t),M):e.slice()},M.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),M):i&&i.slice()},M.tickFormat=function(t){return arguments.length?(r=t,M):r},M.tickSize=function(t){return arguments.length?(g=d=+t,M):g},M.tickSizeInner=function(t){return arguments.length?(g=+t,M):g},M.tickSizeOuter=function(t){return arguments.length?(d=+t,M):d},M.tickPadding=function(t){return arguments.length?(v=+t,M):v},M.offset=function(t){return arguments.length?(x=+t,M):x},M}function d(t){return g(s,t)}function v(t){return g(u,t)}function x(){}function m(t){return null==t?x:function(){return this.querySelector(t)}}function w(){return[]}function b(t){return null==t?w:function(){return this.querySelectorAll(t)}}function M(t){return function(){return null==(n=t.apply(this,arguments))?[]:Array.isArray(n)?n:Array.from(n);var n}}function T(t){return function(){return this.matches(t)}}function k(t){return function(n){return n.matches(t)}}var N=Array.prototype.find;function A(){return this.firstElementChild}var C=Array.prototype.filter;function S(){return Array.from(this.children)}function $(t){return new Array(t.length)}function E(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function U(t,n,e,i,r,o){for(var s,a=0,u=n.length,h=o.length;an?1:t>=n?0:NaN}E.prototype={constructor:E,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var H="http://www.w3.org/1999/xhtml";const L={svg:"http://www.w3.org/2000/svg",xhtml:H,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function q(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),L.hasOwnProperty(n)?{space:L[n],local:t}:t}function z(t){return function(){this.removeAttribute(t)}}function O(t){return function(){this.removeAttributeNS(t.space,t.local)}}function j(t,n){return function(){this.setAttribute(t,n)}}function I(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function X(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function R(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function B(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function V(t){return function(){this.style.removeProperty(t)}}function Z(t,n,e){return function(){this.style.setProperty(t,n,e)}}function W(t,n,e){return function(){var i=n.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,e)}}function G(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function Q(t){return function(){delete this[t]}}function J(t,n){return function(){this[t]=n}}function K(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function tt(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new et(t)}function et(t){this._node=t,this._names=tt(t.getAttribute("class")||"")}function it(t,n){for(var e=nt(t),i=-1,r=n.length;++i=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ct=[null];function St(t,n){this._groups=t,this._parents=n}function $t(){return new St([[document.documentElement]],Ct)}St.prototype=$t.prototype={constructor:St,select:function(t){"function"!=typeof t&&(t=m(t));for(var n=this._groups,e=n.length,i=new Array(e),r=0;r=w&&(w=m+1);!(x=d[w])&&++w=0;)(i=r[o])&&(s&&4^i.compareDocumentPosition(s)&&s.parentNode.insertBefore(i,s),s=i);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o1?this.each((null==n?V:"function"==typeof n?W:Z)(t,n,null==e?"":e)):G(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Q:"function"==typeof n?K:J)(t,n)):this.node()[t]},classed:function(t,n){var e=tt(t+"");if(arguments.length<2){for(var i=nt(this.node()),r=-1,o=e.length;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),s=o.length;if(!(arguments.length<2)){for(a=n?Tt:Mt,i=0;i{}};function Dt(){for(var t,n=0,e=arguments.length,i={};n=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),s=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++s0)for(var e,i,r=new Array(e),o=0;o=0&&n._call.call(void 0,t),n=n._next;--zt}()}finally{zt=0,function(){var t,n,e=Lt,i=1/0;for(;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Lt=n);qt=t,tn(i)}(),Xt=0}}function Kt(){var t=Bt.now(),n=t-It;n>1e3&&(Rt-=n,It=t)}function tn(t){zt||(Ot&&(Ot=clearTimeout(Ot)),t-Xt>24?(t<1/0&&(Ot=setTimeout(Jt,t-Bt.now()-Rt)),jt&&(jt=clearInterval(jt))):(jt||(It=Bt.now(),jt=setInterval(Kt,1e3)),zt=1,Vt(Jt)))}function nn(t,n,e){var i=new Gt;return n=null==n?0:+n,i.restart(e=>{i.stop(),t(e+n)},n,e),i}Gt.prototype=Qt.prototype={constructor:Gt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Zt():+e)+(null==n?0:+n),this._next||qt===this||(qt?qt._next=this:Lt=this,qt=this),this._call=t,this._time=e,tn()},stop:function(){this._call&&(this._call=null,this._time=1/0,tn())}};var en=Ht("start","end","cancel","interrupt"),rn=[];function on(t,n,e,i,r,o){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};!function(t,n,e){var i,r=t.__transition;function o(t){e.state=1,e.timer.restart(s,e.delay,e.time),e.delay<=t&&s(t-e.delay)}function s(o){var h,c,l,f;if(1!==e.state)return u();for(h in r)if((f=r[h]).name===e.name){if(3===f.state)return nn(s);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete r[h]):+h0)throw new Error("too late; already scheduled");return e}function an(t,n){var e=un(t,n);if(e.state>3)throw new Error("too late; already running");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function hn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var cn,ln=180/Math.PI,fn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _n(t,n,e,i,r,o){var s,a,u;return(s=Math.sqrt(t*t+n*n))&&(t/=s,n/=s),(u=t*e+n*i)&&(e-=t*u,i-=n*u),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,u/=a),t*i180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(r(e)+"rotate(",null,i)-2,x:hn(t,n)})):n&&e.push(r(e)+"rotate("+n+i)}(o.rotate,s.rotate,a,u),function(t,n,e,o){t!==n?o.push({i:e.push(r(e)+"skewX(",null,i)-2,x:hn(t,n)}):n&&e.push(r(e)+"skewX("+n+i)}(o.skewX,s.skewX,a,u),function(t,n,e,i,o,s){if(t!==e||n!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:hn(t,e)},{i:a-2,x:hn(n,i)})}else 1===e&&1===i||o.push(r(o)+"scale("+e+","+i+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,a,u),o=s=null,function(t){for(var n,e=-1,i=u.length;++e>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?zn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?zn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Sn.exec(t))?new In(n[1],n[2],n[3],1):(n=$n.exec(t))?new In(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=En.exec(t))?zn(n[1],n[2],n[3],n[4]):(n=Un.exec(t))?zn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Dn.exec(t))?Wn(n[1],n[2]/100,n[3]/100,1):(n=Pn.exec(t))?Wn(n[1],n[2]/100,n[3]/100,n[4]):Fn.hasOwnProperty(t)?qn(Fn[t]):"transparent"===t?new In(NaN,NaN,NaN,0):null}function qn(t){return new In(t>>16&255,t>>8&255,255&t,1)}function zn(t,n,e,i){return i<=0&&(t=n=e=NaN),new In(t,n,e,i)}function On(t){return t instanceof bn||(t=Ln(t)),t?new In((t=t.rgb()).r,t.g,t.b,t.opacity):new In}function jn(t,n,e,i){return 1===arguments.length?On(t):new In(t,n,e,null==i?1:i)}function In(t,n,e,i){this.r=+t,this.g=+n,this.b=+e,this.opacity=+i}function Xn(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}`}function Rn(){const t=Bn(this.opacity);return`${1===t?"rgb(":"rgba("}${Vn(this.r)}, ${Vn(this.g)}, ${Vn(this.b)}${1===t?")":`, ${t})`}`}function Bn(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Vn(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Zn(t){return((t=Vn(t))<16?"0":"")+t.toString(16)}function Wn(t,n,e,i){return i<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Qn(t,n,e,i)}function Gn(t){if(t instanceof Qn)return new Qn(t.h,t.s,t.l,t.opacity);if(t instanceof bn||(t=Ln(t)),!t)return new Qn;if(t instanceof Qn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,i=t.b/255,r=Math.min(n,e,i),o=Math.max(n,e,i),s=NaN,a=o-r,u=(o+r)/2;return a?(s=n===o?(e-i)/a+6*(e0&&u<1?0:s,new Qn(s,a,u,t.opacity)}function Qn(t,n,e,i){this.h=+t,this.s=+n,this.l=+e,this.opacity=+i}function Jn(t){return(t=(t||0)%360)<0?t+360:t}function Kn(t){return Math.max(0,Math.min(1,t||0))}function te(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function ne(t,n,e,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*n+(4-6*o+3*s)*e+(1+3*t+3*o-3*s)*i+s*r)/6}mn(bn,Ln,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Yn,formatHex:Yn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Gn(this).formatHsl()},formatRgb:Hn,toString:Hn}),mn(In,jn,wn(bn,{brighter(t){return t=null==t?Tn:Math.pow(Tn,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Mn:Math.pow(Mn,t),new In(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new In(Vn(this.r),Vn(this.g),Vn(this.b),Bn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xn,formatHex:Xn,formatHex8:function(){return`#${Zn(this.r)}${Zn(this.g)}${Zn(this.b)}${Zn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Rn,toString:Rn})),mn(Qn,function(t,n,e,i){return 1===arguments.length?Gn(t):new Qn(t,n,e,null==i?1:i)},wn(bn,{brighter(t){return t=null==t?Tn:Math.pow(Tn,t),new Qn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Mn:Math.pow(Mn,t),new Qn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*n,r=2*e-i;return new In(te(t>=240?t-240:t+120,r,i),te(t,r,i),te(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Qn(Jn(this.h),Kn(this.s),Kn(this.l),Bn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Bn(this.opacity);return`${1===t?"hsl(":"hsla("}${Jn(this.h)}, ${100*Kn(this.s)}%, ${100*Kn(this.l)}%${1===t?")":`, ${t})`}`}}));const ee=t=>()=>t;function ie(t,n){return function(e){return t+e*n}}function re(t){return 1===(t=+t)?oe:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(i){return Math.pow(t+i*n,e)}}(n,e,t):ee(isNaN(n)?e:n)}}function oe(t,n){var e=n-t;return e?ie(t,e):ee(isNaN(t)?n:t)}const se=function t(n){var e=re(n);function i(t,n){var i=e((t=jn(t)).r,(n=jn(n)).r),r=e(t.g,n.g),o=e(t.b,n.b),s=oe(t.opacity,n.opacity);return function(n){return t.r=i(n),t.g=r(n),t.b=o(n),t.opacity=s(n),t+""}}return i.gamma=t,i}(1);function ae(t){return function(n){var e,i,r=n.length,o=new Array(r),s=new Array(r),a=new Array(r);for(e=0;e=1?(e=1,n-1):Math.floor(e*n),r=t[i],o=t[i+1],s=i>0?t[i-1]:2*r-o,a=io&&(r=n.slice(o,r),a[s]?a[s]+=r:a[++s]=r),(e=e[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,u.push({i:s,x:hn(e,i)})),o=he.lastIndex;return o=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?sn:an;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(n,e),s.on=r}}(e,t,n))},attr:function(t,n){var e=q(t),i="transform"===e?gn:le;return this.attrTween(t,"function"==typeof n?(e.local?de:ge)(e,i,xn(this,"attr."+t,n)):null==n?(e.local?_e:fe)(e):(e.local?ye:pe)(e,i,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var i=q(t);return this.tween(e,(i.local?ve:xe)(i,n))},style:function(t,n,e){var i="transform"==(t+="")?yn:le;return null==n?this.styleTween(t,function(t,n){var e,i,r;return function(){var o=G(this,t),s=(this.style.removeProperty(t),G(this,t));return o===s?null:o===e&&s===i?r:r=n(e=o,i=s)}}(t,i)).on("end.style."+t,ke(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var i,r,o;return function(){var s=G(this,t),a=e(this),u=a+"";return null==a&&(this.style.removeProperty(t),u=a=G(this,t)),s===u?null:s===i&&u===r?o:(r=u,o=n(i=s,a))}}(t,i,xn(this,"style."+t,n))).each(function(t,n){var e,i,r,o,s="style."+n,a="end."+s;return function(){var u=an(this,t),h=u.on,c=null==u.value[s]?o||(o=ke(n)):void 0;h===e&&r===c||(i=(e=h).copy()).on(a,r=c),u.on=i}}(this._id,t)):this.styleTween(t,function(t,n,e){var i,r,o=e+"";return function(){var s=G(this,t);return s===o?null:s===i?r:r=n(i=s,e)}}(t,i,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==n)return this.tween(i,null);if("function"!=typeof n)throw new Error;return this.tween(i,function(t,n,e){var i,r;function o(){var o=n.apply(this,arguments);return o!==r&&(i=(r=o)&&function(t,n,e){return function(i){this.style.setProperty(t,n.call(this,i),e)}}(t,o,e)),i}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(xn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function i(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&function(t){return function(n){this.textContent=t.call(this,n)}}(i)),n}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var i,r=un(this.node(),e).tween,o=0,s=r.length;o2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(i?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[r]):s=!1;s&&delete t.__transition}}(this,t)})},Et.prototype.transition=function(t){var n,e;t instanceof Ae?(n=t._id,t=t._name):(n=Ce(),(e=$e).time=Zt(),t=null==t?null:t+"");for(var i=this._groups,r=i.length,o=0;o1?i[0]+i.slice(2):i,+t.slice(e+1)]}function qe(t){return(t=Le(Math.abs(t)))?t[1]:NaN}var ze,Oe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function je(t){if(!(n=Oe.exec(t)))throw new Error("invalid format: "+t);var n;return new Ie({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ie(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Xe(t,n){var e=Le(t,n);if(!e)return t+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}je.prototype=Ie.prototype,Ie.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Re={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Xe(100*t,n),r:Xe,s:function(t,n){var e=Le(t,n);if(!e)return ze=void 0,t.toPrecision(n);var i=e[0],r=e[1],o=r-(ze=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Le(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Be(t){return t}var Ve,Ze,We,Ge=Array.prototype.map,Qe=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function Je(t){var n,e,i=void 0===t.grouping||void 0===t.thousands?Be:(n=Ge.call(t.grouping,Number),e=t.thousands+"",function(t,i){for(var r=t.length,o=[],s=0,a=n[0],u=0;r>0&&a>0&&(u+a+1>i&&(a=Math.max(1,i-u)),o.push(t.substring(r-=a,r+a)),!((u+=a+1)>i));)a=n[s=(s+1)%n.length];return o.reverse().join(e)}),r=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?Be:function(t){return function(n){return n.replace(/[0-9]/g,function(n){return t[+n]})}}(Ge.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"\u2212":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function l(t,n){var e=(t=je(t)).fill,l=t.align,f=t.sign,_=t.symbol,p=t.zero,y=t.width,g=t.comma,d=t.precision,v=t.trim,x=t.type;"n"===x?(g=!0,x="g"):Re[x]||(void 0===d&&(d=12),v=!0,x="g"),(p||"0"===e&&"="===l)&&(p=!0,e="0",l="=");var m=(n&&void 0!==n.prefix?n.prefix:"")+("$"===_?r:"#"===_&&/[boxX]/.test(x)?"0"+x.toLowerCase():""),w=("$"===_?o:/[%p]/.test(x)?u:"")+(n&&void 0!==n.suffix?n.suffix:""),b=Re[x],M=/[defgprs%]/.test(x);function T(t){var n,r,o,u=m,_=w;if("c"===x)_=b(t)+_,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),d),v&&(t=function(t){t:for(var n,e=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(n+1):t}(t)),T&&0===+t&&"+"!==f&&(T=!1),u=(T?"("===f?f:h:"-"===f||"("===f?"":f)+u,_=("s"!==x||isNaN(t)||void 0===ze?"":Qe[8+ze/3])+_+(T&&"("===f?")":""),M)for(n=-1,r=t.length;++n(o=t.charCodeAt(n))||o>57){_=(46===o?s+t.slice(n+1):t.slice(n))+_,t=t.slice(0,n);break}}g&&!p&&(t=i(t,1/0));var k=u.length+t.length+_.length,N=k>1)+u+t+_+N.slice(k);break;default:t=N+u+t+_}return a(t)}return d=void 0===d?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),T.toString=function(){return t+""},T}return{format:l,formatPrefix:function(t,n){var e=3*Math.max(-8,Math.min(8,Math.floor(qe(n)/3))),i=Math.pow(10,-e),r=l(((t=je(t)).type="f",t),{suffix:Qe[8+e/3]});return function(t){return r(i*t)}}}}function Ke(t){var n=0,e=t.children,i=e&&e.length;if(i)for(;--i>=0;)n+=e[i].value;else n=1;t.value=n}function ti(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=ei)):void 0===n&&(n=ni);for(var e,i,r,o,s,a=new oi(t),u=[a];e=u.pop();)if((r=n(e.data))&&(s=(r=Array.from(r)).length))for(e.children=r,o=s-1;o>=0;--o)u.push(i=r[o]=new oi(r[o])),i.parent=e,i.depth=e.depth+1;return a.eachBefore(ri)}function ni(t){return t.children}function ei(t){return Array.isArray(t)?t[1]:null}function ii(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function ri(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function oi(t){this.data=t,this.depth=this.height=0,this.parent=null}function si(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ai(t,n,e,i,r){for(var o,s=t.children,a=-1,u=s.length,h=t.value&&(i-n)/t.value;++a=0;--i)o.push(e[i]);return this},find:function(t,n){let e=-1;for(const i of this)if(t.call(n,i,++e,this))return i},sum:function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,i=n.children,r=i&&i.length;--r>=0;)e+=i[r].value;n.value=e})},sort:function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),r=null;t=e.pop(),n=i.pop();for(;t===n;)r=t,t=e.pop(),n=i.pop();return r}(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var r=i.length;t!==e;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},links:function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n},copy:function(){return ti(this).eachBefore(ii)},[Symbol.iterator]:function*(){var t,n,e,i,r=this,o=[r];do{for(t=o.reverse(),o=[];r=t.pop();)if(yield r,n=r.children)for(e=0,i=n.length;ef&&(f=a),g=c*c*y,(_=Math.max(f/g,g/l))>p){c-=a;break}p=_}d.push(s={value:c,dice:u1?n:1)},e}((1+Math.sqrt(5))/2);function ci(t){if("function"!=typeof t)throw new Error;return t}function li(){return 0}function fi(t){return function(){return t}}function _i(){var t=hi,n=!1,e=1,i=1,r=[0],o=li,s=li,a=li,u=li,h=li;function c(t){return t.x0=t.y0=0,t.x1=e,t.y1=i,t.eachBefore(l),r=[0],n&&t.eachBefore(si),t}function l(n){var e=r[n.depth],i=n.x0+e,c=n.y0+e,l=n.x1-e,f=n.y1-e;lwi?Math.pow(t,1/3):t/mi+vi}function ki(t){return t>xi?t*t*t:mi*(t-vi)}function Ni(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ai(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ci(t){if(t instanceof $i)return new $i(t.h,t.c,t.l,t.opacity);if(t instanceof Mi||(t=bi(t)),0===t.a&&0===t.b)return new $i(NaN,0180||e<-180?e-360*Math.round(e/360):e):ee(isNaN(t)?n:t)});Ui(oe);function Pi(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}class Fi extends Map{constructor(t,n=qi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),null!=t)for(const[e,i]of t)this.set(e,i)}get(t){return super.get(Yi(this,t))}has(t){return super.has(Yi(this,t))}set(t,n){return super.set(Hi(this,t),n)}delete(t){return super.delete(Li(this,t))}}Set;function Yi({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):e}function Hi({_intern:t,_key:n},e){const i=n(e);return t.has(i)?t.get(i):(t.set(i,e),e)}function Li({_intern:t,_key:n},e){const i=n(e);return t.has(i)&&(e=t.get(i),t.delete(i)),e}function qi(t){return null!==t&&"object"==typeof t?t.valueOf():t}const zi=Symbol("implicit");function Oi(){var t=new Fi,n=[],e=[],i=zi;function r(r){let o=t.get(r);if(void 0===o){if(i!==zi)return i;t.set(r,o=n.push(r)-1)}return e[o%e.length]}return r.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Fi;for(const i of e)t.has(i)||t.set(i,n.push(i)-1);return r},r.range=function(t){return arguments.length?(e=Array.from(t),r):e.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return Oi(n,e).unknown(i)},Pi.apply(r,arguments),r}function ji(){var t,n,e=Oi().unknown(void 0),i=e.domain,r=e.range,o=0,s=1,a=!1,u=0,h=0,c=.5;function l(){var e=i().length,l=s=Ii?10:o>=Xi?5:o>=Ri?2:1;let a,u,h;return r<0?(h=Math.pow(10,-r)/s,a=Math.round(t*h),u=Math.round(n*h),a/hn&&--u,h=-h):(h=Math.pow(10,r)*s,a=Math.round(t/h),u=Math.round(n/h),a*hn&&--u),un?1:t>=n?0:NaN}function Gi(t,n){return null==t||null==n?NaN:nt?1:n>=t?0:NaN}function Qi(t){let n,e,i;function r(t,i,r=0,o=t.length){if(r>>1;e(t[n],i)<0?r=n+1:o=n}while(rWi(t(n),e),i=(n,e)=>t(n)-e):(n=t===Wi||t===Gi?t:Ji,e=t,i=t),{left:r,center:function(t,n,e=0,o=t.length){const s=r(t,n,e,o-1);return s>e&&i(t[s-1],n)>-i(t[s],n)?s-1:s},right:function(t,i,r=0,o=t.length){if(r>>1;e(t[n],i)<=0?r=n+1:o=n}while(rn&&(e=t,t=n,n=e),h=function(e){return Math.max(t,Math.min(n,e))}),i=u>2?_r:fr,r=o=null,l}function l(n){return null==n||isNaN(n=+n)?e:(r||(r=i(s.map(t),a,u)))(t(h(n)))}return l.invert=function(e){return h(n((o||(o=i(a,s.map(t),hn)))(e)))},l.domain=function(t){return arguments.length?(s=Array.from(t,ur),c()):s.slice()},l.range=function(t){return arguments.length?(a=Array.from(t),c()):a.slice()},l.rangeRound=function(t){return a=Array.from(t),u=ar,c()},l.clamp=function(t){return arguments.length?(h=!!t||cr,c()):h!==cr},l.interpolate=function(t){return arguments.length?(u=t,c()):u},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,i){return t=e,n=i,c()}}function gr(){return yr()(cr,cr)}function dr(t,n,e,i){var r,o=Zi(t,n,e);switch((i=je(null==i?",f":i)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(n));return null!=i.precision||isNaN(r=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(qe(n)/3)))-qe(Math.abs(t)))}(o,s))||(i.precision=r),We(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(r=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,qe(n)-qe(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(i.precision=r-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(r=function(t){return Math.max(0,-qe(Math.abs(t)))}(o))||(i.precision=r-2*("%"===i.type))}return Ze(i)}function vr(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){if(!((e=+e)>0))return[];if((t=+t)===(n=+n))return[t];const i=n=r))return[];const a=o-r+1,u=new Array(a);if(i)if(s<0)for(let h=0;h0;){if((r=Vi(u,h,e))===i)return o[s]=u,o[a]=h,n(o);if(r>0)u=Math.floor(u/r)*r,h=Math.ceil(h/r)*r;else{if(!(r<0))break;u=Math.ceil(u*r)/r,h=Math.floor(h*r)/r}i=r}return t},t}function xr(){var t=gr();return t.copy=function(){return pr(t,xr())},Pi.apply(t,arguments),vr(t)}const mr=1e3,wr=6e4,br=36e5,Mr=864e5,Tr=6048e5,kr=2592e6,Nr=31536e6,Ar=new Date,Cr=new Date;function Sr(t,n,e,i){function r(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return r.floor=n=>(t(n=new Date(+n)),n),r.ceil=e=>(t(e=new Date(e-1)),n(e,1),t(e),e),r.round=t=>{const n=r(t),e=r.ceil(t);return t-n(n(t=new Date(+t),null==e?1:Math.floor(e)),t),r.range=(e,i,o)=>{const s=[];if(e=r.ceil(e),o=null==o?1:Math.floor(o),!(e0))return s;let a;do{s.push(a=new Date(+e)),n(e,o),t(e)}while(aSr(n=>{if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;n(t,-1),!e(t););else for(;--i>=0;)for(;n(t,1),!e(t););}),e&&(r.count=(n,i)=>(Ar.setTime(+n),Cr.setTime(+i),t(Ar),t(Cr),Math.floor(e(Ar,Cr))),r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?n=>i(n)%t===0:n=>r.count(0,n)%t===0):r:null)),r}const $r=Sr(()=>{},(t,n)=>{t.setTime(+t+n)},(t,n)=>n-t);$r.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Sr(n=>{n.setTime(Math.floor(n/t)*t)},(n,e)=>{n.setTime(+n+e*t)},(n,e)=>(e-n)/t):$r:null);$r.range;const Er=Sr(t=>{t.setTime(t-t.getMilliseconds())},(t,n)=>{t.setTime(+t+n*mr)},(t,n)=>(n-t)/mr,t=>t.getUTCSeconds()),Ur=(Er.range,Sr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mr)},(t,n)=>{t.setTime(+t+n*wr)},(t,n)=>(n-t)/wr,t=>t.getMinutes())),Dr=(Ur.range,Sr(t=>{t.setUTCSeconds(0,0)},(t,n)=>{t.setTime(+t+n*wr)},(t,n)=>(n-t)/wr,t=>t.getUTCMinutes())),Pr=(Dr.range,Sr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mr-t.getMinutes()*wr)},(t,n)=>{t.setTime(+t+n*br)},(t,n)=>(n-t)/br,t=>t.getHours())),Fr=(Pr.range,Sr(t=>{t.setUTCMinutes(0,0,0)},(t,n)=>{t.setTime(+t+n*br)},(t,n)=>(n-t)/br,t=>t.getUTCHours())),Yr=(Fr.range,Sr(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*wr)/Mr,t=>t.getDate()-1)),Hr=(Yr.range,Sr(t=>{t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n)},(t,n)=>(n-t)/Mr,t=>t.getUTCDate()-1)),Lr=(Hr.range,Sr(t=>{t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n)},(t,n)=>(n-t)/Mr,t=>Math.floor(t/Mr)));Lr.range;function qr(t){return Sr(n=>{n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+7*n)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*wr)/Tr)}const zr=qr(0),Or=qr(1),jr=qr(2),Ir=qr(3),Xr=qr(4),Rr=qr(5),Br=qr(6);zr.range,Or.range,jr.range,Ir.range,Xr.range,Rr.range,Br.range;function Vr(t){return Sr(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+7*n)},(t,n)=>(n-t)/Tr)}const Zr=Vr(0),Wr=Vr(1),Gr=Vr(2),Qr=Vr(3),Jr=Vr(4),Kr=Vr(5),to=Vr(6),no=(Zr.range,Wr.range,Gr.range,Qr.range,Jr.range,Kr.range,to.range,Sr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,n)=>{t.setMonth(t.getMonth()+n)},(t,n)=>n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear()),t=>t.getMonth())),eo=(no.range,Sr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCMonth(t.getUTCMonth()+n)},(t,n)=>n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),io=(eo.range,Sr(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n)},(t,n)=>n.getFullYear()-t.getFullYear(),t=>t.getFullYear()));io.every=t=>isFinite(t=Math.floor(t))&&t>0?Sr(n=>{n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,e)=>{n.setFullYear(n.getFullYear()+e*t)}):null;io.range;const ro=Sr(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n)},(t,n)=>n.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ro.every=t=>isFinite(t=Math.floor(t))&&t>0?Sr(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,e)=>{n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null;ro.range;function oo(t,n,e,i,r,o){const s=[[Er,1,mr],[Er,5,5e3],[Er,15,15e3],[Er,30,3e4],[o,1,wr],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,br],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,Mr],[i,2,1728e5],[e,1,Tr],[n,1,kr],[n,3,7776e6],[t,1,Nr]];function a(n,e,i){const r=Math.abs(e-n)/i,o=Qi(([,,t])=>t).right(s,r);if(o===s.length)return t.every(Zi(n/Nr,e/Nr,i));if(0===o)return $r.every(Math.max(Zi(n,e,i),1));const[a,u]=s[r/s[o-1][2][t.toLowerCase(),n]))}function To(t,n,e){var i=go.exec(n.slice(e,e+1));return i?(t.w=+i[0],e+i[0].length):-1}function ko(t,n,e){var i=go.exec(n.slice(e,e+1));return i?(t.u=+i[0],e+i[0].length):-1}function No(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.U=+i[0],e+i[0].length):-1}function Ao(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.V=+i[0],e+i[0].length):-1}function Co(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.W=+i[0],e+i[0].length):-1}function So(t,n,e){var i=go.exec(n.slice(e,e+4));return i?(t.y=+i[0],e+i[0].length):-1}function $o(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function Eo(t,n,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function Uo(t,n,e){var i=go.exec(n.slice(e,e+1));return i?(t.q=3*i[0]-3,e+i[0].length):-1}function Do(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.m=i[0]-1,e+i[0].length):-1}function Po(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.d=+i[0],e+i[0].length):-1}function Fo(t,n,e){var i=go.exec(n.slice(e,e+3));return i?(t.m=0,t.d=+i[0],e+i[0].length):-1}function Yo(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.H=+i[0],e+i[0].length):-1}function Ho(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.M=+i[0],e+i[0].length):-1}function Lo(t,n,e){var i=go.exec(n.slice(e,e+2));return i?(t.S=+i[0],e+i[0].length):-1}function qo(t,n,e){var i=go.exec(n.slice(e,e+3));return i?(t.L=+i[0],e+i[0].length):-1}function zo(t,n,e){var i=go.exec(n.slice(e,e+6));return i?(t.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function Oo(t,n,e){var i=vo.exec(n.slice(e,e+1));return i?e+i[0].length:-1}function jo(t,n,e){var i=go.exec(n.slice(e));return i?(t.Q=+i[0],e+i[0].length):-1}function Io(t,n,e){var i=go.exec(n.slice(e));return i?(t.s=+i[0],e+i[0].length):-1}function Xo(t,n){return mo(t.getDate(),n,2)}function Ro(t,n){return mo(t.getHours(),n,2)}function Bo(t,n){return mo(t.getHours()%12||12,n,2)}function Vo(t,n){return mo(1+Yr.count(io(t),t),n,3)}function Zo(t,n){return mo(t.getMilliseconds(),n,3)}function Wo(t,n){return Zo(t,n)+"000"}function Go(t,n){return mo(t.getMonth()+1,n,2)}function Qo(t,n){return mo(t.getMinutes(),n,2)}function Jo(t,n){return mo(t.getSeconds(),n,2)}function Ko(t){var n=t.getDay();return 0===n?7:n}function ts(t,n){return mo(zr.count(io(t)-1,t),n,2)}function ns(t){var n=t.getDay();return n>=4||0===n?Xr(t):Xr.ceil(t)}function es(t,n){return t=ns(t),mo(Xr.count(io(t),t)+(4===io(t).getDay()),n,2)}function is(t){return t.getDay()}function rs(t,n){return mo(Or.count(io(t)-1,t),n,2)}function os(t,n){return mo(t.getFullYear()%100,n,2)}function ss(t,n){return mo((t=ns(t)).getFullYear()%100,n,2)}function as(t,n){return mo(t.getFullYear()%1e4,n,4)}function us(t,n){var e=t.getDay();return mo((t=e>=4||0===e?Xr(t):Xr.ceil(t)).getFullYear()%1e4,n,4)}function hs(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+mo(n/60|0,"0",2)+mo(n%60,"0",2)}function cs(t,n){return mo(t.getUTCDate(),n,2)}function ls(t,n){return mo(t.getUTCHours(),n,2)}function fs(t,n){return mo(t.getUTCHours()%12||12,n,2)}function _s(t,n){return mo(1+Hr.count(ro(t),t),n,3)}function ps(t,n){return mo(t.getUTCMilliseconds(),n,3)}function ys(t,n){return ps(t,n)+"000"}function gs(t,n){return mo(t.getUTCMonth()+1,n,2)}function ds(t,n){return mo(t.getUTCMinutes(),n,2)}function vs(t,n){return mo(t.getUTCSeconds(),n,2)}function xs(t){var n=t.getUTCDay();return 0===n?7:n}function ms(t,n){return mo(Zr.count(ro(t)-1,t),n,2)}function ws(t){var n=t.getUTCDay();return n>=4||0===n?Jr(t):Jr.ceil(t)}function bs(t,n){return t=ws(t),mo(Jr.count(ro(t),t)+(4===ro(t).getUTCDay()),n,2)}function Ms(t){return t.getUTCDay()}function Ts(t,n){return mo(Wr.count(ro(t)-1,t),n,2)}function ks(t,n){return mo(t.getUTCFullYear()%100,n,2)}function Ns(t,n){return mo((t=ws(t)).getUTCFullYear()%100,n,2)}function As(t,n){return mo(t.getUTCFullYear()%1e4,n,4)}function Cs(t,n){var e=t.getUTCDay();return mo((t=e>=4||0===e?Jr(t):Jr.ceil(t)).getUTCFullYear()%1e4,n,4)}function Ss(){return"+0000"}function $s(){return"%"}function Es(t){return+t}function Us(t){return Math.floor(+t/1e3)}function Ds(t){return new Date(t)}function Ps(t){return t instanceof Date?+t:+new Date(+t)}function Fs(t,n,e,i,r,o,s,a,u,h){var c=gr(),l=c.invert,f=c.domain,_=h(".%L"),p=h(":%S"),y=h("%I:%M"),g=h("%I %p"),d=h("%a %d"),v=h("%b %d"),x=h("%B"),m=h("%Y");function w(t){return(u(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Es,s:Us,S:Jo,u:Ko,U:ts,V:es,w:is,W:rs,x:null,X:null,y:os,Y:as,Z:hs,"%":$s},m={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:cs,e:cs,f:ys,g:Ns,G:Cs,H:ls,I:fs,j:_s,L:ps,m:gs,M:ds,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Es,s:Us,S:vs,u:xs,U:ms,V:bs,w:Ms,W:Ts,x:null,X:null,y:ks,Y:As,Z:Ss,"%":$s},w={a:function(t,n,e){var i=_.exec(n.slice(e));return i?(t.w=p.get(i[0].toLowerCase()),e+i[0].length):-1},A:function(t,n,e){var i=l.exec(n.slice(e));return i?(t.w=f.get(i[0].toLowerCase()),e+i[0].length):-1},b:function(t,n,e){var i=d.exec(n.slice(e));return i?(t.m=v.get(i[0].toLowerCase()),e+i[0].length):-1},B:function(t,n,e){var i=y.exec(n.slice(e));return i?(t.m=g.get(i[0].toLowerCase()),e+i[0].length):-1},c:function(t,e,i){return T(t,n,e,i)},d:Po,e:Po,f:zo,g:$o,G:So,H:Yo,I:Yo,j:Fo,L:qo,m:Do,M:Ho,p:function(t,n,e){var i=h.exec(n.slice(e));return i?(t.p=c.get(i[0].toLowerCase()),e+i[0].length):-1},q:Uo,Q:jo,s:Io,S:Lo,u:ko,U:No,V:Ao,w:To,W:Co,x:function(t,n,i){return T(t,e,n,i)},X:function(t,n,e){return T(t,i,n,e)},y:$o,Y:So,Z:Eo,"%":Oo};function b(t,n){return function(e){var i,r,o,s=[],a=-1,u=0,h=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=lo(fo(o.y,0,1))).getUTCDay(),i=r>4||0===r?Wr.ceil(i):Wr(i),i=Hr.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(r=(i=co(fo(o.y,0,1))).getDay(),i=r>4||0===r?Or.ceil(i):Or(i),i=Yr.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),r="Z"in o?lo(fo(o.y,0,1)).getUTCDay():co(fo(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,lo(o)):co(o)}}function T(t,n,e,i){for(var r,o,s=0,a=n.length,u=e.length;s=u)return-1;if(37===(r=n.charCodeAt(s++))){if(r=n.charAt(s++),!(o=w[r in yo?n.charAt(s++):r])||(i=o(t,e,i))<0)return-1}else if(r!=e.charCodeAt(i++))return-1}return i}return x.x=b(e,x),x.X=b(i,x),x.c=b(n,x),m.x=b(e,m),m.X=b(i,m),m.c=b(n,m),{format:function(t){var n=b(t+="",x);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=b(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}(t),po=_o.format,_o.parse,_o.utcFormat,_o.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Hs=function(t){for(var n=t.length/6|0,e=new Array(n),i=0;i=1?Ws:t<=-1?-Ws:Math.asin(t)}const Js=Math.PI,Ks=2*Js,ta=1e-6,na=Ks-ta;function ea(t){this._+=t[0];for(let n=1,e=t.length;n=0))throw new Error(`invalid digits: ${t}`);if(n>15)return ea;const e=10**n;return function(t){this._+=t[0];for(let n=1,i=t.length;nta)if(Math.abs(c*a-u*h)>ta&&r){let f=e-o,_=i-s,p=a*a+u*u,y=f*f+_*_,g=Math.sqrt(p),d=Math.sqrt(l),v=r*Math.tan((Js-Math.acos((p+l-y)/(2*g*d)))/2),x=v/d,m=v/g;Math.abs(x-1)>ta&&this._append`L${t+x*h},${n+x*c}`,this._append`A${r},${r},0,0,${+(c*f>h*_)},${this._x1=t+m*a},${this._y1=n+m*u}`}else this._append`L${this._x1=t},${this._y1=n}`;else;}arc(t,n,e,i,r,o){if(t=+t,n=+n,o=!!o,(e=+e)<0)throw new Error(`negative radius: ${e}`);let s=e*Math.cos(i),a=e*Math.sin(i),u=t+s,h=n+a,c=1^o,l=o?i-r:r-i;null===this._x1?this._append`M${u},${h}`:(Math.abs(this._x1-u)>ta||Math.abs(this._y1-h)>ta)&&this._append`L${u},${h}`,e&&(l<0&&(l=l%Ks+Ks),l>na?this._append`A${e},${e},0,1,${c},${t-s},${n-a}A${e},${e},0,1,${c},${this._x1=u},${this._y1=h}`:l>ta&&this._append`A${e},${e},0,${+(l>=Js)},${c},${this._x1=t+e*Math.cos(r)},${this._y1=n+e*Math.sin(r)}`)}rect(t,n,e,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${e=+e}v${+i}h${-e}Z`}toString(){return this._}}function ra(t){let n=3;return t.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);n=t}return t},()=>new ia(n)}function oa(t){return t.innerRadius}function sa(t){return t.outerRadius}function aa(t){return t.startAngle}function ua(t){return t.endAngle}function ha(t){return t&&t.padAngle}function ca(t,n,e,i,r,o,s){var a=t-e,u=n-i,h=(s?o:-o)/Bs(a*a+u*u),c=h*u,l=-h*a,f=t+c,_=n+l,p=e+c,y=i+l,g=(f+p)/2,d=(_+y)/2,v=p-f,x=y-_,m=v*v+x*x,w=r-o,b=f*y-p*_,M=(x<0?-1:1)*Bs(Is(0,w*w*m-b*b)),T=(b*x-v*M)/m,k=(-b*v-x*M)/m,N=(b*x+v*M)/m,A=(-b*v+x*M)/m,C=T-g,S=k-d,$=N-g,E=A-d;return C*C+S*S>$*$+E*E&&(T=N,k=A),{cx:T,cy:k,x01:-c,y01:-l,x11:T*(r/w-1),y11:k*(r/w-1)}}function la(){var t=oa,n=sa,e=qs(0),i=null,r=aa,o=ua,s=ha,a=null,u=ra(h);function h(){var h,c,l,f=+t.apply(this,arguments),_=+n.apply(this,arguments),p=r.apply(this,arguments)-Ws,y=o.apply(this,arguments)-Ws,g=zs(y-p),d=y>p;if(a||(a=h=u()),_Vs)if(g>Gs-Vs)a.moveTo(_*js(p),_*Rs(p)),a.arc(0,0,_,p,y,!d),f>Vs&&(a.moveTo(f*js(y),f*Rs(y)),a.arc(0,0,f,y,p,d));else{var v,x,m=p,w=y,b=p,M=y,T=g,k=g,N=s.apply(this,arguments)/2,A=N>Vs&&(i?+i.apply(this,arguments):Bs(f*f+_*_)),C=Xs(zs(_-f)/2,+e.apply(this,arguments)),S=C,$=C;if(A>Vs){var E=Qs(A/f*Rs(N)),U=Qs(A/_*Rs(N));(T-=2*E)>Vs?(b+=E*=d?1:-1,M-=E):(T=0,b=M=(p+y)/2),(k-=2*U)>Vs?(m+=U*=d?1:-1,w-=U):(k=0,m=w=(p+y)/2)}var D=_*js(m),P=_*Rs(m),F=f*js(M),Y=f*Rs(M);if(C>Vs){var H,L=_*js(w),q=_*Rs(w),z=f*js(b),O=f*Rs(b);if(g1?0:l<-1?Zs:Math.acos(l))/2),V=Bs(H[0]*H[0]+H[1]*H[1]);S=Xs(C,(f-V)/(B-1)),$=Xs(C,(_-V)/(B+1))}else S=$=0}k>Vs?$>Vs?(v=ca(z,O,D,P,_,$,d),x=ca(L,q,F,Y,_,$,d),a.moveTo(v.cx+v.x01,v.cy+v.y01),$Vs&&T>Vs?S>Vs?(v=ca(F,Y,L,q,f,-S,d),x=ca(D,P,z,O,f,-S,d),a.lineTo(v.cx+v.x01,v.cy+v.y01),St?1:n>=t?0:NaN}function xa(t){return t}function ma(){var t=xa,n=va,e=null,i=qs(0),r=qs(Gs),o=qs(0);function s(s){var a,u,h,c,l,f=(s=fa(s)).length,_=0,p=new Array(f),y=new Array(f),g=+i.apply(this,arguments),d=Math.min(Gs,Math.max(-Gs,r.apply(this,arguments)-g)),v=Math.min(Math.abs(d)/f,o.apply(this,arguments)),x=v*(d<0?-1:1);for(a=0;a0&&(_+=l);for(null!=n?p.sort(function(t,e){return n(y[t],y[e])}):null!=e&&p.sort(function(t,n){return e(s[t],s[n])}),a=0,h=_?(d-f*x)/_:0;a0?l*h:0)+x,y[u]={data:s[u],index:a,value:l,startAngle:g,endAngle:c,padAngle:v};return y}return s.value=function(n){return arguments.length?(t="function"==typeof n?n:qs(+n),s):t},s.sortValues=function(t){return arguments.length?(n=t,e=null,s):n},s.sort=function(t){return arguments.length?(e=t,n=null,s):e},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:qs(+t),s):i},s.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:qs(+t),s):r},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:qs(+t),s):o},s}function wa(){}function ba(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Ma(t){this._context=t}function Ta(t){return new Ma(t)}function ka(t){this._context=t}function Na(t){return new ka(t)}function Aa(t){this._context=t}function Ca(t){return new Aa(t)}_a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}},Ma.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ba(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ba(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},ka.prototype={areaStart:wa,areaEnd:wa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:ba(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,i):this._context.moveTo(e,i);break;case 3:this._point=4;default:ba(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};class Sa{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n)}this._x0=t,this._y0=n}}function $a(t){return new Sa(t,!0)}function Ea(t){return new Sa(t,!1)}function Ua(t,n){this._basis=new Ma(t),this._beta=n}Ua.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var i,r=t[0],o=n[0],s=t[e]-r,a=n[e]-o,u=-1;++u<=e;)i=u/e,this._basis.point(this._beta*t[u]+(1-this._beta)*(r+i*s),this._beta*n[u]+(1-this._beta)*(o+i*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};const Da=function t(n){function e(t){return 1===n?new Ma(t):new Ua(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Pa(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Fa(t,n){this._context=t,this._k=(1-n)/6}Fa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Pa(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Pa(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Ya=function t(n){function e(t){return new Fa(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Ha(t,n){this._context=t,this._k=(1-n)/6}Ha.prototype={areaStart:wa,areaEnd:wa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Pa(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const La=function t(n){function e(t){return new Ha(t,n)}return e.tension=function(n){return t(+n)},e}(0);function qa(t,n){this._context=t,this._k=(1-n)/6}qa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pa(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const za=function t(n){function e(t){return new qa(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Oa(t,n,e){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Vs){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>Vs){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-n*t._l12_2a)/c,s=(s*h+t._y1*t._l23_2a-e*t._l12_2a)/c}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function ja(t,n){this._context=t,this._alpha=n}ja.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Oa(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Ia=function t(n){function e(t){return n?new ja(t,n):new Fa(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Xa(t,n){this._context=t,this._alpha=n}Xa.prototype={areaStart:wa,areaEnd:wa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Oa(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Ra=function t(n){function e(t){return n?new Xa(t,n):new Ha(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ba(t,n){this._context=t,this._alpha=n}Ba.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,i=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Oa(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};const Va=function t(n){function e(t){return n?new Ba(t,n):new qa(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Za(t){this._context=t}function Wa(t){return new Za(t)}function Ga(t){return t<0?-1:1}function Qa(t,n,e){var i=t._x1-t._x0,r=n-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(e-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(Ga(o)+Ga(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function Ja(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Ka(t,n,e){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*n,o-a,s-a*e,o,s)}function tu(t){this._context=t}function nu(t){this._context=new eu(t)}function eu(t){this._context=t}function iu(t){return new tu(t)}function ru(t){return new nu(t)}function ou(t){this._context=t}function su(t){var n,e,i=t.length-1,r=new Array(i),o=new Array(i),s=new Array(i);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],n=1;n=0;--n)r[n]=(s[n]-r[n+1])/o[n];for(o[i-1]=(t[i]+r[i-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},fu.prototype={constructor:fu,scale:function(t){return 1===t?this:new fu(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new fu(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new fu(1,0,0);fu.prototype}}]); \ No newline at end of file diff --git a/assets/js/156.c3e6c79e.js b/assets/js/156.c3e6c79e.js new file mode 100644 index 0000000..0decfc5 --- /dev/null +++ b/assets/js/156.c3e6c79e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[156],{5561:(n,t,r)=>{r.d(t,{A:()=>f});var e=r(3372);const o=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this};const u=function(n){return this.__data__.has(n)};function c(n){var t=-1,r=null==n?0:n.length;for(this.__data__=new e.A;++t{r.d(t,{A:()=>e});const e=function(n,t){for(var r=-1,e=null==n?0:n.length;++r{r.d(t,{A:()=>e});const e=function(n,t){for(var r=-1,e=null==n?0:n.length,o=0,u=[];++r{r.d(t,{A:()=>e});const e=function(n,t){for(var r=-1,e=null==n?0:n.length,o=Array(e);++r{r.d(t,{A:()=>e});const e=function(n,t){for(var r=-1,e=t.length,o=n.length;++r{r.d(t,{A:()=>u});var e=r(6668),o=r(2839);const u=function(n,t){return function(r,e){if(null==r)return r;if(!(0,o.A)(r))return n(r,e);for(var u=r.length,c=t?u:-1,f=Object(r);(t?c--:++c{r.d(t,{A:()=>e});const e=function(n,t,r,e){for(var o=n.length,u=r+(e?1:-1);e?u--:++u{r.d(t,{A:()=>a});var e=r(6659),o=r(8400),u=r(6789),c=r(8384),f=o.A?o.A.isConcatSpreadable:void 0;const i=function(n){return(0,c.A)(n)||(0,u.A)(n)||!!(f&&n&&n[f])};const a=function n(t,r,o,u,c){var f=-1,a=t.length;for(o||(o=i),c||(c=[]);++f0&&o(s)?r>1?n(s,r-1,o,u,c):(0,e.A)(c,s):u||(c[c.length]=s)}return c}},6668:(n,t,r)=>{r.d(t,{A:()=>u});var e=r(7759),o=r(3085);const u=function(n,t){return n&&(0,e.A)(n,t,o.A)}},5429:(n,t,r)=>{r.d(t,{A:()=>u});var e=r(2392),o=r(9750);const u=function(n,t){for(var r=0,u=(t=(0,e.A)(t,n)).length;null!=n&&r{r.d(t,{A:()=>u});var e=r(6659),o=r(8384);const u=function(n,t,r){var u=t(n);return(0,o.A)(n)?u:(0,e.A)(u,r(n))}},8529:(n,t,r)=>{r.d(t,{A:()=>Q});var e=r(3771),o=r(5561);const u=function(n,t){for(var r=-1,e=null==n?0:n.length;++rs))return!1;var l=i.get(n),v=i.get(t);if(l&&v)return l==t&&v==n;var d=-1,h=!0,p=2&r?new o.A:void 0;for(i.set(n,t),i.set(t,n);++d{r.d(t,{A:()=>e});const e=function(n){return function(t){return null==t?void 0:t[n]}}},7399:(n,t,r)=>{r.d(t,{A:()=>h});var e=r(5561),o=r(2956);const u=function(n){return n!=n};const c=function(n,t,r){for(var e=r-1,o=n.length;++e-1};const a=function(n,t,r){for(var e=-1,o=null==n?0:n.length;++e=200){var h=t?null:d(n);if(h)return(0,v.A)(h);f=!1,u=s.A,l=new e.A}else l=t?[]:A;n:for(;++o{r.d(t,{A:()=>e});const e=function(n,t){return n.has(t)}},1779:(n,t,r)=>{r.d(t,{A:()=>o});var e=r(8539);const o=function(n){return"function"==typeof n?n:e.A}},2392:(n,t,r)=>{r.d(t,{A:()=>s});var e=r(8384),o=r(2582),u=r(9881);var c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g;const i=function(n){var t=(0,u.A)(n,function(n){return 500===r.size&&r.clear(),n}),r=t.cache;return t}(function(n){var t=[];return 46===n.charCodeAt(0)&&t.push(""),n.replace(c,function(n,r,e,o){t.push(e?o.replace(f,"$1"):r||n)}),t});var a=r(5247);const s=function(n,t){return(0,e.A)(n)?n:(0,o.A)(n,t)?[n]:i((0,a.A)(n))}},4583:(n,t,r)=>{r.d(t,{A:()=>c});var e=r(4338),o=r(9273),u=r(3085);const c=function(n){return(0,e.A)(n,u.A,o.A)}},9273:(n,t,r)=>{r.d(t,{A:()=>f});var e=r(9413),o=r(8304),u=Object.prototype.propertyIsEnumerable,c=Object.getOwnPropertySymbols;const f=c?function(n){return null==n?[]:(n=Object(n),(0,e.A)(c(n),function(t){return u.call(n,t)}))}:o.A},3045:(n,t,r)=>{r.d(t,{A:()=>a});var e=r(2392),o=r(6789),u=r(8384),c=r(1310),f=r(5801),i=r(9750);const a=function(n,t,r){for(var a=-1,s=(t=(0,e.A)(t,n)).length,A=!1;++a{r.d(t,{A:()=>f});var e=r(8384),o=r(941),u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/;const f=function(n,t){if((0,e.A)(n))return!1;var r=typeof n;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=n&&!(0,o.A)(n))||(c.test(n)||!u.test(n)||null!=t&&n in Object(t))}},558:(n,t,r)=>{r.d(t,{A:()=>e});const e=function(n){var t=-1,r=Array(n.size);return n.forEach(function(n){r[++t]=n}),r}},9750:(n,t,r)=>{r.d(t,{A:()=>o});var e=r(941);const o=function(n){if("string"==typeof n||(0,e.A)(n))return n;var t=n+"";return"0"==t&&1/n==-1/0?"-0":t}},8511:(n,t,r)=>{r.d(t,{A:()=>i});var e=r(9413),o=r(3043);const u=function(n,t){var r=[];return(0,o.A)(n,function(n,e,o){t(n,e,o)&&r.push(n)}),r};var c=r(8529),f=r(8384);const i=function(n,t){return((0,f.A)(n)?e.A:u)(n,(0,c.A)(t,3))}},6327:(n,t,r)=>{r.d(t,{A:()=>f});var e=r(1549),o=r(3043),u=r(1779),c=r(8384);const f=function(n,t){return((0,c.A)(n)?e.A:o.A)(n,(0,u.A)(t))}},8731:(n,t,r)=>{r.d(t,{A:()=>u});const e=function(n,t){return null!=n&&t in Object(n)};var o=r(3045);const u=function(n,t){return null!=n&&(0,o.A)(n,t,e)}},941:(n,t,r)=>{r.d(t,{A:()=>u});var e=r(4227),o=r(9269);const u=function(n){return"symbol"==typeof n||(0,o.A)(n)&&"[object Symbol]"==(0,e.A)(n)}},3085:(n,t,r)=>{r.d(t,{A:()=>c});var e=r(3434),o=r(7700),u=r(2839);const c=function(n){return(0,u.A)(n)?(0,e.A)(n):(0,o.A)(n)}},7074:(n,t,r)=>{r.d(t,{A:()=>i});const e=function(n,t,r,e){var o=-1,u=null==n?0:n.length;for(e&&u&&(r=n[++o]);++o{r.d(t,{A:()=>e});const e=function(){return[]}},5247:(n,t,r)=>{r.d(t,{A:()=>s});var e=r(8400),o=r(4017),u=r(8384),c=r(941),f=e.A?e.A.prototype:void 0,i=f?f.toString:void 0;const a=function n(t){if("string"==typeof t)return t;if((0,u.A)(t))return(0,o.A)(t,n)+"";if((0,c.A)(t))return i?i.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r};const s=function(n){return null==n?"":a(n)}}}]); \ No newline at end of file diff --git a/assets/js/1571.216fe5d3.js b/assets/js/1571.216fe5d3.js new file mode 100644 index 0000000..8dede6d --- /dev/null +++ b/assets/js/1571.216fe5d3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1571],{1236:(t,e,r)=>{r.d(e,{T:()=>v});var s=r(6569),n=r(1121),i=r(3085),o=r(8511),a=r(7684),c=r(6327),h=r(777),u=r(2877),d=r(6331),l=r(7399),_=r(1220);const A=(0,d.A)(function(t){return(0,l.A)((0,u.A)(t,1,_.A,!0))});var p=r(8642),b=r(7074),f="\0";class v{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=s.A(void 0),this._defaultEdgeLabelFn=s.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[f]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return n.A(t)||(t=s.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var t=this;return o.A(this.nodes(),function(e){return a.A(t._in[e])})}sinks(){var t=this;return o.A(this.nodes(),function(e){return a.A(t._out[e])})}setNodes(t,e){var r=arguments,s=this;return c.A(t,function(t){r.length>1?s.setNode(t,e):s.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=f,this._children[t]={},this._children[f][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],c.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),c.A(i.A(this._in[t]),e),delete this._in[t],delete this._preds[t],c.A(i.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h.A(e))e=f;else{for(var r=e+="";!h.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==f)return e}}children(t){if(h.A(t)&&(t=f),this._isCompound){var e=this._children[t];if(e)return i.A(e)}else{if(t===f)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return i.A(e)}successors(t){var e=this._sucs[t];if(e)return i.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return A(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;c.A(this._nodes,function(r,s){t(s)&&e.setNode(s,r)}),c.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var s={};function n(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(s[t]=i,i):i in s?s[i]:n(i)}return this._isCompound&&c.A(e.nodes(),function(t){e.setParent(t,n(t))}),e}setDefaultEdgeLabel(t){return n.A(t)||(t=s.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return p.A(this._edgeObjs)}setPath(t,e){var r=this,s=arguments;return b.A(t,function(t,n){return s.length>1?r.setEdge(t,n,e):r.setEdge(t,n),n}),this}setEdge(){var t,e,r,s,n=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,r=i.name,2===arguments.length&&(s=arguments[1],n=!0)):(t=i,e=arguments[1],r=arguments[3],arguments.length>2&&(s=arguments[2],n=!0)),t=""+t,e=""+e,h.A(r)||(r=""+r);var o=y(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return n&&(this._edgeLabels[o]=s),this;if(!h.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[o]=n?s:this._defaultEdgeLabelFn(t,e,r);var a=function(t,e,r,s){var n=""+e,i=""+r;if(!t&&n>i){var o=n;n=i,i=o}var a={v:n,w:i};s&&(a.name=s);return a}(this._isDirected,t,e,r);return t=a.v,e=a.w,Object.freeze(a),this._edgeObjs[o]=a,g(this._preds[e],t),g(this._sucs[t],e),this._in[e][o]=a,this._out[t][o]=a,this._edgeCount++,this}edge(t,e,r){var s=1===arguments.length?w(this._isDirected,arguments[0]):y(this._isDirected,t,e,r);return this._edgeLabels[s]}hasEdge(t,e,r){var s=1===arguments.length?w(this._isDirected,arguments[0]):y(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,e,r){var s=1===arguments.length?w(this._isDirected,arguments[0]):y(this._isDirected,t,e,r),n=this._edgeObjs[s];return n&&(t=n.v,e=n.w,delete this._edgeLabels[s],delete this._edgeObjs[s],j(this._preds[e],t),j(this._sucs[t],e),delete this._in[e][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var s=p.A(r);return e?o.A(s,function(t){return t.v===e}):s}}outEdges(t,e){var r=this._out[t];if(r){var s=p.A(r);return e?o.A(s,function(t){return t.w===e}):s}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function g(t,e){t[e]?t[e]++:t[e]=1}function j(t,e){--t[e]||delete t[e]}function y(t,e,r,s){var n=""+e,i=""+r;if(!t&&n>i){var o=n;n=i,i=o}return n+"\x01"+i+"\x01"+(h.A(s)?"\0":s)}function w(t,e){return y(t,e.v,e.w,e.name)}v.prototype._nodeCount=0,v.prototype._edgeCount=0},7446:(t,e,r)=>{r.d(e,{T:()=>s.T});var s=r(1236)},5368:(t,e,r)=>{r.d(e,{A:()=>Z});var s=r(3771),n=r(1549),i=r(7776),o=r(1050),a=r(3085);const c=function(t,e){return t&&(0,o.A)(e,(0,a.A)(e),t)};var h=r(4538);const u=function(t,e){return t&&(0,o.A)(e,(0,h.A)(e),t)};var d=r(781),l=r(2352),_=r(9273);const A=function(t,e){return(0,o.A)(t,(0,_.A)(t),e)};var p=r(6659),b=r(4218),f=r(8304);const v=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)(0,p.A)(e,(0,_.A)(t)),t=(0,b.A)(t);return e}:f.A;const g=function(t,e){return(0,o.A)(t,v(t),e)};var j=r(4583),y=r(4338);const w=function(t){return(0,y.A)(t,h.A,v)};var m=r(6900),O=Object.prototype.hasOwnProperty;const C=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&O.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var E=r(2848);const N=function(t,e){var r=e?(0,E.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var L=/\w*$/;const D=function(t){var e=new t.constructor(t.source,L.exec(t));return e.lastIndex=t.lastIndex,e};var P=r(8400),F=P.A?P.A.prototype:void 0,M=F?F.valueOf:void 0;const S=function(t){return M?Object(M.call(t)):{}};var x=r(2314);const I=function(t,e,r){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return(0,E.A)(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return N(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,x.A)(t,r);case"[object Map]":case"[object Set]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return D(t);case"[object Symbol]":return S(t)}};var U=r(5239),k=r(8384),B=r(3449),G=r(9269);const T=function(t){return(0,G.A)(t)&&"[object Map]"==(0,m.A)(t)};var R=r(5354),V=r(9388),z=V.A&&V.A.isMap;const W=z?(0,R.A)(z):T;var $=r(6138);const q=function(t){return(0,G.A)(t)&&"[object Set]"==(0,m.A)(t)};var H=V.A&&V.A.isSet;const J=H?(0,R.A)(H):q;var K="[object Arguments]",Q="[object Function]",X="[object Object]",Y={};Y[K]=Y["[object Array]"]=Y["[object ArrayBuffer]"]=Y["[object DataView]"]=Y["[object Boolean]"]=Y["[object Date]"]=Y["[object Float32Array]"]=Y["[object Float64Array]"]=Y["[object Int8Array]"]=Y["[object Int16Array]"]=Y["[object Int32Array]"]=Y["[object Map]"]=Y["[object Number]"]=Y[X]=Y["[object RegExp]"]=Y["[object Set]"]=Y["[object String]"]=Y["[object Symbol]"]=Y["[object Uint8Array]"]=Y["[object Uint8ClampedArray]"]=Y["[object Uint16Array]"]=Y["[object Uint32Array]"]=!0,Y["[object Error]"]=Y[Q]=Y["[object WeakMap]"]=!1;const Z=function t(e,r,o,_,p,b){var f,v=1&r,y=2&r,O=4&r;if(o&&(f=p?o(e,_,p,b):o(e)),void 0!==f)return f;if(!(0,$.A)(e))return e;var E=(0,k.A)(e);if(E){if(f=C(e),!v)return(0,l.A)(e,f)}else{var N=(0,m.A)(e),L=N==Q||"[object GeneratorFunction]"==N;if((0,B.A)(e))return(0,d.A)(e,v);if(N==X||N==K||L&&!p){if(f=y||L?{}:(0,U.A)(e),!v)return y?g(e,u(f,e)):A(e,c(f,e))}else{if(!Y[N])return p?e:{};f=I(e,N,v)}}b||(b=new s.A);var D=b.get(e);if(D)return D;b.set(e,f),J(e)?e.forEach(function(s){f.add(t(s,r,o,s,e,b))}):W(e)&&e.forEach(function(s,n){f.set(n,t(s,r,o,n,e,b))});var P=O?y?w:j.A:y?h.A:a.A,F=E?void 0:P(e);return(0,n.A)(F||e,function(s,n){F&&(s=e[n=s]),(0,i.A)(f,n,t(s,r,o,n,e,b))}),f}},777:(t,e,r)=>{r.d(e,{A:()=>s});const s=function(t){return void 0===t}},8642:(t,e,r)=>{r.d(e,{A:()=>o});var s=r(4017);const n=function(t,e){return(0,s.A)(e,function(e){return t[e]})};var i=r(3085);const o=function(t){return null==t?[]:n(t,(0,i.A)(t))}}}]); \ No newline at end of file diff --git a/assets/js/165.4c5708a1.js b/assets/js/165.4c5708a1.js deleted file mode 100644 index 1909e68..0000000 --- a/assets/js/165.4c5708a1.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 165.4c5708a1.js.LICENSE.txt */ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[165],{165(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function s(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{A:()=>Zh});var f="undefined"==typeof window?null:window,p=f?f.navigator:null;f&&f.document;var v,g,y,m,b,x,w,E,k,T,C,P,S,B,D,_,A,M,R,I,N,L,z,O,V,F,X,j,Y=d(""),q=d({}),W=d(function(){}),U="undefined"==typeof HTMLElement?"undefined":d(HTMLElement),H=function(e){return e&&e.instanceString&&G(e.instanceString)?e.instanceString():null},K=function(e){return null!=e&&d(e)==Y},G=function(e){return null!=e&&d(e)===W},Z=function(e){return!ee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},$=function(e){return null!=e&&d(e)===q&&!Z(e)&&e.constructor===Object},Q=function(e){return null!=e&&d(e)===d(1)&&!isNaN(e)},J=function(e){return"undefined"===U?void 0:null!=e&&e instanceof HTMLElement},ee=function(e){return te(e)||ne(e)},te=function(e){return"collection"===H(e)&&e._private.single},ne=function(e){return"collection"===H(e)&&!e._private.single},re=function(e){return"core"===H(e)},ae=function(e){return"stylesheet"===H(e)},ie=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},oe=function(e){return function(e){return null!=e&&d(e)===q}(e)&&G(e.then)},se=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},be=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+ge+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(e)},we={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ee=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a=o||t<0||g&&e-p>=c}function x(){var e=t();if(b(e))return w(e);h=setTimeout(x,function(e){var t=o-(e-f);return g?a(t,c-(e-p)):t}(e))}function w(e){return h=void 0,y&&l?m(e):(l=u=void 0,d)}function E(){var e=t(),n=b(e);if(l=arguments,u=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(x,o),v?m(e):d}(f);if(g)return clearTimeout(h),h=setTimeout(x,o),m(f)}return void 0===h&&(h=setTimeout(x,o)),d}return o=n(o)||0,e(s)&&(v=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,o):c,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=u=h=void 0},E.flush=function(){return void 0===h?d:w(t())},E},X}(),Re=Ce(Me),Ie=f?f.performance:null,Ne=Ie&&Ie.now?function(){return Ie.now()}:function(){return Date.now()},Le=function(){if(f){if(f.requestAnimationFrame)return function(e){f.requestAnimationFrame(e)};if(f.mozRequestAnimationFrame)return function(e){f.mozRequestAnimationFrame(e)};if(f.webkitRequestAnimationFrame)return function(e){f.webkitRequestAnimationFrame(e)};if(f.msRequestAnimationFrame)return function(e){f.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Ne())},1e3/60)}}(),ze=function(e){return Le(e)},Oe=Ne,Ve=9261,Fe=5381,Xe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;!(t=e.next()).done;)n=65599*n+t.value|0;return n},je=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve)+e|0},Ye=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Fe;return(t<<5)+t+e|0},qe=function(e){return 2097152*e[0]+e[1]},We=function(e,t){return[je(e[0],t[0]),Ye(e[1],t[1])]},Ue=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Xe({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},pt=function(e){e.splice(0,e.length)},vt=function(e,t,n){return n&&(t=ce(n,t)),e[t]},gt=function(e,t,n,r){n&&(t=ce(n,t)),e[t]=r},yt="undefined"!=typeof Map?Map:function(){return i(function e(){a(this,e),this._obj={}},[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}])}(),mt=function(){return i(function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&re(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new bt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];Z(t.classes)?l=t.classes:K(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;iv;0<=v?++h:--h)g.push(i(e,r));return g},p=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},v=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var w=y.pop(),E=v(w),k=w.id();if(d[k]=E,E!==1/0)for(var T=w.neighborhood().intersect(f),C=0;C0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},Rt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(x(),E++,u===d){for(var k=[],T=a,C=d,P=m[C];k.unshift(T),null!=P&&k.unshift(P),null!=(T=y[C]);)P=m[C=T.id()];return{found:!0,distance:h[u],path:this.spawn(k),steps:E}}p[u]=!0;for(var S=l._private.edges,B=0;BP&&(f[C]=P,y[C]=T,m[C]=x),!a){var S=T*u+k;!a&&f[S]>P&&(f[S]=P,y[S]=k,m[S]=x)}}}for(var B=0;B1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},Ft=Math.sqrt(2),Xt=function(e,t,n){0===n.length&&it("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var f=0;fr;){var a=Math.floor(Math.random()*t.length);t=Xt(a,e,t),n--}return t},Yt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/Ft);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Zt=function(e,t){return Math.sqrt($t(e,t))},$t=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Qt=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},rn=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},an=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},sn=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ln=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},un=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2t.y2)&&!(t.y1>e.y2)))))))},cn=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},dn=function(e,t){return cn(e,t.x,t.y)},hn=function(e,t){return cn(e,t.x1,t.y1)&&cn(e,t.x2,t.y2)},fn=null!==(Dt=Math.hypot)&&void 0!==Dt?Dt:function(e,t){return Math.sqrt(e*e+t*t)};function pn(e,t,n,r,a,i){var o=function(e,t){if(e.length<3)throw new Error("Need at least 3 vertices");var n=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},r=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},a=function(e,t){return{x:e.x*t,y:e.y*t}},i=function(e,t){return e.x*t.y-e.y*t.x},o=function(e){var t=fn(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},s=function(e,t,o,s){var l=r(t,e),u=r(s,o),c=i(l,u);if(Math.abs(c)<1e-9)return n(e,a(l,.5));var d=i(r(o,e),u)/c;return n(e,a(l,d))},l=e.map(function(e){return{x:e.x,y:e.y}});(function(e){for(var t=0,n=0;n7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?In(a,i):u,d=a/2,h=i/2,f=(c=Math.min(c,d,h))!==d,p=c!==h;if(f){var v=r-h-o;if((s=Sn(e,t,n,r,n-d+c-o,v,n+d-c+o,v,!1)).length>0)return s}if(p){var g=n+d+o;if((s=Sn(e,t,n,r,g,r-h+c-o,g,r+h-c+o,!1)).length>0)return s}if(f){var y=r+h+o;if((s=Sn(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(p){var m=n-d-o;if((s=Sn(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=Cn(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=Cn(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,T=r+h-c;if((l=Cn(e,t,n,r,k,T,c+o)).length>0&&l[0]>=k&&l[1]>=T)return[l[0],l[1]];var C=n-d+c,P=r+h-c;return(l=Cn(e,t,n,r,C,P,c+o)).length>0&&l[0]<=C&&l[1]>=P?[l[0],l[1]]:[]},gn=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},yn=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},mn=function(e,t,n,r,a,i,o,s){var l=[];!function(e,t,n,r,a){var i,o,s,l,u,c,d,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,a[1]=0,d=t/3,i>0?(u=(u=s+Math.sqrt(i))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*h-d,a[4]=a[2]=-(h+d)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),h=2*Math.sqrt(o),a[0]=-d+h*Math.cos(l/3),a[2]=-d+h*Math.cos((l+2*Math.PI)/3),a[4]=-d+h*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,h,f,p=-1,v=0;v=0?fl?(e-a)*(e-a)+(t-i)*(t-i):u-d},xn=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},wn=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),f=Math.sin(-u),p=0;p0){var v=kn(c,-l);d=En(v)}else d=c;return xn(e,t,d)},En=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var y=g[0]*s[0]+e,m=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[y,m]:[y,m,g[1]*s[0]+e,g[1]*s[1]+t]:[y,m]},Pn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Sn=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,f=r-t,p=s-i,v=d*h-p*u,g=c*h-f*u,y=p*c-d*f;if(0!==y){var m=v/y,b=g/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*f]:[]}return 0===v||0===g?Pn(e,n,o)===o?[o,s]:Pn(e,n,a)===a?[a,i]:Pn(a,o,n)===n?[n,r]:[]:[]},Bn=function(e,t,n,r,a){var i=[],o=r/2,s=a/2,l=t,u=n;i.push({x:l+o*e[0],y:u+s*e[1]});for(var c=1;c0){var m=kn(v,-s);u=En(m)}else u=v}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?b.edgesTo(m)[0]:m.edgesTo(b)[0];var w=r(x);m=m.id(),u[m]>u[v]+w&&(u[m]=u[v]+w,h.nodes.indexOf(m)<0?h.push(m):h.updateItem(m),l[m]=0,n[m]=[]),u[m]==u[v]+w&&(l[m]=l[m]+l[v],n[m].push(v))}else for(var E=0;E0;){for(var P=t.pop(),S=0;S0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:nr,o=r,s=0;s=2?lr(e,t,n,0,ir,or):lr(e,t,n,0,ar)},squaredEuclidean:function(e,t,n){return lr(e,t,n,0,ir)},manhattan:function(e,t,n){return lr(e,t,n,0,ar)},max:function(e,t,n){return lr(e,t,n,-1/0,sr)}};function cr(e,t,n,r,a,i){var o;return o=G(e)?e:ur[e]||ur.euclidean,0===t&&G(e)?o(a,i):o(t,n,r,a,i)}ur["squared-euclidean"]=ur.squaredEuclidean,ur.squaredeuclidean=ur.squaredEuclidean;var dr=ht({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),hr=function(e){return dr(e)},fr=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return cr(e,r.length,i,function(e){return r[e](t)},o,s)},pr=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1}return!0},br=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var f,p=t[o],v=t[r[o]];f="dendrogram"===a.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=f,e.splice(v.index,1),t[p.key]=f;for(var g=0;gn[v.key][y.key]&&(i=n[v.key][y.key])):"max"===a.linkage?(i=n[p.key][y.key],n[p.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort(function(e,t){return e-t});var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;ao&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u=P?(S=P,P=D,B=_):D>S&&(S=D);for(var A=0;A0?1:0;k[E%u.minIterations*t+z]=O,L+=O}if(L>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var V=0,F=0;F0&&r.push(a);return r}(t,i,o),Y=function(e,t,n){for(var r=zr(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return zr(e,t,n)}(t,r,j),q={},W=0;W1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[t].push(e.id())})}else d[t]=[void 0,e.target().id()]}):l.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):d[t]=[e.source().id(),e.target().id()]});var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var f=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter(function(e){return e!=t}),a=r):s||a==n||(c[n]=c[n].filter(function(e){return e!=t}),a=n),i.unshift(t),i.unshift(a);return i},p=[],v=[];for(v=f(a);1!=v.length;)0==c[v[0]].length?(p.unshift(l.getElementById(v.shift())),p.unshift(l.getElementById(v.shift()))):v=f(v.shift()).concat(v);for(var g in p.unshift(l.getElementById(v.shift())),c)if(c[g].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},jr=function(){var e=this,t={},n=0,r=0,a=[],i=[],o={},s=function(l,u,c){l===c&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var d,h,f,p,v=e.getElementById(u).connectedEdges().intersection(e);0===v.size()?a.push(e.spawn(e.getElementById(u))):v.forEach(function(n){d=n.source().id(),h=n.target().id(),(f=d===u?h:d)!==c&&(p=n.id(),o[p]||(o[p]=!0,i.push({x:u,y:f,edge:n})),f in t?t[u].low=Math.min(t[u].low,t[f].id):(s(l,f,u),t[u].low=Math.min(t[u].low,t[f].low),t[u].id<=t[f].low&&(t[u].cutVertex=!0,function(n,r){for(var o=i.length-1,s=[],l=e.spawn();i[o].x!=n||i[o].y!=r;)s.push(i.pop().edge),o--;s.push(i.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach(function(n){var r=n.id(),a=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(a.filter(function(e){return e.isLoop()})):l.merge(a)})}),a.push(l)}(u,f))))})};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,s(n,n),t[n].cutVertex=r>1)}});var l=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(l),components:a}},Yr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:i,components:r}},qr={};[Et,Mt,Rt,Nt,zt,Vt,Yt,Vn,Xn,Yn,Wn,tr,Cr,Rr,Vr,Xr,{hopcroftTarjanBiconnected:jr,htbc:jr,htb:jr,hopcroftTarjanBiconnectedComponents:jr},{tarjanStronglyConnected:Yr,tsc:Yr,tscc:Yr,tarjanStronglyConnectedComponents:Yr}].forEach(function(e){be(qr,e)});var Wr=function(e){if(!(this instanceof Wr))return new Wr(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Wr.prototype={fulfill:function(e){return Ur(this,1,"fulfillValue",e)},reject:function(e){return Ur(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Wr;return n.onFulfilled.push(Gr(e,r,"fulfill")),n.onRejected.push(Gr(t,r,"reject")),Hr(n),r.proxy}};var Ur=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Hr(e)),e},Hr=function(e){1===e.state?Kr(e,"onFulfilled",e.fulfillValue):2===e.state&&Kr(e,"onRejected",e.rejectReason)},Kr=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),a=function(){if(Wa)return qa;Wa=1;var e=Fi();return qa=function(t,n){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,n])):r[a][1]=n,this},qa}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){Z(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};Po.className=Po.classNames=Po.classes;var So={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:fe,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};So.variable="(?:[\\w-.]|(?:\\\\"+So.metaChar+"))+",So.className="(?:[\\w-]|(?:\\\\"+So.metaChar+"))+",So.value=So.string+"|"+So.number,So.id=So.variable,function(){var e,t,n;for(e=So.comparatorOp.split("|"),n=0;n=0||"="!==t&&(So.comparatorOp+="|\\!"+t)}();var Bo=0,Do=1,_o=2,Ao=3,Mo=4,Ro=5,Io=6,No=7,Lo=8,zo=9,Oo=10,Vo=11,Fo=12,Xo=13,jo=14,Yo=15,qo=16,Wo=17,Uo=18,Ho=19,Ko=20,Go=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return function(e,t){return-1*me(e,t)}(e.selector,t.selector)}),Zo=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return st("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return st("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&st("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return K(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,i){var o=r.type,s=r.value;switch(o){case Bo:var l=e(s);return l.substring(0,l.length-1);case Ao:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case Ro:var d=r.operator,h=r.field;return"["+e(d)+h+"]";case Mo:return"["+r.field+"]";case Io:var f=r.operator;return"[["+r.field+n(e(f))+t(s)+"]]";case No:return s;case Lo:return"#"+s;case zo:return"."+s;case Wo:case Yo:return a(r.parent,i)+n(">")+a(r.child,i);case Uo:case qo:return a(r.ancestor,i)+" "+a(r.descendant,i);case Ho:var p=a(r.left,i),v=a(r.subject,i),g=a(r.right,i);return p+(p.length>0?" ":"")+v+g;case Ko:return""}},a=function(e,t){return e.checks.reduce(function(n,a,i){return n+(t===e&&0===i?"$":"")+r(a,t)},"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function gs(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],gs)},ps.forEachUp=function(e){return vs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ys)},ps.forEachUpAndDown=function(e){return vs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],ms)},ps.ancestors=ps.parents,(ds=hs={data:To.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:To.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:To.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:To.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:To.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:To.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=ds.data,ds.removeAttr=ds.removeData;var bs,xs,ws=hs,Es={};function ks(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot}),minIndegree:Ts("indegree",function(e,t){return et}),minOutdegree:Ts("outdegree",function(e,t){return et})}),be(Es,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,g=v;v&&(p=p[0]);var y=g?p.position():{x:0,y:0};void 0!==t?f.position(e,t+y[e]):void 0!==a&&f.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},bs.modelPosition=bs.point=bs.position,bs.modelPositions=bs.points=bs.positions,bs.renderedPoint=bs.renderedPosition,bs.relativePoint=bs.relativePosition;var Ss,Bs,Ds=xs;Ss=Bs={},Bs.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},Bs.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}}),this):this},Bs.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,f=d.biasComplementDiff,p=y(a.height.val-i.h,u,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+f)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-v+i.y1+i.y2+g)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},Ms=function(e,t){return null==t?e:As(e,t.x1,t.y1,t.x2,t.y2)},Rs=function(e,t,n){return vt(e,t,n)},Is=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,on(u,1),As(e,u.x1,u.y1,u.x2,u.y2)}}},Ns=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=Rs(i,"labelWidth",n),f=Rs(i,"labelHeight",n),p=Rs(i,"labelX",n),v=Rs(i,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=f,T=h,C=T/2,P=k/2;if(m)o=p-C,s=p+C,l=v-P,u=v+P;else{switch(c.value){case"left":o=p-T,s=p;break;case"center":o=p-C,s=p+C;break;case"right":o=p,s=p+T}switch(d.value){case"top":l=v-k,u=v;break;case"center":l=v-P,u=v+P;break;case"bottom":l=v,u=v+k}}var S=g-Math.max(x,w)-E-2,B=g+Math.max(x,w)+E+2,D=y-Math.max(x,w)-E-2,_=y+Math.max(x,w)+E+2;o+=S,s+=B,l+=D,u+=_;var A=n||"main",M=a.labelBounds,R=M[A]=M[A]||{};R.x1=o,R.y1=l,R.x2=s,R.y2=u,R.w=s-o,R.h=u-l,R.leftPad=S,R.rightPad=B,R.topPad=D,R.botPad=_;var I=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(I||N){var L=I?Rs(a.rstyle,"labelAngle",n):b.pfValue,z=Math.cos(L),O=Math.sin(L),V=(o+s)/2,F=(l+u)/2;if(!m){switch(c.value){case"left":V=s;break;case"right":V=o}switch(d.value){case"top":F=u;break;case"bottom":F=l}}var X=function(e,t){return{x:(e-=V)*z-(t-=F)*O+V,y:e*O+t*z+F}},j=X(o,l),Y=X(o,u),q=X(s,l),W=X(s,u);o=Math.min(j.x,Y.x,q.x,W.x),s=Math.max(j.x,Y.x,q.x,W.x),l=Math.min(j.y,Y.y,q.y,W.y),u=Math.max(j.y,Y.y,q.y,W.y)}var U=A+"Rot",H=M[U]=M[U]||{};H.x1=o,H.y1=l,H.x2=s,H.y2=u,H.w=s-o,H.h=u-l,As(e,o,l,s,u),As(a.labelBounds.all,o,l,s,u)}return e}},Ls=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;zs(e,t,n,r,"outside",r/2)}},zs=function(e,t,n,r,a,i){if(!(0===n||r<=0||"inside"===a)){var o=t.cy(),s=t.pstyle("shape").value,l=o.renderer().nodeShapes[s],u=t.position(),c=u.x,d=u.y,h=t.width(),f=t.height();if(l.hasMiterBounds){"center"===a&&(r/=2);var p=l.miterBounds(c,d,h,f,r);Ms(e,p)}else null!=i&&i>0&&sn(e,[i,i,i,i])}},Os=function(e,t){var n,r,a,i,o,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),h=nn(),f=e._private,p=e.isNode(),v=e.isEdge(),g=f.rstyle,y=p&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!v||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),k=0;if(c&&(k=e.pstyle("width").pfValue/2),p&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var C=e.outerWidth()/2,P=e.outerHeight()/2;As(h,n=o-C,a=s-P,r=o+C,i=s+P),c&&Ls(h,e),c&&t.includeOutlines&&!d&&Ls(h,e),c&&function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,r=t.pstyle("border-width").pfValue,a=t.pstyle("border-position").value;zs(e,t,n,r,a)}}(h,e)}else if(v&&t.includeEdges)if(c&&!d){var S=e.pstyle("curve-style").strValue;if(n=Math.min(g.srcX,g.midX,g.tgtX),r=Math.max(g.srcX,g.midX,g.tgtX),a=Math.min(g.srcY,g.midY,g.tgtY),i=Math.max(g.srcY,g.midY,g.tgtY),As(h,n-=k,a-=k,r+=k,i+=k),"haystack"===S){var B=g.haystackPts;if(B&&2===B.length){if(n=B[0].x,a=B[0].y,n>(r=B[1].x)){var D=n;n=r,r=D}if(a>(i=B[1].y)){var _=a;a=i,i=_}As(h,n-k,a-k,r+k,i+k)}}else if("bezier"===S||"unbundled-bezier"===S||he(S,"segments")||he(S,"taxi")){var A;switch(S){case"bezier":case"unbundled-bezier":A=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":A=g.linePts}if(null!=A)for(var M=0;M(r=N.x)){var L=n;n=r,r=L}if((a=I.y)>(i=N.y)){var z=a;a=i,i=z}As(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&v&&(Is(h,e,"mid-source"),Is(h,e,"mid-target"),Is(h,e,"source"),Is(h,e,"target")),c)if("yes"===e.pstyle("ghost").value){var O=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;As(h,h.x1+O,h.y1+V,h.x2+O,h.y2+V)}var F=f.bodyBounds=f.bodyBounds||{};ln(F,h),sn(F,y),on(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,As(h,n-E,a-E,r+E,i+E));var X=f.overlayBounds=f.overlayBounds||{};ln(X,h),sn(X,y),on(X,1);var j=f.labelBounds=f.labelBounds||{};null!=j.all?((l=j.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):j.all=nn(),c&&t.includeLabels&&(t.includeMainLabels&&Ns(h,e,null),v&&(t.includeSourceLabels&&Ns(h,e,"source"),t.includeTargetLabels&&Ns(h,e,"target")))}return h.x1=_s(h.x1),h.y1=_s(h.y1),h.x2=_s(h.x2),h.y2=_s(h.y2),h.w=_s(h.x2-h.x1),h.h=_s(h.y2-h.y1),h.w>0&&h.h>0&&b&&(sn(h,y),on(h,1)),h},Vs=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:il,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},sl.removeAllListeners=function(){return this.removeListener("*")},sl.emit=sl.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,Z(t)||(t=[t]),cl(this,function(e,i){null!=n&&(r=[{event:i.event,type:i.type,namespace:i.namespace,callback:n}],a=r.length);for(var o=function(){var n=r[s];if(n.type===i.type&&(!n.namespace||n.namespace===i.namespace||".*"===n.namespace)&&e.eventMatches(e.context,n,i)){var a=[i];null!=t&&function(e,t){for(var n=0;n1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&K(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if($(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(K(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Nl.neighbourhood=Nl.neighborhood,Nl.closedNeighbourhood=Nl.closedNeighborhood,Nl.openNeighbourhood=Nl.openNeighborhood,be(Nl,{source:fs(function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t},"source"),target:fs(function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t},"target"),sources:Vl({attr:"source"}),targets:Vl({attr:"target"})}),be(Nl,{edgesWith:fs(Fl(),"edgesWith"),edgesTo:fs(Fl({thisIsSrc:!0}),"edgesTo")}),be(Nl,{connectedEdges:fs(function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Nl.componentsOf=Nl.components;var jl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new yt,i=!1;if(t){if(t.length>0&&$(t[0])&&!te(t[0])){i=!0;for(var o=[],s=new bt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var I=e.length===a.length?a:new jl(i,e),N=0;N0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var T=0;T=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}var p=!1;function v(){p=!0,e===t&&n===r||function(){for(var t=0;t<11;++t)s[t]=d(t*a,e,n)}()}var g=function(a){return p||v(),e===t&&n===r?a:0===a?0:1===a?1:d(f(a),t,r)};g.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var y="generateBezier("+[e,t,n,r]+")";return g.toString=function(){return y},g}var Ul=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Hl=function(e,t,n,r){var a=Wl(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},Kl={linear:function(e,t,n){return e+(t-e)*n},ease:Hl(.25,.1,.25,1),"ease-in":Hl(.42,0,1,1),"ease-out":Hl(0,0,.58,1),"ease-in-out":Hl(.42,0,.58,1),"ease-in-sine":Hl(.47,0,.745,.715),"ease-out-sine":Hl(.39,.575,.565,1),"ease-in-out-sine":Hl(.445,.05,.55,.95),"ease-in-quad":Hl(.55,.085,.68,.53),"ease-out-quad":Hl(.25,.46,.45,.94),"ease-in-out-quad":Hl(.455,.03,.515,.955),"ease-in-cubic":Hl(.55,.055,.675,.19),"ease-out-cubic":Hl(.215,.61,.355,1),"ease-in-out-cubic":Hl(.645,.045,.355,1),"ease-in-quart":Hl(.895,.03,.685,.22),"ease-out-quart":Hl(.165,.84,.44,1),"ease-in-out-quart":Hl(.77,0,.175,1),"ease-in-quint":Hl(.755,.05,.855,.06),"ease-out-quint":Hl(.23,1,.32,1),"ease-in-out-quint":Hl(.86,0,.07,1),"ease-in-expo":Hl(.95,.05,.795,.035),"ease-out-expo":Hl(.19,1,.22,1),"ease-in-out-expo":Hl(1,0,0,1),"ease-in-circ":Hl(.6,.04,.98,.335),"ease-out-circ":Hl(.075,.82,.165,1),"ease-in-out-circ":Hl(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Kl.linear;var r=Ul(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Hl};function Gl(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Zl(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function $l(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Zl(e,a),s=Zl(t,a);if(Q(o)&&Q(s))return Gl(i,o,s,n,r);if(Z(o)&&Z(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=Kl[d].apply(null,h)):o.easingImpl=Kl[d]}var f,p=o.easingImpl;if(f=0===o.duration?1:(n-l)/o.duration,o.applying&&(f=o.progress),f<0?f=0:f>1&&(f=1),null==o.delay){var v=o.startPosition,g=o.position;if(g&&a&&!e.locked()){var y={};Jl(v.x,g.x)&&(y.x=$l(v.x,g.x,f,p)),Jl(v.y,g.y)&&(y.y=$l(v.y,g.y,f,p)),e.position(y)}var m=o.startPan,b=o.pan,x=i.pan,w=null!=b&&r;w&&(Jl(m.x,b.x)&&(x.x=$l(m.x,b.x,f,p)),Jl(m.y,b.y)&&(x.y=$l(m.y,b.y,f,p)),e.emit("pan"));var E=o.startZoom,k=o.zoom,T=null!=k&&r;T&&(Jl(E,k)&&(i.zoom=tn(i.minZoom,$l(E,k,f,p),i.maxZoom)),e.emit("zoom")),(w||T)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&a){for(var P=0;P=0;t--){(0,e[t])()}e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||eu(0,d,e),Ql(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var nu={animate:To.animate(),animation:To.animation(),animated:To.animated(),clearQueue:To.clearQueue(),delay:To.delay(),delayAnimation:To.delayAnimation(),stop:To.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender(function(t,n){tu(n,e)},t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&ze(function(n){tu(n,e),t()})}()}}},ru={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&te(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},au=function(e){return K(e)?new ls(e):e},iu={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new ol(ru,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,au(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,au(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,au(t),n),this},once:function(e,t,n){return this.emitter().one(e,au(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};To.eventAliasesOn(iu);var ou={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};ou.jpeg=ou.jpg;var su={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=K(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var i=new r(be({},e,{cy:t,eles:a}));return i}it("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else it("A `name` must be specified to make a layout");else it("Layout options must be specified to make a layout")}};su.createLayout=su.makeLayout=su.layout;var lu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};cu.invalidateDimensions=cu.resize;var du={collection:function(e,t){return K(e)?this.$(e):ee(e)?e.collection():Z(e)?(t||(t={}),new jl(this,e,t.unique,t.removed)):new jl(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};du.elements=du.filter=du.$;var hu={},fu="t";hu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&f){var p=void 0;h&&f||h?p=u.properties:f&&(p=u.mappedProperties);for(var v=0;v1&&(g=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],k=a.valueMin[1],T=a.valueMax[1],C=a.valueMin[2],P=a.valueMax[2],S=null==a.valueMin[3]?1:a.valueMin[3],B=null==a.valueMax[3]?1:a.valueMax[3],D=[Math.round(w+(E-w)*g),Math.round(k+(T-k)*g),Math.round(C+(P-C)*g),Math.round(S+(B-S)*g)];n={bypass:a.bypass,name:a.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else{if(!s.number)return!1;var _=a.valueMin+(a.valueMax-a.valueMin)*g;n=this.parse(a.name,_,a.bypass,h)}if(!n)return v(),!1;n.mapping=a,a=n;break;case o.data:for(var A=a.field.split("."),M=d.data,R=0;R0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},hu.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);e.removed()||null!=s&&s(n,r,e)&&i(o)},hu.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){a._private.cy.notify("zorder",e)})},hu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},hu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},hu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},hu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var pu={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){st("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u)if(new ls(u).invalid){st("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],d=!1;n=c;for(var h=[];;){if(n.match(/^\s*$/))break;var f=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!f){st("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=f[0];var p=f[1],v=f[2];if(this.properties[p])a.parse(p,v)?(h.push({name:p,val:v}),s()):(st("Skipping property: Invalid property definition in: "+r),s());else st("Skipping property: Invalid property name in: "+r),s()}if(d){o();break}a.selector(u);for(var g=0;g=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var f=s.mapData;if(!d.color&&!d.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return st("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(d.color){var g=p.value,y=v.value;if(!(g[0]!==y[0]||g[1]!==y[1]||g[2]!==y[2]||g[3]!==y[3]&&(null!=g[3]&&1!==g[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:f,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):Z(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var b=[],x=[],w=[],E="",k=!1,T=0;T0?" ":"")+C.strValue}return d.validate&&!d.validate(b,x)?null:d.singleEnum&&k?1===b.length&&K(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:E,bypass:n,units:x}}var P,S,B=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var R={name:e,value:t,strValue:""+t+(D||""),units:D,bypass:n};return d.unitless||"px"!==D&&"em"!==D?R.pfValue=t:R.pfValue="px"!==D&&D?this.getEmSizeInPixels()*t:t,"ms"!==D&&"s"!==D||(R.pfValue="ms"===D?t:1e3*t),"deg"!==D&&"rad"!==D||(R.pfValue="rad"===D?t:(P=t,Math.PI*P/180)),"%"===D&&(R.pfValue=t/100),R}if(d.propList){var I=[],N=""+t;if("none"===N);else{for(var L=N.split(/\s*,\s*|\s+/),z=0;z0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),Q(e)?n=e:$(e)&&(n=e.level,null!=e.position?t=qt(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;Q(l.x)&&(t.pan.x=l.x,o=!1),Q(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(K(e)){var n=e;e=this.mutableElements().filter(n)}else ee(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,a=this;return n.sizeCache=n.sizeCache||(r?(e=a.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Tu.centre=Tu.center,Tu.autolockNodes=Tu.autolock,Tu.autoungrabifyNodes=Tu.autoungrabify;var Cu={data:To.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:To.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:To.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:To.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Cu.attr=Cu.data,Cu.removeAttr=Cu.removeData;var Pu=function(e){var t=this,n=(e=be({},e)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==f&&void 0!==n&&!e.headless,o=e;o.layout=be({name:i?"grid":"null"},o.layout),o.renderer=be({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new jl(this),listeners:[],aniEles:new jl(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:Q(o.zoom)?o.zoom:1,pan:{x:$(o.pan)&&Q(o.pan.x)?o.pan.x:0,y:$(o.pan)&&Q(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=be({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(oe))return $r.all(e).then(t);t(e)}([o.style,o.elements],function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&($(e)||Z(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var i=be({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,function(){t.startAnimationLoop(),l.ready=!0,G(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,l=!!t.boundingBox,u=nn(l?t.boundingBox:structuredClone(n.extent()));if(ee(t.roots))e=t.roots;else if(Z(t.roots)){for(var c=[],d=0;d0;){var D=B(),_=T(D,P);if(_)D.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(S);else if(null===_){st("Detected double maximal shift for node `"+D.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var A=0;if(t.avoidOverlap)for(var M=0;M0&&y[0].length<=3?i/2:0),s=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(o=1),{x:W+o*Math.cos(s),y:U+o*Math.sin(s)}}var c=y[r].length,d=Math.max(1===c?0:l?(u.w-2*t.padding-H.w)/((t.grid?$:c)-1):(u.w-2*t.padding-H.w)/((t.grid?$:c)+1),A);return{x:W+(a+1-(c+1)/2)*d,y:U+(r+1-(V+1)/2)*G}}(e),u,Q[t.direction])}),this};var Ru={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Iu(e){this.options=be({},Ru,e)}Iu.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var g=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(g*g+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}}),this};var Nu,Lu={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function zu(e){this.options=be({},Lu,e)}zu.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0)Math.abs(m[0].value-x.value)>=g&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var T=0,C=0;C1&&t.avoidOverlap){var D=Math.cos(B)-Math.cos(0),_=Math.sin(B)-Math.sin(0),A=Math.sqrt(w*w/(D*D+_*_));T=Math.max(A,T)}P.r=T,T+=w}if(t.equidistant){for(var M=0,R=0,I=0;I=e.numIter)&&(Uu(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature=e.animationThreshold&&i(),ze(c)):(ac(r,e),s())};c()}else{for(;u;)u=o(l),l++;ac(r,e),s()}return this},Vu.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Vu.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Fu=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=nn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(w);for(u=0;ur.count?0:r.graph},ju=function(e,t,n,r){var a=r.graphSet[n];if(-10)var s=(u=r.nodeOverlap*o)*a/(v=Math.sqrt(a*a+i*i)),l=u*i/v;else{var u,c=$u(e,a,i),d=$u(t,-1*a,-1*i),h=d.x-c.x,f=d.y-c.y,p=h*h+f*f,v=Math.sqrt(p);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/p)*h/v,l=u*f/v}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Zu=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},$u=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},Qu=function(e,t){for(var n=0;n1){var p=t.gravity*d/f,v=t.gravity*h/f;c.offsetX+=p,c.offsetY+=v}}}}},ec=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},rc=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],a=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,a=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,a=!0),(null==r.minY||e.minY-r.padTopp&&(d+=f+t.componentSpacing,c=0,h=0,f=0)}}},ic={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function oc(e){this.options=be({},ic,e)}oc.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=nn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,function(e){return{x:i.x1,y:i.y1}});else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=f)l=h,u=f;else if(null!=h&&null==f)l=h,u=Math.ceil(o/l);else if(null==h&&null!=f)u=f,l=Math.ceil(o/u);else if(u*l>o){var p=c(),v=d();(p-1)*v>=o?c(p-1):(v-1)*p>=o&&d(v-1)}else for(;u*l=o?d(y+1):c(g+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(A=0,_++)},R={},I=0;I(r=bn(e,t,x[w],x[w+1],x[w+2],x[w+3])))return g(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=mn(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return g(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return vt(e,t,n)}function x(n,r){var a,i=n._private,o=p;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,f=n.pstyle(a+"text-margin-y").pfValue,v=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-f,x=s.y2+o-f;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=k(v,m),C=k(v,x),P=k(y,m),S=k(y,x),B=[T.x+h,T.y+f,P.x+h,P.y+f,S.x+h,S.y+f,C.x+h,C.y+f];if(xn(e,t,B))return g(n),!0}else if(cn(s,e,t))return g(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){var a=this.getCachedZSortedEles().interactive,i=2/this.cy.zoom(),o=[],s=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=nn({x1:e=s,y1:t=c,x2:n=u,y2:r=d}),f=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[f[0],f[1]],[f[1],f[2]],[f[2],f[3]],[f[3],f[0]]];function v(e,t,n){return vt(e,t,n)}function g(e,t){var n=e._private,r=i;e.boundingBox();var a=n.labelBounds.main;if(!a)return null;var o=v(n.rscratch,"labelX",t),s=v(n.rscratch,"labelY",t),l=v(n.rscratch,"labelAngle",t),u=e.pstyle("text-margin-x").pfValue,c=e.pstyle("text-margin-y").pfValue,d=a.x1-r-u,h=a.x2+r-u,f=a.y1-r-c,p=a.y2+r-c;if(l){var g=Math.cos(l),y=Math.sin(l),m=function(e,t){return{x:(e-=o)*g-(t-=s)*y+o,y:e*y+t*g+s}};return[m(d,f),m(h,f),m(h,p),m(d,p)]}return[{x:d,y:f},{x:h,y:f},{x:h,y:p},{x:d,y:p}]}function y(e,t,n,r){function a(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return a(e,n,r)!==a(t,n,r)&&a(e,t,n)!==a(e,t,r)}for(var m=0;m0?-(Math.PI-i.ang):Math.PI+i.ang),Vc(t,n,Oc),Ec=zc.nx*Oc.ny-zc.ny*Oc.nx,kc=zc.nx*Oc.nx-zc.ny*-Oc.ny,Pc=Math.asin(Math.max(-1,Math.min(1,Ec))),Math.abs(Pc)<1e-6)return xc=t.x,wc=t.y,void(Bc=_c=0);Tc=1,Cc=!1,kc<0?Pc<0?Pc=Math.PI+Pc:(Pc=Math.PI-Pc,Tc=-1,Cc=!0):Pc>0&&(Tc=-1,Cc=!0),_c=void 0!==t.radius?t.radius:r,Sc=Pc/2,Ac=Math.min(zc.len/2,Oc.len/2),a?(Dc=Math.abs(Math.cos(Sc)*_c/Math.sin(Sc)))>Ac?(Dc=Ac,Bc=Math.abs(Dc*Math.sin(Sc)/Math.cos(Sc))):Bc=_c:(Dc=Math.min(Ac,_c),Bc=Math.abs(Dc*Math.sin(Sc)/Math.cos(Sc))),Ic=t.x+Oc.nx*Dc,Nc=t.y+Oc.ny*Dc,xc=Ic-Oc.ny*Bc*Tc,wc=Nc+Oc.nx*Bc*Tc,Mc=t.x+zc.nx*Dc,Rc=t.y+zc.ny*Dc,Lc=t};function Xc(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function jc(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Fc(e,t,n,r,a),{cx:xc,cy:wc,radius:Bc,startX:Mc,startY:Rc,stopX:Ic,stopY:Nc,startAngle:zc.ang+Math.PI/2*Tc,endAngle:Oc.ang-Math.PI/2*Tc,counterClockwise:Cc})}var Yc=.01,qc=Math.sqrt(.02),Wc={};function Uc(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},S=P(T,E),B=P(C,k),D=!1;"auto"===g?v=Math.abs(S)>Math.abs(B)?a:r:g===l||g===s?(v=r,D=!0):g!==i&&g!==o||(v=a,D=!0);var _,A=v===r,M=A?B:S,R=A?C:T,I=Gt(R),N=!1;(D&&(m||x)||!(g===s&&R<0||g===l&&R>0||g===i&&R>0||g===o&&R<0)||(M=(I*=-1)*Math.abs(M),N=!0),m)?_=(b<0?1+b:b)*M:_=(b<0?M:0)+b*I;var L=function(e){return Math.abs(e)=Math.abs(M)},z=L(_),O=L(Math.abs(M)-Math.abs(_));if((z||O)&&!N)if(A){var V=Math.abs(R)<=d/2,F=Math.abs(T)<=h/2;if(V){var X=(u.x1+u.x2)/2,j=u.y1,Y=u.y2;n.segpts=[X,j,X,Y]}else if(F){var q=(u.y1+u.y2)/2,W=u.x1,U=u.x2;n.segpts=[W,q,U,q]}else n.segpts=[u.x1,u.y2]}else{var H=Math.abs(R)<=c/2,K=Math.abs(C)<=f/2;if(H){var G=(u.y1+u.y2)/2,Z=u.x1,$=u.x2;n.segpts=[Z,G,$,G]}else if(K){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(A){var te=u.y1+_+(p?d/2*I:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+_+(p?c/2*I:0),ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},Wc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,f=t.srcRs,p=t.tgtRs,v=!Q(n.startX)||!Q(n.startY),g=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),m=!Q(n.arrowEndX)||!Q(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Zt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xv.poolIndex()){var g=p;p=v,v=g}var y=d.srcPos=p.position(),m=d.tgtPos=v.position(),b=d.srcW=p.outerWidth(),x=d.srcH=p.outerHeight(),E=d.tgtW=v.outerWidth(),k=d.tgtH=v.outerHeight(),T=d.srcShape=n.nodeShapes[t.getNodeShape(p)],C=d.tgtShape=n.nodeShapes[t.getNodeShape(v)],P=d.srcCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,S=d.tgtCornerRadius="auto"===v.pstyle("corner-radius").value?"auto":v.pstyle("corner-radius").pfValue,B=d.tgtRs=v._private.rscratch,D=d.srcRs=p._private.rscratch;d.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_=qc||(q=Math.sqrt(Math.max(Y*Y,Yc)+Math.max(j*j,Yc)));var W=d.vector={x:Y,y:j},U=d.vectorNorm={x:W.x/q,y:W.y/q},H={x:-U.y,y:U.x};d.nodesOverlap=!Q(q)||C.checkPoint(L[0],L[1],0,E,k,m.x,m.y,S,B)||T.checkPoint(O[0],O[1],0,b,x,y.x,y.y,P,D),d.vectorNormInverse=H,e={nodesOverlap:d.nodesOverlap,dirCounts:d.dirCounts,calculatedIntersection:!0,hasBezier:d.hasBezier,hasUnbundled:d.hasUnbundled,eles:d.eles,srcPos:m,srcRs:B,tgtPos:y,tgtRs:D,srcW:E,srcH:k,tgtW:b,tgtH:x,srcIntn:V,tgtIntn:z,srcShape:C,tgtShape:T,posPts:{x1:X.x2,y1:X.y2,x2:X.x1,y2:X.y1},intersectionPts:{x1:F.x2,y1:F.y2,x2:F.x1,y2:F.y1},vector:{x:-W.x,y:-W.y},vectorNorm:{x:-U.x,y:-U.y},vectorNormInverse:{x:-H.x,y:-H.y}}}var K=N?e:d;M.nodesOverlap=K.nodesOverlap,M.srcIntn=K.srcIntn,M.tgtIntn=K.tgtIntn,M.isRound=R.startsWith("round"),r&&(p.isParent()||p.isChild()||v.isParent()||v.isChild())&&(p.parents().anySame(v)||v.parents().anySame(p)||p.same(v)&&p.isParent())?t.findCompoundLoopPoints(A,K,_,I):p===v?t.findLoopPoints(A,K,_,I):R.endsWith("segments")?t.findSegmentsPoints(A,K):R.endsWith("taxi")?t.findTaxiPoints(A,K):"straight"===R||!I&&d.eles.length%2==1&&_===Math.floor(d.eles.length/2)?t.findStraightEdgePoints(A):t.findBezierPoints(A,K,_,I,N),t.findEndpoints(A),t.tryToCorrectInvalidPoints(A,K),t.checkForInvalidEdgeWarning(A),t.storeAllpts(A),t.storeEdgeProjections(A),t.calculateArrowAngles(A),t.recalculateEdgeLabelProjections(A),t.calculateLabelAngles(A)}},w=0;w0){var J=f,ee=$t(J,Ut(i)),te=$t(J,Ut($)),ne=ee;if(te2)$t(J,{x:$[2],y:$[3]})0){var ge=p,ye=$t(ge,Ut(i)),me=$t(ge,Ut(ve)),be=ye;if(me2)$t(ge,{x:ve[2],y:ve[3]})=u||m){c={cp:v,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=tn(0,k,1),t=en(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=tn(0,r-.001,1),i=tn(0,r+.001,1),o=en(e,t,n,a),s=en(e,t,n,i);return Qc(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var T,C,P,S,B=0,D=r.allpts.length,_=0;_+3=u));_+=2);var A=(u-C)/T;A=tn(0,A,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Zt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,S,A),a=Qc(P,S)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Zc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Zc.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=He(r,e._private.labelDimsKey);if(vt(n.rscratch,"prefixedLabelDimsKey",t)!==a){gt(n.rscratch,"prefixedLabelDimsKey",t,a);var i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,s=e.pstyle("text-wrap").strValue,l=vt(n.rscratch,"labelWrapCachedLines",t)||[],u="wrap"!==s?1:Math.max(l.length,1),c=i.height/u,d=c*o,h=i.width,f=i.height+(u-1)*(o-1)*c;gt(n.rstyle,"labelWidth",t,h),gt(n.rscratch,"labelWidth",t,h),gt(n.rstyle,"labelHeight",t,f),gt(n.rscratch,"labelHeight",t,f),gt(n.rscratch,"labelLineHeight",t,d)}},Zc.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,s=function(e,r){return r?(gt(n.rscratch,e,t,r),r):vt(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var u=s("labelKey");if(null!=u&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c=a.split("\n"),d=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],p=/[\s\u200b]+|$/g,v=0;vd){var b,x="",w=0,E=o(g.matchAll(p));try{for(E.s();!(b=E.n()).done;){var k=b.value,T=k[0],C=g.substring(w,k.index);w=k.index+T.length;var P=0===x.length?C:x+C+T;this.calculateLabelDimensions(e,P).width<=d?x+=C+T:(x&&f.push(x),x=C+T)}}catch(A){E.e(A)}finally{E.f()}x.match(/^[\s\u200b]+$/)||f.push(x)}else f.push(g)}s("labelWrapCachedLines",f),a=s("labelWrapCachedText",f.join("\n")),s("labelWrapKey",u)}else if("ellipsis"===l){var S=e.pstyle("text-max-width").pfValue,B="",D=!1;if(this.calculateLabelDimensions(e,a).widthS)break;B+=a[_],_===a.length-1&&(D=!0)}return D||(B+="\u2026"),B}return a},Zc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Zc.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue,i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=n.createElement("canvas"),l=this.labelCalcCanvasContext=s.getContext("2d");var u=s.style;u.position="absolute",u.left="-9999px",u.top="-9999px",u.zIndex="-1",u.visibility="hidden",u.pointerEvents="none"}l.font="".concat(r," ").concat(o," ").concat(a,"px ").concat(i);for(var c=0,d=0,h=t.split("\n"),f=0;f1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var P=a(t);g&&(e.hoverData.tapholdCancelled=!0);n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var S=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}},B=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit(S("boxstart")),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var D=S("cxtdrag");b?b.emit(D):o.emit(D),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(S("cxtdragout")),e.hoverData.cxtOver=v,v&&v.emit(S("cxtdragover")))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var _;if(e.hoverData.justStartedPan){var A=e.hoverData.mdownPos;_={x:(c[0]-A[0])*s,y:(c[1]-A[1])*s},e.hoverData.justStartedPan=!1}else _={x:x[0]*s,y:x[1]*s};o.panBy(_),o.emit(S("dragpan")),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||v==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&r(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),b)if(g){if(o.boxSelectionEnabled()&&P)b&&b.grabbed()&&(d(w),b.emit(S("freeon")),w.emit(S("free")),e.dragData.didDrag&&(b.emit(S("dragfreeon")),w.emit(S("dragfree")))),B();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var M=!e.dragData.didDrag;M&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var R={x:0,y:0};if(Q(x[0])&&Q(x[1])&&(R.x+=x[0],R.y+=x[1],M)){var I=e.hoverData.dragDelta;I&&Q(I[0])&&Q(I[1])&&(R.x+=I[0],R.y+=I[1])}e.hoverData.draggingEles=!0,w.silentShift(R).emit(S("position")).emit(S("drag")),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();n=!0}else if(g){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!P&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Ut(h),e.redrawHint("select",!0),e.redraw())}}else B();b&&b.pannable()&&b.active()&&b.unactivate()}return p[2]=c[0],p[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}},!1),e.registerBinding(t,"mouseup",function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate();var f=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(3===e.hoverData.which){var p=f("cxttapend");if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var v=f("cxttap");c?c.emit(v):i.emit(v)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout(function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit(f("boxend"));var y=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit(f("box")).stdFilter(y).select().emit(f("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=c&&c.grabbed();d(u),m&&(c.emit(f("freeon")),u.emit(f("free")),e.dragData.didDrag&&(c.emit(f("dragfreeon")),u.emit(f("dragfree"))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var k,T,C,P,S,B,D,_,A,M,R,I,N,L,z=[],O=1e5,V=function(t){var n=!1,r=t.deltaY;if(null==r&&(null!=t.wheelDeltaY?r=t.wheelDeltaY/4:null!=t.wheelDelta&&(r=t.wheelDelta/4)),0!==r){if(null==k)if(z.length>=4){var a=z;if(k=function(e,t){for(var n=0;n5}if(k)for(var o=0;o5&&(r=5*Gt(r)),h=r/-250,k&&(h/=O,h*=3),h*=e.wheelSensitivity,1===t.deltaMode&&(h*=33);var f=s.zoom()*Math.pow(10,h);"gesturechange"===t.type&&(f=e.gestureStartZoom*t.scale),s.zoom({level:f,renderedPosition:{x:d[0],y:d[1]}}),s.emit({type:"gesturechange"===t.type?"pinchzoom":"scrollzoom",originalEvent:t,position:{x:c[0],y:c[1]}})}}}};e.registerBinding(e.container,"wheel",V,!0),e.registerBinding(t,"scroll",function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(t){e.hasTouchStarted||V(t)},!0),e.registerBinding(e.container,"mouseout",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,"mouseover",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var F,X,j,Y,q,W,U,H=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},K=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(t){if(e.hasTouchStarted=!0,m(t)){f(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=o[0],a[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=o[0],a[5]=o[1]}var l=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var h=e.findContainerClientCoords();M=h[0],R=h[1],I=h[2],N=h[3],T=t.touches[0].clientX-M,C=t.touches[0].clientY-R,P=t.touches[1].clientX-M,S=t.touches[1].clientY-R,L=0<=T&&T<=I&&0<=P&&P<=I&&0<=C&&C<=N&&0<=S&&S<=N;var p=n.pan(),v=n.zoom();B=H(T,C,P,S),D=K(T,C,P,S),A=[((_=[(T+P)/2,(C+S)/2])[0]-p.x)/v,(_[1]-p.y)/v];if(D<4e4&&!t.touches[2]){var g=e.findNearestElement(a[0],a[1],!0,!0),y=e.findNearestElement(a[2],a[3],!0,!0);return g&&g.isNode()?(g.activate().emit(l("cxttapstart")),e.touchData.start=g):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),e.touchData.start=y):n.emit(l("cxttapstart")),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(a[0],a[1],!0,!0),x=b[0];if(null!=x&&(x.activate(),e.touchData.start=x,e.touchData.starts=b,e.nodeIsGrabbable(x))){var w=e.dragData.touchDragEles=n.collection(),E=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),x.selected()?(E=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),u(E,{addToList:w})):c(x,{addToList:w}),s(x),x.emit(l("grabon")),E?E.forEach(function(e){e.emit(l("grab"))}):x.emit(l("grab"))}r(x,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==x&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var k=e.touchData.startPosition=[null,null,null,null,null,null],z=0;z=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var E=t.touches[0].clientX-M,k=t.touches[0].clientY-R,_=t.touches[1].clientX-M,I=t.touches[1].clientY-R,N=K(E,k,_,I);if(N/D>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var z=p("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(z),e.touchData.start=null):o.emit(z)}}if(n&&e.touchData.cxt){z=p("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(z):o.emit(z),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var O=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&O===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit(p("cxtdragout")),e.touchData.cxtOver=O,O&&O.emit(p("cxtdragover")))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit(p("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),te=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",j=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",Y=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),l=e.touchData.now,u=e.touchData.earlier;if(t.touches[0]){var c=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=c[0],l[1]=c[1]}if(t.touches[1]){c=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);l[2]=c[0],l[3]=c[1]}if(t.touches[2]){c=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);l[4]=c[0],l[5]=c[1]}var h,f=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}};if(a&&a.unactivate(),e.touchData.cxt){if(h=f("cxttapend"),a?a.emit(h):o.emit(h),!e.touchData.cxtDragged){var p=f("cxttap");a?a.emit(p):o.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var v=o.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),o.emit(f("boxend"));v.emit(f("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f("boxselect")),v.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=a){var y=a._private.grabbed;d(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(a.emit(f("freeon")),g.emit(f("free")),e.dragData.didDrag&&(a.emit(f("dragfreeon")),g.emit(f("dragfree")))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]}),a.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(l[0],l[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]})}var b=e.touchData.startPosition[0]-l[0],x=b*b,w=e.touchData.startPosition[1]-l[1],E=(x+w*w)*s*s;e.touchData.singleTouchMoved||(a||o.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:l[0],y:l[1]}),q=!1,t.timeStamp-U<=o.multiClickDebounceTime()?(W&&clearTimeout(W),q=!0,U=null,r(a,["dbltap","vdblclick"],t,{x:l[0],y:l[1]})):(W=setTimeout(function(){q||r(a,["onetap","voneclick"],t,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),U=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&E2){for(var f=[c[0],c[1]],p=Math.pow(f[0]-e,2)+Math.pow(f[1]-t,2),v=1;v0)return v[0]}return null},f=Object.keys(d),p=0;p0?u:vn(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?In(r,a):s);if(wn(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(wn(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!xn(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||(!!Tn(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!Tn(e,t,l,l,i-r/2+s,o+a/2-s,n))}}},od.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",An(3,0)),this.generateRoundPolygon("round-triangle",An(3,0)),this.generatePolygon("rectangle",An(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",An(5,0)),this.generateRoundPolygon("round-pentagon",An(5,0)),this.generatePolygon("hexagon",An(6,0)),this.generateRoundPolygon("round-hexagon",An(6,0)),this.generatePolygon("heptagon",An(7,0)),this.generateRoundPolygon("round-heptagon",An(7,0)),this.generatePolygon("octagon",An(8,0)),this.generateRoundPolygon("round-octagon",An(8,0));var r=new Array(20),a=Rn(5,0),i=Rn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*v)break}else if(a){if(f>=e.deqCost*l||f>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*dd)break;var g=e.deq(t,d,c);if(!(g.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())},a(t))}}},fd=function(){return i(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt;a(this,e),this.idsByKey=new yt,this.keyForId=new yt,this.cachesByLvl=new yt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n},[{key:"getIdsFor",value:function(e){null==e&&it("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new bt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new yt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),pd=7.99,vd={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},gd=ht({getKey:null,doesEleInvalidateKey:nt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:tt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),yd=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=gd(t);be(n,r),n.lookup=new fd(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},md=yd.prototype;md.reasons=vd,md.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},md.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},md.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new _t(function(e,t){return t.reqs-e.reqs})},md.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},md.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Kt(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var f,p=l.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(f=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var v=i.getTextureQueue(f),g=v[v.length-2],y=function(){return i.recycleTexture(f,d)||i.addTexture(f,d)};g||(g=v[v.length-1]),g||(g=y()),g.width-g.usedWidthr;S--)C=i.getElement(e,t,n,S,vd.downscale);P()}else{var B;if(!x&&!w&&!E)for(var D=r-1;D>=-4;D--){var _=l.get(e,D);if(_){B=_;break}}if(b(B))return i.queueElement(e,r),B;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,e,t,h,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:u,width:d,height:c,scaledLabelShown:h},g.usedWidth+=Math.ceil(d+8),g.eleCaches.push(p),l.set(e,r,p),i.checkTextureFullness(g),p},md.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},md.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ft(t,e):e.fullnessChecks++},md.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ft(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,pt(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),ft(r,i),n.push(i),i}},md.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},md.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,vd.dequeue)}}return a},md.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=et,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},md.onDequeue=function(e){this.onDequeues.push(e)},md.offDequeue=function(e){ft(this.onDequeues,e)},md.setupDequeueing=hd({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&ft(c,o)}}();var d=function(t){var a=(t=t||{}).after;!function(){if(!o){o=nn();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var l=r.makeLayer(o,n);if(null!=a){var d=c.indexOf(a)+1;c.splice(d,0,l)}else(void 0===t.insert||t.insert)&&c.unshift(l);return l};if(r.skipping&&!i)return null;for(var h=null,f=e.length/1,p=!i,v=0;v=f||!hn(h.bb,g.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||p?r.queueLayer(h,g):r.drawEleInLayer(h,g,n,t),h.eles.push(g),m[n]=h}}return s||(p?null:c)},xd.getEleLevelForLayerLevel=function(e,t){return e},xd.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,true),a.setImgSmoothing(i,!0))},xd.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},xd.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},xd.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=Oe(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},xd.invalidateLayer=function(e){if(this.lastInvalidationTime=Oe(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ft(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,f=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=t.pstyle("line-outline-width").value,g=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=f,e.lineCap=p,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,T=y*k;e.translate(w,E),b(T),x(T),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=f+v,e.lineCap=p,v>0?(o.colorStrokeStyle(e,g[0],g[1],g[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},Od=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};zd.drawEdgeOverlay=Od("overlay"),zd.drawEdgeUnderlay=Od("underlay"),zd.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,s=t,l=!1,u=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,d=e.pstyle("line-dash-offset").pfValue;if(u){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,l=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=d;break;case"solid":s.setLineDash([])}if(!l&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5,o=Math.min(i,r/2,a/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+a-o),e.quadraticCurveTo(t+r,n+a,t+r-o,n+a),e.lineTo(t+o,n+a),e.quadraticCurveTo(t,n+a,t,n+a-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}Fd.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Kt(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),h=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var f,p=!n;n&&(f=n,e.translate(-f.x1,-f.y1)),null==a?(o.drawText(e,t,null,p,i),t.isEdge()&&(o.drawText(e,t,"source",p,i),o.drawText(e,t,"target",p,i))):o.drawText(e,t,a,p,i),n&&e.translate(f.x1,f.y1)},Fd.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Fd.getTextAngle=function(e,t){var n,r=e._private.rscratch,a=t?t+"-":"",i=e.pstyle(a+"text-rotation");if("autorotate"===i.strValue){var o=vt(r,"labelAngle",t);n=e.isEdge()?o:0}else n="none"===i.strValue?0:i.pfValue;return n},Fd.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=vt(i,"labelX",n),c=vt(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,f=n?n+"-":"",p=vt(i,"labelWidth",n),v=vt(i,"labelHeight",n),g=t.pstyle(f+"text-margin-x").pfValue,y=t.pstyle(f+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=g,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0),x){case"top":break;case"center":c+=v/2;break;case"bottom":c+=v}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,T=t.pstyle("text-background-padding").pfValue,C=t.pstyle("text-background-shape").strValue,P="round-rectangle"===C||"roundrectangle"===C,S="circle"===C;if(w>0||k>0&&E>0){var B=e.fillStyle,D=e.strokeStyle,_=e.lineWidth,A=t.pstyle("text-background-color").value,M=t.pstyle("text-border-color").value,R=t.pstyle("text-border-style").value,I=w>0,N=k>0&&E>0,L=u-T;switch(b){case"left":L-=p;break;case"center":L-=p/2}var z=c-v-T,O=p+2*T,V=v+2*T;if(I&&(e.fillStyle="rgba(".concat(A[0],",").concat(A[1],",").concat(A[2],",").concat(w*o,")")),N&&(e.strokeStyle="rgba(".concat(M[0],",").concat(M[1],",").concat(M[2],",").concat(E*o,")"),e.lineWidth=k,e.setLineDash))switch(R){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;default:e.setLineDash([])}if(P?(e.beginPath(),Xd(e,L,z,O,V,2)):S?(e.beginPath(),function(e,t,n,r,a){var i=Math.min(r,a)/2,o=t+r/2,s=n+a/2;e.beginPath(),e.arc(o,s,i,0,2*Math.PI),e.closePath()}(e,L,z,O,V)):(e.beginPath(),e.rect(L,z,O,V)),I&&e.fill(),N&&e.stroke(),N&&"double"===R){var F=k/2;e.beginPath(),P?Xd(e,L+F,z+F,O-2*F,V-2*F,2):e.rect(L+F,z+F,O-2*F,V-2*F),e.stroke()}e.fillStyle=B,e.strokeStyle=D,e.lineWidth=_,e.setLineDash&&e.setLineDash([])}var X=2*t.pstyle("text-outline-width").pfValue;if(X>0&&(e.lineWidth=X),"wrap"===t.pstyle("text-wrap").value){var j=vt(i,"labelWrapCachedLines",n),Y=vt(i,"labelLineHeight",n),q=p/2,W=this.getLabelJustification(t);switch("auto"===W||("left"===b?"left"===W?u+=-p:"center"===W&&(u+=-q):"center"===b?"left"===W?u+=-q:"right"===W&&(u+=q):"right"===b&&("center"===W?u+=q:"right"===W&&(u+=p))),x){case"top":case"center":case"bottom":c-=(j.length-1)*Y}for(var U=0;U0&&e.strokeText(j[U],u,c),e.fillText(j[U],u,c),c+=Y}else X>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var jd={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(Q(d.x)&&Q(d.y)&&(!s||t.visible())){var h,f,p=s?t.effectiveOpacity():1,v=l.usePaths(),g=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(f=n,e.translate(-f.x1,-f.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:S;l.eleFillStyle(e,t,n)},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;l.colorStrokeStyle(e,B[0],B[1],B[2],t)},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V;l.colorStrokeStyle(e,z[0],z[1],z[2],t)},W=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=Ke("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+X),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},U=t.pstyle("shape").strValue,H=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(d.x,d.y);var K=W(r,a,U,H);h=K.path,g=K.cacheHit}var G=function(){if(!g){var n=d;v&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,X,c)}v?e.fill(h):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasStripe(t)&&(e.save(),v?e.clip(c.pathCache):(l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c),e.clip()),l.drawStripe(e,t,i),e.restore(),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},ee=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},te=function(){if(P>0){if(e.lineWidth=P,e.lineCap=A,e.lineJoin=_,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(R),e.lineDashOffset=I;break;case"solid":case"double":e.setLineDash([])}if("center"!==M){if(e.save(),e.lineWidth*=2,"inside"===M)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-P,-a/2-P,r+2*P,a+2*P),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===D){e.lineWidth=P/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ne=function(){if(L>0){if(e.lineWidth=L,e.lineCap="butt",e.setLineDash)switch(O){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;v&&(n={x:0,y:0});var i=l.getNodeShape(t),o=P;"inside"===M&&(o=0),"outside"===M&&(o*=2);var s,u=(r+o+(L+F))/r,c=(a+o+(L+F))/a,h=r*u,f=a*c,p=l.nodeShapes[i].points;if(v)s=W(h,f,i,p).path;if("ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,f);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var g=0,y=0,m=0;"round-diamond"===i?g=1.4*(o+F+L):"round-heptagon"===i?(g=1.075*(o+F+L),m=-(o/2+F+L)/35):"round-hexagon"===i?g=1.12*(o+F+L):"round-pentagon"===i?(g=1.13*(o+F+L),m=-(o/2+F+L)/15):"round-tag"===i?(g=1.12*(o+F+L),y=.07*(o/2+L+F)):"round-triangle"===i&&(g=(o+F+L)*(Math.PI/2),m=-(o+F/2+L)/Math.PI),0!==g&&(h=r*(u=(r+g)/r),["round-hexagon","round-tag"].includes(i)||(f=a*(c=(a+g)/a)));for(var b=h/2,x=f/2,w=(X="auto"===X?Nn(h,f):X)+(o+L+F)/2,E=new Array(p.length/2),k=new Array(p.length/2),T=0;T0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};jd.drawNodeOverlay=Yd("overlay"),jd.drawNodeUnderlay=Yd("underlay"),jd.hasPie=function(e){return(e=e[0])._private.hasPie},jd.hasStripe=function(e){return(e=e[0])._private.hasStripe},jd.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a,i=t.cy().style(),o=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,u=r.x,c=r.y,d=t.width(),h=t.height(),f=Math.min(d,h)/2,p=0;if(this.usePaths()&&(u=0,c=0),"%"===o.units?f*=o.pfValue:void 0!==o.pfValue&&(f=o.pfValue/2),"%"===s.units?a=f*s.pfValue:void 0!==s.pfValue&&(a=s.pfValue/2),!(a>=f))for(var v=1;v<=i.pieBackgroundN;v++){var g=t.pstyle("pie-"+v+"-background-size").value,y=t.pstyle("pie-"+v+"-background-color").value,m=t.pstyle("pie-"+v+"-background-opacity").value*n,b=g/100;b+p>1&&(b=1-p);var x=1.5*Math.PI+2*Math.PI*p,w=(x+=l)+2*Math.PI*b;0===g||p>=1||p+b>1||(0===a?(e.beginPath(),e.moveTo(u,c),e.arc(u,c,f,x,w),e.closePath()):(e.beginPath(),e.arc(u,c,f,x,w),e.arc(u,c,a,w,x,!0),e.closePath()),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),p+=b)}},jd.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=r.x,o=r.y,s=t.width(),l=t.height(),u=0,c=this.usePaths();e.save();var d=t.pstyle("stripe-direction").value,h=t.pstyle("stripe-size");switch(d){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var f=s,p=l;"%"===h.units?(f*=h.pfValue,p*=h.pfValue):void 0!==h.pfValue&&(f=h.pfValue,p=h.pfValue),c&&(i=0,o=0),o-=f/2,i-=p/2;for(var v=1;v<=a.stripeBackgroundN;v++){var g=t.pstyle("stripe-"+v+"-background-size").value,y=t.pstyle("stripe-"+v+"-background-color").value,m=t.pstyle("stripe-"+v+"-background-opacity").value*n,b=g/100;b+u>1&&(b=1-u),0===g||u>=1||u+b>1||(e.beginPath(),e.rect(i,o+p*u,f,p*b),e.closePath(),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),u+=b)}e.restore()};var qd,Wd={};function Ud(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(r));return r}function Hd(e,t,n){void 0===n&&(n=t);var r=e.makeOffscreenCanvas(t,n),a=r.context=r.getContext("2d");return r.clear=function(){return a.clearRect(0,0,r.width,r.height)},r.clear(),r}function Kd(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function Gd(e){return"solid"===e.pstyle("background-fill").value&&("none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||(0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)))}function Zd(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function Jd(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function eh(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function th(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function nh(e,t,n,r,a,i){switch(t){case e.FLOAT:return new Float32Array(n.buffer,i*r,a);case e.INT:return new Int32Array(n.buffer,i*r,a)}}function rh(e,t,n,r){var a=l(eh(e,n),3),i=a[0],o=a[1],s=a[2],u=th(e,o,t*i),c=i*s,d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,t*c,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,i,o,!1,c,0):o===e.INT&&e.vertexAttribIPointer(r,i,o,c,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var h=new Array(t),f=0;ft.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!d&&(c[t.NODE]=!0,c[t.SELECT_BOX]=!0);var m=n.style(),b=n.zoom(),x=void 0!==o?o:b,w=n.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},T=t.prevViewport;void 0===T||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||v&&!p||(t.motionBlurPxRatio=1),s&&(E=s),x*=l,E.x*=l,E.y*=l;var C=t.getCachedZSortedEles();function P(e,n,r,a,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,a,i),e.globalCompositeOperation=o}function S(e,n){var i,l,c,d;t.clearingMotionBlur||e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]?(i=E,l=x,c=t.canvasWidth,d=t.canvasHeight):(i={x:w.x*f,y:w.y*f},l=b*f,c=t.canvasWidth*f,d=t.canvasHeight*f),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?P(e,0,0,c,d):r||void 0!==n&&!n||e.clearRect(0,0,c,d),a||(e.translate(i.x,i.y),e.scale(l,l)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(d||(t.textureDrawLastFrame=!1),d){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var B=t.data.bufferContexts[t.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult}),(k=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[t.DRAG]=!1,c[t.NODE]=!1;var D=u.contexts[t.NODE],_=t.textureCache.texture;k=t.textureCache.viewport;D.setTransform(1,0,0,1,0,0),h?P(D,0,0,k.width,k.height):D.clearRect(0,0,k.width,k.height);var A=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;t.colorFillStyle(D,A[0],A[1],A[2],M),D.fillRect(0,0,k.width,k.height);b=n.zoom();S(D,!1),D.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),D.drawImage(_,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else t.textureOnViewport&&!r&&(t.textureCache=null);var R=n.extent(),I=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),N=t.hideEdgesOnViewport&&I,L=[];if(L[t.NODE]=!c[t.NODE]&&h&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,L[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),L[t.DRAG]=!c[t.DRAG]&&h&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,L[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),c[t.NODE]||a||i||L[t.NODE]){var z=h&&!L[t.NODE]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.nondrag,l,R):t.drawLayeredElements(D,C.nondrag,l,R),t.debug&&t.drawDebugPoints(D,C.nondrag),a||h||(c[t.NODE]=!1)}if(!i&&(c[t.DRAG]||a||L[t.DRAG])){z=h&&!L[t.DRAG]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.drag,l,R):t.drawCachedElements(D,C.drag,l,R),t.debug&&t.drawDebugPoints(D,C.drag),a||h||(c[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,S),h&&1!==f){var O=u.contexts[t.NODE],V=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],F=u.contexts[t.DRAG],X=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],j=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):P(e,0,0,t.canvasWidth,t.canvasHeight);var a=f;e.drawImage(n,0,0,t.canvasWidth*a,t.canvasHeight*a,0,0,t.canvasWidth,t.canvasHeight)};(c[t.NODE]||L[t.NODE])&&(j(O,V,L[t.NODE]),c[t.NODE]=!1),(c[t.DRAG]||L[t.DRAG])&&(j(F,X,L[t.DRAG]),c[t.DRAG]=!1)}t.prevViewport=k,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),h&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!d,t.mbFrames=0,c[t.NODE]=!0,c[t.DRAG]=!0,t.redraw()},100)),r||n.emit("render")},Wd.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,a=n.data,i=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,l=a.canvasNeedsRedraw,u=e.forcedContext;if(n.showFps||!o&&l[n.SELECT_BOX]&&!s){var c=u||a.contexts[n.SELECT_BOX];if(t(c),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var d=n.cy.zoom(),h=i.core("selection-box-border-width").value/d;c.lineWidth=h,c.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",c.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),h>0&&(c.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",c.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(a.bgActivePosistion&&!n.hoverData.selecting){d=n.cy.zoom();var f=a.bgActivePosistion;c.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",c.beginPath(),c.arc(f.x,f.y,i.core("active-bg-size").pfValue/d,0,2*Math.PI),c.fill()}var p=n.lastRedrawTime;if(n.showFps&&p){p=Math.round(p);var v=Math.round(1e3/p),g="1 frame = "+p+" ms = "+v+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!qd){var y=c.measureText(g);qd=y.actualBoundingBoxAscent}c.fillText(g,0,qd);c.strokeRect(0,qd+10,250,20),c.fillRect(0,qd+10,250*Math.min(v/60,1),20)}s||(l[n.SELECT_BOX]=!1)}};var ah="undefined"!=typeof Float32Array?Float32Array:Array;function ih(){var e=new ah(9);return ah!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function oh(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function sh(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=n[0],f=n[1];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e[6]=h*r+f*o+u,e[7]=h*a+f*s+c,e[8]=h*i+f*l+d,e}function lh(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=Math.sin(n),f=Math.cos(n);return e[0]=f*r+h*o,e[1]=f*a+h*s,e[2]=f*i+h*l,e[3]=f*o-h*r,e[4]=f*s-h*a,e[5]=f*l-h*i,e[6]=u,e[7]=c,e[8]=d,e}function uh(e,t,n){var r=n[0],a=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var ch=function(){return i(function e(t,n,r,i){a(this,e),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,n,n),this.scratch=i(t,n,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(e){var t=e.w,n=e.h,r=this.texHeight,a=this.texSize,i=r/n,o=t*i,s=n*i;return o>a&&(o=t*(i=a/t),s=n*i),{scale:i,texW:o,texH:s}}},{key:"draw",value:function(e,t,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var a=this.texSize,i=this.texRows,o=this.texHeight,s=this.getScale(t),l=s.scale,u=s.texW,c=s.texH,d=function(e,r){if(n&&r){var a=r.context,i=e.x,s=e.row,u=i,c=o*s;a.save(),a.translate(u,c),a.scale(l,l),n(a,t),a.restore()}},h=[null,null],f=function(){d(r.freePointer,r.canvas),h[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:u,h:c},h[1]={x:r.freePointer.x+u,y:r.freePointer.row*o,w:0,h:c},r.freePointer.x+=u,r.freePointer.x==a&&(r.freePointer.x=0,r.freePointer.row++)},p=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=a)f();else{if(this.freePointer.row>=i-1)return!1;this.freePointer.x===a?(p(),f()):this.enableWrapping?function(){var e=r.scratch,t=r.canvas;e.clear(),d({x:0,row:0},e);var n=a-r.freePointer.x,i=u-n,s=o,l=r.freePointer.x,f=r.freePointer.row*o,p=n;t.context.drawImage(e,0,0,p,s,l,f,p,s),h[0]={x:l,y:f,w:p,h:c};var v=n,g=(r.freePointer.row+1)*o,y=i;t&&t.context.drawImage(e,v,0,y,s,0,g,y,s),h[1]={x:0,y:g,w:y,h:c},r.freePointer.x=i,r.freePointer.row++}():(p(),f())}return this.keyToLocation.set(e,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(e){return this.keyToLocation.get(e)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return!(this.freePointer.x+r>t)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},a=r.forceRedraw,i=void 0!==a&&a,s=r.filterEle,l=void 0===s?function(){return!0}:s,u=r.filterType,c=void 0===u?function(){return!0}:u,d=!1,h=!1,f=o(e);try{for(f.s();!(t=f.n()).done;){var p=t.value;if(l(p)){var v,g=o(this.renderTypes.values());try{var y=function(){var e=v.value,t=e.type;if(c(t)){var r=n.collections.get(e.collection),a=e.getKey(p),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),h=!0;else{var s=e.getID?e.getID(p):p.id(),l=n._key(t,s),u=n.typeAndIdToKey.get(l);void 0===u||Zd(o,u)||(d=!0,n.typeAndIdToKey.delete(l),u.forEach(function(e){return r.markKeyForGC(e)}))}}};for(g.s();!(v=g.n()).done;)y()}catch(m){g.e(m)}finally{g.f()}}}}catch(m){f.e(m)}finally{f.f()}return h&&(this.gc(),d=!1),d}},{key:"gc",value:function(){var e,t=o(this.collections.values());try{for(t.s();!(e=t.n()).done;){e.value.gc()}}catch(n){t.e(n)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(e,t,n,r){var a=this.renderTypes.get(t),i=this.collections.get(a.collection),o=!1,s=i.draw(r,n,function(t){a.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),a.drawElement(t,e,n,!0,!0),t.restore()):a.drawElement(t,e,n,!0,!0),o=!0});if(o){var l=a.getID?a.getID(e):e.id(),u=this._key(t,l);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:"getAtlasInfo",value:function(e,t){var n=this,r=this.renderTypes.get(t),a=r.getKey(e);return(Array.isArray(a)?a:[a]).map(function(a){var i=r.getBoundingBox(e,a),o=n.getOrCreateAtlas(e,t,i,a),s=l(o.getOffsets(a),2),u=s[0];return{atlas:o,tex:u,tex1:u,tex2:s[1],bb:i}})}},{key:"getDebugInfo",value:function(){var e,t=[],n=o(this.collections);try{for(n.s();!(e=n.n()).done;){var r=l(e.value,2),a=r[0],i=r[1].getCounts(),s=i.keyCount,u=i.atlasCount;t.push({type:a,keyCount:s,atlasCount:u})}}catch(c){n.e(c)}finally{n.f()}return t}}])}(),fh=function(){return i(function e(t){a(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:"getAtlasIndexForBatch",value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),ph={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},vh=1,gh=2,yh=function(){return i(function e(t,n,r){a(this,e),this.r=t,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Hd,this.atlasManager=new hh(t,r),this.batchManager=new fh(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(ph.SCREEN),this.pickingProgram=this._createShaderProgram(ph.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:"addTextureAtlasRenderType",value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:"addSimpleShapeRenderType",value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:"invalidate",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(e){var t=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),a="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(e.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),i=function(e,t,n){var r=Ud(e,e.VERTEX_SHADER,t),a=Ud(e,e.FRAGMENT_SHADER,n),i=e.createProgram();if(e.attachShader(i,r),e.attachShader(i,a),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Could not initialize shaders");return i}(t,n,a);i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:ph.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))}},{key:"drawTexture",value:function(e,t,n){var r=this.atlasManager,a=this.batchManager,i=r.getRenderTypeOpts(n);if(this._isVisible(e,i)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&i.getTexPickingMode){var s=i.getTexPickingMode(e);if(s===vh)return;if(s==gh)return void this.drawPickingRectangle(e,t,n)}var u,c=o(r.getAtlasInfo(e,n));try{for(c.s();!(u=c.n()).done;){var d=u.value,h=d.atlas,f=d.tex1,p=d.tex2;a.canAddToCurrentBatch(h)||this.endBatch();for(var v=a.getAtlasIndexForBatch(h),g=0,y=[[f,!0],[p,!1]];g=this.maxInstances&&this.endBatch()}}}}catch(T){c.e(T)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=0;if(n.shapeProps&&n.shapeProps.padding&&(i=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);a||(u=1-u);var c=this._getAdjustedBB(o,i,a,u);this._applyTransformMatrix(t,c,n,e)}else{var d=n.getBoundingBox(e),h=this._getAdjustedBB(d,i,!0,1);this._applyTransformMatrix(t,h,n,e)}}},{key:"_applyTransformMatrix",value:function(e,t,n,r){var a,i;oh(e);var o=n.getRotation?n.getRotation(r):0;if(0!==o){var s=n.getRotationPoint(r);sh(e,e,[s.x,s.y]),lh(e,e,o);var l=n.getRotationOffset(r);a=l.x+(t.xOffset||0),i=l.y+(t.yOffset||0)}else a=t.x1,i=t.y1;sh(e,e,[a,i]),uh(e,e,[t.w,t.h])}},{key:"_getAdjustedBB",value:function(e,t,n,r){var a=e.x1,i=e.y1,o=e.w,s=e.h;t&&(a-=t,i-=t,o+=2*t,s+=2*t);var l=0,u=o*r;return n&&r<1?o=u:!n&&r<1&&(a+=l=o-u,o=u),{x1:a,y1:i,w:o,h:s,xOffset:l,yOffset:e.yOffset}}},{key:"drawPickingRectangle",value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),a=this.instanceCount;this.vertTypeBuffer.getView(a)[0]=4,Qd(t,this.indexBuffer.getView(a)),$d([0,0,0],1,this.colorBuffer.getView(a));var i=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(e,i,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var a=r.shapeProps,i=this._getVertTypeForShape(e,a.shape);if(void 0===i||r.isSimple&&!r.isSimple(e))this.drawTexture(e,t,n);else{var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=i,5===i||6===i){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,a.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,6===i&&(u[0]=0,u[2]=0)}Qd(t,this.indexBuffer.getView(o)),$d(e.pstyle(a.color).value,e.pstyle(a.opacity).value,this.colorBuffer.getView(o));var c=this.lineWidthBuffer.getView(o);if(c[0]=0,c[1]=0,a.border){var d=e.pstyle("border-width").value;if(d>0){$d(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(o));var h=e.pstyle("border-position").value;if("inside"===h)c[0]=0,c[1]=-d;else if("outside"===h)c[0]=d,c[1]=0;else{var f=d/2;c[0]=f,c[1]=-f}}}var p=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,p,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(e,t,n){var r=n.w,a=n.h;if("auto"===e.pstyle(t).value)return In(r,a);var i=e.pstyle(t).pfValue,o=r/2,s=a/2;return Math.min(i,s,o)}},{key:"drawEdgeArrow",value:function(e,t,n){if(e.visible()){var r,a,i,o=e._private.rscratch;if("source"===n?(r=o.arrowStartX,a=o.arrowStartY,i=o.srcArrowAngle):(r=o.arrowEndX,a=o.arrowEndY,i=o.tgtArrowAngle),!(isNaN(r)||null==r||isNaN(a)||null==a||isNaN(i)||null==i))if("none"!==e.pstyle(n+"-arrow-shape").value){var s=e.pstyle(n+"-arrow-color").value,l=e.pstyle("opacity").value*e.pstyle("line-opacity").value,u=e.pstyle("width").pfValue,c=e.pstyle("arrow-scale").value,d=this.r.getArrowWidth(u,c),h=this.instanceCount,f=this.transformBuffer.getMatrixView(h);oh(f),sh(f,f,[r,a]),uh(f,f,[d,d]),lh(f,f,i),this.vertTypeBuffer.getView(h)[0]=3,Qd(t,this.indexBuffer.getView(h)),$d(s,l,this.colorBuffer.getView(h)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle("opacity").value,a=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,o=e.pstyle("line-color").value,s=r*a;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,Qd(t,this.indexBuffer.getView(l)),$d(o,s,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=i;var u=this.pointAPointBBuffer.getView(l);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var c=0;c=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(e){var t=e._private.rscratch;return!t.badLine&&null!=t.allpts&&!isNaN(t.allpts[0])}},{key:"_getEdgePoints",value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(4==n.length)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(e){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(e,t){if(4==e.length)return e;for(var n=Array(2*(t+1)),r=0;r<=t;r++)if(0==r)n[0]=e[0],n[1]=e[1];else if(r==t)n[2*r]=e[e.length-2],n[2*r+1]=e[e.length-1];else{var a=r/t;this._setCurvePoint(e,a,n,2*r)}return n}},{key:"_setCurvePoint",value:function(e,t,n,r){if(!(e.length<=2)){for(var a=Array(e.length-2),i=0;i0}},u=function(e){return"yes"===e.pstyle("text-events").strValue?gh:vh},c=function(e){var t=e.position(),n=t.x,r=t.y,a=e.outerWidth(),i=e.outerHeight();return{w:a,h:i,x1:n-a/2,y1:r-i/2}};n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:Gd,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:u,getKey:xh(t.getLabelKey,null),getBoundingBox:wh(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:a(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:u,getKey:xh(t.getSourceLabelKey,"source"),getBoundingBox:wh(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:a("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:u,getKey:xh(t.getTargetLabelKey,"target"),getBoundingBox:wh(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:a("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:i("target-label")});var d=Re(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&d()}),function(e){var t=e.render;e.render=function(n){n=n||{};var r=e.cy;e.webgl&&(r.zoom()>pd?(!function(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}(e),t.call(e,n)):(!function(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}(e),Th(e,n,ph.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,a){return function(e,t,n){var r,a,i,s=function(e,t,n){var r,a,i,o,s=Kd(e),u=s.pan,c=s.zoom,d=function(e,t,n,r,a){var i=r*n+t.x,o=a*n+t.y;return[i,o=Math.round(e.canvasHeight-o)]}(e,u,c,t,n),h=l(d,2),f=h[0],p=h[1],v=6;if(r=f-v/2,a=p-v/2,o=v,0===(i=v)||0===o)return[];var g=e.data.contexts[e.WEBGL];g.bindFramebuffer(g.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(g.viewport(0,0,g.canvas.width,g.canvas.height),Th(e,null,ph.PICKING),e.pickingFrameBuffer.needsDraw=!1);var y=i*o,m=new Uint8Array(4*y);g.readPixels(r,a,i,o,g.RGBA,g.UNSIGNED_BYTE,m),g.bindFramebuffer(g.FRAMEBUFFER,null);for(var b=new Set,x=0;x=0&&b.add(w)}return b}(e,t,n),u=e.getCachedZSortedEles(),c=o(s);try{for(c.s();!(i=c.n()).done;){var d=u[i.value];if(!r&&d.isNode()&&(r=d),!a&&d.isEdge()&&(a=d),r&&a)break}}catch(h){c.e(h)}finally{c.f()}return[r,a].filter(Boolean)}(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var a=e.notify;e.notify=function(t,n){a.call(e,t,n),"viewport"===t||"bounds"===t?e.pickingFrameBuffer.needsDraw=!0:"background"===t&&e.drawing.invalidate(n,{type:"node-body"})}}(n)};var xh=function(e,t){return function(n){var r=e(n),a=bh(n,t);return a.length>1?a.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},wh=function(e,t){return function(n,r){var a=e(n);if("string"==typeof r){var i=r.indexOf("_");if(i>0){var o=Number(r.substring(i+1)),s=bh(n,t),l=a.h/s.length,u=l*o,c=a.y1+u;return{x1:a.x1,w:a.w,y1:c,h:l,yOffset:u}}}return a}};function Eh(e,t){var n=e.canvasWidth,r=e.canvasHeight,a=Kd(e),i=a.pan,o=a.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(i.x,i.y),t.scale(o,o)}function kh(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,"node-underlay"),r.drawNode(n,t,"node-body"),r.drawTexture(n,t,"label"),r.drawNode(n,t,"node-overlay")):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,"source"),r.drawEdgeArrow(n,t,"target"),r.drawTexture(n,t,"label"),r.drawTexture(n,t,"edge-source-label"),r.drawTexture(n,t,"edge-target-label"))}function Th(e,t,n){var r;e.webglDebug&&(r=performance.now());var a=e.drawing,i=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&function(e,t){e.drawSelectionRectangle(t,function(t){return Eh(e,t)})}(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var l=function(e){var t=e.canvasWidth,n=e.canvasHeight,r=Kd(e),a=r.pan,i=r.zoom,o=ih();sh(o,o,[a.x,a.y]),uh(o,o,[i,i]);var s=ih();!function(e,t,n){e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1}(s,t,n);var l,u,c,d,h,f,p,v,g,y,m,b,x,w,E,k,T,C,P,S,B,D=ih();return l=D,c=o,d=(u=s)[0],h=u[1],f=u[2],p=u[3],v=u[4],g=u[5],y=u[6],m=u[7],b=u[8],x=c[0],w=c[1],E=c[2],k=c[3],T=c[4],C=c[5],P=c[6],S=c[7],B=c[8],l[0]=x*d+w*p+E*y,l[1]=x*h+w*v+E*m,l[2]=x*f+w*g+E*b,l[3]=k*d+T*p+C*y,l[4]=k*h+T*v+C*m,l[5]=k*f+T*g+C*b,l[6]=P*d+S*p+B*y,l[7]=P*h+S*v+B*m,l[8]=P*f+S*g+B*b,D}(e),u=e.getCachedZSortedEles();if(i=u.length,a.startFrame(l,n),n.screen){for(var c=0;c0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var f=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var p=t.pan(),v={x:p.x*l,y:p.y*l};l*=t.zoom(),h.translate(v.x,v.y),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(-v.x,-v.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},Mh.png=function(e){return Ih(e,this.bufferCanvasImage(e),"image/png")},Mh.jpg=function(e){return Ih(e,this.bufferCanvasImage(e),"image/jpeg")};var Nh={nodeShapeImpl:function(e,t,n,r,a,i,o,s){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,i);case"polygon":return this.drawPolygonPath(t,n,r,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,i,s);case"barrel":return this.drawBarrelPath(t,n,r,a,i)}}},Lh=Oh,zh=Oh.prototype;function Oh(e){var t=this,n=t.cy.window().document;e.webgl&&(zh.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array(zh.CANVAS_LAYERS),contexts:new Array(zh.CANVAS_LAYERS),canvasNeedsRedraw:new Array(zh.CANVAS_LAYERS),bufferCanvases:new Array(zh.BUFFER_COUNT),bufferContexts:new Array(zh.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;lct});var i=e(7633),s=e(797),r=e(451);function o(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function c(t){return t.target.depth}function l(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function h(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function u(t){return function(){return t}}function f(t,n){return d(t.source,n.source)||t.index-n.index}function y(t,n){return d(t.target,n.target)||t.index-n.index}function d(t,n){return t.y0-n.y0}function p(t){return t.value}function g(t){return t.index}function _(t){return t.nodes}function k(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function m({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function v(){let t,n,e,i=0,s=0,r=1,c=1,v=24,b=8,w=g,L=l,S=_,E=k,K=6;function A(){const l={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map((n,e)=>[w(n,e,t),n]));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=x(i,t)),"object"!=typeof n&&(n=s.target=x(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(l),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,p),a(n.targetLinks,p)):n.fixedValue}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function(e){const l=function({nodes:t}){const e=h(t,t=>t.depth)+1,s=(r-i-v)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(b,(c-s)/(h(l,t=>t.length)-1)),function(n){const e=o(n,n=>(c-s-(n.length-1)*t)/a(n,p));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(c-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=$(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,c,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(y);for(const{target:{targetLinks:n}}of t)n.sort(f)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(y),e.sort(f)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return A.update=function(t){return m(t),t},A.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:u(t),A):w},A.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:u(t),A):L},A.nodeSort=function(t){return arguments.length?(n=t,A):n},A.nodeWidth=function(t){return arguments.length?(v=+t,A):v},A.nodePadding=function(n){return arguments.length?(b=t=+n,A):b},A.nodes=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.linkSort=function(t){return arguments.length?(e=t,A):e},A.size=function(t){return arguments.length?(i=s=0,r=+t[0],c=+t[1],A):[r-i,c-s]},A.extent=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],s=+t[0][1],c=+t[1][1],A):[[i,s],[r,c]]},A.iterations=function(t){return arguments.length?(K=+t,A):K},A}var b=Math.PI,w=2*b,L=1e-6,S=w-L;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K(){return new E}E.prototype=K.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,l=i-n,a=r-t,h=o-n,u=a*a+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>L)if(Math.abs(h*c-l*a)>L&&s){var f=e-r,y=i-o,d=c*c+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((b-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,m=k/g;Math.abs(x-1)>L&&(this._+="L"+(t+x*a)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>a*y)+","+(this._x1=t+m*c)+","+(this._y1=n+m*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),l=t+o,a=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+a:(Math.abs(this._x1-l)>L||Math.abs(this._y1-a)>L)&&(this._+="L"+l+","+a),e&&(u<0&&(u=u%w+w),u>S?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=a):u>L&&(this._+="A"+e+","+e+",0,"+ +(u>=b)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=K;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function D(t){return t[1]}function N(t){return t.source}function P(t){return t.target}function C(t){var n=N,e=P,i=T,s=D,r=null;function o(){var o,c=M.call(arguments),l=n.apply(this,c),a=e.apply(this,c);if(r||(r=o=A()),t(r,+i.apply(this,(c[0]=l,c)),+s.apply(this,c),+i.apply(this,(c[0]=a,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:I(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function O(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function $(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return C(O).source($).target(j)}var U=function(){var t=(0,s.K2)(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],r={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,s.K2)(function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,s.K2)(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var n=this,e=[0],i=[],r=[null],o=[],c=this.table,l="",a=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),(0,s.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,K,A={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M="";for(L in K=[],c[v])this.terminals_[L]&&L>2&&K.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(a+1)+":\n"+y.showPosition()+"\nExpecting "+K.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:K})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,l=y.yytext,a=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],A.$=r[r.length-S],A._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(A._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[l,h,a,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(A.$),o.push(A._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,s.K2)(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:(0,s.K2)(function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:(0,s.K2)(function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,s.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();U.parser=U;var F=U,W=[],G=[],V=new Map,X=(0,s.K2)(()=>{W=[],G=[],V=new Map,(0,i.IU)()},"clear"),Y=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,s.K2)(this,"SankeyLink")}},q=(0,s.K2)((t,n,e)=>{W.push(new Y(t,n,e))},"addLink"),Q=class{constructor(t){this.ID=t}static{(0,s.K2)(this,"SankeyNode")}},R=(0,s.K2)(t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=V.get(t);return void 0===n&&(n=new Q(t),V.set(t,n),G.push(n)),n},"findOrCreateNode"),B=(0,s.K2)(()=>G,"getNodes"),Z=(0,s.K2)(()=>W,"getLinks"),H=(0,s.K2)(()=>({nodes:G.map(t=>({id:t.ID})),links:W.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:V,getConfig:(0,s.K2)(()=>(0,i.D7)().sankey,"getConfig"),getNodes:B,getLinks:Z,getGraph:H,addLink:q,findOrCreateNode:R,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:X},tt=class t{static{(0,s.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},nt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,c)-1:0},justify:l},et=(0,s.K2)(function(t,n,e,o){const{securityLevel:c,sankey:l}=(0,i.D7)(),a=i.ME.sankey;let h;"sandbox"===c&&(h=(0,r.Ltv)("#i"+n));const u="sandbox"===c?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),f="sandbox"===c?u.select(`[id="${n}"]`):(0,r.Ltv)(`[id="${n}"]`),y=l?.width??a.width,d=l?.height??a.width,p=l?.useMaxWidth??a.useMaxWidth,g=l?.nodeAlignment??a.nodeAlignment,_=l?.prefix??a.prefix,k=l?.suffix??a.suffix,x=l?.showValues??a.showValues,m=o.db.getGraph(),b=nt[g];v().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(b).extent([[0,0],[y,d]])(m);const w=(0,r.UMr)(r.zt);f.append("g").attr("class","nodes").selectAll(".node").data(m.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>w(t.id));const L=(0,s.K2)(({id:t,value:n})=>x?`${t}\n${_}${Math.round(100*n)/100}${k}`:t,"getText");f.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(m.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>t.x0(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>w(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>w(t.target.id))}let K;switch(E){case"gradient":K=(0,s.K2)(t=>t.uid,"coloring");break;case"source":K=(0,s.K2)(t=>w(t.source.id),"coloring");break;case"target":K=(0,s.K2)(t=>w(t.target.id),"coloring");break;default:K=E}S.append("path").attr("d",z()).attr("stroke",K).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.ot)(void 0,f,0,p)},"draw"),it={draw:et},st=(0,s.K2)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),rt=(0,s.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n }`,"getStyles"),ot=F.parse.bind(F);F.parse=t=>ot(st(t));var ct={styles:rt,parser:F,db:J,renderer:it}}}]); \ No newline at end of file diff --git a/assets/js/1746.afdbc2a0.js b/assets/js/1746.afdbc2a0.js deleted file mode 100644 index fd69257..0000000 --- a/assets/js/1746.afdbc2a0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1746],{9625(t,e,s){s.d(e,{A:()=>a});var i=s(797),n=s(451),a=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},1746(t,e,s){s.d(e,{Lh:()=>k,NM:()=>g,_$:()=>d,tM:()=>b});var i=s(2501),n=s(9625),a=s(1152),r=s(45),u=s(3226),l=s(7633),o=s(797),c=s(451),h=function(){var t=(0,o.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],a=[1,42],r=[1,26],u=[1,24],l=[1,25],c=[1,32],h=[1,33],d=[1,34],p=[1,45],A=[1,35],y=[1,36],C=[1,37],m=[1,38],g=[1,27],b=[1,28],E=[1,29],k=[1,30],T=[1,31],f=[1,44],D=[1,46],F=[1,43],B=[1,47],_=[1,9],S=[1,8,9],N=[1,58],L=[1,59],$=[1,60],x=[1,61],v=[1,62],I=[1,63],O=[1,64],w=[1,8,9,41],R=[1,76],P=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],K=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],M=[13,60,86,100,102,103],G=[13,60,73,74,86,100,102,103],U=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,100],z=[1,117],Q=[1,113],W=[1,109],X=[1,115],j=[1,110],V=[1,111],q=[1,112],H=[1,114],J=[1,116],Z=[22,48,60,61,82,86,87,88,89,90],tt=[1,8,9,39,41,44],et=[1,8,9,22],st=[1,145],it=[1,8,9,61],nt=[1,8,9,22,48,60,61,82,86,87,88,89,90],at={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,o.K2)(function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 10:case 13:case 15:this.$=a[u];break;case 11:case 14:this.$=a[u-2]+"."+a[u];break;case 12:case 16:case 100:this.$=a[u-1]+a[u];break;case 17:case 18:this.$=a[u-1]+"~"+a[u]+"~";break;case 19:i.addRelation(a[u]);break;case 20:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 31:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[u-3],a[u-1]);break;case 35:i.addClassesToNamespace(a[u-4],a[u-1]);break;case 36:this.$=a[u],i.addNamespace(a[u]);break;case 37:case 51:case 64:case 97:this.$=[a[u]];break;case 38:this.$=[a[u-1]];break;case 39:a[u].unshift(a[u-2]),this.$=a[u];break;case 41:i.setCssClass(a[u-2],a[u]);break;case 42:i.addMembers(a[u-3],a[u-1]);break;case 44:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 45:this.$=a[u],i.addClass(a[u]);break;case 46:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 50:i.addAnnotation(a[u],a[u-2]);break;case 52:a[u].push(a[u-1]),this.$=a[u];break;case 53:case 55:case 56:break;case 54:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 57:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 59:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 60:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 61:i.addNote(a[u],a[u-1]);break;case 62:i.addNote(a[u]);break;case 63:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 65:this.$=a[u-2].concat([a[u]]);break;case 66:i.setDirection("TB");break;case 67:i.setDirection("BT");break;case 68:i.setDirection("RL");break;case 69:i.setDirection("LR");break;case 70:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 71:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 72:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 73:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 74:this.$=i.relationType.AGGREGATION;break;case 75:this.$=i.relationType.EXTENSION;break;case 76:this.$=i.relationType.COMPOSITION;break;case 77:this.$=i.relationType.DEPENDENCY;break;case 78:this.$=i.relationType.LOLLIPOP;break;case 79:this.$=i.lineType.LINE;break;case 80:this.$=i.lineType.DOTTED_LINE;break;case 81:case 87:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 82:case 88:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 83:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 84:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 85:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 86:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 89:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 90:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 91:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 92:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 93:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 94:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 95:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 96:i.setCssClass(a[u-1],a[u]);break;case 98:a[u-2].push(a[u]),this.$=a[u-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,49:r,51:u,52:l,54:c,56:h,57:d,60:p,62:A,63:y,64:C,65:m,75:g,76:b,78:E,82:k,83:T,86:f,100:D,102:F,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t(S,[2,19],{22:[1,50]}),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),t(S,[2,24]),t(S,[2,25]),t(S,[2,26]),t(S,[2,27]),t(S,[2,28]),t(S,[2,29]),t(S,[2,30]),{34:[1,51]},{36:[1,52]},t(S,[2,33]),t(S,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:N,69:L,70:$,71:x,72:v,73:I,74:O}),{39:[1,65]},t(w,[2,40],{39:[1,67],44:[1,66]}),t(S,[2,55]),t(S,[2,56]),{16:68,60:p,86:f,100:D,102:F},{16:39,17:40,19:69,60:p,86:f,100:D,102:F,103:B},{16:39,17:40,19:70,60:p,86:f,100:D,102:F,103:B},{16:39,17:40,19:71,60:p,86:f,100:D,102:F,103:B},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:p,86:f,100:D,102:F,103:B},{13:R,55:75},{58:77,60:[1,78]},t(S,[2,66]),t(S,[2,67]),t(S,[2,68]),t(S,[2,69]),t(P,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:p,86:f,100:D,102:F,103:B}),t(P,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:p,86:f,100:D,102:F,103:B},{16:39,17:40,19:86,60:p,86:f,100:D,102:F,103:B},t(K,[2,123]),t(K,[2,124]),t(K,[2,125]),t(K,[2,126]),t([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:e,35:s,37:i,42:n,46:a,49:r,51:u,52:l,54:c,56:h,57:d,60:p,62:A,63:y,64:C,65:m,75:g,76:b,78:E,82:k,83:T,86:f,100:D,102:F,103:B}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,49:r,51:u,52:l,54:c,56:h,57:d,60:p,62:A,63:y,64:C,65:m,75:g,76:b,78:E,82:k,83:T,86:f,100:D,102:F,103:B},t(S,[2,20]),t(S,[2,31]),t(S,[2,32]),{13:[1,90],16:39,17:40,19:89,60:p,86:f,100:D,102:F,103:B},{53:91,66:56,67:57,68:N,69:L,70:$,71:x,72:v,73:I,74:O},t(S,[2,54]),{67:92,73:I,74:O},t(M,[2,73],{66:93,68:N,69:L,70:$,71:x,72:v}),t(G,[2,74]),t(G,[2,75]),t(G,[2,76]),t(G,[2,77]),t(G,[2,78]),t(U,[2,79]),t(U,[2,80]),{8:[1,95],24:96,40:94,43:23,46:a},{16:97,60:p,86:f,100:D,102:F},{41:[1,99],45:98,51:Y},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:z,48:Q,59:106,60:W,82:X,84:107,85:108,86:j,87:V,88:q,89:H,90:J},{60:[1,118]},{13:R,55:119},t(S,[2,62]),t(S,[2,128]),{22:z,48:Q,59:120,60:W,61:[1,121],82:X,84:107,85:108,86:j,87:V,88:q,89:H,90:J},t(Z,[2,64]),{16:39,17:40,19:122,60:p,86:f,100:D,102:F,103:B},t(P,[2,16]),t(P,[2,17]),t(P,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:p,86:f,100:D,102:F,103:B},{39:[2,10]},t(tt,[2,45],{11:125,12:[1,126]}),t(_,[2,7]),{9:[1,127]},t(et,[2,57]),{16:39,17:40,19:128,60:p,86:f,100:D,102:F,103:B},{13:[1,130],16:39,17:40,19:129,60:p,86:f,100:D,102:F,103:B},t(M,[2,72],{66:131,68:N,69:L,70:$,71:x,72:v}),t(M,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:a},{8:[1,134],41:[2,37]},t(w,[2,41],{39:[1,135]}),{41:[1,136]},t(w,[2,43]),{41:[2,51],45:137,51:Y},{16:39,17:40,19:138,60:p,86:f,100:D,102:F,103:B},t(S,[2,81],{13:[1,139]}),t(S,[2,83],{13:[1,141],77:[1,140]}),t(S,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},t(S,[2,95],{61:st}),t(it,[2,97],{85:146,22:z,48:Q,60:W,82:X,86:j,87:V,88:q,89:H,90:J}),t(nt,[2,99]),t(nt,[2,101]),t(nt,[2,102]),t(nt,[2,103]),t(nt,[2,104]),t(nt,[2,105]),t(nt,[2,106]),t(nt,[2,107]),t(nt,[2,108]),t(nt,[2,109]),t(S,[2,96]),t(S,[2,61]),t(S,[2,63],{61:st}),{60:[1,147]},t(P,[2,14]),{15:148,16:84,17:85,60:p,86:f,100:D,102:F,103:B},{39:[2,12]},t(tt,[2,46]),{13:[1,149]},{1:[2,4]},t(et,[2,59]),t(et,[2,58]),{16:39,17:40,19:150,60:p,86:f,100:D,102:F,103:B},t(M,[2,70]),t(S,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:a},{45:153,51:Y},t(w,[2,42]),{41:[2,52]},t(S,[2,50]),t(S,[2,82]),t(S,[2,84]),t(S,[2,85],{77:[1,154]}),t(S,[2,88]),t(S,[2,89],{13:[1,155]}),t(S,[2,91],{13:[1,157],77:[1,156]}),{22:z,48:Q,60:W,82:X,84:158,85:108,86:j,87:V,88:q,89:H,90:J},t(nt,[2,100]),t(Z,[2,65]),{39:[2,11]},{14:[1,159]},t(et,[2,60]),t(S,[2,35]),{41:[2,39]},{41:[1,160]},t(S,[2,86]),t(S,[2,90]),t(S,[2,92]),t(S,[2,93],{77:[1,161]}),t(it,[2,98],{85:146,22:z,48:Q,60:W,82:X,86:j,87:V,88:q,89:H,90:J}),t(tt,[2,8]),t(w,[2,44]),t(S,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,s=[0],i=[],n=[null],a=[],r=this.table,u="",l=0,c=0,h=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(A.yy[y]=this.yy[y]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var C=p.yylloc;a.push(C);var m=p.options&&p.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,o.K2)(g,"lex");for(var b,E,k,T,f,D,F,B,_,S={};;){if(k=s[s.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==b&&(b=g()),T=r[k]&&r[k][b]),void 0===T||!T.length||!T[0]){var N="";for(D in _=[],r[k])this.terminals_[D]&&D>2&&_.push("'"+this.terminals_[D]+"'");N=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:C,expected:_})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(T[0]){case 1:s.push(b),n.push(p.yytext),a.push(p.yylloc),s.push(T[1]),b=null,E?(b=E,E=null):(c=p.yyleng,u=p.yytext,l=p.yylineno,C=p.yylloc,h>0&&h--);break;case 2:if(F=this.productions_[T[1]][1],S.$=n[n.length-F],S._$={first_line:a[a.length-(F||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(F||1)].first_column,last_column:a[a.length-1].last_column},m&&(S._$.range=[a[a.length-(F||1)].range[0],a[a.length-1].range[1]]),void 0!==(f=this.performAction.apply(S,[u,c,l,A.yy,T[1],n,a].concat(d))))return f;F&&(s=s.slice(0,-1*F*2),n=n.slice(0,-1*F),a=a.slice(0,-1*F)),s.push(this.productions_[T[1]][0]),n.push(S.$),a.push(S._$),B=r[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0},"parse")},rt=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ae[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,o.K2)(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),46;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function ut(){this.yy={}}return at.lexer=rt,(0,o.K2)(ut,"Parser"),ut.prototype=at,at.Parser=ut,new ut}();h.parser=h;var d=h,p=["#","+","~","-",""],A=class{static{(0,o.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=(0,l.jZ)(t,(0,l.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,l.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,l.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,l.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(p.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);p.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${(0,l.QO)(this.id)}${"method"===this.memberType?`(${(0,l.QO)(this.parameters)})${this.returnType?" : "+(0,l.QO)(this.returnType):""}`:""}`;this.text=s.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},y="classId-",C=0,m=(0,o.K2)(t=>l.Y2.sanitizeText(t,(0,l.D7)()),"sanitizeText"),g=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,o.K2)(t=>{let e=(0,c.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,c.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,c.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=(0,c.Ltv)(t.currentTarget);if(null===s.attr("title"))return;const i=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"
")),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,c.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setAccDescription=l.EI,this.getAccDescription=l.m7,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getConfig=(0,o.K2)(()=>(0,l.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,o.K2)(this,"ClassDB")}splitClassNameAndType(t){const e=l.Y2.sanitizeText(t,(0,l.D7)());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=m(t[0]),s=m(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=l.Y2.sanitizeText(t,(0,l.D7)());e&&(e=m(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=l.Y2.sanitizeText(t,(0,l.D7)()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=l.Y2.sanitizeText(s,(0,l.D7)());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:y+n+"-"+C}),C++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}lookUpDomId(t){const e=l.Y2.sanitizeText(t,(0,l.D7)());if(this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",(0,l.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){o.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=l.Y2.sanitizeText(t.relationTitle1.trim(),(0,l.D7)()),t.relationTitle2=l.Y2.sanitizeText(t.relationTitle2.trim(),(0,l.D7)()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(m(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new A(t,"method")):t&&i.members.push(new A(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s={id:`note${this.notes.length}`,class:e,text:t};this.notes.push(s)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),m(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=y+s);const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=m(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=(0,l.D7)();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=y+n);const a=this.classes.get(n);a&&(a.link=u._K.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?m(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=l.Y2.sanitizeText(t,(0,l.D7)());if("loose"!==(0,l.D7)().securityLevel)return;if(void 0===e)return;const n=i;if(this.classes.has(n)){const t=this.lookUpDomId(n);let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const s=document.querySelector(`[id="${t}"]`);null!==s&&s.addEventListener("click",()=>{u._K.runFunc(e,...i)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:y+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(const s of e){const{className:e}=this.splitClassNameAndType(s);this.classes.get(e).parent=t,this.namespaces.get(t).classes.set(e,this.classes.get(e))}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){const t=[],e=[],s=(0,l.D7)();for(const n of this.namespaces.keys()){const e=this.namespaces.get(n);if(e){const i={id:e.id,label:e.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:s.look};t.push(i)}}for(const n of this.classes.keys()){const e=this.classes.get(n);if(e){const i=e;i.parentId=e.parent,i.look=s.look,t.push(i)}}let i=0;for(const n of this.notes){i++;const a={id:n.id,label:n.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look};t.push(a);const r=this.classes.get(n.class)?.id??"";if(r){const t={id:`edgeNote${i}`,start:n.id,end:r,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const n of this.interfaces){const e={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}i=0;for(const n of this.relations){i++;const t={id:(0,u.rY)(n.id1,n.id2,{prefix:"id",counter:i}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:s.look};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.getDirection()}}},b=(0,o.K2)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n#compositionStart, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopStart, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n#lollipopEnd, .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n ${(0,i.o)()}\n`,"getStyles"),E=(0,o.K2)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),k={getClasses:(0,o.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,o.K2)(async function(t,e,s,i){o.Rm.info("REF0:"),o.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:c,state:h,layout:d}=(0,l.D7)(),p=i.db.getData(),A=(0,n.A)(e,c);p.type=i.type,p.layoutAlgorithm=(0,r.q7)(d),p.nodeSpacing=h?.nodeSpacing||50,p.rankSpacing=h?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,r.XX)(p,A);u._K.insertTitle(A,"classDiagramTitleText",h?.titleTopMargin??25,i.db.getDiagramTitle()),(0,a.P)(A,8,"classDiagram",h?.useMaxWidth??!0)},"draw"),getDir:E}},2501(t,e,s){s.d(e,{o:()=>i});var i=(0,s(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},1152(t,e,s){s.d(e,{P:()=>a});var i=s(7633),n=s(797),a=(0,n.K2)((t,e,s,a)=>{t.attr("class",s);const{width:l,height:o,x:c,y:h}=r(t,e);(0,i.a$)(t,o,l,a);const d=u(c,h,l,o,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),r=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),u=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")}}]); \ No newline at end of file diff --git a/assets/js/17896441.0e3115cb.js b/assets/js/17896441.0e3115cb.js deleted file mode 100644 index 4aa1c26..0000000 --- a/assets/js/17896441.0e3115cb.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 17896441.0e3115cb.js.LICENSE.txt */ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8401],{1527(e,n,t){"use strict";t.r(n),t.d(n,{default:()=>da});var a=t(6540),r=t(5500),s=t(3807),i=t(4848),o=a.createContext(null);function c(e){var n=e.children,t=function(e){return(0,a.useMemo)(function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}},[e])}(e.content);return(0,i.jsx)(o.Provider,{value:t,children:n})}function l(){var e=(0,a.useContext)(o);if(null===e)throw new s.dV("DocProvider");return e}function u(){var e,n=l(),t=n.metadata,a=n.frontMatter,s=n.assets;return(0,i.jsx)(r.be,{title:t.title,description:t.description,keywords:a.keywords,image:null!=(e=s.image)?e:a.image})}var d=t(4164),m=t(4581),f=t(1312),h=t(8774);function v(e){var n=e.permalink,t=e.title,a=e.subLabel,r=e.isNext;return(0,i.jsxs)(h.A,{className:(0,d.A)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n,children:[a&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,i.jsx)("div",{className:"pagination-nav__label",children:t})]})}function g(e){var n=e.className,t=e.previous,a=e.next;return(0,i.jsxs)("nav",{className:(0,d.A)(n,"pagination-nav"),"aria-label":(0,f.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(v,Object.assign({},t,{subLabel:(0,i.jsx)(f.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),a&&(0,i.jsx)(v,Object.assign({},a,{subLabel:(0,i.jsx)(f.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}function p(){var e=l().metadata;return(0,i.jsx)(g,{className:"docusaurus-mt-lg",previous:e.previous,next:e.next})}var b=t(4586),j=t(4070),x=t(7559),N=t(3886),A=t(3025);var y={unreleased:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,i.jsx)(f.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:n,versionLabel:(0,i.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,i.jsx)(f.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:n,versionLabel:(0,i.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function w(e){var n=y[e.versionMetadata.banner];return(0,i.jsx)(n,Object.assign({},e))}function C(e){var n=e.versionLabel,t=e.to,a=e.onClick;return(0,i.jsx)(f.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:n,latestVersionLink:(0,i.jsx)("b",{children:(0,i.jsx)(h.A,{to:t,onClick:a,children:(0,i.jsx)(f.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function L(e){var n,t=e.className,a=e.versionMetadata,r=(0,b.A)().siteConfig.title,s=(0,j.vT)({failfast:!0}).pluginId,o=(0,N.g1)(s).savePreferredVersionName,c=(0,j.HW)(s),l=c.latestDocSuggestion,u=c.latestVersionSuggestion,m=null!=l?l:(n=u).docs.find(function(e){return e.id===n.mainDocId});return(0,i.jsxs)("div",{className:(0,d.A)(t,x.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,i.jsx)("div",{children:(0,i.jsx)(w,{siteTitle:r,versionMetadata:a})}),(0,i.jsx)("div",{className:"margin-top--md",children:(0,i.jsx)(C,{versionLabel:u.label,to:m.path,onClick:function(){return o(u.name)}})})]})}function k(e){var n=e.className,t=(0,A.r)();return t.banner?(0,i.jsx)(L,{className:n,versionMetadata:t}):null}function _(e){var n=e.className,t=(0,A.r)();return t.badge?(0,i.jsx)("span",{className:(0,d.A)(n,x.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,i.jsx)(f.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}const O="tag_zVej",T="tagRegular_sFm0",B="tagWithCount_h2kH";function M(e){var n=e.permalink,t=e.label,a=e.count,r=e.description;return(0,i.jsxs)(h.A,{rel:"tag",href:n,title:r,className:(0,d.A)(O,a?B:T),children:[t,a&&(0,i.jsx)("span",{children:a})]})}const H="tags_jXut",E="tag_QGVx";function S(e){var n=e.tags;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(f.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,d.A)(H,"padding--none","margin-left--sm"),children:n.map(function(e){return(0,i.jsx)("li",{className:E,children:(0,i.jsx)(M,Object.assign({},e))},e.permalink)})})]})}var I=t(8587);const V="iconEdit_Z9Sw";var U=["className"];function z(e){var n=e.className,t=(0,I.A)(e,U);return(0,i.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.A)(V,n),"aria-hidden":"true"},t,{children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function R(e){var n=e.editUrl;return(0,i.jsxs)(h.A,{to:n,className:x.G.common.editThisPage,children:[(0,i.jsx)(z,{}),(0,i.jsx)(f.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}function P(e){void 0===e&&(e={});var n=(0,b.A)().i18n.currentLocale,t=function(){var e=(0,b.A)().i18n,n=e.currentLocale;return e.localeConfigs[n].calendar}();return new Intl.DateTimeFormat(n,Object.assign({calendar:t},e))}function G(e){var n=e.lastUpdatedAt,t=new Date(n),a=P({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(t);return(0,i.jsx)(f.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:t.toISOString(),itemProp:"dateModified",children:a})})},children:" on {date}"})}function F(e){var n=e.lastUpdatedBy;return(0,i.jsx)(f.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:n})},children:" by {user}"})}function D(e){var n=e.lastUpdatedAt,t=e.lastUpdatedBy;return(0,i.jsxs)("span",{className:x.G.common.lastUpdated,children:[(0,i.jsx)(f.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:n?(0,i.jsx)(G,{lastUpdatedAt:n}):"",byUser:t?(0,i.jsx)(F,{lastUpdatedBy:t}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const W="lastUpdated_JAkA",q="noPrint_WFHX";function J(e){var n=e.className,t=e.editUrl,a=e.lastUpdatedAt,r=e.lastUpdatedBy;return(0,i.jsxs)("div",{className:(0,d.A)("row",n),children:[(0,i.jsx)("div",{className:(0,d.A)("col",q),children:t&&(0,i.jsx)(R,{editUrl:t})}),(0,i.jsx)("div",{className:(0,d.A)("col",W),children:(a||r)&&(0,i.jsx)(D,{lastUpdatedAt:a,lastUpdatedBy:r})})]})}function Z(){var e=l().metadata,n=e.editUrl,t=e.lastUpdatedAt,a=e.lastUpdatedBy,r=e.tags,s=r.length>0,o=!!(n||t||a);return s||o?(0,i.jsxs)("footer",{className:(0,d.A)(x.G.docs.docFooter,"docusaurus-mt-lg"),children:[s&&(0,i.jsx)("div",{className:(0,d.A)("row margin-top--sm",x.G.docs.docFooterTagsRow),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(S,{tags:r})})}),o&&(0,i.jsx)(J,{className:(0,d.A)("margin-top--sm",x.G.docs.docFooterEditMetaRow),editUrl:n,lastUpdatedAt:t,lastUpdatedBy:a})]}):null}var $=t(1422),X=t(6342),Y=["parentIndex"];function Q(e){var n=e.map(function(e){return Object.assign({},e,{parentIndex:-1,children:[]})}),t=Array(7).fill(-1);n.forEach(function(e,n){var a=t.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),t[e.level]=n});var a=[];return n.forEach(function(e){var t=e.parentIndex,r=(0,I.A)(e,Y);t>=0?n[t].children.push(r):a.push(r)}),a}function K(e){var n=e.toc,t=e.minHeadingLevel,a=e.maxHeadingLevel;return n.flatMap(function(e){var n=K({toc:e.children,minHeadingLevel:t,maxHeadingLevel:a});return function(e){return e.level>=t&&e.level<=a}(e)?[Object.assign({},e,{children:n})]:n})}function ee(e){var n=e.getBoundingClientRect();return n.top===n.bottom?ee(e.parentNode):n}function ne(e,n){var t,a,r=n.anchorTopOffset,s=e.find(function(e){return ee(e).top>=r});return s?function(e){return e.top>0&&e.bottom",end:""}}),Se=Object.keys(He);function Ie(e,n){var t=e.map(function(e){var t=Ee[e],a=t.start,r=t.end;return"(?:"+a+"\\s*("+n.flatMap(function(e){var n,t;return[e.line,null==(n=e.block)?void 0:n.start,null==(t=e.block)?void 0:t.end].filter(Boolean)}).join("|")+")\\s*"+r+")"}).join("|");return new RegExp("^\\s*(?:"+t+")\\s*$")}function Ve(e){var n=e.showLineNumbers,t=e.metastring;return"boolean"==typeof n?n?1:void 0:"number"==typeof n?n:function(e){var n=null==e?void 0:e.split(" ").find(function(e){return e.startsWith("showLineNumbers")});if(n){if(n.startsWith("showLineNumbers=")){var t=n.replace("showLineNumbers=","");return parseInt(t,10)}return 1}}(t)}function Ue(e,n){var t=n.language,a=n.magicComments;if(void 0===t)return{lineClassNames:{},code:e};for(var r=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return Ie(["js","jsBlock"],n);case"jsx":case"tsx":return Ie(["js","jsBlock","jsx"],n);case"html":return Ie(["js","jsBlock","html"],n);case"python":case"py":case"bash":return Ie(["bash"],n);case"markdown":case"md":return Ie(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return Ie(["tex"],n);case"lua":case"haskell":return Ie(["lua"],n);case"sql":return Ie(["lua","jsBlock"],n);case"wasm":return Ie(["wasm"],n);case"vb":case"vba":case"visual-basic":return Ie(["vb","rem"],n);case"vbnet":return Ie(["vbnet","rem"],n);case"batch":return Ie(["rem"],n);case"basic":return Ie(["rem","f90"],n);case"fsharp":return Ie(["js","ml"],n);case"ocaml":case"sml":return Ie(["ml"],n);case"fortran":return Ie(["f90"],n);case"cobol":return Ie(["cobol"],n);default:return Ie(Se,n)}}(t,a),s=e.split(/\r?\n/),i=Object.fromEntries(a.map(function(e){return[e.className,{start:0,range:""}]})),o=Object.fromEntries(a.filter(function(e){return e.line}).map(function(e){var n=e.className;return[e.line,n]})),c=Object.fromEntries(a.filter(function(e){return e.block}).map(function(e){var n=e.className;return[e.block.start,n]})),l=Object.fromEntries(a.filter(function(e){return e.block}).map(function(e){var n=e.className;return[e.block.end,n]})),u=0;u0}).map(function(e){return[e-1,[s]]});return{lineClassNames:Object.fromEntries(i),code:e}}return null}(a,Object.assign({},n)))?t:Ue(a,Object.assign({},n))}function Re(e){var n,t,a,r=function(e){var n,t,a,r;return null!=(n=null==(r=null!=(t=null!=(a=e.language)?a:function(e){if(e){var n=e.split(" ").find(function(e){return e.startsWith("language-")});return null==n?void 0:n.replace(/language-/,"")}}(e.className))?t:e.defaultLanguage)?void 0:r.toLowerCase())?n:"text"}({language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}),s=ze(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:r}),i=s.lineClassNames,o=s.code,c=function(e){var n=e.className,t=e.language;return(0,d.A)(n,t&&!(null!=n&&n.includes("language-"+t))&&"language-"+t)}({className:e.className,language:r}),l=(n=e.metastring,(null!=(t=null==n||null==(a=n.match(Be))?void 0:a.groups.title)?t:"")||e.title),u=Ve({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:o,className:c,language:r,title:l,lineNumbersStart:u,lineClassNames:i}}var Pe=(0,a.createContext)(null);function Ge(e){var n=e.metadata,t=e.wordWrap,r=e.children,s=(0,a.useMemo)(function(){return{metadata:n,wordWrap:t}},[n,t]);return(0,i.jsx)(Pe.Provider,{value:s,children:r})}function Fe(){var e=(0,a.useContext)(Pe);if(null===e)throw new s.dV("CodeBlockContextProvider");return e}const De="codeBlockContainer_Ckt0";var We=["as"];function qe(e){var n=e.as,t=(0,I.A)(e,We),a=function(e){var n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach(function(e){var a=e[0],r=e[1],s=n[a];s&&"string"==typeof r&&(t[s]=r)}),t}(ke());return(0,i.jsx)(n,Object.assign({},t,{style:a,className:(0,d.A)(t.className,De,x.G.common.codeBlock)}))}const Je="codeBlock_bY9V",Ze="codeBlockStandalone_MEMb",$e="codeBlockLines_e6Vv",Xe="codeBlockLinesWithNumbering_o6Pm";function Ye(e){var n=e.children,t=e.className;return(0,i.jsx)(qe,{as:"pre",tabIndex:0,className:(0,d.A)(Ze,"thin-scrollbar",t),children:(0,i.jsx)("code",{className:$e,children:n})})}var Qe={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Ke(e,n){var t=(0,a.useState)(),r=t[0],i=t[1],o=(0,a.useCallback)(function(){var n;i(null==(n=e.current)?void 0:n.closest("[role=tabpanel][hidden]"))},[e,i]);(0,a.useEffect)(function(){o()},[o]),function(e,n,t){void 0===t&&(t=Qe);var r=(0,s._q)(n),i=(0,s.Be)(t);(0,a.useEffect)(function(){var n=new MutationObserver(r);return e&&n.observe(e,i),function(){return n.disconnect()}},[e,r,i])}(r,function(e){e.forEach(function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(n(),o())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}function en(e){return e.children}var nn=t(1765),tn=["line","token"];function an(e){e.line,e.token;var n=(0,I.A)(e,tn);return(0,i.jsx)("span",Object.assign({},n))}const rn="codeLine_lJS_",sn="codeLineNumber_Tfdd",on="codeLineContent_feaV";function cn(e){var n=e.line,t=e.classNames,a=e.showLineNumbers,r=e.getLineProps,s=e.getTokenProps,o=function(e){var n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[Object.assign({},n,{content:""})]:e}(n),c=r({line:o,className:(0,d.A)(t,a&&rn)}),l=o.map(function(e,n){var t=s({token:e});return(0,i.jsx)(an,Object.assign({},t,{line:o,token:e,children:t.children}),n)});return(0,i.jsxs)("span",Object.assign({},c,{children:[a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:sn}),(0,i.jsx)("span",{className:on,children:l})]}):l,(0,i.jsx)("br",{})]}))}var ln=a.forwardRef(function(e,n){return(0,i.jsx)("pre",Object.assign({ref:n,tabIndex:0},e,{className:(0,d.A)(e.className,Je,"thin-scrollbar")}))});function un(e){var n=Fe().metadata;return(0,i.jsx)("code",Object.assign({},e,{className:(0,d.A)(e.className,$e,void 0!==n.lineNumbersStart&&Xe),style:Object.assign({},e.style,{counterReset:void 0===n.lineNumbersStart?void 0:"line-count "+(n.lineNumbersStart-1)})}))}function dn(e){var n=e.className,t=Fe(),a=t.metadata,r=t.wordWrap,s=ke(),o=a.code,c=a.language,l=a.lineNumbersStart,u=a.lineClassNames;return(0,i.jsx)(nn.f4,{theme:s,code:o,language:c,children:function(e){var t=e.className,a=e.style,s=e.tokens,o=e.getLineProps,c=e.getTokenProps;return(0,i.jsx)(ln,{ref:r.codeBlockRef,className:(0,d.A)(n,t),style:a,children:(0,i.jsx)(un,{children:s.map(function(e,n){return(0,i.jsx)(cn,{line:e,getLineProps:o,getTokenProps:c,classNames:u[n],showLineNumbers:void 0!==l},n)})})})}})}function mn(e){var n=e.children,t=e.fallback;return(0,Ce.A)()?(0,i.jsx)(i.Fragment,{children:null==n?void 0:n()}):null!=t?t:null}var fn=["className"];function hn(e){var n=e.className,t=(0,I.A)(e,fn);return(0,i.jsx)("button",Object.assign({type:"button"},t,{className:(0,d.A)("clean-btn",n)}))}function vn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})}))}function gn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}))}const pn={copyButtonCopied:"copyButtonCopied_Vdqa",copyButtonIcons:"copyButtonIcons_IEyt",copyButtonIcon:"copyButtonIcon_TrPX",copyButtonSuccessIcon:"copyButtonSuccessIcon_cVMy"};function bn(e){return e?(0,f.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,f.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"})}function jn(e){var n=e.className,t=function(){var e=Fe().metadata.code,n=(0,a.useState)(!1),t=n[0],r=n[1],s=(0,a.useRef)(void 0),i=(0,a.useCallback)(function(){navigator.clipboard.writeText(e).then(function(){r(!0),s.current=window.setTimeout(function(){r(!1)},1e3)})},[e]);return(0,a.useEffect)(function(){return function(){return window.clearTimeout(s.current)}},[]),{copyCode:i,isCopied:t}}(),r=t.copyCode,s=t.isCopied;return(0,i.jsx)(hn,{"aria-label":bn(s),title:(0,f.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,d.A)(n,pn.copyButton,s&&pn.copyButtonCopied),onClick:r,children:(0,i.jsxs)("span",{className:pn.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(vn,{className:pn.copyButtonIcon}),(0,i.jsx)(gn,{className:pn.copyButtonSuccessIcon})]})})}function xn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const Nn="wordWrapButtonIcon_b1P5",An="wordWrapButtonEnabled_uzNF";function yn(e){var n=e.className,t=Fe().wordWrap;if(!(t.isEnabled||t.isCodeScrollable))return!1;var a=(0,f.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)(hn,{onClick:function(){return t.toggle()},className:(0,d.A)(n,t.isEnabled&&An),"aria-label":a,title:a,children:(0,i.jsx)(xn,{className:Nn,"aria-hidden":"true"})})}const wn="buttonGroup_M5ko";function Cn(e){var n=e.className;return(0,i.jsx)(mn,{children:function(){return(0,i.jsxs)("div",{className:(0,d.A)(n,wn),children:[(0,i.jsx)(yn,{}),(0,i.jsx)(jn,{})]})}})}const Ln="codeBlockContent_QJqH",kn="codeBlockTitle_OeMC";function _n(e){var n=e.className,t=Fe().metadata;return(0,i.jsxs)(qe,{as:"div",className:(0,d.A)(n,t.className),children:[t.title&&(0,i.jsx)("div",{className:kn,children:(0,i.jsx)(en,{children:t.title})}),(0,i.jsxs)("div",{className:Ln,children:[(0,i.jsx)(dn,{}),(0,i.jsx)(Cn,{})]})]})}function On(e){var n,t,r,s,o,c,l,u,d,m=function(e){var n=(0,X.p)().prism;return Re({code:e.children,className:e.className,metastring:e.metastring,magicComments:n.magicComments,defaultLanguage:n.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),f=(n=(0,a.useState)(!1),t=n[0],r=n[1],s=(0,a.useState)(!1),o=s[0],c=s[1],l=(0,a.useRef)(null),u=(0,a.useCallback)(function(){var e=l.current.querySelector("code");t?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),r(function(e){return!e})},[l,t]),d=(0,a.useCallback)(function(){var e=l.current,n=e.scrollWidth>e.clientWidth||l.current.querySelector("code").hasAttribute("style");c(n)},[l]),Ke(l,d),(0,a.useEffect)(function(){d()},[t,d]),(0,a.useEffect)(function(){return window.addEventListener("resize",d,{passive:!0}),function(){window.removeEventListener("resize",d)}},[d]),{codeBlockRef:l,isEnabled:t,isCodeScrollable:o,toggle:u});return(0,i.jsx)(Ge,{metadata:m,wordWrap:f,children:(0,i.jsx)(_n,{})})}var Tn=["children"];function Bn(e){var n=e.children,t=(0,I.A)(e,Tn),r=(0,Ce.A)(),s=function(e){return a.Children.toArray(e).some(function(e){return(0,a.isValidElement)(e)})?e:Array.isArray(e)?e.join(""):e}(n),o="string"==typeof s?On:Ye;return(0,i.jsx)(o,Object.assign({},t,{children:s}),String(r))}function Mn(e){return(0,i.jsx)("code",Object.assign({},e))}var Hn=t(3535);var En=t(3427);const Sn="details_lb9f",In="isBrowser_bmU9",Vn="collapsibleContent_i85q";var Un=["summary","children"];function zn(e){return!!e&&("SUMMARY"===e.tagName||zn(e.parentElement))}function Rn(e,n){return!!e&&(e===n||Rn(e.parentElement,n))}function Pn(e){var n=e.summary,t=e.children,r=(0,I.A)(e,Un);(0,En.A)().collectAnchor(r.id);var s=(0,Ce.A)(),o=(0,a.useRef)(null),c=(0,$.u)({initialState:!r.open}),l=c.collapsed,u=c.setCollapsed,m=(0,a.useState)(r.open),f=m[0],h=m[1],v=a.isValidElement(n)?n:(0,i.jsx)("summary",{children:null!=n?n:"Details"});return(0,i.jsxs)("details",Object.assign({},r,{ref:o,open:f,"data-collapsed":l,className:(0,d.A)(Sn,s&&In,r.className),onMouseDown:function(e){zn(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var n=e.target;zn(n)&&Rn(n,o.current)&&(e.preventDefault(),l?(u(!1),h(!0)):u(!0))},children:[v,(0,i.jsx)($.N,{lazy:!1,collapsed:l,onCollapseTransitionEnd:function(e){u(e),h(!e)},children:(0,i.jsx)("div",{className:Vn,children:t})})]}))}const Gn="details_b_Ee";function Fn(e){var n=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,i.jsx)(Pn,Object.assign({},n,{className:(0,d.A)("alert alert--info",Gn,n.className)}))}function Dn(e){var n=a.Children.toArray(e.children),t=n.find(function(e){return a.isValidElement(e)&&"summary"===e.type}),r=(0,i.jsx)(i.Fragment,{children:n.filter(function(e){return e!==t})});return(0,i.jsx)(Fn,Object.assign({},e,{summary:t,children:r}))}function Wn(e){return(0,i.jsx)(Ae.A,Object.assign({},e))}const qn="containsTaskList_mC6p";function Jn(e){if(void 0!==e)return(0,d.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&qn)}const Zn="img_ev3q";function $n(e){var n,t=function(e){var n=a.Children.toArray(e),t=n.find(function(e){return a.isValidElement(e)&&"mdxAdmonitionTitle"===e.type}),r=n.filter(function(e){return e!==t});return{mdxAdmonitionTitle:null==t?void 0:t.props.children,rest:r.length>0?(0,i.jsx)(i.Fragment,{children:r}):null}}(e.children),r=t.mdxAdmonitionTitle,s=t.rest,o=null!=(n=e.title)?n:r;return Object.assign({},e,o&&{title:o},{children:s})}const Xn="admonition_xJq3",Yn="admonitionHeading_Gvgb",Qn="admonitionIcon_Rf37",Kn="admonitionContent_BuS1";function et(e){var n=e.type,t=e.className,a=e.children;return(0,i.jsx)("div",{className:(0,d.A)(x.G.common.admonition,x.G.common.admonitionType(n),Xn,t),children:a})}function nt(e){var n=e.icon,t=e.title;return(0,i.jsxs)("div",{className:Yn,children:[(0,i.jsx)("span",{className:Qn,children:n}),t]})}function tt(e){var n=e.children;return n?(0,i.jsx)("div",{className:Kn,children:n}):null}function at(e){var n=e.type,t=e.icon,a=e.title,r=e.children,s=e.className;return(0,i.jsxs)(et,{type:n,className:s,children:[a||t?(0,i.jsx)(nt,{title:a,icon:t}):null,(0,i.jsx)(tt,{children:r})]})}function rt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var st={icon:(0,i.jsx)(rt,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function it(e){return(0,i.jsx)(at,Object.assign({},st,e,{className:(0,d.A)("alert alert--secondary",e.className),children:e.children}))}function ot(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var ct={icon:(0,i.jsx)(ot,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function lt(e){return(0,i.jsx)(at,Object.assign({},ct,e,{className:(0,d.A)("alert alert--success",e.className),children:e.children}))}function ut(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var dt={icon:(0,i.jsx)(ut,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function mt(e){return(0,i.jsx)(at,Object.assign({},dt,e,{className:(0,d.A)("alert alert--info",e.className),children:e.children}))}function ft(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var ht={icon:(0,i.jsx)(ft,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function vt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var gt={icon:(0,i.jsx)(vt,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var pt={icon:(0,i.jsx)(ft,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var bt={note:it,tip:lt,info:mt,warning:function(e){return(0,i.jsx)(at,Object.assign({},ht,e,{className:(0,d.A)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,i.jsx)(at,Object.assign({},gt,e,{className:(0,d.A)("alert alert--danger",e.className),children:e.children}))}},jt={secondary:function(e){return(0,i.jsx)(it,Object.assign({title:"secondary"},e))},important:function(e){return(0,i.jsx)(mt,Object.assign({title:"important"},e))},success:function(e){return(0,i.jsx)(lt,Object.assign({title:"success"},e))},caution:function(e){return(0,i.jsx)(at,Object.assign({},pt,e,{className:(0,d.A)("alert alert--warning",e.className),children:e.children}))}};const xt=Object.assign({},bt,jt);function Nt(e){var n,t=$n(e),a=(n=t.type,xt[n]||(console.warn('No admonition component found for admonition type "'+n+'". Using Info as fallback.'),xt.info));return(0,i.jsx)(a,Object.assign({},t))}var At=t(7489),yt=t(2181);function wt(e,n,t,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}wt=function(e,n,t,a){function s(n,t){wt(e,n,function(e){return this._invoke(n,t,e)})}n?r?r(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(s("next",0),s("throw",1),s("return",2))},wt(e,n,t,a)}function Ct(){var e,n,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",r=t.toStringTag||"@@toStringTag";function s(t,a,r,s){var c=a&&a.prototype instanceof o?a:o,l=Object.create(c.prototype);return wt(l,"_invoke",function(t,a,r){var s,o,c,l=0,u=r||[],d=!1,m={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(n,t){return s=n,o=0,c=e,m.n=t,i}};function f(t,a){for(o=t,c=a,n=0;!d&&l&&!r&&n3?(r=h===a)&&(c=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=f&&((r=t<2&&fa||a>h)&&(s[4]=t,s[5]=a,m.n=h,o=0))}if(r||t>1)return i;throw d=!0,a}return function(r,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),o=u,c=h;(n=o<2?e:c)||!d;){s||(o?o<3?(o>1&&(m.n=-1),f(o,c)):m.n=c:m.v=c);try{if(l=2,s){if(o||(r="next"),n=s[r]){if(!(n=n.call(s,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,o<2&&(o=0)}else 1===o&&(n=s.return)&&n.call(s),o<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),o=1);s=e}else if((n=(d=m.n<0)?c:t.call(a,m))!==i)break}catch(n){s=e,o=1,c=n}finally{l=1}}return{value:n,done:d}}}(t,r,s),!0),l}var i={};function o(){}function c(){}function l(){}n=Object.getPrototypeOf;var u=[][a]?n(n([][a]())):(wt(n={},a,function(){return this}),n),d=l.prototype=o.prototype=Object.create(u);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,wt(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,wt(d,"constructor",l),wt(l,"constructor",c),c.displayName="GeneratorFunction",wt(l,r,"GeneratorFunction"),wt(d),wt(d,r,"Generator"),wt(d,a,function(){return this}),wt(d,"toString",function(){return"[object Generator]"}),(Ct=function(){return{w:s,m:m}})()}function Lt(e,n,t,a,r,s,i){try{var o=e[s](i),c=o.value}catch(e){return void t(e)}o.done?n(c):Promise.resolve(c).then(a,r)}function kt(e){return function(){var n=this,t=arguments;return new Promise(function(a,r){var s=e.apply(n,t);function i(e){Lt(s,a,r,i,o,"next",e)}function o(e){Lt(s,a,r,i,o,"throw",e)}i(void 0)})}}function _t(){return Ot.apply(this,arguments)}function Ot(){return(Ot=kt(Ct().m(function e(){var n,a;return Ct().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,t.e(2279).then(t.bind(t,2279));case 1:n=e.v.default,e.n=3;break;case 2:a=e.v.default,n.registerLayoutLoaders(a);case 3:return e.a(2,n)}},e)}))).apply(this,arguments)}var Tt=null;function Bt(){return Mt.apply(this,arguments)}function Mt(){return(Mt=kt(Ct().m(function e(){return Ct().w(function(e){for(;;)if(0===e.n)return Tt||(Tt=_t()),e.a(2,Tt)},e)}))).apply(this,arguments)}function Ht(){var e=(0,Le.G)().colorMode,n=(0,X.p)().mermaid,t=n.theme[e],r=n.options;return(0,a.useMemo)(function(){return Object.assign({startOnLoad:!1},r,{theme:t})},[t,r])}function Et(){return(Et=kt(Ct().m(function e(n){var t,a,r,s,i,o;return Ct().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=n.id,a=n.text,r=n.config,e.n=1,Bt();case 1:return(s=e.v).initialize(r),e.p=2,e.n=3,s.render(t,a);case 3:return e.a(2,e.v);case 4:throw e.p=4,o=e.v,null==(i=document.querySelector("#d"+t))||i.remove(),o;case 5:return e.a(2)}},e,null,[[2,4]])}))).apply(this,arguments)}function St(e){var n=e.text,t=e.config,r=(0,a.useState)(null),s=r[0],i=r[1],o=(0,a.useState)("mermaid-svg-"+Math.round(1e7*Math.random()))[0],c=Ht(),l=null!=t?t:c;return(0,a.useEffect)(function(){(function(e){return Et.apply(this,arguments)})({id:o,text:n,config:l}).then(i).catch(function(e){i(function(){throw e})})},[o,n,l]),s}const It="container_lyt7";function Vt(e){var n=e.renderResult,t=(0,a.useRef)(null);return(0,a.useEffect)(function(){var e=t.current;null==n.bindFunctions||n.bindFunctions(e)},[n]),(0,i.jsx)("div",{ref:t,className:"docusaurus-mermaid-container "+It,dangerouslySetInnerHTML:{__html:n.svg}})}function Ut(e){var n=St({text:e.value});return null===n?null:(0,i.jsx)(Vt,{renderResult:n})}const zt={Head:we.A,details:Dn,Details:Dn,code:function(e){return function(e){return void 0!==e.children&&a.Children.toArray(e.children).every(function(e){return"string"==typeof e&&!e.includes("\n")})}(e)?(0,i.jsx)(Mn,Object.assign({},e)):(0,i.jsx)(Bn,Object.assign({},e))},a:function(e){var n=(0,Hn.v)(e.id);return(0,i.jsx)(h.A,Object.assign({},e,{className:(0,d.A)(n,e.className)}))},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",Object.assign({},e,{className:Jn(e.className)}))},li:function(e){(0,En.A)().collectAnchor(e.id);var n=(0,Hn.v)(e.id);return(0,i.jsx)("li",Object.assign({className:(0,d.A)(n,e.className)},e))},img:function(e){return(0,i.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},e,{className:(n=e.className,(0,d.A)(n,Zn))}));var n},h1:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h1"},e))},h2:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h2"},e))},h3:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h3"},e))},h4:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h4"},e))},h5:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h5"},e))},h6:function(e){return(0,i.jsx)(Wn,Object.assign({as:"h6"},e))},admonition:Nt,mermaid:function(e){return(0,i.jsx)(At.A,{fallback:function(e){return(0,i.jsx)(yt.MN,Object.assign({},e))},children:(0,i.jsx)(Ut,Object.assign({},e))})}};function Rt(e){var n=e.children;return(0,i.jsx)(ye.x,{components:zt,children:n})}function Pt(e){var n,t,a,r,s=e.children,o=(n=l(),t=n.metadata,a=n.frontMatter,r=n.contentTitle,a.hide_title||void 0!==r?null:t.title);return(0,i.jsxs)("div",{className:(0,d.A)(x.G.docs.docMarkdown,"markdown"),children:[o&&(0,i.jsx)("header",{children:(0,i.jsx)(Ae.A,{as:"h1",children:o})}),(0,i.jsx)(Rt,{children:s})]})}var Gt=t(4718),Ft=t(9169),Dt=t(6025);function Wt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const qt="breadcrumbHomeIcon_YNFT";function Jt(){var e=(0,Dt.Ay)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(h.A,{"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Wt,{className:qt})})})}function Zt(e){var n,t,a,r=(n={breadcrumbs:e.breadcrumbs},t=n.breadcrumbs,a=(0,b.A)().siteConfig,{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t.filter(function(e){return e.href}).map(function(e,n){return{"@type":"ListItem",position:n+1,name:e.label,item:""+a.url+e.href}})});return(0,i.jsx)(we.A,{children:(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(r)})})}const $t="breadcrumbsContainer_Z_bl";function Xt(e){var n=e.children,t=e.href,a="breadcrumbs__link";return e.isLast?(0,i.jsx)("span",{className:a,children:n}):t?(0,i.jsx)(h.A,{className:a,href:t,children:(0,i.jsx)("span",{children:n})}):(0,i.jsx)("span",{className:a,children:n})}function Yt(e){var n=e.children,t=e.active;return(0,i.jsx)("li",{className:(0,d.A)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:n})}function Qt(){var e=(0,Gt.OF)(),n=(0,Ft.Dt)();return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zt,{breadcrumbs:e}),(0,i.jsx)("nav",{className:(0,d.A)(x.G.docs.docBreadcrumbs,$t),"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",children:[n&&(0,i.jsx)(Jt,{}),e.map(function(n,t){var a=t===e.length-1,r="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,i.jsx)(Yt,{active:a,children:(0,i.jsx)(Xt,{href:r,isLast:a,children:n.label})},t)})]})})]}):null}function Kt(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function ea(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function na(){return(0,i.jsx)(we.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function ta(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function aa(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function ra(e){var n=e.className;return(0,i.jsx)(Nt,{type:"caution",title:(0,i.jsx)(ta,{}),className:(0,d.A)(n,x.G.common.draftBanner),children:(0,i.jsx)(aa,{})})}function sa(e){var n=e.className;return(0,i.jsx)(Nt,{type:"caution",title:(0,i.jsx)(Kt,{}),className:(0,d.A)(n,x.G.common.unlistedBanner),children:(0,i.jsx)(ea,{})})}function ia(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(na,{}),(0,i.jsx)(sa,Object.assign({},e))]})}function oa(e){var n=e.metadata,t=n.unlisted,a=n.frontMatter;return(0,i.jsxs)(i.Fragment,{children:[(t||a.unlisted)&&(0,i.jsx)(ia,{}),a.draft&&(0,i.jsx)(ra,{})]})}const ca="docItemContainer_Djhp",la="docItemCol_VOVn";function ua(e){var n,t,a,r,s,o,c=e.children,u=(n=l(),t=n.frontMatter,a=n.toc,r=(0,m.l)(),s=t.hide_table_of_contents,o=!s&&a.length>0,{hidden:s,mobile:o?(0,i.jsx)(pe,{}):void 0,desktop:!o||"desktop"!==r&&"ssr"!==r?void 0:(0,i.jsx)(Ne,{})}),f=l().metadata;return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,d.A)("col",!u.hidden&&la),children:[(0,i.jsx)(oa,{metadata:f}),(0,i.jsx)(k,{}),(0,i.jsxs)("div",{className:ca,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(Qt,{}),(0,i.jsx)(_,{}),u.mobile,(0,i.jsx)(Pt,{children:c}),(0,i.jsx)(Z,{})]}),(0,i.jsx)(p,{})]})]}),u.desktop&&(0,i.jsx)("div",{className:"col col--3",children:u.desktop})]})}function da(e){var n="docs-doc-id-"+e.content.metadata.id,t=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(r.e3,{className:n,children:[(0,i.jsx)(u,{}),(0,i.jsx)(ua,{children:(0,i.jsx)(t,{})})]})})}},8426(e,n){function t(e){let n,t=[];for(let a of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(a))t.push(parseInt(a,10));else if(n=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,s]=n;if(a&&s){a=parseInt(a),s=parseInt(s);const e=ai,x:()=>o});var a=t(6540);const r={},s=a.createContext(r);function i(e){const n=a.useContext(s);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.278c1b8c.js b/assets/js/17896441.278c1b8c.js new file mode 100644 index 0000000..97d74fd --- /dev/null +++ b/assets/js/17896441.278c1b8c.js @@ -0,0 +1,2 @@ +/*! For license information please see 17896441.278c1b8c.js.LICENSE.txt */ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8401],{4822:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>la});var a=t(63),r=t(4315),s=t(9835),i=t(199),o=a.createContext(null);function c(e){var n=e.children,t=function(e){return(0,a.useMemo)(function(){return{metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc}},[e])}(e.content);return(0,i.jsx)(o.Provider,{value:t,children:n})}function l(){var e=(0,a.useContext)(o);if(null===e)throw new s.dV("DocProvider");return e}function u(){var e,n=l(),t=n.metadata,a=n.frontMatter,s=n.assets;return(0,i.jsx)(r.be,{title:t.title,description:t.description,keywords:a.keywords,image:null!=(e=s.image)?e:a.image})}var d=t(8573),m=t(1070),f=t(5819),h=t(1598);function v(e){var n=e.permalink,t=e.title,a=e.subLabel,r=e.isNext;return(0,i.jsxs)(h.A,{className:(0,d.A)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:n,children:[a&&(0,i.jsx)("div",{className:"pagination-nav__sublabel",children:a}),(0,i.jsx)("div",{className:"pagination-nav__label",children:t})]})}function p(e){var n=e.className,t=e.previous,a=e.next;return(0,i.jsxs)("nav",{className:(0,d.A)(n,"pagination-nav"),"aria-label":(0,f.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"}),children:[t&&(0,i.jsx)(v,Object.assign({},t,{subLabel:(0,i.jsx)(f.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc",children:"Previous"})})),a&&(0,i.jsx)(v,Object.assign({},a,{subLabel:(0,i.jsx)(f.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc",children:"Next"}),isNext:!0}))]})}function g(){var e=l().metadata;return(0,i.jsx)(p,{className:"docusaurus-mt-lg",previous:e.previous,next:e.next})}var b=t(9778),j=t(7584),x=t(568),N=t(7541),A=t(7738);var y={unreleased:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,i.jsx)(f.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:n,versionLabel:(0,i.jsx)("b",{children:t.label})},children:"This is unreleased documentation for {siteTitle} {versionLabel} version."})},unmaintained:function(e){var n=e.siteTitle,t=e.versionMetadata;return(0,i.jsx)(f.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:n,versionLabel:(0,i.jsx)("b",{children:t.label})},children:"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained."})}};function C(e){var n=y[e.versionMetadata.banner];return(0,i.jsx)(n,Object.assign({},e))}function L(e){var n=e.versionLabel,t=e.to,a=e.onClick;return(0,i.jsx)(f.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:n,latestVersionLink:(0,i.jsx)("b",{children:(0,i.jsx)(h.A,{to:t,onClick:a,children:(0,i.jsx)(f.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label",children:"latest version"})})})},children:"For up-to-date documentation, see the {latestVersionLink} ({versionLabel})."})}function w(e){var n,t=e.className,a=e.versionMetadata,r=(0,b.A)().siteConfig.title,s=(0,j.vT)({failfast:!0}).pluginId,o=(0,N.g1)(s).savePreferredVersionName,c=(0,j.HW)(s),l=c.latestDocSuggestion,u=c.latestVersionSuggestion,m=null!=l?l:(n=u).docs.find(function(e){return e.id===n.mainDocId});return(0,i.jsxs)("div",{className:(0,d.A)(t,x.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert",children:[(0,i.jsx)("div",{children:(0,i.jsx)(C,{siteTitle:r,versionMetadata:a})}),(0,i.jsx)("div",{className:"margin-top--md",children:(0,i.jsx)(L,{versionLabel:u.label,to:m.path,onClick:function(){return o(u.name)}})})]})}function k(e){var n=e.className,t=(0,A.r)();return t.banner?(0,i.jsx)(w,{className:n,versionMetadata:t}):null}function _(e){var n=e.className,t=(0,A.r)();return t.badge?(0,i.jsx)("span",{className:(0,d.A)(n,x.G.docs.docVersionBadge,"badge badge--secondary"),children:(0,i.jsx)(f.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:t.label},children:"Version: {versionLabel}"})}):null}const O={tag:"tag__zUQ",tagRegular:"tagRegular_QrVF",tagWithCount:"tagWithCount_JHHL"};function T(e){var n=e.permalink,t=e.label,a=e.count,r=e.description;return(0,i.jsxs)(h.A,{rel:"tag",href:n,title:r,className:(0,d.A)(O.tag,a?O.tagWithCount:O.tagRegular),children:[t,a&&(0,i.jsx)("span",{children:a})]})}const B={tags:"tags_y9FL",tag:"tag_LO49"};function E(e){var n=e.tags;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("b",{children:(0,i.jsx)(f.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list",children:"Tags:"})}),(0,i.jsx)("ul",{className:(0,d.A)(B.tags,"padding--none","margin-left--sm"),children:n.map(function(e){return(0,i.jsx)("li",{className:B.tag,children:(0,i.jsx)(T,Object.assign({},e))},e.permalink)})})]})}var H=t(429);const M={iconEdit:"iconEdit_Q3Kh"};var I=["className"];function S(e){var n=e.className,t=(0,H.A)(e,I);return(0,i.jsx)("svg",Object.assign({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.A)(M.iconEdit,n),"aria-hidden":"true"},t,{children:(0,i.jsx)("g",{children:(0,i.jsx)("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})})}))}function U(e){var n=e.editUrl;return(0,i.jsxs)(h.A,{to:n,className:x.G.common.editThisPage,children:[(0,i.jsx)(S,{}),(0,i.jsx)(f.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page",children:"Edit this page"})]})}function V(e){void 0===e&&(e={});var n=(0,b.A)().i18n.currentLocale,t=function(){var e=(0,b.A)().i18n,n=e.currentLocale;return e.localeConfigs[n].calendar}();return new Intl.DateTimeFormat(n,Object.assign({calendar:t},e))}function R(e){var n=e.lastUpdatedAt,t=new Date(n),a=V({day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(t);return(0,i.jsx)(f.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:(0,i.jsx)("b",{children:(0,i.jsx)("time",{dateTime:t.toISOString(),itemProp:"dateModified",children:a})})},children:" on {date}"})}function z(e){var n=e.lastUpdatedBy;return(0,i.jsx)(f.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:(0,i.jsx)("b",{children:n})},children:" by {user}"})}function P(e){var n=e.lastUpdatedAt,t=e.lastUpdatedBy;return(0,i.jsxs)("span",{className:x.G.common.lastUpdated,children:[(0,i.jsx)(f.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:n?(0,i.jsx)(R,{lastUpdatedAt:n}):"",byUser:t?(0,i.jsx)(z,{lastUpdatedBy:t}):""},children:"Last updated{atDate}{byUser}"}),!1]})}const G={lastUpdated:"lastUpdated_y2i3",noPrint:"noPrint_MdEK"};function F(e){var n=e.className,t=e.editUrl,a=e.lastUpdatedAt,r=e.lastUpdatedBy;return(0,i.jsxs)("div",{className:(0,d.A)("row",n),children:[(0,i.jsx)("div",{className:(0,d.A)("col",G.noPrint),children:t&&(0,i.jsx)(U,{editUrl:t})}),(0,i.jsx)("div",{className:(0,d.A)("col",G.lastUpdated),children:(a||r)&&(0,i.jsx)(P,{lastUpdatedAt:a,lastUpdatedBy:r})})]})}function W(){var e=l().metadata,n=e.editUrl,t=e.lastUpdatedAt,a=e.lastUpdatedBy,r=e.tags,s=r.length>0,o=!!(n||t||a);return s||o?(0,i.jsxs)("footer",{className:(0,d.A)(x.G.docs.docFooter,"docusaurus-mt-lg"),children:[s&&(0,i.jsx)("div",{className:(0,d.A)("row margin-top--sm",x.G.docs.docFooterTagsRow),children:(0,i.jsx)("div",{className:"col",children:(0,i.jsx)(E,{tags:r})})}),o&&(0,i.jsx)(F,{className:(0,d.A)("margin-top--sm",x.G.docs.docFooterEditMetaRow),editUrl:n,lastUpdatedAt:t,lastUpdatedBy:a})]}):null}var D=t(3995),q=t(6239),Z=["parentIndex"];function K(e){var n=e.map(function(e){return Object.assign({},e,{parentIndex:-1,children:[]})}),t=Array(7).fill(-1);n.forEach(function(e,n){var a=t.slice(2,e.level);e.parentIndex=Math.max.apply(Math,a),t[e.level]=n});var a=[];return n.forEach(function(e){var t=e.parentIndex,r=(0,H.A)(e,Z);t>=0?n[t].children.push(r):a.push(r)}),a}function Q(e){var n=e.toc,t=e.minHeadingLevel,a=e.maxHeadingLevel;return n.flatMap(function(e){var n=Q({toc:e.children,minHeadingLevel:t,maxHeadingLevel:a});return function(e){return e.level>=t&&e.level<=a}(e)?[Object.assign({},e,{children:n})]:n})}function $(e){var n=e.getBoundingClientRect();return n.top===n.bottom?$(e.parentNode):n}function X(e,n){var t,a,r=n.anchorTopOffset,s=e.find(function(e){return $(e).top>=r});return s?function(e){return e.top>0&&e.bottom",end:""}}),Be=Object.keys(Oe);function Ee(e,n){var t=e.map(function(e){var t=Te[e],a=t.start,r=t.end;return"(?:"+a+"\\s*("+n.flatMap(function(e){var n,t;return[e.line,null==(n=e.block)?void 0:n.start,null==(t=e.block)?void 0:t.end].filter(Boolean)}).join("|")+")\\s*"+r+")"}).join("|");return new RegExp("^\\s*(?:"+t+")\\s*$")}function He(e){var n=e.showLineNumbers,t=e.metastring;return"boolean"==typeof n?n?1:void 0:"number"==typeof n?n:function(e){var n=null==e?void 0:e.split(" ").find(function(e){return e.startsWith("showLineNumbers")});if(n){if(n.startsWith("showLineNumbers=")){var t=n.replace("showLineNumbers=","");return parseInt(t,10)}return 1}}(t)}function Me(e,n){var t=n.language,a=n.magicComments;if(void 0===t)return{lineClassNames:{},code:e};for(var r=function(e,n){switch(e){case"js":case"javascript":case"ts":case"typescript":return Ee(["js","jsBlock"],n);case"jsx":case"tsx":return Ee(["js","jsBlock","jsx"],n);case"html":return Ee(["js","jsBlock","html"],n);case"python":case"py":case"bash":return Ee(["bash"],n);case"markdown":case"md":return Ee(["html","jsx","bash"],n);case"tex":case"latex":case"matlab":return Ee(["tex"],n);case"lua":case"haskell":return Ee(["lua"],n);case"sql":return Ee(["lua","jsBlock"],n);case"wasm":return Ee(["wasm"],n);case"vb":case"vba":case"visual-basic":return Ee(["vb","rem"],n);case"vbnet":return Ee(["vbnet","rem"],n);case"batch":return Ee(["rem"],n);case"basic":return Ee(["rem","f90"],n);case"fsharp":return Ee(["js","ml"],n);case"ocaml":case"sml":return Ee(["ml"],n);case"fortran":return Ee(["f90"],n);case"cobol":return Ee(["cobol"],n);default:return Ee(Be,n)}}(t,a),s=e.split(/\r?\n/),i=Object.fromEntries(a.map(function(e){return[e.className,{start:0,range:""}]})),o=Object.fromEntries(a.filter(function(e){return e.line}).map(function(e){var n=e.className;return[e.line,n]})),c=Object.fromEntries(a.filter(function(e){return e.block}).map(function(e){var n=e.className;return[e.block.start,n]})),l=Object.fromEntries(a.filter(function(e){return e.block}).map(function(e){var n=e.className;return[e.block.end,n]})),u=0;u0}).map(function(e){return[e-1,[s]]});return{lineClassNames:Object.fromEntries(i),code:e}}return null}(a,Object.assign({},n)))?t:Me(a,Object.assign({},n))}function Se(e){var n,t,a,r=function(e){var n,t,a,r;return null!=(n=null==(r=null!=(t=null!=(a=e.language)?a:function(e){if(e){var n=e.split(" ").find(function(e){return e.startsWith("language-")});return null==n?void 0:n.replace(/language-/,"")}}(e.className))?t:e.defaultLanguage)?void 0:r.toLowerCase())?n:"text"}({language:e.language,defaultLanguage:e.defaultLanguage,className:e.className}),s=Ie(e.code,{metastring:e.metastring,magicComments:e.magicComments,language:r}),i=s.lineClassNames,o=s.code,c=function(e){var n=e.className,t=e.language;return(0,d.A)(n,t&&!(null!=n&&n.includes("language-"+t))&&"language-"+t)}({className:e.className,language:r}),l=(n=e.metastring,(null!=(t=null==n||null==(a=n.match(ke))?void 0:a.groups.title)?t:"")||e.title),u=He({showLineNumbers:e.showLineNumbers,metastring:e.metastring});return{codeInput:e.code,code:o,className:c,language:r,title:l,lineNumbersStart:u,lineClassNames:i}}var Ue=(0,a.createContext)(null);function Ve(e){var n=e.metadata,t=e.wordWrap,r=e.children,s=(0,a.useMemo)(function(){return{metadata:n,wordWrap:t}},[n,t]);return(0,i.jsx)(Ue.Provider,{value:s,children:r})}function Re(){var e=(0,a.useContext)(Ue);if(null===e)throw new we.dV("CodeBlockContextProvider");return e}const ze="codeBlockContainer_ei_j";var Pe=["as"];function Ge(e){var n=e.as,t=(0,H.A)(e,Pe),a=function(e){var n={color:"--prism-color",backgroundColor:"--prism-background-color"},t={};return Object.entries(e.plain).forEach(function(e){var a=e[0],r=e[1],s=n[a];s&&"string"==typeof r&&(t[s]=r)}),t}(Ae());return(0,i.jsx)(n,Object.assign({},t,{style:a,className:(0,d.A)(t.className,ze,x.G.common.codeBlock)}))}const Fe="codeBlock_NBAy",We="codeBlockStandalone_gjRk",De="codeBlockLines_AQpN",qe="codeBlockLinesWithNumbering_jsIC";function Ze(e){var n=e.children,t=e.className;return(0,i.jsx)(Ge,{as:"pre",tabIndex:0,className:(0,d.A)(We,"thin-scrollbar",t),children:(0,i.jsx)("code",{className:De,children:n})})}var Ke={attributes:!0,characterData:!0,childList:!0,subtree:!0};function Qe(e,n){var t=(0,a.useState)(),r=t[0],s=t[1],i=(0,a.useCallback)(function(){var n;s(null==(n=e.current)?void 0:n.closest("[role=tabpanel][hidden]"))},[e,s]);(0,a.useEffect)(function(){i()},[i]),function(e,n,t){void 0===t&&(t=Ke);var r=(0,we._q)(n),s=(0,we.Be)(t);(0,a.useEffect)(function(){var n=new MutationObserver(r);return e&&n.observe(e,s),function(){return n.disconnect()}},[e,r,s])}(r,function(e){e.forEach(function(e){"attributes"===e.type&&"hidden"===e.attributeName&&(n(),i())})},{attributes:!0,characterData:!1,childList:!1,subtree:!1})}function $e(e){return e.children}var Xe=t(6198),Je=["line","token"];function Ye(e){e.line,e.token;var n=(0,H.A)(e,Je);return(0,i.jsx)("span",Object.assign({},n))}const en="codeLine_EWsE",nn="codeLineNumber_aMvZ",tn="codeLineContent_nU6k";function an(){return(0,i.jsx)("br",{})}function rn(e){var n=e.line,t=e.classNames,a=e.showLineNumbers,r=e.getLineProps,s=e.getTokenProps,o=function(e){var n=1===e.length&&"\n"===e[0].content?e[0]:void 0;return n?[Object.assign({},n,{content:""})]:e}(n),c=r({line:o,className:(0,d.A)(t,a&&en)}),l=o.map(function(e,n){var t=s({token:e});return(0,i.jsx)(Ye,Object.assign({},t,{line:o,token:e,children:t.children}),n)});return(0,i.jsxs)("div",Object.assign({},c,{children:[a?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:nn}),(0,i.jsx)("span",{className:tn,children:l})]}):l,(0,i.jsx)(an,{})]}))}var sn=a.forwardRef(function(e,n){return(0,i.jsx)("pre",Object.assign({ref:n,tabIndex:0},e,{className:(0,d.A)(e.className,Fe,"thin-scrollbar")}))});function on(e){var n=Re().metadata;return(0,i.jsx)("code",Object.assign({},e,{className:(0,d.A)(e.className,De,void 0!==n.lineNumbersStart&&qe),style:Object.assign({},e.style,{counterReset:void 0===n.lineNumbersStart?void 0:"line-count "+(n.lineNumbersStart-1)})}))}function cn(e){var n=e.className,t=Re(),a=t.metadata,r=t.wordWrap,s=Ae(),o=a.code,c=a.language,l=a.lineNumbersStart,u=a.lineClassNames;return(0,i.jsx)(Xe.f4,{theme:s,code:o,language:c,children:function(e){var t=e.className,a=e.style,s=e.tokens,o=e.getLineProps,c=e.getTokenProps;return(0,i.jsx)(sn,{ref:r.codeBlockRef,className:(0,d.A)(n,t),style:a,children:(0,i.jsx)(on,{children:s.map(function(e,n){return(0,i.jsx)(rn,{line:e,getLineProps:o,getTokenProps:c,classNames:u[n],showLineNumbers:void 0!==l},n)})})})}})}function ln(e){var n=e.children,t=e.fallback;return(0,xe.A)()?(0,i.jsx)(i.Fragment,{children:null==n?void 0:n()}):null!=t?t:null}function un(e,n,t,a){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}un=function(e,n,t,a){function s(n,t){un(e,n,function(e){return this._invoke(n,t,e)})}n?r?r(e,n,{value:t,enumerable:!a,configurable:!a,writable:!a}):e[n]=t:(s("next",0),s("throw",1),s("return",2))},un(e,n,t,a)}function dn(){var e,n,t="function"==typeof Symbol?Symbol:{},a=t.iterator||"@@iterator",r=t.toStringTag||"@@toStringTag";function s(t,a,r,s){var c=a&&a.prototype instanceof o?a:o,l=Object.create(c.prototype);return un(l,"_invoke",function(t,a,r){var s,o,c,l=0,u=r||[],d=!1,m={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(n,t){return s=n,o=0,c=e,m.n=t,i}};function f(t,a){for(o=t,c=a,n=0;!d&&l&&!r&&n3?(r=h===a)&&(c=s[(o=s[4])?5:(o=3,3)],s[4]=s[5]=e):s[0]<=f&&((r=t<2&&fa||a>h)&&(s[4]=t,s[5]=a,m.n=h,o=0))}if(r||t>1)return i;throw d=!0,a}return function(r,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&f(u,h),o=u,c=h;(n=o<2?e:c)||!d;){s||(o?o<3?(o>1&&(m.n=-1),f(o,c)):m.n=c:m.v=c);try{if(l=2,s){if(o||(r="next"),n=s[r]){if(!(n=n.call(s,c)))throw TypeError("iterator result is not an object");if(!n.done)return n;c=n.value,o<2&&(o=0)}else 1===o&&(n=s.return)&&n.call(s),o<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),o=1);s=e}else if((n=(d=m.n<0)?c:t.call(a,m))!==i)break}catch(n){s=e,o=1,c=n}finally{l=1}}return{value:n,done:d}}}(t,r,s),!0),l}var i={};function o(){}function c(){}function l(){}n=Object.getPrototypeOf;var u=[][a]?n(n([][a]())):(un(n={},a,function(){return this}),n),d=l.prototype=o.prototype=Object.create(u);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,un(e,r,"GeneratorFunction")),e.prototype=Object.create(d),e}return c.prototype=l,un(d,"constructor",l),un(l,"constructor",c),c.displayName="GeneratorFunction",un(l,r,"GeneratorFunction"),un(d),un(d,r,"Generator"),un(d,a,function(){return this}),un(d,"toString",function(){return"[object Generator]"}),(dn=function(){return{w:s,m:m}})()}function mn(e,n,t,a,r,s,i){try{var o=e[s](i),c=o.value}catch(e){return void t(e)}o.done?n(c):Promise.resolve(c).then(a,r)}function fn(e){return function(){var n=this,t=arguments;return new Promise(function(a,r){var s=e.apply(n,t);function i(e){mn(s,a,r,i,o,"next",e)}function o(e){mn(s,a,r,i,o,"throw",e)}i(void 0)})}}var hn=["className"];function vn(e){var n=e.className,t=(0,H.A)(e,hn);return(0,i.jsx)("button",Object.assign({type:"button"},t,{className:(0,d.A)("clean-btn",n)}))}function pn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"})}))}function gn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"})}))}const bn={copyButtonCopied:"copyButtonCopied_Goav",copyButtonIcons:"copyButtonIcons_Tfbm",copyButtonIcon:"copyButtonIcon_VLBc",copyButtonSuccessIcon:"copyButtonSuccessIcon_USTC"};function jn(e){return e?(0,f.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,f.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"})}function xn(){return(xn=fn(dn().m(function e(n){var a,r;return dn().w(function(e){for(;;)switch(e.n){case 0:if(!navigator.clipboard){e.n=1;break}return e.a(2,navigator.clipboard.writeText(n));case 1:return e.n=2,t.e(4456).then(t.bind(t,4456));case 2:return a=e.v,r=a.default,e.a(2,r(n))}},e)}))).apply(this,arguments)}function Nn(){var e=Re().metadata.code,n=(0,a.useState)(!1),t=n[0],r=n[1],s=(0,a.useRef)(void 0),i=(0,a.useCallback)(function(){(function(e){return xn.apply(this,arguments)})(e).then(function(){r(!0),s.current=window.setTimeout(function(){r(!1)},1e3)})},[e]);return(0,a.useEffect)(function(){return function(){return window.clearTimeout(s.current)}},[]),{copyCode:i,isCopied:t}}function An(e){var n=e.className,t=Nn(),a=t.copyCode,r=t.isCopied;return(0,i.jsx)(vn,{"aria-label":jn(r),title:(0,f.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,d.A)(n,bn.copyButton,r&&bn.copyButtonCopied),onClick:a,children:(0,i.jsxs)("span",{className:bn.copyButtonIcons,"aria-hidden":"true",children:[(0,i.jsx)(pn,{className:bn.copyButtonIcon}),(0,i.jsx)(gn,{className:bn.copyButtonSuccessIcon})]})})}function yn(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"})}))}const Cn="wordWrapButtonIcon_gZW2",Ln="wordWrapButtonEnabled_G6TK";function wn(e){var n=e.className,t=Re().wordWrap;if(!(t.isEnabled||t.isCodeScrollable))return!1;var a=(0,f.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return(0,i.jsx)(vn,{onClick:function(){return t.toggle()},className:(0,d.A)(n,t.isEnabled&&Ln),"aria-label":a,title:a,children:(0,i.jsx)(yn,{className:Cn,"aria-hidden":"true"})})}const kn="buttonGroup_wZWc";function _n(e){var n=e.className;return(0,i.jsx)(ln,{children:function(){return(0,i.jsxs)("div",{className:(0,d.A)(n,kn),children:[(0,i.jsx)(wn,{}),(0,i.jsx)(An,{})]})}})}const On="codeBlockContent_p9UO",Tn="codeBlockTitle_Mi4j";function Bn(e){var n=e.className,t=Re().metadata;return(0,i.jsxs)(Ge,{as:"div",className:(0,d.A)(n,t.className),children:[t.title&&(0,i.jsx)("div",{className:Tn,children:(0,i.jsx)($e,{children:t.title})}),(0,i.jsxs)("div",{className:On,children:[(0,i.jsx)(cn,{}),(0,i.jsx)(_n,{})]})]})}function En(e){var n,t,r,s,o,c,l,u,d,m=function(e){var n=(0,q.p)().prism;return Se({code:e.children,className:e.className,metastring:e.metastring,magicComments:n.magicComments,defaultLanguage:n.defaultLanguage,language:e.language,title:e.title,showLineNumbers:e.showLineNumbers})}(e),f=(n=(0,a.useState)(!1),t=n[0],r=n[1],s=(0,a.useState)(!1),o=s[0],c=s[1],l=(0,a.useRef)(null),u=(0,a.useCallback)(function(){var e=l.current.querySelector("code");t?e.removeAttribute("style"):(e.style.whiteSpace="pre-wrap",e.style.overflowWrap="anywhere"),r(function(e){return!e})},[l,t]),d=(0,a.useCallback)(function(){var e=l.current,n=e.scrollWidth>e.clientWidth||l.current.querySelector("code").hasAttribute("style");c(n)},[l]),Qe(l,d),(0,a.useEffect)(function(){d()},[t,d]),(0,a.useEffect)(function(){return window.addEventListener("resize",d,{passive:!0}),function(){window.removeEventListener("resize",d)}},[d]),{codeBlockRef:l,isEnabled:t,isCodeScrollable:o,toggle:u});return(0,i.jsx)(Ve,{metadata:m,wordWrap:f,children:(0,i.jsx)(Bn,{})})}var Hn=["children"];function Mn(e){var n=e.children,t=(0,H.A)(e,Hn),r=(0,xe.A)(),s=function(e){return a.Children.toArray(e).some(function(e){return(0,a.isValidElement)(e)})?e:Array.isArray(e)?e.join(""):e}(n),o="string"==typeof s?En:Ze;return(0,i.jsx)(o,Object.assign({},t,{children:s}),String(r))}function In(e){return(0,i.jsx)("code",Object.assign({},e))}var Sn=t(9499);var Un=t(4169);const Vn="details_XC5U",Rn="isBrowser_jVIb",zn="collapsibleContent_vBVi";var Pn=["summary","children"];function Gn(e){return!!e&&("SUMMARY"===e.tagName||Gn(e.parentElement))}function Fn(e,n){return!!e&&(e===n||Fn(e.parentElement,n))}function Wn(e){var n=e.summary,t=e.children,r=(0,H.A)(e,Pn);(0,Un.A)().collectAnchor(r.id);var s=(0,xe.A)(),o=(0,a.useRef)(null),c=(0,D.u)({initialState:!r.open}),l=c.collapsed,u=c.setCollapsed,m=(0,a.useState)(r.open),f=m[0],h=m[1],v=a.isValidElement(n)?n:(0,i.jsx)("summary",{children:null!=n?n:"Details"});return(0,i.jsxs)("details",Object.assign({},r,{ref:o,open:f,"data-collapsed":l,className:(0,d.A)(Vn,s&&Rn,r.className),onMouseDown:function(e){Gn(e.target)&&e.detail>1&&e.preventDefault()},onClick:function(e){e.stopPropagation();var n=e.target;Gn(n)&&Fn(n,o.current)&&(e.preventDefault(),l?(u(!1),h(!0)):u(!0))},children:[v,(0,i.jsx)(D.N,{lazy:!1,collapsed:l,onCollapseTransitionEnd:function(e){u(e),h(!e)},children:(0,i.jsx)("div",{className:zn,children:t})})]}))}const Dn="details_KlpA";function qn(e){var n=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return(0,i.jsx)(Wn,Object.assign({},n,{className:(0,d.A)("alert alert--info",Dn,n.className)}))}function Zn(e){var n=a.Children.toArray(e.children),t=n.find(function(e){return a.isValidElement(e)&&"summary"===e.type}),r=(0,i.jsx)(i.Fragment,{children:n.filter(function(e){return e!==t})});return(0,i.jsx)(qn,Object.assign({},e,{summary:t,children:r}))}function Kn(e){return(0,i.jsx)(ge.A,Object.assign({},e))}const Qn="containsTaskList_pgAs";function $n(e){if(void 0!==e)return(0,d.A)(e,(null==e?void 0:e.includes("contains-task-list"))&&Qn)}const Xn="img_KzBV";function Jn(e){var n,t=function(e){var n=a.Children.toArray(e),t=n.find(function(e){return a.isValidElement(e)&&"mdxAdmonitionTitle"===e.type}),r=n.filter(function(e){return e!==t});return{mdxAdmonitionTitle:null==t?void 0:t.props.children,rest:r.length>0?(0,i.jsx)(i.Fragment,{children:r}):null}}(e.children),r=t.mdxAdmonitionTitle,s=t.rest,o=null!=(n=e.title)?n:r;return Object.assign({},e,o&&{title:o},{children:s})}const Yn="admonition_Dpr7",et="admonitionHeading_d6Ef",nt="admonitionIcon_epaQ",tt="admonitionContent__5gi";function at(e){var n=e.type,t=e.className,a=e.children,r=e.id;return(0,i.jsx)("div",{className:(0,d.A)(x.G.common.admonition,x.G.common.admonitionType(n),Yn,t),id:r,children:a})}function rt(e){var n=e.icon,t=e.title;return(0,i.jsxs)("div",{className:et,children:[(0,i.jsx)("span",{className:nt,children:n}),t]})}function st(e){var n=e.children;return n?(0,i.jsx)("div",{className:tt,children:n}):null}function it(e){var n=e.type,t=e.icon,a=e.title,r=e.children,s=e.className,o=e.id;return(0,i.jsxs)(at,{type:n,className:s,id:o,children:[a||t?(0,i.jsx)(rt,{title:a,icon:t}):null,(0,i.jsx)(st,{children:r})]})}function ot(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"})}))}var ct={icon:(0,i.jsx)(ot,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)",children:"note"})};function lt(e){return(0,i.jsx)(it,Object.assign({},ct,e,{className:(0,d.A)("alert alert--secondary",e.className),children:e.children}))}function ut(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})}))}var dt={icon:(0,i.jsx)(ut,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)",children:"tip"})};function mt(e){return(0,i.jsx)(it,Object.assign({},dt,e,{className:(0,d.A)("alert alert--success",e.className),children:e.children}))}function ft(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 14 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"})}))}var ht={icon:(0,i.jsx)(ft,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)",children:"info"})};function vt(e){return(0,i.jsx)(it,Object.assign({},ht,e,{className:(0,d.A)("alert alert--info",e.className),children:e.children}))}function pt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 16 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"})}))}var gt={icon:(0,i.jsx)(pt,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.warning",description:"The default label used for the Warning admonition (:::warning)",children:"warning"})};function bt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 12 16"},e,{children:(0,i.jsx)("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"})}))}var jt={icon:(0,i.jsx)(bt,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)",children:"danger"})};var xt={icon:(0,i.jsx)(pt,{}),title:(0,i.jsx)(f.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)",children:"caution"})};var Nt={note:lt,tip:mt,info:vt,warning:function(e){return(0,i.jsx)(it,Object.assign({},gt,e,{className:(0,d.A)("alert alert--warning",e.className),children:e.children}))},danger:function(e){return(0,i.jsx)(it,Object.assign({},jt,e,{className:(0,d.A)("alert alert--danger",e.className),children:e.children}))}},At={secondary:function(e){return(0,i.jsx)(lt,Object.assign({title:"secondary"},e))},important:function(e){return(0,i.jsx)(vt,Object.assign({title:"important"},e))},success:function(e){return(0,i.jsx)(mt,Object.assign({title:"success"},e))},caution:function(e){return(0,i.jsx)(it,Object.assign({},xt,e,{className:(0,d.A)("alert alert--warning",e.className),children:e.children}))}};const yt=Object.assign({},Nt,At);function Ct(e){var n,t=Jn(e),a=(n=t.type,yt[n]||(console.warn('No admonition component found for admonition type "'+n+'". Using Info as fallback.'),yt.info));return(0,i.jsx)(a,Object.assign({},t))}var Lt=t(8610),wt=t(8007);function kt(){return _t.apply(this,arguments)}function _t(){return(_t=fn(dn().m(function e(){var n,a;return dn().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Promise.all([t.e(1485),t.e(5043)]).then(t.bind(t,5043));case 1:return n=e.v.default,e.n=2,t.e(8705).then(t.bind(t,8705));case 2:a=e.v.default,n.registerLayoutLoaders(a);case 3:return e.a(2,n)}},e)}))).apply(this,arguments)}var Ot=null;function Tt(){return Bt.apply(this,arguments)}function Bt(){return(Bt=fn(dn().m(function e(){return dn().w(function(e){for(;;)if(0===e.n)return Ot||(Ot=kt()),e.a(2,Ot)},e)}))).apply(this,arguments)}function Et(){var e=(0,Ne.G)().colorMode,n=(0,q.p)().mermaid,t=n.theme[e],r=n.options;return(0,a.useMemo)(function(){return Object.assign({startOnLoad:!1},r,{theme:t})},[t,r])}function Ht(){return(Ht=fn(dn().m(function e(n){var t,a,r,s,i,o;return dn().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=n.id,a=n.text,r=n.config,e.n=1,Tt();case 1:return(s=e.v).initialize(r),e.p=2,e.n=3,s.render(t,a);case 3:return e.a(2,e.v);case 4:throw e.p=4,o=e.v,null==(i=document.querySelector("#d"+t))||i.remove(),o;case 5:return e.a(2)}},e,null,[[2,4]])}))).apply(this,arguments)}function Mt(e){var n=e.text,t=e.config,r=(0,a.useState)(null),s=r[0],i=r[1],o=(0,a.useState)("mermaid-svg-"+Math.round(1e7*Math.random()))[0],c=Et(),l=null!=t?t:c;return(0,a.useEffect)(function(){(function(e){return Ht.apply(this,arguments)})({id:o,text:n,config:l}).then(i).catch(function(e){i(function(){throw e})})},[o,n,l]),s}const It="container_VRXZ";function St(e){var n=e.renderResult,t=(0,a.useRef)(null);return(0,a.useEffect)(function(){var e=t.current;null==n.bindFunctions||n.bindFunctions(e)},[n]),(0,i.jsx)("div",{ref:t,className:"docusaurus-mermaid-container "+It,dangerouslySetInnerHTML:{__html:n.svg}})}function Ut(e){var n=Mt({text:e.value});return null===n?null:(0,i.jsx)(St,{renderResult:n})}const Vt={Head:je.A,details:Zn,Details:Zn,code:function(e){return function(e){return void 0!==e.children&&a.Children.toArray(e.children).every(function(e){return"string"==typeof e&&!e.includes("\n")})}(e)?(0,i.jsx)(In,Object.assign({},e)):(0,i.jsx)(Mn,Object.assign({},e))},a:function(e){var n=(0,Sn.v)(e.id);return(0,i.jsx)(h.A,Object.assign({},e,{className:(0,d.A)(n,e.className)}))},pre:function(e){return(0,i.jsx)(i.Fragment,{children:e.children})},ul:function(e){return(0,i.jsx)("ul",Object.assign({},e,{className:$n(e.className)}))},li:function(e){(0,Un.A)().collectAnchor(e.id);var n=(0,Sn.v)(e.id);return(0,i.jsx)("li",Object.assign({className:(0,d.A)(n,e.className)},e))},img:function(e){return(0,i.jsx)("img",Object.assign({decoding:"async",loading:"lazy"},e,{className:(n=e.className,(0,d.A)(n,Xn))}));var n},h1:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h1"},e))},h2:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h2"},e))},h3:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h3"},e))},h4:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h4"},e))},h5:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h5"},e))},h6:function(e){return(0,i.jsx)(Kn,Object.assign({as:"h6"},e))},admonition:Ct,mermaid:function(e){return(0,i.jsx)(Lt.A,{fallback:function(e){return(0,i.jsx)(wt.MN,Object.assign({},e))},children:(0,i.jsx)(Ut,Object.assign({},e))})}};function Rt(e){var n=e.children;return(0,i.jsx)(be.x,{components:Vt,children:n})}function zt(e){var n,t,a,r,s=e.children,o=(n=l(),t=n.metadata,a=n.frontMatter,r=n.contentTitle,a.hide_title||void 0!==r?null:t.title);return(0,i.jsxs)("div",{className:(0,d.A)(x.G.docs.docMarkdown,"markdown"),children:[o&&(0,i.jsx)("header",{children:(0,i.jsx)(ge.A,{as:"h1",children:o})}),(0,i.jsx)(Rt,{children:s})]})}var Pt=t(3996),Gt=t(7322),Ft=t(1969);function Wt(e){return(0,i.jsx)("svg",Object.assign({viewBox:"0 0 24 24"},e,{children:(0,i.jsx)("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"})}))}const Dt={breadcrumbHomeIcon:"breadcrumbHomeIcon_ilNI"};function qt(){var e=(0,Ft.Ay)("/");return(0,i.jsx)("li",{className:"breadcrumbs__item",children:(0,i.jsx)(h.A,{"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e,children:(0,i.jsx)(Wt,{className:Dt.breadcrumbHomeIcon})})})}function Zt(e){var n,t,a,r=(n={breadcrumbs:e.breadcrumbs},t=n.breadcrumbs,a=(0,b.A)().siteConfig,{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:t.filter(function(e){return e.href}).map(function(e,n){return{"@type":"ListItem",position:n+1,name:e.label,item:""+a.url+e.href}})});return(0,i.jsx)(je.A,{children:(0,i.jsx)("script",{type:"application/ld+json",children:JSON.stringify(r)})})}const Kt={breadcrumbsContainer:"breadcrumbsContainer__5rh"};function Qt(e){var n=e.children,t=e.href,a="breadcrumbs__link";return e.isLast?(0,i.jsx)("span",{className:a,children:n}):t?(0,i.jsx)(h.A,{className:a,href:t,children:(0,i.jsx)("span",{children:n})}):(0,i.jsx)("span",{className:a,children:n})}function $t(e){var n=e.children,t=e.active;return(0,i.jsx)("li",{className:(0,d.A)("breadcrumbs__item",{"breadcrumbs__item--active":t}),children:n})}function Xt(){var e=(0,Pt.OF)(),n=(0,Gt.Dt)();return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Zt,{breadcrumbs:e}),(0,i.jsx)("nav",{className:(0,d.A)(x.G.docs.docBreadcrumbs,Kt.breadcrumbsContainer),"aria-label":(0,f.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"}),children:(0,i.jsxs)("ul",{className:"breadcrumbs",children:[n&&(0,i.jsx)(qt,{}),e.map(function(n,t){var a=t===e.length-1,r="category"===n.type&&n.linkUnlisted?void 0:n.href;return(0,i.jsx)($t,{active:a,children:(0,i.jsx)(Qt,{href:r,isLast:a,children:n.label})},t)})]})})]}):null}function Jt(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.unlistedBanner.title",description:"The unlisted content banner title",children:"Unlisted page"})}function Yt(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.unlistedBanner.message",description:"The unlisted content banner message",children:"This page is unlisted. Search engines will not index it, and only users having a direct link can access it."})}function ea(){return(0,i.jsx)(je.A,{children:(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})}function na(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.draftBanner.title",description:"The draft content banner title",children:"Draft page"})}function ta(){return(0,i.jsx)(f.A,{id:"theme.contentVisibility.draftBanner.message",description:"The draft content banner message",children:"This page is a draft. It will only be visible in dev and be excluded from the production build."})}function aa(e){var n=e.className;return(0,i.jsx)(Ct,{type:"caution",title:(0,i.jsx)(na,{}),className:(0,d.A)(n,x.G.common.draftBanner),children:(0,i.jsx)(ta,{})})}function ra(e){var n=e.className;return(0,i.jsx)(Ct,{type:"caution",title:(0,i.jsx)(Jt,{}),className:(0,d.A)(n,x.G.common.unlistedBanner),children:(0,i.jsx)(Yt,{})})}function sa(e){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ea,{}),(0,i.jsx)(ra,Object.assign({},e))]})}function ia(e){var n=e.metadata,t=n.unlisted,a=n.frontMatter;return(0,i.jsxs)(i.Fragment,{children:[(t||a.unlisted)&&(0,i.jsx)(sa,{}),a.draft&&(0,i.jsx)(aa,{})]})}const oa={docItemContainer:"docItemContainer_gUK8",docItemCol:"docItemCol_SLVn"};function ca(e){var n,t,a,r,s,o,c=e.children,u=(n=l(),t=n.frontMatter,a=n.toc,r=(0,m.l)(),s=t.hide_table_of_contents,o=!s&&a.length>0,{hidden:s,mobile:o?(0,i.jsx)(ue,{}):void 0,desktop:!o||"desktop"!==r&&"ssr"!==r?void 0:(0,i.jsx)(pe,{})}),f=l().metadata;return(0,i.jsxs)("div",{className:"row",children:[(0,i.jsxs)("div",{className:(0,d.A)("col",!u.hidden&&oa.docItemCol),children:[(0,i.jsx)(ia,{metadata:f}),(0,i.jsx)(k,{}),(0,i.jsxs)("div",{className:oa.docItemContainer,children:[(0,i.jsxs)("article",{children:[(0,i.jsx)(Xt,{}),(0,i.jsx)(_,{}),u.mobile,(0,i.jsx)(zt,{children:c}),(0,i.jsx)(W,{})]}),(0,i.jsx)(g,{})]})]}),u.desktop&&(0,i.jsx)("div",{className:"col col--3",children:u.desktop})]})}function la(e){var n="docs-doc-id-"+e.content.metadata.id,t=e.content;return(0,i.jsx)(c,{content:e.content,children:(0,i.jsxs)(r.e3,{className:n,children:[(0,i.jsx)(u,{}),(0,i.jsx)(ca,{children:(0,i.jsx)(t,{})})]})})}},9514:(e,n)=>{function t(e){let n,t=[];for(let a of e.split(",").map(e=>e.trim()))if(/^-?\d+$/.test(a))t.push(parseInt(a,10));else if(n=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,r,s]=n;if(a&&s){a=parseInt(a),s=parseInt(s);const e=a{"use strict";t.d(n,{R:()=>i,x:()=>o});var a=t(63);const r={},s=a.createContext(r);function i(e){const n=a.useContext(s);return a.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/17896441.0e3115cb.js.LICENSE.txt b/assets/js/17896441.278c1b8c.js.LICENSE.txt similarity index 100% rename from assets/js/17896441.0e3115cb.js.LICENSE.txt rename to assets/js/17896441.278c1b8c.js.LICENSE.txt diff --git a/assets/js/1903.c19e32df.js b/assets/js/1903.c19e32df.js deleted file mode 100644 index 36d35f1..0000000 --- a/assets/js/1903.c19e32df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1903],{1903(e,a,s){s.d(a,{createRadarServices:()=>c.f});var c=s(6645);s(808)}}]); \ No newline at end of file diff --git a/assets/js/2130.6aca0963.js b/assets/js/2130.6aca0963.js deleted file mode 100644 index 2891c9c..0000000 --- a/assets/js/2130.6aca0963.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2130],{2130(e,t,r){r.d(t,{default:()=>dn});class a{constructor(e,t,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=r}static range(e,t){return t?e&&e.loc&&t.loc&&e.loc.lexer===t.loc.lexer?new a(e.loc.lexer,e.loc.start,t.loc.end):null:e&&e.loc}}class n{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new n(t,a.range(this,e))}}class i{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,a,n="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,a=o.end,r===s.length?n+=" at end of input: ":n+=" at position "+(r+1)+": ";var l=s.slice(r,a).replace(/[^]/g,"$&\u0332");n+=(r>15?"\u2026"+s.slice(r-15,r):s.slice(0,r))+l+(a+15e.replace(o,"-$1").toLowerCase(),l={"&":"&",">":">","<":"<",'"':""","'":"'"},h=/[&><"']/g,m=e=>String(e).replace(h,e=>l[e]),c=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?c(e.body[0]):e:"font"===e.type?c(e.body):e,u=new Set(["mathord","textord","atom"]),p=e=>u.has(c(e).type),d={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function g(e){if(e.default)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class f{constructor(e){for(var t in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},d)if(d.hasOwnProperty(t)){var r=d[t];this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:g(r)}}reportNonstrict(e,t,r){var a=this.strict;if("function"==typeof a&&(a=a(e,t,r)),a&&"ignore"!==a){if(!0===a||"error"===a)throw new i("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===a?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(n){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if(e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class v{constructor(e,t,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=r}sup(){return b[y[this.id]]}sub(){return b[x[this.id]]}fracNum(){return b[w[this.id]]}fracDen(){return b[k[this.id]]}cramp(){return b[z[this.id]]}text(){return b[S[this.id]]}isTight(){return this.size>=2}}var b=[new v(0,0,!1),new v(1,0,!0),new v(2,1,!1),new v(3,1,!0),new v(4,2,!1),new v(5,2,!0),new v(6,3,!1),new v(7,3,!0)],y=[4,5,4,5,6,7,6,7],x=[5,5,5,5,7,7,7,7],w=[2,3,4,5,6,7,6,7],k=[3,3,5,5,7,7,7,7],z=[1,1,3,3,5,5,7,7],S=[0,1,2,3,2,3,2,3],M={DISPLAY:b[0],TEXT:b[2],SCRIPT:b[4],SCRIPTSCRIPT:b[6]},A=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var T=[];function B(e){for(var t=0;t=T[t]&&e<=T[t+1])return!0;return!1}A.forEach(e=>e.blocks.forEach(e=>T.push(...e)));var q=80,C={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class I{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText()).join("")}}var H={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},R={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},E={"\xc5":"A","\xd0":"D","\xde":"o","\xe5":"a","\xf0":"d","\xfe":"o","\u0410":"A","\u0411":"B","\u0412":"B","\u0413":"F","\u0414":"A","\u0415":"E","\u0416":"K","\u0417":"3","\u0418":"N","\u0419":"N","\u041a":"K","\u041b":"N","\u041c":"M","\u041d":"H","\u041e":"O","\u041f":"N","\u0420":"P","\u0421":"C","\u0422":"T","\u0423":"y","\u0424":"O","\u0425":"X","\u0426":"U","\u0427":"h","\u0428":"W","\u0429":"W","\u042a":"B","\u042b":"X","\u042c":"B","\u042d":"3","\u042e":"X","\u042f":"R","\u0430":"a","\u0431":"b","\u0432":"a","\u0433":"r","\u0434":"y","\u0435":"e","\u0436":"m","\u0437":"e","\u0438":"n","\u0439":"n","\u043a":"n","\u043b":"n","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"n","\u0440":"p","\u0441":"c","\u0442":"o","\u0443":"y","\u0444":"b","\u0445":"x","\u0446":"n","\u0447":"n","\u0448":"w","\u0449":"w","\u044a":"a","\u044b":"m","\u044c":"a","\u044d":"e","\u044e":"m","\u044f":"r"};function O(e,t,r){if(!H[t])throw new Error("Font metrics not found for font: "+t+".");var a=e.charCodeAt(0),n=H[t][a];if(!n&&e[0]in E&&(a=E[e[0]].charCodeAt(0),n=H[t][a]),n||"text"!==r||B(a)&&(n=H[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var N={};var D=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],P=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],L=function(e,t){return t.size<2?e:D[e-1][t.size-1]};class V{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||V.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=P[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return new V(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:L(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:P[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=L(V.BASESIZE,e);return this.size===t&&this.textSize===V.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==V.BASESIZE?["sizing","reset-size"+this.size,"size"+V.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!N[t=e>=5?0:e>=3?1:2]){var r=N[t]={cssEmPerMu:R.quad[t]/18};for(var a in R)R.hasOwnProperty(a)&&(r[a]=R[a][t])}return N[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}V.BASESIZE=6;var F={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},G={ex:!0,em:!0,mu:!0},U=function(e){return"string"!=typeof e&&(e=e.unit),e in F||e in G||"ex"===e},W=function(e,t){var r;if(e.unit in F)r=F[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var a;if(a=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=a.fontMetrics().xHeight;else{if("em"!==e.unit)throw new i("Invalid unit: '"+e.unit+"'");r=a.fontMetrics().quad}a!==t&&(r*=a.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},Y=function(e){return+e.toFixed(4)+"em"},X=function(e){return e.filter(e=>e).join(" ")},_=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},j=function(e){var t=document.createElement(e);for(var r in t.className=X(this.classes),this.style)this.style.hasOwnProperty(r)&&(t.style[r]=this.style[r]);for(var a in this.attributes)this.attributes.hasOwnProperty(a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n/=\x00-\x1f]/,Z=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+m(X(this.classes))+'"');var r="";for(var a in this.style)this.style.hasOwnProperty(a)&&(r+=s(a)+":"+this.style[a]+";");for(var n in r&&(t+=' style="'+m(r)+'"'),this.attributes)if(this.attributes.hasOwnProperty(n)){if($.test(n))throw new i("Invalid attribute name '"+n+"'");t+=" "+n+'="'+m(this.attributes[n])+'"'}t+=">";for(var o=0;o"};class K{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,_.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return j.call(this,"span")}toMarkup(){return Z.call(this,"span")}}class J{constructor(e,t,r,a){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,_.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return j.call(this,"a")}toMarkup(){return Z.call(this,"a")}}class Q{constructor(e,t,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+m(this.alt)+'=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=ee[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r in this.italic>0&&((t=document.createElement("span")).style.marginRight=Y(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=X(this.classes)),this.style)this.style.hasOwnProperty(r)&&((t=t||document.createElement("span")).style[r]=this.style[r]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(a)&&(r+=s(a)+":"+this.style[a]+";");r&&(e=!0,t+=' style="'+m(r)+'"');var n=m(this.text);return e?(t+=">",t+=n,t+=""):n}}class re{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r':''}}class ne{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="","\\gt",!0),he(me,ue,ke,"\u2208","\\in",!0),he(me,ue,ke,"\ue020","\\@not"),he(me,ue,ke,"\u2282","\\subset",!0),he(me,ue,ke,"\u2283","\\supset",!0),he(me,ue,ke,"\u2286","\\subseteq",!0),he(me,ue,ke,"\u2287","\\supseteq",!0),he(me,pe,ke,"\u2288","\\nsubseteq",!0),he(me,pe,ke,"\u2289","\\nsupseteq",!0),he(me,ue,ke,"\u22a8","\\models"),he(me,ue,ke,"\u2190","\\leftarrow",!0),he(me,ue,ke,"\u2264","\\le"),he(me,ue,ke,"\u2264","\\leq",!0),he(me,ue,ke,"<","\\lt",!0),he(me,ue,ke,"\u2192","\\rightarrow",!0),he(me,ue,ke,"\u2192","\\to"),he(me,pe,ke,"\u2271","\\ngeq",!0),he(me,pe,ke,"\u2270","\\nleq",!0),he(me,ue,ze,"\xa0","\\ "),he(me,ue,ze,"\xa0","\\space"),he(me,ue,ze,"\xa0","\\nobreakspace"),he(ce,ue,ze,"\xa0","\\ "),he(ce,ue,ze,"\xa0"," "),he(ce,ue,ze,"\xa0","\\space"),he(ce,ue,ze,"\xa0","\\nobreakspace"),he(me,ue,ze,null,"\\nobreak"),he(me,ue,ze,null,"\\allowbreak"),he(me,ue,we,",",","),he(me,ue,we,";",";"),he(me,pe,ge,"\u22bc","\\barwedge",!0),he(me,pe,ge,"\u22bb","\\veebar",!0),he(me,ue,ge,"\u2299","\\odot",!0),he(me,ue,ge,"\u2295","\\oplus",!0),he(me,ue,ge,"\u2297","\\otimes",!0),he(me,ue,Se,"\u2202","\\partial",!0),he(me,ue,ge,"\u2298","\\oslash",!0),he(me,pe,ge,"\u229a","\\circledcirc",!0),he(me,pe,ge,"\u22a1","\\boxdot",!0),he(me,ue,ge,"\u25b3","\\bigtriangleup"),he(me,ue,ge,"\u25bd","\\bigtriangledown"),he(me,ue,ge,"\u2020","\\dagger"),he(me,ue,ge,"\u22c4","\\diamond"),he(me,ue,ge,"\u22c6","\\star"),he(me,ue,ge,"\u25c3","\\triangleleft"),he(me,ue,ge,"\u25b9","\\triangleright"),he(me,ue,xe,"{","\\{"),he(ce,ue,Se,"{","\\{"),he(ce,ue,Se,"{","\\textbraceleft"),he(me,ue,fe,"}","\\}"),he(ce,ue,Se,"}","\\}"),he(ce,ue,Se,"}","\\textbraceright"),he(me,ue,xe,"{","\\lbrace"),he(me,ue,fe,"}","\\rbrace"),he(me,ue,xe,"[","\\lbrack",!0),he(ce,ue,Se,"[","\\lbrack",!0),he(me,ue,fe,"]","\\rbrack",!0),he(ce,ue,Se,"]","\\rbrack",!0),he(me,ue,xe,"(","\\lparen",!0),he(me,ue,fe,")","\\rparen",!0),he(ce,ue,Se,"<","\\textless",!0),he(ce,ue,Se,">","\\textgreater",!0),he(me,ue,xe,"\u230a","\\lfloor",!0),he(me,ue,fe,"\u230b","\\rfloor",!0),he(me,ue,xe,"\u2308","\\lceil",!0),he(me,ue,fe,"\u2309","\\rceil",!0),he(me,ue,Se,"\\","\\backslash"),he(me,ue,Se,"\u2223","|"),he(me,ue,Se,"\u2223","\\vert"),he(ce,ue,Se,"|","\\textbar",!0),he(me,ue,Se,"\u2225","\\|"),he(me,ue,Se,"\u2225","\\Vert"),he(ce,ue,Se,"\u2225","\\textbardbl"),he(ce,ue,Se,"~","\\textasciitilde"),he(ce,ue,Se,"\\","\\textbackslash"),he(ce,ue,Se,"^","\\textasciicircum"),he(me,ue,ke,"\u2191","\\uparrow",!0),he(me,ue,ke,"\u21d1","\\Uparrow",!0),he(me,ue,ke,"\u2193","\\downarrow",!0),he(me,ue,ke,"\u21d3","\\Downarrow",!0),he(me,ue,ke,"\u2195","\\updownarrow",!0),he(me,ue,ke,"\u21d5","\\Updownarrow",!0),he(me,ue,ye,"\u2210","\\coprod"),he(me,ue,ye,"\u22c1","\\bigvee"),he(me,ue,ye,"\u22c0","\\bigwedge"),he(me,ue,ye,"\u2a04","\\biguplus"),he(me,ue,ye,"\u22c2","\\bigcap"),he(me,ue,ye,"\u22c3","\\bigcup"),he(me,ue,ye,"\u222b","\\int"),he(me,ue,ye,"\u222b","\\intop"),he(me,ue,ye,"\u222c","\\iint"),he(me,ue,ye,"\u222d","\\iiint"),he(me,ue,ye,"\u220f","\\prod"),he(me,ue,ye,"\u2211","\\sum"),he(me,ue,ye,"\u2a02","\\bigotimes"),he(me,ue,ye,"\u2a01","\\bigoplus"),he(me,ue,ye,"\u2a00","\\bigodot"),he(me,ue,ye,"\u222e","\\oint"),he(me,ue,ye,"\u222f","\\oiint"),he(me,ue,ye,"\u2230","\\oiiint"),he(me,ue,ye,"\u2a06","\\bigsqcup"),he(me,ue,ye,"\u222b","\\smallint"),he(ce,ue,ve,"\u2026","\\textellipsis"),he(me,ue,ve,"\u2026","\\mathellipsis"),he(ce,ue,ve,"\u2026","\\ldots",!0),he(me,ue,ve,"\u2026","\\ldots",!0),he(me,ue,ve,"\u22ef","\\@cdots",!0),he(me,ue,ve,"\u22f1","\\ddots",!0),he(me,ue,Se,"\u22ee","\\varvdots"),he(ce,ue,Se,"\u22ee","\\varvdots"),he(me,ue,de,"\u02ca","\\acute"),he(me,ue,de,"\u02cb","\\grave"),he(me,ue,de,"\xa8","\\ddot"),he(me,ue,de,"~","\\tilde"),he(me,ue,de,"\u02c9","\\bar"),he(me,ue,de,"\u02d8","\\breve"),he(me,ue,de,"\u02c7","\\check"),he(me,ue,de,"^","\\hat"),he(me,ue,de,"\u20d7","\\vec"),he(me,ue,de,"\u02d9","\\dot"),he(me,ue,de,"\u02da","\\mathring"),he(me,ue,be,"\ue131","\\@imath"),he(me,ue,be,"\ue237","\\@jmath"),he(me,ue,Se,"\u0131","\u0131"),he(me,ue,Se,"\u0237","\u0237"),he(ce,ue,Se,"\u0131","\\i",!0),he(ce,ue,Se,"\u0237","\\j",!0),he(ce,ue,Se,"\xdf","\\ss",!0),he(ce,ue,Se,"\xe6","\\ae",!0),he(ce,ue,Se,"\u0153","\\oe",!0),he(ce,ue,Se,"\xf8","\\o",!0),he(ce,ue,Se,"\xc6","\\AE",!0),he(ce,ue,Se,"\u0152","\\OE",!0),he(ce,ue,Se,"\xd8","\\O",!0),he(ce,ue,de,"\u02ca","\\'"),he(ce,ue,de,"\u02cb","\\`"),he(ce,ue,de,"\u02c6","\\^"),he(ce,ue,de,"\u02dc","\\~"),he(ce,ue,de,"\u02c9","\\="),he(ce,ue,de,"\u02d8","\\u"),he(ce,ue,de,"\u02d9","\\."),he(ce,ue,de,"\xb8","\\c"),he(ce,ue,de,"\u02da","\\r"),he(ce,ue,de,"\u02c7","\\v"),he(ce,ue,de,"\xa8",'\\"'),he(ce,ue,de,"\u02dd","\\H"),he(ce,ue,de,"\u25ef","\\textcircled");var Me={"--":!0,"---":!0,"``":!0,"''":!0};he(ce,ue,Se,"\u2013","--",!0),he(ce,ue,Se,"\u2013","\\textendash"),he(ce,ue,Se,"\u2014","---",!0),he(ce,ue,Se,"\u2014","\\textemdash"),he(ce,ue,Se,"\u2018","`",!0),he(ce,ue,Se,"\u2018","\\textquoteleft"),he(ce,ue,Se,"\u2019","'",!0),he(ce,ue,Se,"\u2019","\\textquoteright"),he(ce,ue,Se,"\u201c","``",!0),he(ce,ue,Se,"\u201c","\\textquotedblleft"),he(ce,ue,Se,"\u201d","''",!0),he(ce,ue,Se,"\u201d","\\textquotedblright"),he(me,ue,Se,"\xb0","\\degree",!0),he(ce,ue,Se,"\xb0","\\degree"),he(ce,ue,Se,"\xb0","\\textdegree",!0),he(me,ue,Se,"\xa3","\\pounds"),he(me,ue,Se,"\xa3","\\mathsterling",!0),he(ce,ue,Se,"\xa3","\\pounds"),he(ce,ue,Se,"\xa3","\\textsterling",!0),he(me,pe,Se,"\u2720","\\maltese"),he(ce,pe,Se,"\u2720","\\maltese");for(var Ae='0123456789/@."',Te=0;Te<14;Te++){var Be=Ae.charAt(Te);he(me,ue,Se,Be,Be)}for(var qe='0123456789!@*()-=+";:?/.,',Ce=0;Ce<25;Ce++){var Ie=qe.charAt(Ce);he(ce,ue,Se,Ie,Ie)}for(var He="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Re=0;Re<52;Re++){var Ee=He.charAt(Re);he(me,ue,be,Ee,Ee),he(ce,ue,Se,Ee,Ee)}he(me,pe,Se,"C","\u2102"),he(ce,pe,Se,"C","\u2102"),he(me,pe,Se,"H","\u210d"),he(ce,pe,Se,"H","\u210d"),he(me,pe,Se,"N","\u2115"),he(ce,pe,Se,"N","\u2115"),he(me,pe,Se,"P","\u2119"),he(ce,pe,Se,"P","\u2119"),he(me,pe,Se,"Q","\u211a"),he(ce,pe,Se,"Q","\u211a"),he(me,pe,Se,"R","\u211d"),he(ce,pe,Se,"R","\u211d"),he(me,pe,Se,"Z","\u2124"),he(ce,pe,Se,"Z","\u2124"),he(me,ue,be,"h","\u210e"),he(ce,ue,be,"h","\u210e");for(var Oe="",Ne=0;Ne<52;Ne++){var De=He.charAt(Ne);he(me,ue,be,De,Oe=String.fromCharCode(55349,56320+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56372+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56424+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56580+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56684+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56736+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56788+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56840+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56944+Ne)),he(ce,ue,Se,De,Oe),Ne<26&&(he(me,ue,be,De,Oe=String.fromCharCode(55349,56632+Ne)),he(ce,ue,Se,De,Oe),he(me,ue,be,De,Oe=String.fromCharCode(55349,56476+Ne)),he(ce,ue,Se,De,Oe))}he(me,ue,be,"k",Oe=String.fromCharCode(55349,56668)),he(ce,ue,Se,"k",Oe);for(var Pe=0;Pe<10;Pe++){var Le=Pe.toString();he(me,ue,be,Le,Oe=String.fromCharCode(55349,57294+Pe)),he(ce,ue,Se,Le,Oe),he(me,ue,be,Le,Oe=String.fromCharCode(55349,57314+Pe)),he(ce,ue,Se,Le,Oe),he(me,ue,be,Le,Oe=String.fromCharCode(55349,57324+Pe)),he(ce,ue,Se,Le,Oe),he(me,ue,be,Le,Oe=String.fromCharCode(55349,57334+Pe)),he(ce,ue,Se,Le,Oe)}for(var Ve="\xd0\xde\xfe",Fe=0;Fe<3;Fe++){var Ge=Ve.charAt(Fe);he(me,ue,be,Ge,Ge),he(ce,ue,Se,Ge,Ge)}var Ue=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],We=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Ye=function(e,t,r){return le[r][e]&&le[r][e].replace&&(e=le[r][e].replace),{value:e,metrics:O(e,t,r)}},Xe=function(e,t,r,a,n){var i,o=Ye(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new te(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new te(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},_e=function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Ye(e,"Main-Bold",t).metrics?Xe(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===le[t][e].font?Xe(e,"Main-Regular",t,r,a):Xe(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},je=function(e,t,r){var a=e.mode,n=e.text,o=["mord"],s="math"===a||"text"===a&&t.font,l=s?t.font:t.fontFamily,h="",m="";if(55349===n.charCodeAt(0)&&([h,m]=function(e,t){var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,a="math"===t?0:1;if(119808<=r&&r<120484){var n=Math.floor((r-119808)/26);return[Ue[n][2],Ue[n][a]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[We[o][2],We[o][a]]}if(120485===r||120486===r)return[Ue[0][2],Ue[0][a]];if(1204860)return Xe(n,h,a,t,o.concat(m));if(l){var c,u;if("boldsymbol"===l){var p=function(e,t,r,a,n){return"textord"!==n&&Ye(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(n,a,0,0,r);c=p.fontName,u=[p.fontClass]}else s?(c=ot[l].fontName,u=[l]):(c=it(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Ye(n,c,a).metrics)return Xe(n,c,a,t,o.concat(u));if(Me.hasOwnProperty(n)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g{if(X(e.classes)!==X(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a in e.style)if(e.style.hasOwnProperty(a)&&e.style[a]!==t.style[a])return!1;for(var n in t.style)if(t.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;return!0},Ze=e=>{for(var t=0;tt&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},Je=function(e,t,r,a){var n=new K(e,t,r,a);return Ke(n),n},Qe=(e,t,r,a)=>new K(e,t,r,a),et=function(e,t,r){var a=Je([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=Y(a.height),a.maxFontSize=1,a},tt=function(e){var t=new I(e);return Ke(t),t},rt=function(e,t){return e instanceof I?Je([],[e],t):e},at=function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i{var r=Je(["mspace"],[],t),a=W(e,t);return r.style.marginRight=Y(a),r},it=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},ot={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},st={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},lt=function(e,t){var[r,a,n]=st[e],i=new ae(r),o=new re([i],{width:Y(a),height:Y(n),style:"width:"+Y(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=Qe(["overlay"],[o],t);return s.height=n,s.style.height=Y(n),s.style.width=Y(a),s},ht={number:3,unit:"mu"},mt={number:4,unit:"mu"},ct={number:5,unit:"mu"},ut={mord:{mop:ht,mbin:mt,mrel:ct,minner:ht},mop:{mord:ht,mop:ht,mrel:ct,minner:ht},mbin:{mord:mt,mop:mt,mopen:mt,minner:mt},mrel:{mord:ct,mop:ct,mopen:ct,minner:ct},mopen:{},mclose:{mop:ht,mbin:mt,mrel:ct,minner:ht},mpunct:{mord:ht,mop:ht,mrel:ct,mopen:ht,mclose:ht,mpunct:ht,minner:ht},minner:{mord:ht,mop:ht,mbin:mt,mrel:ct,mopen:ht,mpunct:ht,minner:ht}},pt={mord:{mop:ht},mop:{mord:ht,mop:ht},mbin:{},mrel:{},mopen:{},mclose:{mop:ht},mpunct:{},minner:{mop:ht}},dt={},gt={},ft={};function vt(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l{var r=t.classes[0],a=e.classes[0];"mbin"===r&&kt.has(a)?t.classes[0]="mord":"mbin"===a&&wt.has(r)&&(e.classes[0]="mord")},{node:m},c,u),At(n,(e,t)=>{var r=qt(t),a=qt(e),n=r&&a?e.hasClass("mtight")?pt[r][a]:ut[r][a]:null;if(n)return nt(n,l)},{node:m},c,u),n},At=function e(t,r,a,n,i){n&&t.push(n);for(var o=0;or=>{t.splice(e+1,0,r),o++})(o)}}n&&t.pop()},Tt=function(e){return e instanceof I||e instanceof J||e instanceof K&&e.hasClass("enclosing")?e:null},Bt=function e(t,r){var a=Tt(t);if(a){var n=a.children;if(n.length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}}return t},qt=function(e,t){return e?(t&&(e=Bt(e,t)),St[e.classes[0]]||null):null},Ct=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return Je(t.concat(r))},It=function(e,t,r){if(!e)return Je();if(gt[e.type]){var a=gt[e.type](e,t);if(r&&t.size!==r.size){a=Je(t.sizingClasses(r),[a],t);var n=t.sizeMultiplier/r.sizeMultiplier;a.height*=n,a.depth*=n}return a}throw new i("Got group of unknown type: '"+e.type+"'")};function Ht(e,t){var r=Je(["base"],e,t),a=Je(["strut"]);return a.style.height=Y(r.height+r.depth),r.depth&&(a.style.verticalAlign=Y(-r.depth)),r.children.unshift(a),r}function Rt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=Mt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l0&&(o.push(Ht(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(Ht(s,t)),r?((i=Ht(Mt(r,t,!0))).classes=["tag"],o.push(i)):a&&o.push(a);var m=Je(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=Y(m.height+m.depth),m.depth&&(c.style.verticalAlign=Y(-m.depth))}return m}function Et(e){return new I(e)}class Ot{constructor(e,t,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=X(this.classes));for(var r=0;r0&&(e+=' class ="'+m(X(this.classes))+'"'),e+=">";for(var r=0;r"}toText(){return this.children.map(e=>e.toText()).join("")}}class Nt{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return m(this.toText())}toText(){return this.text}}class Dt{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Y(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Pt=new Set(["\\imath","\\jmath"]),Lt=new Set(["mrow","mtable"]),Vt=function(e,t,r){return!le[t][e]||!le[t][e].replace||55349===e.charCodeAt(0)||Me.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=le[t][e].replace),new Nt(e)},Ft=function(e){return 1===e.length?e[0]:new Ot("mrow",e)},Gt=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;return Pt.has(n)?null:(le[a][n]&&le[a][n].replace&&(n=le[a][n].replace),O(n,ot[r].fontName,a)?ot[r].variant:null)};function Ut(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Nt&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Nt&&","===r.text}return!1}var Wt=function(e,t,r){if(1===e.length){var a=Xt(e[0],t);return r&&a instanceof Ot&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o=1&&("mn"===n.type||Ut(n))){var l=s.children[0];l instanceof Ot&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Nt&&"\u0338"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Nt&&m.text.length>0&&(m.text=m.text.slice(0,1)+"\u0338"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Yt=function(e,t,r){return Ft(Wt(e,t,r))},Xt=function(e,t){if(!e)return new Ot("mrow");if(ft[e.type])return ft[e.type](e,t);throw new i("Got group of unknown type: '"+e.type+"'")};function _t(e,t,r,a,n){var i,o=Wt(e,r);i=1===o.length&&o[0]instanceof Ot&&Lt.has(o[0].type)?o[0]:new Ot("mrow",o);var s=new Ot("annotation",[new Nt(t)]);s.setAttribute("encoding","application/x-tex");var l=new Ot("semantics",[i,s]),h=new Ot("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),Je([n?"katex":"katex-mathml"],[h])}var jt=function(e){return new V({style:e.displayMode?M.DISPLAY:M.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},$t=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=Je(r,[e])}return e},Zt={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},Kt=function(e){var t=new Ot("mo",[new Nt(Zt[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Jt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Qt=new Set(["widehat","widecheck","widetilde","utilde"]),er=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(Qt.has(a)){var n,i,o,s=e,l="ordgroup"===s.base.type?s.base.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][h],n=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=a+h):(r=[0,600,1033,2339,2340][h],n=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new ae(i),c=new re([m],{width:"100%",height:Y(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:Qe([],[c],t),minWidth:0,height:o}}var u,p,d=[],g=Jt[a],[f,v,b]=g,y=b/1e3,x=f.length;if(1===x)u=["hide-tail"],p=[g[3]];else if(2===x)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(r.style.minWidth=Y(a)),r};function tr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function rr(e){var t=ar(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function ar(e){return e&&("atom"===e.type||se.hasOwnProperty(e.type))?e:null}var nr=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=tr(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof K)return e;throw new Error("Expected span but got "+String(e)+".")}(It(e,t)),e.base=a):r=(a=tr(e,"accent")).base;var i=It(r,t.havingCrampedStyle()),o=0;if(a.isShifty&&p(r)){var s=c(r);o=ie(It(s,t.havingCrampedStyle())).skew}var l,h="\\c"===a.label,m=h?i.height+i.depth:Math.min(i.height,t.fontMetrics().xHeight);if(a.isStretchy)l=er(a,t),l=at({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+Y(2*o)+")",marginLeft:Y(2*o)}:void 0}]});else{var u,d;"\\vec"===a.label?(u=lt("vec",t),d=st.vec[1]):((u=ie(u=je({mode:a.mode,text:a.label},t,"textord"))).italic=0,d=u.width,h&&(m+=u.depth)),l=Je(["accent-body"],[u]);var g="\\textcircled"===a.label;g&&(l.classes.push("accent-full"),m=i.height);var f=o;g||(f-=d/2),l.style.left=Y(f),"\\textcircled"===a.label&&(l.style.top=".2em"),l=at({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-m},{type:"elem",elem:l}]})}var v=Je(["mord","accent"],[l],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},ir=(e,t)=>{var r=e.isStretchy?Kt(e.label):new Ot("mo",[Vt(e.label,e.mode)]),a=new Ot("mover",[Xt(e.base,t),r]);return a.setAttribute("accent","true"),a},or=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));vt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=yt(t[0]),a=!or.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:nr,mathmlBuilder:ir}),vt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:nr,mathmlBuilder:ir}),vt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=It(e.base,t),a=er(e,t),n="\\utilde"===e.label?.12:0,i=at({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return Je(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=Kt(e.label),a=new Ot("munder",[Xt(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var sr=e=>{var t=new Ot("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function lr(e,t){var r=Mt(e.body,t,!0);return Je([e.mclass],r,t)}function hr(e,t){var r,a=Wt(e.body,t);return"minner"===e.mclass?r=new Ot("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new Ot("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new Ot("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}vt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=rt(It(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=rt(It(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=er(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=at({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]})}else s=at({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]});return s.children[0].children[0].children[1].classes.push("svg-align"),Je(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=Kt(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=sr(Xt(e.body,t));if(e.below){var i=sr(Xt(e.below,t));r=new Ot("munderover",[a,i,n])}else r=new Ot("mover",[a,n])}else if(e.below){var o=sr(Xt(e.below,t));r=new Ot("munder",[a,o])}else r=sr(),r=new Ot("mover",[a,r]);return r}}),vt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:xt(n),isCharacterBox:p(n)}},htmlBuilder:lr,mathmlBuilder:hr});var mr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};vt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:mr(t[0]),body:xt(t[1]),isCharacterBox:p(t[1])}}}),vt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?mr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:xt(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:p(l)}},htmlBuilder:lr,mathmlBuilder:hr}),vt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:mr(t[0]),body:xt(t[0])}},htmlBuilder(e,t){var r=Mt(e.body,t,!0),a=Je([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Wt(e.body,t),a=new Ot("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var cr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},ur=()=>({type:"styling",body:[],mode:"math",style:"display"}),pr=e=>"textord"===e.type&&"@"===e.text,dr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function gr(e,t,r){var a=cr[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}vt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=rt(It(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=Y(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new Ot("mrow",[Xt(e.label,t)]);return(r=new Ot("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new Ot("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),vt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=rt(It(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new Ot("mrow",[Xt(e.fragment,t)])}),vt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,a=tr(t[0],"ordgroup").body,n="",o=0;o=1114111)throw new i("\\@char with invalid code point "+n);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var fr=(e,t)=>{var r=Mt(e.body,t.withColor(e.color),!1);return tt(r)},vr=(e,t)=>{var r=Wt(e.body,t.withColor(e.color)),a=new Ot("mstyle",r);return a.setAttribute("mathcolor",e.color),a};vt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=tr(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:xt(n)}},htmlBuilder:fr,mathmlBuilder:vr}),vt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=tr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:fr,mathmlBuilder:vr}),vt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&tr(n,"size").value}},htmlBuilder(e,t){var r=Je(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Y(W(e.size,t)))),r},mathmlBuilder(e,t){var r=new Ot("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Y(W(e.size,t)))),r}});var br={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},yr=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new i("Expected a control sequence",e);return t},xr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};vt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var a=t.fetch();if(br[a.text])return"\\global"!==r&&"\\\\globallong"!==r||(a.text=br[a.text]),tr(t.parseFunction(),"internal");throw new i("Invalid token after macro prefix",a)}}),vt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=t.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new i("Expected a control sequence",a);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(a=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(a=t.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new i('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new i('Argument number "'+a.text+'" out of order');s++,l.push([])}else{if("EOF"===a.text)throw new i("Expected a macro definition");l[s].push(a.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(n,{tokens:h,numArgs:s,delimiters:l},r===br[r]),{type:"internal",mode:t.mode}}}),vt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=yr(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return xr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),vt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=yr(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return xr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var wr=function(e,t,r){var a=O(le.math[e]&&le.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},kr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=Je(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},zr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Y(n),e.height-=n,e.depth+=n},Sr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Xe(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=kr(Je(["delimsizing","size"+t],[o],a),M.TEXT,a,i);return r&&zr(s,a,M.TEXT),s},Mr=function(e,t,r){return{type:"elem",elem:Je(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[Je([],[Xe(e,t,r)])])}},Ar=function(e,t,r){var a=H["Size4-Regular"][e.charCodeAt(0)]?H["Size4-Regular"][e.charCodeAt(0)][4]:H["Size1-Regular"][e.charCodeAt(0)][4],n=new ae("inner",function(e,t){switch(e){case"\u239c":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"\u2223":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"\u2225":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145zM367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z";case"\u239f":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"\u23a2":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"\u23a5":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"\u23aa":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"\u23d0":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"\u2016":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257zM478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z";default:return""}}(e,Math.round(1e3*t))),i=new re([n],{width:Y(a),height:Y(t),style:"width:"+Y(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Qe([],[i],r);return o.height=t,o.style.height=Y(t),o.style.width=Y(a),{type:"elem",elem:o}},Tr={type:"kern",size:-.008},Br=new Set(["|","\\lvert","\\rvert","\\vert"]),qr=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),Cr=function(e,t,r,a,n,i){var o,s,l,h,m="",c=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="\u23d0":"\\Uparrow"===e?l=h="\u2016":"\\downarrow"===e?o=l="\u23d0":"\\Downarrow"===e?o=l="\u2016":"\\updownarrow"===e?(o="\\uparrow",l="\u23d0",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="\u2016",h="\\Downarrow"):Br.has(e)?(l="\u2223",m="vert",c=333):qr.has(e)?(l="\u2225",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="\u23a1",l="\u23a2",h="\u23a3",u="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="\u23a4",l="\u23a5",h="\u23a6",u="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"\u230a"===e?(l=o="\u23a2",h="\u23a3",u="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"\u2308"===e?(o="\u23a1",l=h="\u23a2",u="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"\u230b"===e?(l=o="\u23a5",h="\u23a6",u="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"\u2309"===e?(o="\u23a4",l=h="\u23a5",u="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="\u239b",l="\u239c",h="\u239d",u="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="\u239e",l="\u239f",h="\u23a0",u="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",h="\u23a9",l="\u23aa",u="Size4-Regular");var p=wr(o,u,n),d=p.height+p.depth,g=wr(l,u,n),f=g.height+g.depth,v=wr(h,u,n),b=v.height+v.depth,y=0,x=1;if(null!==s){var w=wr(s,u,n);y=w.height+w.depth,x=2}var k=d+b+y,z=k+Math.max(0,Math.ceil((t-k)/(x*f)))*x*f,S=a.fontMetrics().axisHeight;r&&(S*=a.sizeMultiplier);var A=z/2-S,T=[];if(m.length>0){var B=z-d-b,q=Math.round(1e3*z),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*B)),I=new ae(m,C),H=(c/1e3).toFixed(3)+"em",R=(q/1e3).toFixed(3)+"em",E=new re([I],{width:H,height:R,viewBox:"0 0 "+c+" "+q}),O=Qe([],[E],a);O.height=q/1e3,O.style.width=H,O.style.height=R,T.push({type:"elem",elem:O})}else{if(T.push(Mr(h,u,n)),T.push(Tr),null===s){var N=z-d-b+.016;T.push(Ar(l,N,a))}else{var D=(z-d-b-y)/2+.016;T.push(Ar(l,D,a)),T.push(Tr),T.push(Mr(s,u,n)),T.push(Tr),T.push(Ar(l,D,a))}T.push(Tr),T.push(Mr(o,u,n))}var P=a.havingBaseStyle(M.TEXT),L=at({positionType:"bottom",positionData:A,children:T});return kr(Je(["delimsizing","mult"],[L],P),M.TEXT,a,i)},Ir=.08,Hr=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,q);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,q);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,q);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,q);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,q);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,q,r)}return a}(e,a,r),o=new ae(e,i),s=new re([o],{width:"400em",height:Y(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Qe(["hide-tail"],[s],n)},Rr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),Er=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"]),Or=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Nr=[0,1.2,1.8,2.4,3],Dr=function(e,t,r,a,n){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),Rr.has(e)||Or.has(e))return Sr(e,t,!1,r,a,n);if(Er.has(e))return Cr(e,Nr[t],!1,r,a,n);throw new i("Illegal delimiter: '"+e+"'")},Pr=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Lr=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"stack"}],Vr=[{type:"small",style:M.SCRIPTSCRIPT},{type:"small",style:M.SCRIPT},{type:"small",style:M.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Fr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Gr=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);nt)return r[n]}return r[r.length-1]},Ur=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=Or.has(e)?Pr:Rr.has(e)?Vr:Lr;var s=Gr(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Xe(e,"Main-Regular",n,a),s=kr(o,t,a,i);return r&&zr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?Sr(e,s.size,r,a,n,i):Cr(e,t,r,a,n,i)},Wr=function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Ur(e,h,!0,a,n,i)},Yr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Xr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function _r(e,t){var r=ar(e);if(r&&Xr.has(r.text))return r;throw new i(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function jr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}vt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=_r(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Yr[e.funcName].size,mclass:Yr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?Je([e.mclass]):Dr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Vt(e.delim,e.mode));var r=new Ot("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=Y(Nr[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),vt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new i("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:_r(t[0],e).text,color:r}}}),vt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=_r(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=tr(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{jr(e);for(var r,a,n=Mt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l{jr(e);var r=Wt(e.body,t);if("."!==e.left){var a=new Ot("mo",[Vt(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new Ot("mo",[Vt(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Ft(r)}}),vt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=_r(t[0],e);if(!e.parser.leftrightDepth)throw new i("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=Ct(t,[]);else{r=Dr(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Vt("|","text"):Vt(e.delim,e.mode),a=new Ot("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var $r=(e,t)=>{var r,a,n,i=rt(It(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=p(e.body);if("sout"===o)(r=Je(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=W({number:.6,unit:"pt"},t),c=W({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var u=i.height+i.depth+m+c;i.style.paddingLeft=Y(u/2+m);var d=Math.floor(1e3*u*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new re([new ae("phase",g)],{width:"400em",height:Y(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=Qe(["hide-tail"],[f],t)).style.height=Y(u),l=i.depth+m+c}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=Je(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new ne({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new re(l,{width:"100%",height:Y(o)});i=Qe([],[h],n)}return i.height=o,i.style.height=Y(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=Y(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=Y(y),r.style.borderRightWidth=Y(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=at({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]});else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=at({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]})}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?Je(["mord","cancel-lap"],[n],t):Je(["mord"],[n],t)},Zr=(e,t)=>{var r=0,a=new Ot(e.label.includes("colorbox")?"mpadded":"menclose",[Xt(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(e.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};vt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=tr(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:$r,mathmlBuilder:Zr}),vt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=tr(t[0],"color-token").color,o=tr(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:$r,mathmlBuilder:Zr}),vt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),vt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:$r,mathmlBuilder:Zr}),vt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Kr={};function Jr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{if(!e.parser.settings.displayMode)throw new i("{"+e.envName+"} can be used only in display mode.")},aa=new Set(["gather","gather*"]);function na(e){if(!e.includes("ed"))return!e.includes("*")}function ia(e,t,r){var{hskipBeforeAndAfter:a,addJot:o,cols:s,arraystretch:l,colSeparationType:h,autoTag:m,singleRow:c,emptySingleRow:u,maxNumCols:p,leqno:d}=t;if(e.gullet.beginGroup(),c||e.gullet.macros.set("\\cr","\\\\\\relax"),!l){var g=e.gullet.expandMacroAsText("\\arraystretch");if(null==g)l=1;else if(!(l=parseFloat(g))||l<0)throw new i("Invalid \\arraystretch: "+g)}e.gullet.beginGroup();var f=[],v=[f],b=[],y=[],x=null!=m?[]:void 0;function w(){m&&e.gullet.macros.set("\\@eqnsw","1",!0)}function k(){x&&(e.gullet.macros.get("\\df@tag")?(x.push(e.subparse([new n("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):x.push(Boolean(m)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(w(),y.push(ta(e));;){var z=e.parseExpression(!1,c?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup(),z={type:"ordgroup",mode:e.mode,body:z},r&&(z={type:"styling",mode:e.mode,style:r,body:[z]}),f.push(z);var S=e.fetch().text;if("&"===S){if(p&&f.length===p){if(c||h)throw new i("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===S){k(),1===f.length&&"styling"===z.type&&0===z.body[0].body.length&&(v.length>1||!u)&&v.pop(),y.length0&&(b+=.25),h.push({pos:b,isDashed:e[t]})}for(y(o[0]),r=0;r0&&(k<(T+=v)&&(k=T),T=0),e.addJot&&(k+=d),z.height=w,z.depth=k,b+=w,z.pos=b,b+=k+T,l[r]=z,y(o[r+1])}var B,q,C=b/2+t.fontMetrics().axisHeight,I=e.cols||[],H=[],R=[];if(e.tags&&e.tags.some(e=>e))for(r=0;r=s)){var U,X=void 0;if(a>0||e.hskipBeforeAndAfter)0!==(X=null!=(U=P.pregap)?U:u)&&((B=Je(["arraycolsep"],[])).style.width=Y(X),H.push(B));var _,j=[];for(r=0;r0){for(var J=et("hline",t,m),Q=et("hdashline",t,m),ee=[{type:"elem",elem:l,shift:0}];h.length>0;){var te=h.pop(),re=te.pos-C;te.isDashed?ee.push({type:"elem",elem:Q,shift:re}):ee.push({type:"elem",elem:J,shift:re})}l=at({positionType:"individualShift",children:ee})}if(0===R.length)return Je(["mord"],[l],t);var ae=at({positionType:"individualShift",children:R});return ae=Je(["tag"],[ae],t),tt([l,ae])},la={c:"center ",l:"left ",r:"right "},ha=function(e,t){for(var r=[],a=new Ot("mtd",[],["mtr-glue"]),n=new Ot("mtd",[],["mml-eqn-num"]),i=0;i0){var p=e.cols,d="",g=!1,f=0,v=p.length;"separator"===p[0].type&&(c+="top ",f=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b0?"left ":"",c+=z[z.length-1].length>0?"right ":"";for(var S=1;S0&&u&&(g=1),a[p]={type:"align",align:d,pregap:g,postgap:0}}return s.colSeparationType=u?"align":"alignat",s};Jr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(ar(t[0])?[t[0]]:tr(t[0],"ordgroup").body).map(function(e){var t=rr(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new i("Unknown column alignment: "+t,e)}),a={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return ia(e.parser,a,oa(e.envName))},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var n=e.parser;if(n.consumeSpaces(),"["===n.fetch().text){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,!"lcr".includes(r))throw new i("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:r}]}}var o=ia(e.parser,a,oa(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=ia(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(ar(t[0])?[t[0]]:tr(t[0],"ordgroup").body).map(function(e){var t=rr(e).text;if("lc".includes(t))return{type:"align",align:t};throw new i("Unknown column alignment: "+t,e)});if(r.length>1)throw new i("{subarray} can contain only one column");var a={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5};if((a=ia(e.parser,a,"script")).body.length>0&&a.body[0].length>1)throw new i("{subarray} can contain only one column");return a},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=ia(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},oa(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ma,htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){aa.has(e.envName)&&ra(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:na(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ia(e.parser,t,"display")},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ma,htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){ra(e);var t={autoTag:na(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ia(e.parser,t,"display")},htmlBuilder:sa,mathmlBuilder:ha}),Jr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(ra(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new i("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var a=[],n=[a],o=0;oAV".includes(m))throw new i('Expected one of "<>AV=|." after @',s[h]);for(var u=0;u<2;u++){for(var p=!0,d=h+1;d{var r=e.font,a=t.withFont(r);return It(e.body,a)},pa=(e,t)=>{var r=e.font,a=t.withFont(r);return Xt(e.body,a)},da={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};vt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=yt(t[0]),i=a;return i in da&&(i=da[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:ua,mathmlBuilder:pa}),vt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:mr(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:p(a)}}}),vt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:ua,mathmlBuilder:pa});var ga=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;vt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h="\\cfrac"===n,m=null;return h||n.startsWith("\\d")?m="display":n.startsWith("\\t")&&(m="text"),ga({type:"genfrac",mode:a.mode,numer:i,denom:o,continued:h,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},m)},htmlBuilder:(e,t)=>{var r,a=t.style,n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=It(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m){var r=new Ot("mfrac",[Xt(e.numer,t),Xt(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=W(e.barSize,t);r.setAttribute("linethickness",Y(a))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var n=[];if(null!=e.leftDelim){var i=new Ot("mo",[new Nt(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),n.push(i)}if(n.push(r),null!=e.rightDelim){var o=new Ot("mo",[new Nt(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),n.push(o)}return Ft(n)}return r}}),vt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var fa=["display","text","script","scriptscript"],va=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};vt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=yt(t[0]),s="atom"===o.type&&"open"===o.family?va(o.text):null,l=yt(t[1]),h="atom"===l.type&&"close"===l.family?va(l.text):null,m=tr(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=tr(p.body[0],"textord");u=fa[Number(d.text)]}}else p=tr(p,"textord"),u=fa[Number(p.text)];return ga({type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h},u)}}),vt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:tr(t[0],"size").value,token:n}}}),vt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=tr(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var ba=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?It(e.sup,t.havingStyle(n.sup()),t):It(e.sub,t.havingStyle(n.sub()),t),a=tr(e.base,"horizBrace")):a=tr(e,"horizBrace");var i,o=It(a.base,t.havingBaseStyle(M.DISPLAY)),s=er(a,t);if(a.isOver?(i=at({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[1].classes.push("svg-align"):(i=at({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[0].classes.push("svg-align"),r){var l=Je(["mord",a.isOver?"mover":"munder"],[i],t);i=a.isOver?at({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):at({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return Je(["mord",a.isOver?"mover":"munder"],[i],t)};vt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:/^\\over/.test(a),base:t[0]}},htmlBuilder:ba,mathmlBuilder:(e,t)=>{var r=Kt(e.label);return new Ot(e.isOver?"mover":"munder",[Xt(e.base,t),r])}}),vt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=tr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:xt(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=Mt(e.body,t,!1);return function(e,t,r,a){var n=new J(e,t,r,a);return Ke(n),n}(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Yt(e.body,t);return r instanceof Ot||(r=new Ot("mrow",[r])),r.setAttribute("href",e.href),r}}),vt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=tr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;inew Ot("mrow",Wt(e.body,t))}),vt({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:a,funcName:n,token:o}=e,s=tr(t[0],"raw").string,l=t[1];a.settings.strict&&a.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(n){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c{var r=Mt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=Je(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Yt(e.body,t)}),vt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:xt(t[0]),mathml:xt(t[1])}},htmlBuilder:(e,t)=>{var r=Mt(e.html,t,!1);return tt(r)},mathmlBuilder:(e,t)=>Yt(e.mathml,t)});var ya=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new i("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!U(r))throw new i("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};vt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:a}=e,n={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=tr(r[0],"raw").string.split(","),m=0;m{var r=W(e.height,t),a=0;e.totalheight.number>0&&(a=W(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=W(e.width,t));var i={height:Y(r+a)};n>0&&(i.width=Y(n)),a>0&&(i.verticalAlign=Y(-a));var o=new Q(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new Ot("mglyph",[]);r.setAttribute("alt",e.alt);var a=W(e.height,t),n=0;if(e.totalheight.number>0&&(n=W(e.totalheight,t)-a,r.setAttribute("valign",Y(-n))),r.setAttribute("height",Y(a+n)),e.width.number>0){var i=W(e.width,t);r.setAttribute("width",Y(i))}return r.setAttribute("src",e.src),r}}),vt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=tr(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>nt(e.dimension,t),mathmlBuilder(e,t){var r=W(e.dimension,t);return new Dt(r)}}),vt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=Je([],[It(e.body,t)]),r=Je(["inner"],[r],t)):r=Je(["inner"],[It(e.body,t)]);var a=Je(["fix"],[]),n=Je([e.alignment],[r,a],t),i=Je(["strut"]);return i.style.height=Y(n.height+n.depth),n.depth&&(i.style.verticalAlign=Y(-n.depth)),n.children.unshift(i),n=Je(["thinbox"],[n],t),Je(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new Ot("mpadded",[Xt(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),vt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),vt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new i("Mismatched "+e.funcName)}});var xa=(e,t)=>{switch(t.style.size){case M.DISPLAY.size:return e.display;case M.TEXT.size:return e.text;case M.SCRIPT.size:return e.script;case M.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};vt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:xt(t[0]),text:xt(t[1]),script:xt(t[2]),scriptscript:xt(t[3])}},htmlBuilder:(e,t)=>{var r=xa(e,t),a=Mt(r,t,!1);return tt(a)},mathmlBuilder:(e,t)=>{var r=xa(e,t);return Yt(r,t)}});var wa=(e,t,r,a,n,i,o)=>{e=Je([],[e]);var s,l,h,m=r&&p(r);if(t){var c=It(t,a.havingStyle(n.sup()),a);l={elem:c,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-c.depth)}}if(r){var u=It(r,a.havingStyle(n.sub()),a);s={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-u.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=at({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Y(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Y(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(s){var g=e.height-o;h=at({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:Y(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var f=e.depth+o;h=at({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:Y(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}var v=[h];if(s&&0!==i&&!m){var b=Je(["mspace"],[],a);b.style.marginRight=Y(i),v.unshift(b)}return Je(["mop","op-limits"],v,a)},ka=new Set(["\\smallint"]),za=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=tr(e.base,"op"),i=!0):n=tr(e,"op");var o,s=t.style,l=!1;if(s.size===M.DISPLAY.size&&n.symbol&&!ka.has(n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=Xe(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),m.length>0){var c=o.italic,u=lt(m+"Size"+(l?"2":"1"),t);o=at({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]}),n.name="\\"+m,o.classes.unshift("mop"),o.italic=c}}else if(n.body){var p=Mt(n.body,t,!0);1===p.length&&p[0]instanceof te?(o=p[0]).classes[0]="mop":o=Je(["mop"],p,t)}else{for(var d=[],g=1;g{var r;if(e.symbol)r=new Ot("mo",[Vt(e.name,e.mode)]),ka.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Ot("mo",Wt(e.body,t));else{r=new Ot("mi",[new Nt(e.name.slice(1))]);var a=new Ot("mo",[Vt("\u2061","text")]);r=e.parentIsSupSub?new Ot("mrow",[r,a]):Et([r,a])}return r},Ma={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};vt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=Ma[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:za,mathmlBuilder:Sa}),vt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xt(a)}},htmlBuilder:za,mathmlBuilder:Sa});var Aa={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};vt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:za,mathmlBuilder:Sa}),vt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:za,mathmlBuilder:Sa}),vt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=Aa[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:za,mathmlBuilder:Sa});var Ta=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=tr(e.base,"operatorname"),o=!0):n=tr(e,"operatorname"),n.body.length>0){for(var s=n.body.map(e=>{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),l=Mt(s,t.withFont("mathrm"),!0),h=0;h{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:xt(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ta,mathmlBuilder:(e,t)=>{for(var r=Wt(e.body,t.withFont("mathrm")),a=!0,n=0;ne.toText()).join("");r=[new Nt(s)]}var l=new Ot("mi",r);l.setAttribute("mathvariant","normal");var h=new Ot("mo",[Vt("\u2061","text")]);return e.parentIsSupSub?new Ot("mrow",[l,h]):Et([l,h])}}),ea("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),bt({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?tt(Mt(e.body,t,!1)):Je(["mord"],Mt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Yt(e.body,t,!0)}),vt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=It(e.body,t.havingCrampedStyle()),a=et("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=at({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]});return Je(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new Ot("mo",[new Nt("\u203e")]);r.setAttribute("stretchy","true");var a=new Ot("mover",[Xt(e.body,t),r]);return a.setAttribute("accent","true"),a}}),vt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:xt(a)}},htmlBuilder:(e,t)=>{var r=Mt(e.body,t.withPhantom(),!1);return tt(r)},mathmlBuilder:(e,t)=>{var r=Wt(e.body,t);return new Ot("mphantom",r)}}),vt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"hphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Je([],[It(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var a=0;a{var r=Wt(xt(e.body),t),a=new Ot("mphantom",r),n=new Ot("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}}),vt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=Je(["inner"],[It(e.body,t.withPhantom())]),a=Je(["fix"],[]);return Je(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Wt(xt(e.body),t),a=new Ot("mphantom",r),n=new Ot("mpadded",[a]);return n.setAttribute("width","0px"),n}}),vt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=tr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=It(e.body,t),a=W(e.dy,t);return at({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Ot("mpadded",[Xt(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),vt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),vt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=tr(t[0],"size"),o=tr(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&tr(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=Je(["mord","rule"],[],t),a=W(e.width,t),n=W(e.height,t),i=e.shift?W(e.shift,t):0;return r.style.borderRightWidth=Y(a),r.style.borderTopWidth=Y(n),r.style.bottom=Y(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=W(e.width,t),a=W(e.height,t),n=e.shift?W(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new Ot("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",Y(r)),o.setAttribute("height",Y(a));var s=new Ot("mpadded",[o]);return n>=0?s.setAttribute("height",Y(n)):(s.setAttribute("height",Y(n)),s.setAttribute("depth",Y(-n))),s.setAttribute("voffset",Y(n)),s}});var qa=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];vt({type:"sizing",names:qa,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:qa.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return Ba(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Wt(e.body,r),n=new Ot("mstyle",a);return n.setAttribute("mathsize",Y(r.sizeMultiplier)),n}}),vt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&tr(r[0],"ordgroup");if(o)for(var s="",l=0;l{var r=Je([],[It(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var a=0;a{var r=new Ot("mpadded",[Xt(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),vt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=It(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=rt(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.idr.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=Y(h);var u=at({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]});if(e.index){var p=t.havingStyle(M.SCRIPTSCRIPT),d=It(e.index,p,t),g=.6*(u.height-u.depth),f=at({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]}),v=Je(["root"],[f]);return Je(["mord","sqrt"],[v,u],t)}return Je(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new Ot("mroot",[Xt(r,t),Xt(a,t)]):new Ot("msqrt",[Xt(r,t)])}});var Ca={display:M.DISPLAY,text:M.TEXT,script:M.SCRIPT,scriptscript:M.SCRIPTSCRIPT};vt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Ca[e.style],a=t.havingStyle(r).withFont("");return Ba(e.body,a,t)},mathmlBuilder(e,t){var r=Ca[e.style],a=t.havingStyle(r),n=Wt(e.body,a),i=new Ot("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});bt({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===M.DISPLAY.size||r.alwaysHandleSupSub)?za:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===M.DISPLAY.size||r.limits)?Ta:null:"accent"===r.type?p(r.base)?nr:null:"horizBrace"===r.type&&!e.sub===r.isOver?ba:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=It(o,t),m=t.fontMetrics(),c=0,u=0,d=o&&p(o);if(s){var g=t.havingStyle(t.style.sup());a=It(s,g,t),d||(c=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=It(l,f,t),d||(u=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===M.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=Y(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof te||w)&&(x=Y(-h.italic))}if(a&&n){c=Math.max(c,i,a.depth+.25*m.xHeight),u=Math.max(u,m.sub2);var k=4*m.defaultRuleThickness;if(c-a.depth-(n.height-u)0&&(c+=z,u-=z)}v=at({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-c,marginRight:y}]})}else if(n){u=Math.max(u,m.sub1,n.height-.8*m.xHeight),v=at({positionType:"shift",positionData:u,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]})}else{if(!a)throw new Error("supsub must have either sup or sub.");c=Math.max(c,i,a.depth+.25*m.xHeight),v=at({positionType:"shift",positionData:-c,children:[{type:"elem",elem:a,marginRight:y}]})}var S=qt(h,"right")||"mord";return Je([S],[h,Je(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Xt(e.base,t)];if(e.sub&&i.push(Xt(e.sub,t)),e.sup&&i.push(Xt(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===M.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===M.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===M.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===M.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===M.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===M.DISPLAY)?"mover":"msup"}return new Ot(n,i)}}),bt({type:"atom",htmlBuilder:(e,t)=>_e(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new Ot("mo",[Vt(e.text,e.mode)]);if("bin"===e.family){var a=Gt(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Ia={mi:"italic",mn:"normal",mtext:"normal"};bt({type:"mathord",htmlBuilder:(e,t)=>je(e,t,"mathord"),mathmlBuilder(e,t){var r=new Ot("mi",[Vt(e.text,e.mode,t)]),a=Gt(e,t)||"italic";return a!==Ia[r.type]&&r.setAttribute("mathvariant",a),r}}),bt({type:"textord",htmlBuilder:(e,t)=>je(e,t,"textord"),mathmlBuilder(e,t){var r,a=Vt(e.text,e.mode,t),n=Gt(e,t)||"normal";return r="text"===e.mode?new Ot("mtext",[a]):/[0-9]/.test(e.text)?new Ot("mn",[a]):"\\prime"===e.text?new Ot("mo",[a]):new Ot("mi",[a]),n!==Ia[r.type]&&r.setAttribute("mathvariant",n),r}});var Ha={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ra={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};bt({type:"spacing",htmlBuilder(e,t){if(Ra.hasOwnProperty(e.text)){var r=Ra[e.text].className||"";if("text"===e.mode){var a=je(e,t,"textord");return a.classes.push(r),a}return Je(["mspace",r],[_e(e.text,e.mode,t)],t)}if(Ha.hasOwnProperty(e.text))return Je(["mspace",Ha[e.text]],[],t);throw new i('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Ra.hasOwnProperty(e.text)){if(Ha.hasOwnProperty(e.text))return new Ot("mspace");throw new i('Unknown type of space "'+e.text+'"')}return new Ot("mtext",[new Nt("\xa0")])}});var Ea=()=>{var e=new Ot("mtd",[]);return e.setAttribute("width","50%"),e};bt({type:"tag",mathmlBuilder(e,t){var r=new Ot("mtable",[new Ot("mtr",[Ea(),new Ot("mtd",[Yt(e.body,t)]),Ea(),new Ot("mtd",[Yt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Oa={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Na={"\\textbf":"textbf","\\textmd":"textmd"},Da={"\\textit":"textit","\\textup":"textup"},Pa=(e,t)=>{var r=e.font;return r?Oa[r]?t.withTextFontFamily(Oa[r]):Na[r]?t.withTextFontWeight(Na[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Da[r]):t};vt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:xt(n),font:a}},htmlBuilder(e,t){var r=Pa(e,t),a=Mt(e.body,r,!0);return Je(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Pa(e,t);return Yt(e.body,r)}}),vt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=It(e.body,t),a=et("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=at({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]});return Je(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new Ot("mo",[new Nt("\u203e")]);r.setAttribute("stretchy","true");var a=new Ot("munder",[Xt(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),vt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=It(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return at({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder:(e,t)=>new Ot("mpadded",[Xt(e.body,t)],["vcenter"])}),vt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new i("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=La(e),a=[],n=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"\u2423":"\xa0"),Va=dt,Fa="[ \r\n\t]",Ga="(\\\\[a-zA-Z@]+)"+Fa+"*",Ua="[\u0300-\u036f]",Wa=new RegExp(Ua+"+$"),Ya="("+Fa+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Ua+"*|[\ud800-\udbff][\udc00-\udfff]"+Ua+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Ga+"|\\\\[^\ud800-\udfff])";class Xa{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Ya,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new n("EOF",new a(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new i("Unexpected character: '"+e[t]+"'",new n(e[t],new a(this,t,t+1)));var o=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[o]){var s=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===s?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new n(o,new a(this,t,this.tokenRegex.lastIndex))}}class _a{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new i("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var ja=Qr;ea("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),ea("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),ea("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),ea("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),ea("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),ea("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ea("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var $a={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};ea("\\char",function(e){var t,r=e.popToken(),a="";if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])a=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new i("\\char` missing argument");a=r.text.charCodeAt(0)}else t=10;if(t){if(null==(a=$a[r.text])||a>=t)throw new i("Invalid base-"+t+" digit "+r.text);for(var n;null!=(n=$a[e.future().text])&&n{var n=e.consumeArg().tokens;if(1!==n.length)throw new i("\\newcommand's first argument must be a macro name");var o=n[0].text,s=e.isDefined(o);if(s&&!t)throw new i("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new i("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new i("Invalid number of arguments: "+h);l=parseInt(h),n=e.consumeArg().tokens}return s&&a||e.macros.set(o,{tokens:n,numArgs:l}),""};ea("\\newcommand",e=>Za(e,!1,!0,!1)),ea("\\renewcommand",e=>Za(e,!0,!1,!1)),ea("\\providecommand",e=>Za(e,!0,!0,!0)),ea("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),ea("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),ea("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Va[r],le.math[r],le.text[r]),""}),ea("\\bgroup","{"),ea("\\egroup","}"),ea("~","\\nobreakspace"),ea("\\lq","`"),ea("\\rq","'"),ea("\\aa","\\r a"),ea("\\AA","\\r A"),ea("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),ea("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),ea("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),ea("\u212c","\\mathscr{B}"),ea("\u2130","\\mathscr{E}"),ea("\u2131","\\mathscr{F}"),ea("\u210b","\\mathscr{H}"),ea("\u2110","\\mathscr{I}"),ea("\u2112","\\mathscr{L}"),ea("\u2133","\\mathscr{M}"),ea("\u211b","\\mathscr{R}"),ea("\u212d","\\mathfrak{C}"),ea("\u210c","\\mathfrak{H}"),ea("\u2128","\\mathfrak{Z}"),ea("\\Bbbk","\\Bbb{k}"),ea("\xb7","\\cdotp"),ea("\\llap","\\mathllap{\\textrm{#1}}"),ea("\\rlap","\\mathrlap{\\textrm{#1}}"),ea("\\clap","\\mathclap{\\textrm{#1}}"),ea("\\mathstrut","\\vphantom{(}"),ea("\\underbar","\\underline{\\text{#1}}"),ea("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),ea("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),ea("\\ne","\\neq"),ea("\u2260","\\neq"),ea("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),ea("\u2209","\\notin"),ea("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),ea("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),ea("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),ea("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),ea("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),ea("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),ea("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),ea("\u27c2","\\perp"),ea("\u203c","\\mathclose{!\\mkern-0.8mu!}"),ea("\u220c","\\notni"),ea("\u231c","\\ulcorner"),ea("\u231d","\\urcorner"),ea("\u231e","\\llcorner"),ea("\u231f","\\lrcorner"),ea("\xa9","\\copyright"),ea("\xae","\\textregistered"),ea("\ufe0f","\\textregistered"),ea("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),ea("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),ea("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),ea("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),ea("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),ea("\u22ee","\\vdots"),ea("\\varGamma","\\mathit{\\Gamma}"),ea("\\varDelta","\\mathit{\\Delta}"),ea("\\varTheta","\\mathit{\\Theta}"),ea("\\varLambda","\\mathit{\\Lambda}"),ea("\\varXi","\\mathit{\\Xi}"),ea("\\varPi","\\mathit{\\Pi}"),ea("\\varSigma","\\mathit{\\Sigma}"),ea("\\varUpsilon","\\mathit{\\Upsilon}"),ea("\\varPhi","\\mathit{\\Phi}"),ea("\\varPsi","\\mathit{\\Psi}"),ea("\\varOmega","\\mathit{\\Omega}"),ea("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),ea("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),ea("\\boxed","\\fbox{$\\displaystyle{#1}$}"),ea("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),ea("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),ea("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),ea("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),ea("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Ka={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Ja=new Set(["bin","rel"]);ea("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ka?t=Ka[r]:("\\not"===r.slice(0,4)||r in le.math&&Ja.has(le.math[r].group))&&(t="\\dotsb"),t});var Qa={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};ea("\\dotso",function(e){return e.future().text in Qa?"\\ldots\\,":"\\ldots"}),ea("\\dotsc",function(e){var t=e.future().text;return t in Qa&&","!==t?"\\ldots\\,":"\\ldots"}),ea("\\cdots",function(e){return e.future().text in Qa?"\\@cdots\\,":"\\@cdots"}),ea("\\dotsb","\\cdots"),ea("\\dotsm","\\cdots"),ea("\\dotsi","\\!\\cdots"),ea("\\dotsx","\\ldots\\,"),ea("\\DOTSI","\\relax"),ea("\\DOTSB","\\relax"),ea("\\DOTSX","\\relax"),ea("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ea("\\,","\\tmspace+{3mu}{.1667em}"),ea("\\thinspace","\\,"),ea("\\>","\\mskip{4mu}"),ea("\\:","\\tmspace+{4mu}{.2222em}"),ea("\\medspace","\\:"),ea("\\;","\\tmspace+{5mu}{.2777em}"),ea("\\thickspace","\\;"),ea("\\!","\\tmspace-{3mu}{.1667em}"),ea("\\negthinspace","\\!"),ea("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ea("\\negthickspace","\\tmspace-{5mu}{.277em}"),ea("\\enspace","\\kern.5em "),ea("\\enskip","\\hskip.5em\\relax"),ea("\\quad","\\hskip1em\\relax"),ea("\\qquad","\\hskip2em\\relax"),ea("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ea("\\tag@paren","\\tag@literal{({#1})}"),ea("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new i("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ea("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ea("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ea("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ea("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ea("\\newline","\\\\\\relax"),ea("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var en=Y(H["Main-Regular"]["T".charCodeAt(0)][1]-.7*H["Main-Regular"]["A".charCodeAt(0)][1]);ea("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+en+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),ea("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+en+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),ea("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ea("\\@hspace","\\hskip #1\\relax"),ea("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ea("\\ordinarycolon",":"),ea("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ea("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ea("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ea("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ea("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ea("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ea("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ea("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ea("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ea("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ea("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ea("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ea("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ea("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ea("\u2237","\\dblcolon"),ea("\u2239","\\eqcolon"),ea("\u2254","\\coloneqq"),ea("\u2255","\\eqqcolon"),ea("\u2a74","\\Coloneqq"),ea("\\ratio","\\vcentcolon"),ea("\\coloncolon","\\dblcolon"),ea("\\colonequals","\\coloneqq"),ea("\\coloncolonequals","\\Coloneqq"),ea("\\equalscolon","\\eqqcolon"),ea("\\equalscoloncolon","\\Eqqcolon"),ea("\\colonminus","\\coloneq"),ea("\\coloncolonminus","\\Coloneq"),ea("\\minuscolon","\\eqcolon"),ea("\\minuscoloncolon","\\Eqcolon"),ea("\\coloncolonapprox","\\Colonapprox"),ea("\\coloncolonsim","\\Colonsim"),ea("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ea("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ea("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ea("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ea("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),ea("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ea("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ea("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),ea("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),ea("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),ea("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),ea("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),ea("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),ea("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),ea("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),ea("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),ea("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),ea("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),ea("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),ea("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),ea("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),ea("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),ea("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),ea("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),ea("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),ea("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),ea("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),ea("\\imath","\\html@mathml{\\@imath}{\u0131}"),ea("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),ea("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),ea("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),ea("\u27e6","\\llbracket"),ea("\u27e7","\\rrbracket"),ea("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),ea("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),ea("\u2983","\\lBrace"),ea("\u2984","\\rBrace"),ea("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),ea("\u29b5","\\minuso"),ea("\\darr","\\downarrow"),ea("\\dArr","\\Downarrow"),ea("\\Darr","\\Downarrow"),ea("\\lang","\\langle"),ea("\\rang","\\rangle"),ea("\\uarr","\\uparrow"),ea("\\uArr","\\Uparrow"),ea("\\Uarr","\\Uparrow"),ea("\\N","\\mathbb{N}"),ea("\\R","\\mathbb{R}"),ea("\\Z","\\mathbb{Z}"),ea("\\alef","\\aleph"),ea("\\alefsym","\\aleph"),ea("\\Alpha","\\mathrm{A}"),ea("\\Beta","\\mathrm{B}"),ea("\\bull","\\bullet"),ea("\\Chi","\\mathrm{X}"),ea("\\clubs","\\clubsuit"),ea("\\cnums","\\mathbb{C}"),ea("\\Complex","\\mathbb{C}"),ea("\\Dagger","\\ddagger"),ea("\\diamonds","\\diamondsuit"),ea("\\empty","\\emptyset"),ea("\\Epsilon","\\mathrm{E}"),ea("\\Eta","\\mathrm{H}"),ea("\\exist","\\exists"),ea("\\harr","\\leftrightarrow"),ea("\\hArr","\\Leftrightarrow"),ea("\\Harr","\\Leftrightarrow"),ea("\\hearts","\\heartsuit"),ea("\\image","\\Im"),ea("\\infin","\\infty"),ea("\\Iota","\\mathrm{I}"),ea("\\isin","\\in"),ea("\\Kappa","\\mathrm{K}"),ea("\\larr","\\leftarrow"),ea("\\lArr","\\Leftarrow"),ea("\\Larr","\\Leftarrow"),ea("\\lrarr","\\leftrightarrow"),ea("\\lrArr","\\Leftrightarrow"),ea("\\Lrarr","\\Leftrightarrow"),ea("\\Mu","\\mathrm{M}"),ea("\\natnums","\\mathbb{N}"),ea("\\Nu","\\mathrm{N}"),ea("\\Omicron","\\mathrm{O}"),ea("\\plusmn","\\pm"),ea("\\rarr","\\rightarrow"),ea("\\rArr","\\Rightarrow"),ea("\\Rarr","\\Rightarrow"),ea("\\real","\\Re"),ea("\\reals","\\mathbb{R}"),ea("\\Reals","\\mathbb{R}"),ea("\\Rho","\\mathrm{P}"),ea("\\sdot","\\cdot"),ea("\\sect","\\S"),ea("\\spades","\\spadesuit"),ea("\\sub","\\subset"),ea("\\sube","\\subseteq"),ea("\\supe","\\supseteq"),ea("\\Tau","\\mathrm{T}"),ea("\\thetasym","\\vartheta"),ea("\\weierp","\\wp"),ea("\\Zeta","\\mathrm{Z}"),ea("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ea("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ea("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ea("\\bra","\\mathinner{\\langle{#1}|}"),ea("\\ket","\\mathinner{|{#1}\\rangle}"),ea("\\braket","\\mathinner{\\langle{#1}\\rangle}"),ea("\\Bra","\\left\\langle#1\\right|"),ea("\\Ket","\\left|#1\\right\\rangle");var tn=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};ea("\\bra@ket",tn(!1)),ea("\\bra@set",tn(!0)),ea("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),ea("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),ea("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),ea("\\angln","{\\angl n}"),ea("\\blue","\\textcolor{##6495ed}{#1}"),ea("\\orange","\\textcolor{##ffa500}{#1}"),ea("\\pink","\\textcolor{##ff00af}{#1}"),ea("\\red","\\textcolor{##df0030}{#1}"),ea("\\green","\\textcolor{##28ae7b}{#1}"),ea("\\gray","\\textcolor{gray}{#1}"),ea("\\purple","\\textcolor{##9d38bd}{#1}"),ea("\\blueA","\\textcolor{##ccfaff}{#1}"),ea("\\blueB","\\textcolor{##80f6ff}{#1}"),ea("\\blueC","\\textcolor{##63d9ea}{#1}"),ea("\\blueD","\\textcolor{##11accd}{#1}"),ea("\\blueE","\\textcolor{##0c7f99}{#1}"),ea("\\tealA","\\textcolor{##94fff5}{#1}"),ea("\\tealB","\\textcolor{##26edd5}{#1}"),ea("\\tealC","\\textcolor{##01d1c1}{#1}"),ea("\\tealD","\\textcolor{##01a995}{#1}"),ea("\\tealE","\\textcolor{##208170}{#1}"),ea("\\greenA","\\textcolor{##b6ffb0}{#1}"),ea("\\greenB","\\textcolor{##8af281}{#1}"),ea("\\greenC","\\textcolor{##74cf70}{#1}"),ea("\\greenD","\\textcolor{##1fab54}{#1}"),ea("\\greenE","\\textcolor{##0d923f}{#1}"),ea("\\goldA","\\textcolor{##ffd0a9}{#1}"),ea("\\goldB","\\textcolor{##ffbb71}{#1}"),ea("\\goldC","\\textcolor{##ff9c39}{#1}"),ea("\\goldD","\\textcolor{##e07d10}{#1}"),ea("\\goldE","\\textcolor{##a75a05}{#1}"),ea("\\redA","\\textcolor{##fca9a9}{#1}"),ea("\\redB","\\textcolor{##ff8482}{#1}"),ea("\\redC","\\textcolor{##f9685d}{#1}"),ea("\\redD","\\textcolor{##e84d39}{#1}"),ea("\\redE","\\textcolor{##bc2612}{#1}"),ea("\\maroonA","\\textcolor{##ffbde0}{#1}"),ea("\\maroonB","\\textcolor{##ff92c6}{#1}"),ea("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ea("\\maroonD","\\textcolor{##ca337c}{#1}"),ea("\\maroonE","\\textcolor{##9e034e}{#1}"),ea("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ea("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ea("\\purpleC","\\textcolor{##aa87ff}{#1}"),ea("\\purpleD","\\textcolor{##7854ab}{#1}"),ea("\\purpleE","\\textcolor{##543b78}{#1}"),ea("\\mintA","\\textcolor{##f5f9e8}{#1}"),ea("\\mintB","\\textcolor{##edf2df}{#1}"),ea("\\mintC","\\textcolor{##e0e5cc}{#1}"),ea("\\grayA","\\textcolor{##f6f7f7}{#1}"),ea("\\grayB","\\textcolor{##f0f1f2}{#1}"),ea("\\grayC","\\textcolor{##e3e5e6}{#1}"),ea("\\grayD","\\textcolor{##d6d8da}{#1}"),ea("\\grayE","\\textcolor{##babec2}{#1}"),ea("\\grayF","\\textcolor{##888d93}{#1}"),ea("\\grayG","\\textcolor{##626569}{#1}"),ea("\\grayH","\\textcolor{##3b3e40}{#1}"),ea("\\grayI","\\textcolor{##21242c}{#1}"),ea("\\kaBlue","\\textcolor{##314453}{#1}"),ea("\\kaGreen","\\textcolor{##71B307}{#1}");var rn={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class an{constructor(e,t,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _a(ja,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Xa(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,i;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:i,end:r}=this.consumeArg(["]"]))}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new n("EOF",r.loc)),this.pushTokens(i),new n("",a.range(t,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var a,n=this.future(),o=0,s=0;do{if(a=this.popToken(),t.push(a),"{"===a.text)++o;else if("}"===a.text){if(-1===--o)throw new i("Extra }",a)}else if("EOF"===a.text)throw new i("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",a);if(e&&r)if((0===o||1===o&&"{"===e[s])&&a.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===n.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:a}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new i("The length of delimiters doesn't match the number of args!");for(var r=t[0],a=0;athis.settings.maxExpand)throw new i("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,a=t.noexpand?null:this._getExpansion(r);if(null==a||e&&a.unexpandable){if(e&&null==a&&"\\"===r[0]&&!this.isDefined(r))throw new i("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=a.tokens,o=this.consumeArgs(a.numArgs,a.delimiters);if(a.numArgs)for(var s=(n=n.slice()).length-1;s>=0;--s){var l=n[s];if("#"===l.text){if(0===s)throw new i("Incomplete placeholder at end of macro body",l);if("#"===(l=n[--s]).text)n.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new i("Not a valid argument number",l);n.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new n(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(a.includes("#"))for(var i=a.replace(/##/g,"");i.includes("#"+(n+1));)++n;for(var o=new Xa(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Va.hasOwnProperty(e)||le.math.hasOwnProperty(e)||le.text.hasOwnProperty(e)||rn.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Va.hasOwnProperty(e)&&!Va[e].primitive}}var nn=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,on=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),sn={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},ln={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class hn{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new an(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new i("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new n("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(hn.endOfExpression.has(a.text))break;if(t&&a.text===t)break;if(e&&Va[a.text]&&Va[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,a=0;a=128))return null;this.settings.strict&&(B(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),o={type:"textord",mode:"text",loc:a.range(e),text:t}}if(this.consume(),s)for(var u=0;ua.b});var a=s(722);s(808)}}]); \ No newline at end of file diff --git a/assets/js/2237.02886161.js b/assets/js/2237.02886161.js deleted file mode 100644 index 5f9dd49..0000000 --- a/assets/js/2237.02886161.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2237],{3363(e,t,i){i.d(t,{A:()=>r});i(6540);var n=i(4164),o=i(1312),s=i(1107),a=i(4848);function r(e){var t=e.className;return(0,a.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237(e,t,i){i.r(t),i.d(t,{default:()=>h});i(6540);var n=i(1312),o=i(5500),s=i(9139),a=i(3363),r=i(4848);function h(){var e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/224113b7.83e258f6.js b/assets/js/224113b7.83e258f6.js new file mode 100644 index 0000000..ad53f6d --- /dev/null +++ b/assets/js/224113b7.83e258f6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2863],{3172:(e,s,i)=>{i.r(s),i.d(s,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"guides/permissions","title":"Permissions","description":"HappyView uses a granular permission system to control access to the admin API. Each user has a set of permissions that determine which endpoints they can access. Permissions can be assigned individually, via templates, or both.","source":"@site/docs/guides/permissions.md","sourceDirName":"guides","slug":"/guides/permissions","permalink":"/guides/permissions","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"API Keys","permalink":"/guides/api-keys"},"next":{"title":"Event Logs","permalink":"/guides/event-logs"}}');var n=i(199),d=i(2560);const l={},t="Permissions",c={},a=[{value:"Permission list",id:"permission-list",level:2},{value:"Lexicons",id:"lexicons",level:3},{value:"Records",id:"records",level:3},{value:"Script Variables",id:"script-variables",level:3},{value:"Users",id:"users",level:3},{value:"API Keys",id:"api-keys",level:3},{value:"Operations",id:"operations",level:3},{value:"Permission templates",id:"permission-templates",level:2},{value:"Viewer",id:"viewer",level:3},{value:"Operator",id:"operator",level:3},{value:"Manager",id:"manager",level:3},{value:"Full Access",id:"full-access",level:3},{value:"Super user",id:"super-user",level:2},{value:"Escalation guards",id:"escalation-guards",level:2},{value:"Self-modification guards",id:"self-modification-guards",level:2},{value:"API key permissions",id:"api-key-permissions",level:2},{value:"Managing permissions",id:"managing-permissions",level:2},{value:"Via the dashboard",id:"via-the-dashboard",level:3},{value:"Via the API",id:"via-the-api",level:3},{value:"Next steps",id:"next-steps",level:2}];function o(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"permissions",children:"Permissions"})}),"\n",(0,n.jsx)(s.p,{children:"HappyView uses a granular permission system to control access to the admin API. Each user has a set of permissions that determine which endpoints they can access. Permissions can be assigned individually, via templates, or both."}),"\n",(0,n.jsx)(s.h2,{id:"permission-list",children:"Permission list"}),"\n",(0,n.jsx)(s.p,{children:"HappyView defines 20 permissions organized by category:"}),"\n",(0,n.jsx)(s.h3,{id:"lexicons",children:"Lexicons"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"lexicons:create"})}),(0,n.jsx)(s.td,{children:"Upload and upsert lexicons (local and network)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"lexicons:read"})}),(0,n.jsx)(s.td,{children:"List and view lexicon details"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"lexicons:delete"})}),(0,n.jsx)(s.td,{children:"Delete lexicons"})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:"records",children:"Records"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"records:read"})}),(0,n.jsx)(s.td,{children:"List and view indexed records"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"records:delete"})}),(0,n.jsx)(s.td,{children:"Delete individual records"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"records:delete-collection"})}),(0,n.jsx)(s.td,{children:"Bulk-delete all records in a collection"})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:"script-variables",children:"Script Variables"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"script-variables:create"})}),(0,n.jsx)(s.td,{children:"Create and update script variables"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"script-variables:read"})}),(0,n.jsx)(s.td,{children:"List script variables (values are masked)"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"script-variables:delete"})}),(0,n.jsx)(s.td,{children:"Delete script variables"})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:"users",children:"Users"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"users:create"})}),(0,n.jsx)(s.td,{children:"Add new users"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"users:read"})}),(0,n.jsx)(s.td,{children:"List and view user details"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"users:update"})}),(0,n.jsx)(s.td,{children:"Modify user permissions"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"users:delete"})}),(0,n.jsx)(s.td,{children:"Remove users"})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:"api-keys",children:"API Keys"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"api-keys:create"})}),(0,n.jsx)(s.td,{children:"Create new API keys"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"api-keys:read"})}),(0,n.jsx)(s.td,{children:"List API keys"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"api-keys:delete"})}),(0,n.jsx)(s.td,{children:"Revoke API keys"})]})]})]}),"\n",(0,n.jsx)(s.h3,{id:"operations",children:"Operations"}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Permission"}),(0,n.jsx)(s.th,{children:"Description"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"backfill:create"})}),(0,n.jsx)(s.td,{children:"Start backfill jobs"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"backfill:read"})}),(0,n.jsx)(s.td,{children:"View backfill job status"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"stats:read"})}),(0,n.jsx)(s.td,{children:"View record statistics"})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:(0,n.jsx)(s.code,{children:"events:read"})}),(0,n.jsx)(s.td,{children:"Query the event log"})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"permission-templates",children:"Permission templates"}),"\n",(0,n.jsxs)(s.p,{children:["Templates are predefined sets of permissions that simplify user creation. Pass a ",(0,n.jsx)(s.code,{children:"template"})," value when creating a user via ",(0,n.jsx)(s.code,{children:"POST /admin/users"}),"."]}),"\n",(0,n.jsx)(s.h3,{id:"viewer",children:"Viewer"}),"\n",(0,n.jsx)(s.p,{children:"Read-only access. Can browse lexicons, records, stats, events, and user lists but cannot modify anything."}),"\n",(0,n.jsxs)(s.p,{children:["Includes: ",(0,n.jsx)(s.code,{children:"lexicons:read"}),", ",(0,n.jsx)(s.code,{children:"records:read"}),", ",(0,n.jsx)(s.code,{children:"script-variables:read"}),", ",(0,n.jsx)(s.code,{children:"users:read"}),", ",(0,n.jsx)(s.code,{children:"api-keys:read"}),", ",(0,n.jsx)(s.code,{children:"backfill:read"}),", ",(0,n.jsx)(s.code,{children:"stats:read"}),", ",(0,n.jsx)(s.code,{children:"events:read"})]}),"\n",(0,n.jsx)(s.h3,{id:"operator",children:"Operator"}),"\n",(0,n.jsx)(s.p,{children:"Everything in Viewer, plus the ability to run backfill jobs and manage API keys."}),"\n",(0,n.jsxs)(s.p,{children:["Adds: ",(0,n.jsx)(s.code,{children:"backfill:create"}),", ",(0,n.jsx)(s.code,{children:"api-keys:create"}),", ",(0,n.jsx)(s.code,{children:"api-keys:delete"})]}),"\n",(0,n.jsx)(s.h3,{id:"manager",children:"Manager"}),"\n",(0,n.jsx)(s.p,{children:"Everything in Operator, plus the ability to manage lexicons, records, and script variables."}),"\n",(0,n.jsxs)(s.p,{children:["Adds: ",(0,n.jsx)(s.code,{children:"lexicons:create"}),", ",(0,n.jsx)(s.code,{children:"lexicons:delete"}),", ",(0,n.jsx)(s.code,{children:"script-variables:create"}),", ",(0,n.jsx)(s.code,{children:"script-variables:delete"}),", ",(0,n.jsx)(s.code,{children:"records:delete"})]}),"\n",(0,n.jsx)(s.h3,{id:"full-access",children:"Full Access"}),"\n",(0,n.jsx)(s.p,{children:"All 20 permissions. Equivalent to granting every permission individually (but still not a super user)."}),"\n",(0,n.jsx)(s.h2,{id:"super-user",children:"Super user"}),"\n",(0,n.jsx)(s.p,{children:"The super user is a special user created automatically when the first person logs in to a fresh HappyView instance. The super user:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Has unrestricted access to all endpoints, regardless of which permissions are assigned"}),"\n",(0,n.jsxs)(s.li,{children:["Is the only user who can call ",(0,n.jsx)(s.code,{children:"POST /admin/users/transfer-super"})]}),"\n",(0,n.jsx)(s.li,{children:"Cannot be deleted"}),"\n",(0,n.jsx)(s.li,{children:"Cannot have their permissions modified by other users"}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"There is always exactly one super user. Super status can be transferred to another user via the dashboard or transfer endpoint in the Admin API."}),"\n",(0,n.jsx)(s.h2,{id:"escalation-guards",children:"Escalation guards"}),"\n",(0,n.jsx)(s.p,{children:"HappyView prevents privilege escalation:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["When creating a user or API key, you can only grant permissions that you yourself have. Attempting to grant a permission you lack returns ",(0,n.jsx)(s.code,{children:"403 Forbidden"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"When updating a user's permissions, the same rule applies \u2014 you cannot grant permissions beyond your own."}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"self-modification-guards",children:"Self-modification guards"}),"\n",(0,n.jsx)(s.p,{children:"Users cannot modify their own account in destructive ways:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"You cannot delete yourself"}),"\n",(0,n.jsx)(s.li,{children:"You cannot revoke your own permissions"}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"These guards prevent accidental lockout."}),"\n",(0,n.jsx)(s.h2,{id:"api-key-permissions",children:"API key permissions"}),"\n",(0,n.jsxs)(s.p,{children:["API keys have their own set of permissions, specified at creation time. The effective permissions of an API key are the ",(0,n.jsx)(s.strong,{children:"intersection"})," of:"]}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"The permissions assigned to the key"}),"\n",(0,n.jsx)(s.li,{children:"The permissions of the user who owns the key"}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"This means if a user's permissions are later reduced, any API keys they created are also effectively reduced \u2014 even though the key's own permission list doesn't change."}),"\n",(0,n.jsxs)(s.p,{children:["For example, if a user with ",(0,n.jsx)(s.code,{children:"lexicons:create"})," and ",(0,n.jsx)(s.code,{children:"lexicons:read"})," creates a key with both permissions, and the user later loses ",(0,n.jsx)(s.code,{children:"lexicons:create"}),", the key can only use ",(0,n.jsx)(s.code,{children:"lexicons:read"}),"."]}),"\n",(0,n.jsx)(s.h2,{id:"managing-permissions",children:"Managing permissions"}),"\n",(0,n.jsx)(s.h3,{id:"via-the-dashboard",children:"Via the dashboard"}),"\n",(0,n.jsxs)(s.p,{children:["Go to ",(0,n.jsx)(s.strong,{children:"Settings > Users"})," to view and manage user permissions. Click on a user to see their current permissions and modify them. You can also assign templates when creating new users."]}),"\n",(0,n.jsx)(s.h3,{id:"via-the-api",children:"Via the API"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"POST /admin/users"})," \u2014 create a user with a template or explicit permissions"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"PATCH /admin/users/{id}/permissions"})," \u2014 grant or revoke individual permissions"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.code,{children:"POST /admin/users/transfer-super"})," \u2014 transfer super user status (super user only)"]}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["See the ",(0,n.jsx)(s.a,{href:"/reference/admin/users",children:"Admin API \u2014 Users"})," for full details."]}),"\n",(0,n.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/reference/admin-api",children:"Admin API reference"})," \u2014 endpoint documentation with required permissions"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/guides/api-keys",children:"API Keys"})," \u2014 creating scoped API keys"]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"/guides/event-logs",children:"Event Logs"})," \u2014 permission-denied events are logged for auditing"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},2560:(e,s,i)=>{i.d(s,{R:()=>l,x:()=>t});var r=i(63);const n={},d=r.createContext(n);function l(e){const s=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:l(e.components),r.createElement(d.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/225.04246537.js b/assets/js/225.04246537.js deleted file mode 100644 index 22080ad..0000000 --- a/assets/js/225.04246537.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[225],{225(e,c,s){s.d(c,{createArchitectureServices:()=>p.S});var p=s(7713);s(808)}}]); \ No newline at end of file diff --git a/assets/js/2264.ab183745.js b/assets/js/2264.ab183745.js new file mode 100644 index 0000000..d7ace38 --- /dev/null +++ b/assets/js/2264.ab183745.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2264],{2528:(e,t,a)=>{function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(8894).K2)(l,"populateCommonDb")},3830:(e,t,a)=>{a.d(t,{P:()=>r});var l=a(5691),s=a(8894),r=(0,s.K2)((e,t,a,r)=>{e.attr("class",a);const{width:o,height:c,x:d,y:p}=n(e,t);(0,l.a$)(e,c,o,r);const h=i(d,p,o,c,t);e.attr("viewBox",h),s.Rm.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),n=(0,s.K2)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),i=(0,s.K2)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},2264:(e,t,a)=>{a.d(t,{diagram:()=>v});var l=a(6417),s=a(3830),r=a(4061),n=a(2528),i=a(2101),o=a(5691),c=a(8894),d=a(4419),p=a(1485),h=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");l&&l.forEach(e=>{(0,r.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function m(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,c.K2)(m,"buildHierarchy");var y=(0,c.K2)((e,t)=>{(0,n.S)(e,t);const a=[];for(const r of e.TreemapRows??[])"ClassDefStatement"===r.$type&&t.addClass(r.className??"",r.styleText??"");for(const r of e.TreemapRows??[]){const e=r.item;if(!e)continue;const l=r.indent?parseInt(r.indent):0,s=f(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n:void 0,o={level:l,name:s,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const l=m(a),s=(0,c.K2)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&s(l.children,a+1)},"addNodesRecursively");s(l,0)},"populate"),f=(0,c.K2)(e=>e.name?String(e.name):"","getItemName"),u={parser:{yy:void 0},parse:(0,c.K2)(async e=>{try{const t=d.qg,a=await t("treemap",e);c.Rm.debug("Treemap AST:",a);const l=u.parser?.yy;if(!(l instanceof h))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y(a,l)}catch(t){throw c.Rm.error("Error parsing treemap:",t),t}},"parse")},S=10,g={draw:(0,c.K2)((e,t,a,n)=>{const i=n.db,d=i.getConfig(),h=d.padding??10,m=i.getDiagramTitle(),y=i.getRoot(),{themeVariables:f}=(0,o.zj)();if(!y)return;const u=m?30:0,g=(0,l.D)(t),x=d.nodeWidth?d.nodeWidth*S:960,$=d.nodeHeight?d.nodeHeight*S:500,v=x,b=$+u;let w;g.attr("viewBox",`0 0 ${v} ${b}`),(0,o.a$)(g,b,v,d.useMaxWidth);try{const e=d.valueFormat||",";if("$0,0"===e)w=(0,c.K2)(e=>"$"+(0,p.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,c.K2)(e=>"$"+(0,p.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,c.K2)(e=>"$"+(0,p.GPZ)(t||"")(e),"valueFormat")}else w=(0,p.GPZ)(e)}catch(G){c.Rm.error("Error creating format function:",G),w=(0,p.GPZ)(",")}const C=(0,p.UMr)().range(["transparent",f.cScale0,f.cScale1,f.cScale2,f.cScale3,f.cScale4,f.cScale5,f.cScale6,f.cScale7,f.cScale8,f.cScale9,f.cScale10,f.cScale11]),L=(0,p.UMr)().range(["transparent",f.cScalePeer0,f.cScalePeer1,f.cScalePeer2,f.cScalePeer3,f.cScalePeer4,f.cScalePeer5,f.cScalePeer6,f.cScalePeer7,f.cScalePeer8,f.cScalePeer9,f.cScalePeer10,f.cScalePeer11]),k=(0,p.UMr)().range([f.cScaleLabel0,f.cScaleLabel1,f.cScaleLabel2,f.cScaleLabel3,f.cScaleLabel4,f.cScaleLabel5,f.cScaleLabel6,f.cScaleLabel7,f.cScaleLabel8,f.cScaleLabel9,f.cScaleLabel10,f.cScaleLabel11]);m&&g.append("text").attr("x",v/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);const T=g.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),P=(0,p.Sk5)(y).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=(0,p.hkb)().size([x,$]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?S:0).paddingRight(e=>e.children&&e.children.length>0?S:0).paddingBottom(e=>e.children&&e.children.length>0?S:0).round(!0)(P),z=M.descendants().filter(e=>e.children&&e.children.length>0),F=T.selectAll(".treemapSection").data(z).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);F.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),F.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),F.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>C(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>L(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),F.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,p.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==d.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==d.showValues&&F.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const K=M.leaves(),D=T.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?C(e.parent.data.name):C(e.data.name)).attr("style",e=>(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?C(e.parent.data.name):C(e.data.name)).attr("stroke-width",3),D.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(D.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,p.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-8,n=l-8;if(r<10||n<10)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>8;)i--,t.style("font-size",`${i}px`);let o=Math.max(6,Math.min(28,Math.round(.6*i))),c=i+2+o;for(;c>n&&i>8&&(i--,o=Math.max(6,Math.min(28,Math.round(.6*i))),!(o<6&&8===i));)t.style("font-size",`${i}px`),c=i+2+o;t.style("font-size",`${i}px`),(s.getComputedTextLength()>r||i<8||n(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(e.data.name)+";"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,p.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,p.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(6,Math.min(28,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+2;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-8;t.node().getComputedTextLength()>c||n+r>o||r<6?t.style("display","none"):t.style("display",null)})}const N=d.diagramPadding??8;(0,s.P)(g,N,"flowchart",d?.useMaxWidth||!1)},"draw"),getClasses:(0,c.K2)(function(e,t){return t.db.getClasses()},"getClasses")},x={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},$=(0,c.K2)(({treemap:e}={})=>{const t=(0,o.P$)(),a=(0,o.zj)(),l=(0,i.$t)(t,a.themeVariables),s=(0,i.$t)(x,e),r=s.titleColor??l.titleColor,n=s.labelColor??l.textColor,c=s.valueColor??l.textColor;return`\n .treemapNode.section {\n stroke: ${s.sectionStrokeColor};\n stroke-width: ${s.sectionStrokeWidth};\n fill: ${s.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${s.leafStrokeColor};\n stroke-width: ${s.leafStrokeWidth};\n fill: ${s.leafFillColor};\n }\n .treemapLabel {\n fill: ${n};\n font-size: ${s.labelFontSize};\n }\n .treemapValue {\n fill: ${c};\n font-size: ${s.valueFontSize};\n }\n .treemapTitle {\n fill: ${r};\n font-size: ${s.titleFontSize};\n }\n `},"getStyles"),v={parser:u,get db(){return new h},renderer:g,styles:$}}}]); \ No newline at end of file diff --git a/assets/js/2279.14e9bbca.js b/assets/js/2279.14e9bbca.js deleted file mode 100644 index 9050eb0..0000000 --- a/assets/js/2279.14e9bbca.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see 2279.14e9bbca.js.LICENSE.txt */ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2279],{9119(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},6750(t,e,r){"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=n(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var o=r;if(!o)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(o))return o;var s=o.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return o;var c=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(c))return i.BLANK_URL;var h=s.replace(/\\/g,"/");if("mailto:"===c||c.includes("://"))return h;if("http:"===c||"https:"===c){if(!function(t){return URL.canParse(t)}(h))return i.BLANK_URL;var u=new URL(h);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return h};var i=r(9119);function n(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},4353(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",n="second",a="minute",o="hour",s="day",l="week",c="month",h="quarter",u="year",d="date",p="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},x={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function t(e,r){if(e.date()1)return t(o[0])}else{var s=e.name;k[s]=e,n=s}return!i&&n&&(b=n),n||!i&&b},v=function(t,e){if(C(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new T(r)},S=x;S.l=_,S.i=C,S.w=function(t,e){return v(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var T=function(){function y(t){this.$L=_(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[w]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(S.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var n=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return S},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=v(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return v(t)2&&i.push(t)}const a=[];e=Math.max(e,.1);const o=[];for(const n of i)for(let t=0;tt.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!o.length)return a;let s=[],l=o[0].ymin,c=0;for(;s.length||o.length;){if(o.length){let t=-1;for(let e=0;el);e++)t=e;o.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||c%e==0)&&s.length>1)for(let t=0;t=s.length)break;const r=s[t].edge,i=s[e].edge;a.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),c++}return a}(l,s,a);if(o){for(const t of l)i(t,c,-o);!function(t,e,r){const n=[];t.forEach(t=>n.push(...t)),i(n,e,r)}(h,c,-o)}return h}function o(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let o=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(o=n),a(t,n,i,o||1)}r.d(e,{A:()=>nt});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=o(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class c extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=o(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,a=[],s=.5*r*Math.cos(n),c=.5*r*Math.sin(n);for(const[o,h]of i)l([o,h])&&a.push([[o[0]-s,o[1]+c],[...h]],[[o[0]+s,o[1]-c],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class h extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const a=i/4;for(const o of t){const t=l(o),s=t/i,c=Math.ceil(s)-1,h=t-c*i,u=(o[0][0]+o[1][0])/2-i/4,d=Math.min(o[0][1],o[1][1]);for(let o=0;o{const a=l(t),o=Math.floor(a/(r+i)),s=(a+i-o*(r+i))/2;let c=t[0],h=t[1];c[0]>h[0]&&(c=t[1],h=t[0]);const u=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let l=0;l{const n=l(t),a=Math.round(n/(2*e));let o=t[0],s=t[1];o[0]>s[0]&&(o=t[1],s=t[0]);const c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let l=0;li%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":a.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=n}return a}function k(t){const e=[];let r="",i=0,n=0,a=0,o=0,s=0,l=0;for(const{key:c,data:h}of t){switch(c){case"M":e.push({key:"M",data:[...h]}),[i,n]=h,[a,o]=h;break;case"C":e.push({key:"C",data:[...h]}),i=h[4],n=h[5],s=h[2],l=h[3];break;case"L":e.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],e.push({key:"L",data:[i,n]});break;case"V":n=h[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-s),a=n+(n-l)):(t=i,a=n),e.push({key:"C",data:[t,a,...h]}),s=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[t,a]=h;let o=0,c=0;"Q"===r||"T"===r?(o=i+(i-s),c=n+(n-l)):(o=i,c=n);const u=i+2*(o-i)/3,d=n+2*(c-n)/3,p=t+2*(o-t)/3,f=a+2*(c-a)/3;e.push({key:"C",data:[u,d,p,f,t,a]}),s=o,l=c,i=t,n=a;break}case"Q":{const[t,r,a,o]=h,c=i+2*(t-i)/3,u=n+2*(r-n)/3,d=a+2*(t-a)/3,p=o+2*(r-o)/3;e.push({key:"C",data:[c,u,d,p,a,o]}),s=t,l=r,i=a,n=o;break}case"A":{const t=Math.abs(h[0]),r=Math.abs(h[1]),a=h[2],o=h[3],s=h[4],l=h[5],c=h[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,c,l,c]}),i=l,n=c):i===l&&n===c||(C(i,n,l,c,t,r,a,o,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,n=c);break}case"Z":e.push({key:"Z",data:[]}),i=a,n=o}r=c}return e}function w(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function C(t,e,r,i,n,a,o,s,l,c){const h=(u=o,Math.PI*u/180);var u;let d=[],p=0,f=0,g=0,y=0;if(c)[p,f,g,y]=c;else{[t,e]=w(t,e,-h),[r,i]=w(r,i,-h);const o=(t-r)/2,c=(e-i)/2;let u=o*o/(n*n)+c*c/(a*a);u>1&&(u=Math.sqrt(u),n*=u,a*=u);const d=n*n,m=a*a,x=d*m-d*c*c-m*o*o,b=d*c*c+m*o*o,k=(s===l?-1:1)*Math.sqrt(Math.abs(x/b));g=k*n*c/a+(t+r)/2,y=k*-a*o/n+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),f=Math.asin(parseFloat(((i-y)/a).toFixed(9))),tf&&(p-=2*Math.PI),!l&&f>p&&(f-=2*Math.PI)}let m=f-p;if(Math.abs(m)>120*Math.PI/180){const t=f,e=r,s=i;f=l&&f>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,d=C(r=g+n*Math.cos(f),i=y+a*Math.sin(f),e,s,n,a,o,0,l,[f,t,g,y])}m=f-p;const x=Math.cos(p),b=Math.sin(p),k=Math.cos(f),_=Math.sin(f),v=Math.tan(m/4),S=4/3*n*v,T=4/3*a*v,A=[t,e],M=[t+S*b,e-T*x],B=[r+S*_,i-T*k],L=[r,i];if(M[0]=2*A[0]-M[0],M[1]=2*A[1]-M[1],c)return[M,B,L].concat(d);{d=[M,B,L].concat(d);const t=[];for(let e=0;e2){const n=[];for(let e=0;e2*Math.PI&&(p=0,f=2*Math.PI);const g=2*Math.PI/l.curveStepCount,y=Math.min(g/2,(f-p)/2),m=q(y,c,h,u,d,p,f,1,l);if(!l.disableMultiStroke){const t=q(y,c,h,u,d,p,f,1.5,l);m.push(...t)}return o&&(s?m.push(...K(c,h,c+u*Math.cos(p),h+d*Math.sin(p),l),...K(c,h,c+u*Math.cos(f),h+d*Math.sin(f),l)):m.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(p),h+d*Math.sin(p)]})),{type:"path",ops:m}}function L(t,e){const r=k(b(x(t))),i=[];let n=[0,0],a=[0,0];for(const{key:o,data:s}of r)switch(o){case"M":a=[s[0],s[1]],n=[s[0],s[1]];break;case"L":i.push(...K(a[0],a[1],s[0],s[1],e)),a=[s[0],s[1]];break;case"C":{const[t,r,n,o,l,c]=s;i.push(...j(t,r,n,o,l,c,a,e)),a=[l,c];break}case"Z":i.push(...K(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]]}return{type:"path",ops:i}}function F(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+R(t,e),i[0][1]+R(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>s&&(h=l/10);const u=h/2,d=.2+.2*D(n);let p=n.bowing*n.maxRandomnessOffset*(i-e)/200,f=n.bowing*n.maxRandomnessOffset*(t-r)/200;p=R(p,n,c),f=R(f,n,c);const g=[],y=()=>R(u,n,c),m=()=>R(h,n,c),x=n.preserveVertices;return a&&(o?g.push({op:"move",data:[t+(x?0:y()),e+(x?0:y())]}):g.push({op:"move",data:[t+(x?0:R(h,n,c)),e+(x?0:R(h,n,c))]})),o?g.push({op:"bcurveTo",data:[p+t+(r-t)*d+y(),f+e+(i-e)*d+y(),p+t+2*(r-t)*d+y(),f+e+2*(i-e)*d+y(),r+(x?0:y()),i+(x?0:y())]}):g.push({op:"bcurveTo",data:[p+t+(r-t)*d+m(),f+e+(i-e)*d+m(),p+t+2*(r-t)*d+m(),f+e+2*(i-e)*d+m(),r+(x?0:m()),i+(x?0:m())]}),g}function N(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]),i.push([t[0][0]+R(e,r),t[0][1]+R(e,r)]);for(let n=1;n3){const a=[],o=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,a=t[e+0],o=t[e+1],s=t[e+2],l=t[e+3],c=G(a,o,i),h=G(o,s,i),u=G(s,l,i),d=G(c,h,i),p=G(h,u,i),f=G(d,p,i);X([a,c,d,f],0,r,n),X([f,p,u,l],0,r,n)}var a,o;return n}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,n){const a=n||[],o=t[e],s=t[r-1];let l=0,c=1;for(let h=e+1;hl&&(l=e,c=h)}return Math.sqrt(l)>i?(Z(t,e,c+1,i,a),Z(t,c,r,i,a)):(a.length||a.push(o),a.push(s)),a}function Q(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let a=0;a0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const a=this._o(n);return this._d("line",[v(t,e,r,i,a)],a)}rectangle(t,e,r,i,n){const a=this._o(n),o=[],s=function(t,e,r,i,n){return function(t,e){return S(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,a);if(a.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?o.push(F([n],a)):o.push($([n],a))}return a.stroke!==J&&o.push(s),this._d("rectangle",o,a)}ellipse(t,e,r,i,n){const a=this._o(n),o=[],s=A(r,i,a),l=M(t,e,a,s);if(a.fill)if("solid"===a.fillStyle){const r=M(t,e,a,s).opset;r.type="fillPath",o.push(r)}else o.push($([l.estimatedPoints],a));return a.stroke!==J&&o.push(l.opset),this._d("ellipse",o,a)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[S(t,!1,r)],r)}arc(t,e,r,i,n,a,o=!1,s){const l=this._o(s),c=[],h=B(t,e,r,i,n,a,o,!0,l);if(o&&l.fill)if("solid"===l.fillStyle){const o=Object.assign({},l);o.disableMultiStroke=!0;const s=B(t,e,r,i,n,a,!0,!1,o);s.type="fillPath",c.push(s)}else c.push(function(t,e,r,i,n,a,o){const s=t,l=e;let c=Math.abs(r/2),h=Math.abs(i/2);c+=R(.01*c,o),h+=R(.01*h,o);let u=n,d=a;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const p=(d-u)/o.curveStepCount,f=[];for(let g=u;g<=d;g+=p)f.push([s+c*Math.cos(g),l+h*Math.sin(g)]);return f.push([s+c*Math.cos(d),l+h*Math.sin(d)]),f.push([s,l]),$([f],o)}(t,e,r,i,n,a,l));return l.stroke!==J&&c.push(h),this._d("arc",c,l)}curve(t,e){const r=this._o(e),i=[],n=T(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=T(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push($([e],r))}return r.stroke!==J&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(F([t],r)):i.push($([t],r))),r.stroke!==J&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,o=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=k(b(x(t))),n=[];let a=[],o=[0,0],s=[];const l=()=>{s.length>=4&&a.push(...Q(s,1)),s=[]},c=()=>{l(),a.length&&(n.push(a),a=[])};for(const{key:u,data:d}of i)switch(u){case"M":c(),o=[d[0],d[1]],a.push(o);break;case"L":l(),a.push([d[0],d[1]]);break;case"C":if(!s.length){const t=a.length?a[a.length-1]:o;s.push([t[0],t[1]])}s.push([d[0],d[1]]),s.push([d[2],d[3]]),s.push([d[4],d[5]]);break;case"Z":l(),a.push([o[0],o[1]])}if(c(),!r)return n;const h=[];for(const u of n){const t=V(u,r);t.length&&h.push(t)}return h}(t,0,o?4-4*(r.simplification||1):(1+r.roughness)/2),l=L(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=L(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(F(s,r));else i.push($(s,r));return a&&(o?s.forEach(t=>{i.push(S(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const n of e){let t=null;switch(n.type){case"path":t={d:this.opsToPath(n),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(n),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(n,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,n),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,n,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const n of e.ops){const e="number"==typeof r&&r>=0?n.data.map(t=>+t.toFixed(r)):n.data;switch(n.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a),a}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a),a}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a),a}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n),n}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const o of e){let e=null;switch(o.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(o,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,o,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(rt,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const a=this.gen.line(t,e,r,i,n);return this.draw(a)}rectangle(t,e,r,i,n){const a=this.gen.rectangle(t,e,r,i,n);return this.draw(a)}ellipse(t,e,r,i,n){const a=this.gen.ellipse(t,e,r,i,n);return this.draw(a)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,a,o=!1,s){const l=this.gen.arc(t,e,r,i,n,a,o,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var nt={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},513(t,e,r){"use strict";function i(t){for(var e=[],r=1;ri})},451(t,e,r){"use strict";function i(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r=i)&&(r=i);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r=n)&&(r=n)}return r}function n(t,e){let r;if(void 0===e)for(const i of t)null!=i&&(r>i||void 0===r&&i>=i)&&(r=i);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function a(t){return t}r.d(e,{JLW:()=>ss,l78:()=>f,tlR:()=>p,qrM:()=>ks,Yu4:()=>Cs,IA3:()=>vs,Wi0:()=>Ts,PGM:()=>As,OEq:()=>Bs,y8u:()=>$s,olC:()=>Ds,IrU:()=>Rs,oDi:()=>Ns,Q7f:()=>zs,cVp:()=>js,lUB:()=>hs,Lx9:()=>Hs,nVG:()=>Js,uxU:()=>tl,Xf2:()=>il,GZz:()=>al,UPb:()=>sl,dyv:()=>ol,GPZ:()=>jr,Sk5:()=>Xr,bEH:()=>Mi,n8j:()=>ps,T9B:()=>i,jkA:()=>n,rLf:()=>ys,WH:()=>Ki,m4Y:()=>gn,UMr:()=>Ri,w7C:()=>$o,zt:()=>Eo,Ltv:()=>Do,UAC:()=>$n,DCK:()=>ha,TUC:()=>zn,Agd:()=>Ln,t6C:()=>Tn,wXd:()=>Mn,ABi:()=>Kn,Ui6:()=>Zn,rGn:()=>qn,ucG:()=>An,YPH:()=>Rn,Mol:()=>Pn,PGu:()=>In,GuW:()=>Nn,hkb:()=>li});var o=1e-6;function s(t){return"translate("+t+",0)"}function l(t){return"translate(0,"+t+")"}function c(t){return e=>+t(e)}function h(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function u(){return!this.__axis}function d(t,e){var r=[],i=null,n=null,d=6,p=6,f=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",x=1===t||3===t?s:l;function b(s){var l=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,b=null==n?e.tickFormat?e.tickFormat.apply(e,r):a:n,k=Math.max(d,0)+f,w=e.range(),C=+w[0]+g,_=+w[w.length-1]+g,v=(e.bandwidth?h:c)(e.copy(),g),S=s.selection?s.selection():s,T=S.selectAll(".domain").data([null]),A=S.selectAll(".tick").data(l,e).order(),M=A.exit(),B=A.enter().append("g").attr("class","tick"),L=A.select("line"),F=A.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(B),L=L.merge(B.append("line").attr("stroke","currentColor").attr(m+"2",y*d)),F=F.merge(B.append("text").attr("fill","currentColor").attr(m,y*k).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),s!==S&&(T=T.transition(s),A=A.transition(s),L=L.transition(s),F=F.transition(s),M=M.transition(s).attr("opacity",o).attr("transform",function(t){return isFinite(t=v(t))?x(t+g):this.getAttribute("transform")}),B.attr("opacity",o).attr("transform",function(t){var e=this.parentNode.__axis;return x((e&&isFinite(e=e(t))?e:v(t))+g)})),M.remove(),T.attr("d",4===t||2===t?p?"M"+y*p+","+C+"H"+g+"V"+_+"H"+y*p:"M"+g+","+C+"V"+_:p?"M"+C+","+y*p+"V"+g+"H"+_+"V"+y*p:"M"+C+","+g+"H"+_),A.attr("opacity",1).attr("transform",function(t){return x(v(t)+g)}),L.attr(m+"2",y*d),F.attr(m,y*k).text(b),S.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),S.each(function(){this.__axis=v})}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return r=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),b):r.slice()},b.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),b):i&&i.slice()},b.tickFormat=function(t){return arguments.length?(n=t,b):n},b.tickSize=function(t){return arguments.length?(d=p=+t,b):d},b.tickSizeInner=function(t){return arguments.length?(d=+t,b):d},b.tickSizeOuter=function(t){return arguments.length?(p=+t,b):p},b.tickPadding=function(t){return arguments.length?(f=+t,b):f},b.offset=function(t){return arguments.length?(g=+t,b):g},b}function p(t){return d(1,t)}function f(t){return d(3,t)}function g(){}function y(t){return null==t?g:function(){return this.querySelector(t)}}function m(){return[]}function x(t){return null==t?m:function(){return this.querySelectorAll(t)}}function b(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function k(t){return function(){return this.matches(t)}}function w(t){return function(e){return e.matches(t)}}var C=Array.prototype.find;function _(){return this.firstElementChild}var v=Array.prototype.filter;function S(){return Array.from(this.children)}function T(t){return new Array(t.length)}function A(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function M(t,e,r,i,n,a){for(var o,s=0,l=e.length,c=a.length;se?1:t>=e?0:NaN}A.prototype={constructor:A,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var E="http://www.w3.org/1999/xhtml";const D={svg:"http://www.w3.org/2000/svg",xhtml:E,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function O(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),D.hasOwnProperty(e)?{space:D[e],local:t}:t}function R(t){return function(){this.removeAttribute(t)}}function K(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I(t,e){return function(){this.setAttribute(t,e)}}function N(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function P(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function z(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function q(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function j(t){return function(){this.style.removeProperty(t)}}function W(t,e,r){return function(){this.style.setProperty(t,e,r)}}function H(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function U(t,e){return t.style.getPropertyValue(e)||q(t).getComputedStyle(t,null).getPropertyValue(e)}function Y(t){return function(){delete this[t]}}function G(t,e){return function(){this[t]=e}}function X(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function V(t){return t.trim().split(/^|\s+/)}function Z(t){return t.classList||new Q(t)}function Q(t){this._node=t,this._names=V(t.getAttribute("class")||"")}function J(t,e){for(var r=Z(t),i=-1,n=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var vt=[null];function St(t,e){this._groups=t,this._parents=e}function Tt(){return new St([[document.documentElement]],vt)}St.prototype=Tt.prototype={constructor:St,select:function(t){"function"!=typeof t&&(t=y(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n=w&&(w=k+1);!(b=m[w])&&++w=0;)(i=n[a])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=$);for(var r=this._groups,i=r.length,n=new Array(i),a=0;a1?this.each((null==e?j:"function"==typeof e?H:W)(t,e,null==r?"":r)):U(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Y:"function"==typeof e?X:G)(t,e)):this.node()[t]},classed:function(t,e){var r=V(t+"");if(arguments.length<2){for(var i=Z(this.node()),n=-1,a=r.length;++n=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?kt:bt,i=0;i{}};function Bt(){for(var t,e=0,r=arguments.length,i={};e=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o0)for(var r,i,n=new Array(r),a=0;a=0&&e._call.call(void 0,t),e=e._next;--Rt}()}finally{Rt=0,function(){var t,e,r=Dt,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Dt=e);Ot=t,Vt(i)}(),Pt=0}}function Xt(){var t=qt.now(),e=t-Nt;e>1e3&&(zt-=e,Nt=t)}function Vt(t){Rt||(Kt&&(Kt=clearTimeout(Kt)),t-Pt>24?(t<1/0&&(Kt=setTimeout(Gt,t-qt.now()-zt)),It&&(It=clearInterval(It))):(It||(Nt=qt.now(),It=setInterval(Xt,1e3)),Rt=1,jt(Gt)))}function Zt(t,e,r){var i=new Ut;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}Ut.prototype=Yt.prototype={constructor:Ut,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?Wt():+r)+(null==e?0:+e),this._next||Ot===this||(Ot?Ot._next=this:Dt=this,Ot=this),this._call=t,this._time=r,Vt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vt())}};var Qt=Et("start","end","cancel","interrupt"),Jt=[];function te(t,e,r,i,n,a){var o=t.__transition;if(o){if(r in o)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function a(t){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=t&&o(t-r.delay)}function o(a){var c,h,u,d;if(1!==r.state)return l();for(c in n)if((d=n[c]).name===r.name){if(3===d.state)return Zt(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[c]):+c0)throw new Error("too late; already scheduled");return r}function re(t,e){var r=ie(t,e);if(r.state>3)throw new Error("too late; already running");return r}function ie(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function ne(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}var ae,oe=180/Math.PI,se={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function le(t,e,r,i,n,a){var o,s,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(n(r)+"rotate(",null,i)-2,x:ne(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(n(r)+"skewX(",null,i)-2,x:ne(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(a.skewX,o.skewX,s,l),function(t,e,r,i,a,o){if(t!==r||e!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ne(t,r)},{i:s-2,x:ne(e,i)})}else 1===r&&1===i||a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,i=l.length;++r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Oe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Oe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ve.exec(t))?new Ie(e[1],e[2],e[3],1):(e=Se.exec(t))?new Ie(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Te.exec(t))?Oe(e[1],e[2],e[3],e[4]):(e=Ae.exec(t))?Oe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Me.exec(t))?We(e[1],e[2]/100,e[3]/100,1):(e=Be.exec(t))?We(e[1],e[2]/100,e[3]/100,e[4]):Le.hasOwnProperty(t)?De(Le[t]):"transparent"===t?new Ie(NaN,NaN,NaN,0):null}function De(t){return new Ie(t>>16&255,t>>8&255,255&t,1)}function Oe(t,e,r,i){return i<=0&&(t=e=r=NaN),new Ie(t,e,r,i)}function Re(t){return t instanceof me||(t=Ee(t)),t?new Ie((t=t.rgb()).r,t.g,t.b,t.opacity):new Ie}function Ke(t,e,r,i){return 1===arguments.length?Re(t):new Ie(t,e,r,null==i?1:i)}function Ie(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function Ne(){return`#${je(this.r)}${je(this.g)}${je(this.b)}`}function Pe(){const t=ze(this.opacity);return`${1===t?"rgb(":"rgba("}${qe(this.r)}, ${qe(this.g)}, ${qe(this.b)}${1===t?")":`, ${t})`}`}function ze(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function qe(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function je(t){return((t=qe(t))<16?"0":"")+t.toString(16)}function We(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,r,i)}function He(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof me||(t=Ee(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),a=Math.max(e,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=e===a?(r-i)/s+6*(r0&&l<1?0:o,new Ue(o,s,l,t.opacity)}function Ue(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function Ye(t){return(t=(t||0)%360)<0?t+360:t}function Ge(t){return Math.max(0,Math.min(1,t||0))}function Xe(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Ve(t,e,r,i,n){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*i+o*n)/6}ge(me,Ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Fe,formatHex:Fe,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return He(this).formatHsl()},formatRgb:$e,toString:$e}),ge(Ie,Ke,ye(me,{brighter(t){return t=null==t?be:Math.pow(be,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?xe:Math.pow(xe,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ie(qe(this.r),qe(this.g),qe(this.b),ze(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ne,formatHex:Ne,formatHex8:function(){return`#${je(this.r)}${je(this.g)}${je(this.b)}${je(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Pe,toString:Pe})),ge(Ue,function(t,e,r,i){return 1===arguments.length?He(t):new Ue(t,e,r,null==i?1:i)},ye(me,{brighter(t){return t=null==t?be:Math.pow(be,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?xe:Math.pow(xe,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Ie(Xe(t>=240?t-240:t+120,n,i),Xe(t,n,i),Xe(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new Ue(Ye(this.h),Ge(this.s),Ge(this.l),ze(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ze(this.opacity);return`${1===t?"hsl(":"hsla("}${Ye(this.h)}, ${100*Ge(this.s)}%, ${100*Ge(this.l)}%${1===t?")":`, ${t})`}`}}));const Ze=t=>()=>t;function Qe(t,e){return function(r){return t+r*e}}function Je(t){return 1===(t=+t)?tr:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}(e,r,t):Ze(isNaN(e)?r:e)}}function tr(t,e){var r=e-t;return r?Qe(t,r):Ze(isNaN(t)?e:t)}const er=function t(e){var r=Je(e);function i(t,e){var i=r((t=Ke(t)).r,(e=Ke(e)).r),n=r(t.g,e.g),a=r(t.b,e.b),o=tr(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=a(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function rr(t){return function(e){var r,i,n=e.length,a=new Array(n),o=new Array(n),s=new Array(n);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),n=t[i],a=t[i+1],o=i>0?t[i-1]:2*n-a,s=ia&&(n=e.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ne(r,i)})),a=nr.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?ee:re;return function(){var o=a(this,t),s=o.on;s!==i&&(n=(i=s).copy()).on(e,r),o.on=n}}(r,t,e))},attr:function(t,e){var r=O(t),i="transform"===r?ue:or;return this.attrTween(t,"function"==typeof e?(r.local?dr:ur)(r,i,fe(this,"attr."+t,e)):null==e?(r.local?lr:sr)(r):(r.local?hr:cr)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=O(t);return this.tween(r,(i.local?pr:fr)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?he:or;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var a=U(this,t),o=(this.style.removeProperty(t),U(this,t));return a===o?null:a===r&&o===i?n:n=e(r=a,i=o)}}(t,i)).on("end.style."+t,kr(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,a;return function(){var o=U(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=U(this,t)),o===l?null:o===i&&l===n?a:(n=l,a=e(i=o,s))}}(t,i,fe(this,"style."+t,e))).each(function(t,e){var r,i,n,a,o="style."+e,s="end."+o;return function(){var l=re(this,t),c=l.on,h=null==l.value[o]?a||(a=kr(e)):void 0;c===r&&n===h||(i=(r=c).copy()).on(s,n=h),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,a=r+"";return function(){var o=U(this,t);return o===a?null:o===i?n:n=e(i=o,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function a(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,a,r)),i}return a._value=e,a}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(fe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=ie(this.node(),r).tween,a=0,o=n.length;a2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[n]):o=!1;o&&delete t.__transition}}(this,t)})},At.prototype.transition=function(t){var e,r;t instanceof Cr?(e=t._id,t=t._name):(e=_r(),(r=Sr).time=Wt(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,a=0;a1?i[0]+i.slice(2):i,+t.slice(r+1)]}function Dr(t){return(t=Er(Math.abs(t)))?t[1]:NaN}var Or,Rr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kr(t){if(!(e=Rr.exec(t)))throw new Error("invalid format: "+t);var e;return new Ir({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Ir(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Nr(t,e){var r=Er(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}Kr.prototype=Ir.prototype,Ir.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Pr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Nr(100*t,e),r:Nr,s:function(t,e){var r=Er(t,e);if(!r)return Or=void 0,t.toPrecision(e);var i=r[0],n=r[1],a=n-(Or=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,o=i.length;return a===o?i:a>o?i+new Array(a-o+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Er(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zr(t){return t}var qr,jr,Wr,Hr=Array.prototype.map,Ur=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function Yr(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?zr:(e=Hr.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?zr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Hr.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function u(t,e){var r=(t=Kr(t)).fill,u=t.align,d=t.sign,p=t.symbol,f=t.zero,g=t.width,y=t.comma,m=t.precision,x=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Pr[b]||(void 0===m&&(m=12),x=!0,b="g"),(f||"0"===r&&"="===u)&&(f=!0,r="0",u="=");var k=(e&&void 0!==e.prefix?e.prefix:"")+("$"===p?n:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),w=("$"===p?a:/[%p]/.test(b)?l:"")+(e&&void 0!==e.suffix?e.suffix:""),C=Pr[b],_=/[defgprs%]/.test(b);function v(t){var e,n,a,l=k,p=w;if("c"===b)p=C(t)+p,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:C(Math.abs(t),m),x&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0===+t&&"+"!==d&&(v=!1),l=(v?"("===d?d:c:"-"===d||"("===d?"":d)+l,p=("s"!==b||isNaN(t)||void 0===Or?"":Ur[8+Or/3])+p+(v&&"("===d?")":""),_)for(e=-1,n=t.length;++e(a=t.charCodeAt(e))||a>57){p=(46===a?o+t.slice(e+1):t.slice(e))+p,t=t.slice(0,e);break}}y&&!f&&(t=i(t,1/0));var S=l.length+t.length+p.length,T=S>1)+l+t+p+T.slice(S);break;default:t=T+l+t+p}return s(t)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),v.toString=function(){return t+""},v}return{format:u,formatPrefix:function(t,e){var r=3*Math.max(-8,Math.min(8,Math.floor(Dr(e)/3))),i=Math.pow(10,-r),n=u(((t=Kr(t)).type="f",t),{suffix:Ur[8+r/3]});return function(t){return n(i*t)}}}}function Gr(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function Xr(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Zr)):void 0===e&&(e=Vr);for(var r,i,n,a,o,s=new ti(t),l=[s];r=l.pop();)if((n=e(r.data))&&(o=(n=Array.from(n)).length))for(r.children=n,a=o-1;a>=0;--a)l.push(i=n[a]=new ti(n[a])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(Jr)}function Vr(t){return t.children}function Zr(t){return Array.isArray(t)?t[1]:null}function Qr(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Jr(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function ti(t){this.data=t,this.depth=this.height=0,this.parent=null}function ei(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ri(t,e,r,i,n){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-e)/t.value;++s=0;--i)a.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,n=i&&i.length;--n>=0;)r+=i[n].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),n=null;t=r.pop(),e=i.pop();for(;t===e;)n=t,t=r.pop(),e=i.pop();return n}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var n=i.length;t!==r;)i.splice(n,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return Xr(this).eachBefore(Qr)},[Symbol.iterator]:function*(){var t,e,r,i,n=this,a=[n];do{for(t=a.reverse(),a=[];n=t.pop();)if(yield n,e=n.children)for(r=0,i=e.length;rd&&(d=s),y=h*h*g,(p=Math.max(d/y,y/u))>f){h-=s;break}f=p}m.push(o={value:h,dice:l1?e:1)},r}((1+Math.sqrt(5))/2);function ai(t){if("function"!=typeof t)throw new Error;return t}function oi(){return 0}function si(t){return function(){return t}}function li(){var t=ni,e=!1,r=1,i=1,n=[0],a=oi,o=oi,s=oi,l=oi,c=oi;function h(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(u),n=[0],e&&t.eachBefore(ei),t}function u(e){var r=n[e.depth],i=e.x0+r,h=e.y0+r,u=e.x1-r,d=e.y1-r;uyi?Math.pow(t,1/3):t/gi+pi}function ki(t){return t>fi?t*t*t:gi*(t-pi)}function wi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ci(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function _i(t){if(t instanceof Si)return new Si(t.h,t.c,t.l,t.opacity);if(t instanceof xi||(t=mi(t)),0===t.a&&0===t.b)return new Si(NaN,0180||r<-180?r-360*Math.round(r/360):r):Ze(isNaN(t)?e:t)});Ai(tr);function Bi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}class Li extends Map{constructor(t,e=Di){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Fi(this,t))}has(t){return super.has(Fi(this,t))}set(t,e){return super.set($i(this,t),e)}delete(t){return super.delete(Ei(this,t))}}Set;function Fi({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function $i({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function Ei({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Di(t){return null!==t&&"object"==typeof t?t.valueOf():t}const Oi=Symbol("implicit");function Ri(){var t=new Li,e=[],r=[],i=Oi;function n(n){let a=t.get(n);if(void 0===a){if(i!==Oi)return i;t.set(n,a=e.push(n)-1)}return r[a%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new Li;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Ri(e,r).unknown(i)},Bi.apply(n,arguments),n}function Ki(){var t,e,r=Ri().unknown(void 0),i=r.domain,n=r.range,a=0,o=1,s=!1,l=0,c=0,h=.5;function u(){var r=i().length,u=o=Ii?10:a>=Ni?5:a>=Pi?2:1;let s,l,c;return n<0?(c=Math.pow(10,-n)/o,s=Math.round(t*c),l=Math.round(e*c),s/ce&&--l,c=-c):(c=Math.pow(10,n)*o,s=Math.round(t/c),l=Math.round(e/c),s*ce&&--l),le?1:t>=e?0:NaN}function Hi(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function Ui(t){let e,r,i;function n(t,i,n=0,a=t.length){if(n>>1;r(t[e],i)<0?n=e+1:a=e}while(nWi(t(e),r),i=(e,r)=>t(e)-r):(e=t===Wi||t===Hi?t:Yi,r=t,i=t),{left:n,center:function(t,e,r=0,a=t.length){const o=n(t,e,r,a-1);return o>r&&i(t[o-1],e)>-i(t[o],e)?o-1:o},right:function(t,i,n=0,a=t.length){if(n>>1;r(t[e],i)<=0?n=e+1:a=e}while(ne&&(r=t,t=e,e=r),c=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?cn:ln,n=a=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(o.map(t),s,l)))(t(c(e)))}return u.invert=function(r){return c(e((a||(a=i(s,o.map(t),ne)))(r)))},u.domain=function(t){return arguments.length?(o=Array.from(t,nn),h()):o.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),h()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=rn,h()},u.clamp=function(t){return arguments.length?(c=!!t||on,h()):c!==on},u.interpolate=function(t){return arguments.length?(l=t,h()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,h()}}function dn(){return un()(on,on)}function pn(t,e,r,i){var n,a=ji(t,e,r);switch((i=Kr(null==i?",f":i)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Dr(e)/3)))-Dr(Math.abs(t)))}(a,o))||(i.precision=n),Wr(i,o);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Dr(e)-Dr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=function(t){return Math.max(0,-Dr(Math.abs(t)))}(a))||(i.precision=n-2*("%"===i.type))}return jr(i)}function fn(t){var e=t.domain;return t.ticks=function(t){var r=e();return function(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e=n))return[];const s=a-n+1,l=new Array(s);if(i)if(o<0)for(let c=0;c0;){if((n=qi(l,c,r))===i)return a[o]=l,a[s]=c,e(a);if(n>0)l=Math.floor(l/n)*n,c=Math.ceil(c/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,c=Math.floor(c*n)/n}i=n}return t},t}function gn(){var t=dn();return t.copy=function(){return hn(t,gn())},Bi.apply(t,arguments),fn(t)}const yn=1e3,mn=6e4,xn=36e5,bn=864e5,kn=6048e5,wn=2592e6,Cn=31536e6,_n=new Date,vn=new Date;function Sn(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,a)=>{const o=[];if(r=n.ceil(r),a=null==a?1:Math.floor(a),!(r0))return o;let s;do{o.push(s=new Date(+r)),e(r,a),t(r)}while(sSn(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(n.count=(e,i)=>(_n.setTime(+e),vn.setTime(+i),t(_n),t(vn),Math.floor(r(_n,vn))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t===0:e=>n.count(0,e)%t===0):n:null)),n}const Tn=Sn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Tn.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Sn(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):Tn:null);Tn.range;const An=Sn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*yn)},(t,e)=>(e-t)/yn,t=>t.getUTCSeconds()),Mn=(An.range,Sn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn)},(t,e)=>{t.setTime(+t+e*mn)},(t,e)=>(e-t)/mn,t=>t.getMinutes())),Bn=(Mn.range,Sn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*mn)},(t,e)=>(e-t)/mn,t=>t.getUTCMinutes())),Ln=(Bn.range,Sn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yn-t.getMinutes()*mn)},(t,e)=>{t.setTime(+t+e*xn)},(t,e)=>(e-t)/xn,t=>t.getHours())),Fn=(Ln.range,Sn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*xn)},(t,e)=>(e-t)/xn,t=>t.getUTCHours())),$n=(Fn.range,Sn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mn)/bn,t=>t.getDate()-1)),En=($n.range,Sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bn,t=>t.getUTCDate()-1)),Dn=(En.range,Sn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/bn,t=>Math.floor(t/bn)));Dn.range;function On(t){return Sn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*mn)/kn)}const Rn=On(0),Kn=On(1),In=On(2),Nn=On(3),Pn=On(4),zn=On(5),qn=On(6);Rn.range,Kn.range,In.range,Nn.range,Pn.range,zn.range,qn.range;function jn(t){return Sn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/kn)}const Wn=jn(0),Hn=jn(1),Un=jn(2),Yn=jn(3),Gn=jn(4),Xn=jn(5),Vn=jn(6),Zn=(Wn.range,Hn.range,Un.range,Yn.range,Gn.range,Xn.range,Vn.range,Sn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())),Qn=(Zn.range,Sn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())),Jn=(Qn.range,Sn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear()));Jn.every=t=>isFinite(t=Math.floor(t))&&t>0?Sn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)}):null;Jn.range;const ta=Sn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());ta.every=t=>isFinite(t=Math.floor(t))&&t>0?Sn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)}):null;ta.range;function ea(t,e,r,i,n,a){const o=[[An,1,yn],[An,5,5e3],[An,15,15e3],[An,30,3e4],[a,1,mn],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,xn],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,bn],[i,2,1728e5],[r,1,kn],[e,1,wn],[e,3,7776e6],[t,1,Cn]];function s(e,r,i){const n=Math.abs(r-e)/i,a=Ui(([,,t])=>t).right(o,n);if(a===o.length)return t.every(ji(e/Cn,r/Cn,i));if(0===a)return Tn.every(Math.max(ji(e,r,i),1));const[s,l]=o[n/o[a-1][2][t.toLowerCase(),e]))}function ba(t,e,r){var i=da.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function ka(t,e,r){var i=da.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function wa(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Ca(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function _a(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function va(t,e,r){var i=da.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function Sa(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Ta(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Aa(t,e,r){var i=da.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function Ma(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function Ba(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function La(t,e,r){var i=da.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function Fa(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function $a(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Ea(t,e,r){var i=da.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Da(t,e,r){var i=da.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Oa(t,e,r){var i=da.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Ra(t,e,r){var i=pa.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Ka(t,e,r){var i=da.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Ia(t,e,r){var i=da.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Na(t,e){return ga(t.getDate(),e,2)}function Pa(t,e){return ga(t.getHours(),e,2)}function za(t,e){return ga(t.getHours()%12||12,e,2)}function qa(t,e){return ga(1+$n.count(Jn(t),t),e,3)}function ja(t,e){return ga(t.getMilliseconds(),e,3)}function Wa(t,e){return ja(t,e)+"000"}function Ha(t,e){return ga(t.getMonth()+1,e,2)}function Ua(t,e){return ga(t.getMinutes(),e,2)}function Ya(t,e){return ga(t.getSeconds(),e,2)}function Ga(t){var e=t.getDay();return 0===e?7:e}function Xa(t,e){return ga(Rn.count(Jn(t)-1,t),e,2)}function Va(t){var e=t.getDay();return e>=4||0===e?Pn(t):Pn.ceil(t)}function Za(t,e){return t=Va(t),ga(Pn.count(Jn(t),t)+(4===Jn(t).getDay()),e,2)}function Qa(t){return t.getDay()}function Ja(t,e){return ga(Kn.count(Jn(t)-1,t),e,2)}function to(t,e){return ga(t.getFullYear()%100,e,2)}function eo(t,e){return ga((t=Va(t)).getFullYear()%100,e,2)}function ro(t,e){return ga(t.getFullYear()%1e4,e,4)}function io(t,e){var r=t.getDay();return ga((t=r>=4||0===r?Pn(t):Pn.ceil(t)).getFullYear()%1e4,e,4)}function no(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ga(e/60|0,"0",2)+ga(e%60,"0",2)}function ao(t,e){return ga(t.getUTCDate(),e,2)}function oo(t,e){return ga(t.getUTCHours(),e,2)}function so(t,e){return ga(t.getUTCHours()%12||12,e,2)}function lo(t,e){return ga(1+En.count(ta(t),t),e,3)}function co(t,e){return ga(t.getUTCMilliseconds(),e,3)}function ho(t,e){return co(t,e)+"000"}function uo(t,e){return ga(t.getUTCMonth()+1,e,2)}function po(t,e){return ga(t.getUTCMinutes(),e,2)}function fo(t,e){return ga(t.getUTCSeconds(),e,2)}function go(t){var e=t.getUTCDay();return 0===e?7:e}function yo(t,e){return ga(Wn.count(ta(t)-1,t),e,2)}function mo(t){var e=t.getUTCDay();return e>=4||0===e?Gn(t):Gn.ceil(t)}function xo(t,e){return t=mo(t),ga(Gn.count(ta(t),t)+(4===ta(t).getUTCDay()),e,2)}function bo(t){return t.getUTCDay()}function ko(t,e){return ga(Hn.count(ta(t)-1,t),e,2)}function wo(t,e){return ga(t.getUTCFullYear()%100,e,2)}function Co(t,e){return ga((t=mo(t)).getUTCFullYear()%100,e,2)}function _o(t,e){return ga(t.getUTCFullYear()%1e4,e,4)}function vo(t,e){var r=t.getUTCDay();return ga((t=r>=4||0===r?Gn(t):Gn.ceil(t)).getUTCFullYear()%1e4,e,4)}function So(){return"+0000"}function To(){return"%"}function Ao(t){return+t}function Mo(t){return Math.floor(+t/1e3)}function Bo(t){return new Date(t)}function Lo(t){return t instanceof Date?+t:+new Date(+t)}function Fo(t,e,r,i,n,a,o,s,l,c){var h=dn(),u=h.invert,d=h.domain,p=c(".%L"),f=c(":%S"),g=c("%I:%M"),y=c("%I %p"),m=c("%a %d"),x=c("%b %d"),b=c("%B"),k=c("%Y");function w(t){return(l(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ao,s:Mo,S:Ya,u:Ga,U:Xa,V:Za,w:Qa,W:Ja,x:null,X:null,y:to,Y:ro,Z:no,"%":To},k={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:ao,e:ao,f:ho,g:Co,G:vo,H:oo,I:so,j:lo,L:co,m:uo,M:po,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ao,s:Mo,S:fo,u:go,U:yo,V:xo,w:bo,W:ko,x:null,X:null,y:wo,Y:_o,Z:So,"%":To},w={a:function(t,e,r){var i=p.exec(e.slice(r));return i?(t.w=f.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=m.exec(e.slice(r));return i?(t.m=x.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=y.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:Ba,e:Ba,f:Oa,g:Sa,G:va,H:Fa,I:Fa,j:La,L:Da,m:Ma,M:$a,p:function(t,e,r){var i=c.exec(e.slice(r));return i?(t.p=h.get(i[0].toLowerCase()),r+i[0].length):-1},q:Aa,Q:Ka,s:Ia,S:Ea,u:ka,U:wa,V:Ca,w:ba,W:_a,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:Sa,Y:va,Z:Ta,"%":Ra};function C(t,e){return function(r){var i,n,a,o=[],s=-1,l=0,c=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in a||(a.w=1),"Z"in a?(n=(i=sa(la(a.y,0,1))).getUTCDay(),i=n>4||0===n?Hn.ceil(i):Hn(i),i=En.offset(i,7*(a.V-1)),a.y=i.getUTCFullYear(),a.m=i.getUTCMonth(),a.d=i.getUTCDate()+(a.w+6)%7):(n=(i=oa(la(a.y,0,1))).getDay(),i=n>4||0===n?Kn.ceil(i):Kn(i),i=$n.offset(i,7*(a.V-1)),a.y=i.getFullYear(),a.m=i.getMonth(),a.d=i.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),n="Z"in a?sa(la(a.y,0,1)).getUTCDay():oa(la(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(n+5)%7:a.w+7*a.U-(n+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,sa(a)):oa(a)}}function v(t,e,r,i){for(var n,a,o=0,s=e.length,l=r.length;o=l)return-1;if(37===(n=e.charCodeAt(o++))){if(n=e.charAt(o++),!(a=w[n in ua?e.charAt(o++):n])||(i=a(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return b.x=C(r,b),b.X=C(i,b),b.c=C(e,b),k.x=C(r,k),k.X=C(i,k),k.c=C(e,k),{format:function(t){var e=C(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=_(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=C(t+="",k);return e.toString=function(){return t},e},utcParse:function(t){var e=_(t+="",!0);return e.toString=function(){return t},e}}}(t),ha=ca.format,ca.parse,ca.utcFormat,ca.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});const Eo=function(t){for(var e=t.length/6|0,r=new Array(e),i=0;i=1?Ho:t<=-1?-Ho:Math.asin(t)}const Go=Math.PI,Xo=2*Go,Vo=1e-6,Zo=Xo-Vo;function Qo(t){this._+=t[0];for(let e=1,r=t.length;e=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Qo;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;eVo)if(Math.abs(h*s-l*c)>Vo&&n){let d=r-a,p=i-o,f=s*s+l*l,g=d*d+p*p,y=Math.sqrt(f),m=Math.sqrt(u),x=n*Math.tan((Go-Math.acos((f+u-g)/(2*y*m)))/2),b=x/m,k=x/y;Math.abs(b-1)>Vo&&this._append`L${t+b*c},${e+b*h}`,this._append`A${n},${n},0,0,${+(h*d>c*p)},${this._x1=t+k*s},${this._y1=e+k*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,r,i,n,a){if(t=+t,e=+e,a=!!a,(r=+r)<0)throw new Error(`negative radius: ${r}`);let o=r*Math.cos(i),s=r*Math.sin(i),l=t+o,c=e+s,h=1^a,u=a?i-n:n-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Vo||Math.abs(this._y1-c)>Vo)&&this._append`L${l},${c}`,r&&(u<0&&(u=u%Xo+Xo),u>Zo?this._append`A${r},${r},0,1,${h},${t-o},${e-s}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:u>Vo&&this._append`A${r},${r},0,${+(u>=Go)},${h},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function ts(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new Jo(e)}function es(t){return t.innerRadius}function rs(t){return t.outerRadius}function is(t){return t.startAngle}function ns(t){return t.endAngle}function as(t){return t&&t.padAngle}function os(t,e,r,i,n,a,o){var s=t-r,l=e-i,c=(o?a:-a)/qo(s*s+l*l),h=c*l,u=-c*s,d=t+h,p=e+u,f=r+h,g=i+u,y=(d+f)/2,m=(p+g)/2,x=f-d,b=g-p,k=x*x+b*b,w=n-a,C=d*g-f*p,_=(b<0?-1:1)*qo(No(0,w*w*k-C*C)),v=(C*b-x*_)/k,S=(-C*x-b*_)/k,T=(C*b+x*_)/k,A=(-C*x+b*_)/k,M=v-y,B=S-m,L=T-y,F=A-m;return M*M+B*B>L*L+F*F&&(v=T,S=A),{cx:v,cy:S,x01:-h,y01:-u,x11:v*(n/w-1),y11:S*(n/w-1)}}function ss(){var t=es,e=rs,r=Oo(0),i=null,n=is,a=ns,o=as,s=null,l=ts(c);function c(){var c,h,u,d=+t.apply(this,arguments),p=+e.apply(this,arguments),f=n.apply(this,arguments)-Ho,g=a.apply(this,arguments)-Ho,y=Ro(g-f),m=g>f;if(s||(s=c=l()),pjo)if(y>Uo-jo)s.moveTo(p*Io(f),p*zo(f)),s.arc(0,0,p,f,g,!m),d>jo&&(s.moveTo(d*Io(g),d*zo(g)),s.arc(0,0,d,g,f,m));else{var x,b,k=f,w=g,C=f,_=g,v=y,S=y,T=o.apply(this,arguments)/2,A=T>jo&&(i?+i.apply(this,arguments):qo(d*d+p*p)),M=Po(Ro(p-d)/2,+r.apply(this,arguments)),B=M,L=M;if(A>jo){var F=Yo(A/d*zo(T)),$=Yo(A/p*zo(T));(v-=2*F)>jo?(C+=F*=m?1:-1,_-=F):(v=0,C=_=(f+g)/2),(S-=2*$)>jo?(k+=$*=m?1:-1,w-=$):(S=0,k=w=(f+g)/2)}var E=p*Io(k),D=p*zo(k),O=d*Io(_),R=d*zo(_);if(M>jo){var K,I=p*Io(w),N=p*zo(w),P=d*Io(C),z=d*zo(C);if(y1?0:u<-1?Wo:Math.acos(u))/2),Y=qo(K[0]*K[0]+K[1]*K[1]);B=Po(M,(d-Y)/(U-1)),L=Po(M,(p-Y)/(U+1))}else B=L=0}S>jo?L>jo?(x=os(P,z,E,D,p,L,m),b=os(I,N,O,R,p,L,m),s.moveTo(x.cx+x.x01,x.cy+x.y01),Ljo&&v>jo?B>jo?(x=os(O,R,I,N,d,-B,m),b=os(E,D,P,z,d,-B,m),s.lineTo(x.cx+x.x01,x.cy+x.y01),Bt?1:e>=t?0:NaN}function gs(t){return t}function ys(){var t=gs,e=fs,r=null,i=Oo(0),n=Oo(Uo),a=Oo(0);function o(o){var s,l,c,h,u,d=(o=ls(o)).length,p=0,f=new Array(d),g=new Array(d),y=+i.apply(this,arguments),m=Math.min(Uo,Math.max(-Uo,n.apply(this,arguments)-y)),x=Math.min(Math.abs(m)/d,a.apply(this,arguments)),b=x*(m<0?-1:1);for(s=0;s0&&(p+=u);for(null!=e?f.sort(function(t,r){return e(g[t],g[r])}):null!=r&&f.sort(function(t,e){return r(o[t],o[e])}),s=0,c=p?(m-d*b)/p:0;s0?u*c:0)+b,g[l]={data:o[l],index:s,value:u,startAngle:y,endAngle:h,padAngle:x};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:Oo(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,r=null,o):e},o.sort=function(t){return arguments.length?(r=t,e=null,o):r},o.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Oo(+t),o):i},o.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:Oo(+t),o):n},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Oo(+t),o):a},o}function ms(){}function xs(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function bs(t){this._context=t}function ks(t){return new bs(t)}function ws(t){this._context=t}function Cs(t){return new ws(t)}function _s(t){this._context=t}function vs(t){return new _s(t)}cs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xs(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ws.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_s.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:xs(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};class Ss{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}function Ts(t){return new Ss(t,!0)}function As(t){return new Ss(t,!1)}function Ms(t,e){this._basis=new bs(t),this._beta=e}Ms.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],a=e[0],o=t[r]-n,s=e[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*o),this._beta*e[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const Bs=function t(e){function r(t){return 1===e?new bs(t):new Ms(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function Ls(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Fs(t,e){this._context=t,this._k=(1-e)/6}Fs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ls(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $s=function t(e){function r(t){return new Fs(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Es(t,e){this._context=t,this._k=(1-e)/6}Es.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ds=function t(e){function r(t){return new Es(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Os(t,e){this._context=t,this._k=(1-e)/6}Os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ls(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Rs=function t(e){function r(t){return new Os(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Ks(t,e,r){var i=t._x1,n=t._y1,a=t._x2,o=t._y2;if(t._l01_a>jo){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>jo){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/h,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(i,n,a,o,t._x2,t._y2)}function Is(t,e){this._context=t,this._alpha=e}Is.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ns=function t(e){function r(t){return e?new Is(t,e):new Fs(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ps(t,e){this._context=t,this._alpha=e}Ps.prototype={areaStart:ms,areaEnd:ms,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zs=function t(e){function r(t){return e?new Ps(t,e):new Es(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function qs(t,e){this._context=t,this._alpha=e}qs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ks(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const js=function t(e){function r(t){return e?new qs(t,e):new Os(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ws(t){this._context=t}function Hs(t){return new Ws(t)}function Us(t){return t<0?-1:1}function Ys(t,e,r){var i=t._x1-t._x0,n=e-t._x1,a=(t._y1-t._y0)/(i||n<0&&-0),o=(r-t._y1)/(n||i<0&&-0),s=(a*n+o*i)/(i+n);return(Us(a)+Us(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Gs(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Xs(t,e,r){var i=t._x0,n=t._y0,a=t._x1,o=t._y1,s=(a-i)/3;t._context.bezierCurveTo(i+s,n+s*e,a-s,o-s*r,a,o)}function Vs(t){this._context=t}function Zs(t){this._context=new Qs(t)}function Qs(t){this._context=t}function Js(t){return new Vs(t)}function tl(t){return new Zs(t)}function el(t){this._context=t}function rl(t){var e,r,i=t.length-1,n=new Array(i),a=new Array(i),o=new Array(i);for(n[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)n[e]=(o[e]-n[e+1])/a[e];for(a[i-1]=(t[i]+n[i-1])/2,e=0;e=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},ll.prototype={constructor:ll,scale:function(t){return 1===t?this:new ll(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new ll(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new ll(1,0,0);ll.prototype},9418(t,e,r){"use strict";r.d(e,{A:()=>st});const{entries:i,setPrototypeOf:n,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:s}=Object;let{freeze:l,seal:c,create:h}=Object,{apply:u,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),c||(c=function(t){return t}),u||(u=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n1?e-1:0),i=1;i1?r-1:0),n=1;n2&&void 0!==arguments[2]?arguments[2]:x;n&&n(t,null);let i=e.length;for(;i--;){let n=e[i];if("string"==typeof n){const t=r(n);t!==n&&(a(e)||(e[i]=t),n=t)}t[n]=!0}return t}function L(t){for(let e=0;e/gm),U=c(/\$\{[\w\W]*/gm),Y=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),G=c(/^aria-[\-\w]+$/),X=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=c(/^(?:\w+script|data):/i),Z=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=c(/^html$/i),J=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:G,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:Y,DOCTYPE_NAME:Q,ERB_EXPR:H,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:V,MUSTACHE_EXPR:W,TMPLIT_EXPR:U});const et=1,rt=3,it=7,nt=8,at=9,ot=function(){return"undefined"==typeof window?null:window};var st=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ot();const r=e=>t(e);if(r.version="3.3.1",r.removed=[],!e||!e.document||e.document.nodeType!==at||!e.Element)return r.isSupported=!1,r;let{document:n}=e;const a=n,o=a.currentScript,{DocumentFragment:s,HTMLTemplateElement:c,Node:u,Element:d,NodeFilter:A,NamedNodeMap:M=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:L,DOMParser:W,trustedTypes:H}=e,U=d.prototype,Y=$(U,"cloneNode"),G=$(U,"remove"),V=$(U,"nextSibling"),Z=$(U,"childNodes"),J=$(U,"parentNode");if("function"==typeof c){const t=n.createElement("template");t.content&&t.content.ownerDocument&&(n=t.content.ownerDocument)}let st,lt="";const{implementation:ct,createNodeIterator:ht,createDocumentFragment:ut,getElementsByTagName:dt}=n,{importNode:pt}=a;let ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof i&&"function"==typeof J&&ct&&void 0!==ct.createHTMLDocument;const{MUSTACHE_EXPR:gt,ERB_EXPR:yt,TMPLIT_EXPR:mt,DATA_ATTR:xt,ARIA_ATTR:bt,IS_SCRIPT_OR_DATA:kt,ATTR_WHITESPACE:wt,CUSTOM_ELEMENT:Ct}=tt;let{IS_ALLOWED_URI:_t}=tt,vt=null;const St=B({},[...E,...D,...O,...K,...N]);let Tt=null;const At=B({},[...P,...z,...q,...j]);let Mt=Object.seal(h(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Bt=null,Lt=null;const Ft=Object.seal(h(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let $t=!0,Et=!0,Dt=!1,Ot=!0,Rt=!1,Kt=!0,It=!1,Nt=!1,Pt=!1,zt=!1,qt=!1,jt=!1,Wt=!0,Ht=!1,Ut=!0,Yt=!1,Gt={},Xt=null;const Vt=B({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=B({},["audio","video","img","source","image","track"]);let Jt=null;const te=B({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",ie="http://www.w3.org/1999/xhtml";let ne=ie,ae=!1,oe=null;const se=B({},[ee,re,ie],b);let le=B({},["mi","mo","mn","ms","mtext"]),ce=B({},["annotation-xml"]);const he=B({},["title","style","font","a","script"]);let ue=null;const de=["application/xhtml+xml","text/html"];let pe=null,fe=null;const ge=n.createElement("form"),ye=function(t){return t instanceof RegExp||t instanceof Function},me=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!fe||fe!==t){if(t&&"object"==typeof t||(t={}),t=F(t),ue=-1===de.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===ue?b:x,vt=v(t,"ALLOWED_TAGS")?B({},t.ALLOWED_TAGS,pe):St,Tt=v(t,"ALLOWED_ATTR")?B({},t.ALLOWED_ATTR,pe):At,oe=v(t,"ALLOWED_NAMESPACES")?B({},t.ALLOWED_NAMESPACES,b):se,Jt=v(t,"ADD_URI_SAFE_ATTR")?B(F(te),t.ADD_URI_SAFE_ATTR,pe):te,Zt=v(t,"ADD_DATA_URI_TAGS")?B(F(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Xt=v(t,"FORBID_CONTENTS")?B({},t.FORBID_CONTENTS,pe):Vt,Bt=v(t,"FORBID_TAGS")?B({},t.FORBID_TAGS,pe):F({}),Lt=v(t,"FORBID_ATTR")?B({},t.FORBID_ATTR,pe):F({}),Gt=!!v(t,"USE_PROFILES")&&t.USE_PROFILES,$t=!1!==t.ALLOW_ARIA_ATTR,Et=!1!==t.ALLOW_DATA_ATTR,Dt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Rt=t.SAFE_FOR_TEMPLATES||!1,Kt=!1!==t.SAFE_FOR_XML,It=t.WHOLE_DOCUMENT||!1,zt=t.RETURN_DOM||!1,qt=t.RETURN_DOM_FRAGMENT||!1,jt=t.RETURN_TRUSTED_TYPE||!1,Pt=t.FORCE_BODY||!1,Wt=!1!==t.SANITIZE_DOM,Ht=t.SANITIZE_NAMED_PROPS||!1,Ut=!1!==t.KEEP_CONTENT,Yt=t.IN_PLACE||!1,_t=t.ALLOWED_URI_REGEXP||X,ne=t.NAMESPACE||ie,le=t.MATHML_TEXT_INTEGRATION_POINTS||le,ce=t.HTML_INTEGRATION_POINTS||ce,Mt=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Mt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Mt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Mt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Rt&&(Et=!1),qt&&(zt=!0),Gt&&(vt=B({},N),Tt=[],!0===Gt.html&&(B(vt,E),B(Tt,P)),!0===Gt.svg&&(B(vt,D),B(Tt,z),B(Tt,j)),!0===Gt.svgFilters&&(B(vt,O),B(Tt,z),B(Tt,j)),!0===Gt.mathMl&&(B(vt,K),B(Tt,q),B(Tt,j))),t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?Ft.tagCheck=t.ADD_TAGS:(vt===St&&(vt=F(vt)),B(vt,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?Ft.attributeCheck=t.ADD_ATTR:(Tt===At&&(Tt=F(Tt)),B(Tt,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&B(Jt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Xt===Vt&&(Xt=F(Xt)),B(Xt,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Xt===Vt&&(Xt=F(Xt)),B(Xt,t.ADD_FORBID_CONTENTS,pe)),Ut&&(vt["#text"]=!0),It&&B(vt,["html","head","body"]),vt.table&&(B(vt,["tbody"]),delete Bt.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');st=t.TRUSTED_TYPES_POLICY,lt=st.createHTML("")}else void 0===st&&(st=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(H,o)),null!==st&&"string"==typeof lt&&(lt=st.createHTML(""));l&&l(t),fe=t}},xe=B({},[...D,...O,...R]),be=B({},[...K,...I]),ke=function(t){y(r.removed,{element:t});try{J(t).removeChild(t)}catch(e){G(t)}},we=function(t,e){try{y(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){y(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(zt||qt)try{ke(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},Ce=function(t){let e=null,r=null;if(Pt)t=""+t;else{const e=k(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===ue&&ne===ie&&(t=''+t+"");const i=st?st.createHTML(t):t;if(ne===ie)try{e=(new W).parseFromString(i,ue)}catch(o){}if(!e||!e.documentElement){e=ct.createDocument(ne,"template",null);try{e.documentElement.innerHTML=ae?lt:i}catch(o){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ne===ie?dt.call(e,It?"html":"body")[0]:It?e.documentElement:a},_e=function(t){return ht.call(t.ownerDocument||t,t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},ve=function(t){return t instanceof L&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof M)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},Se=function(t){return"function"==typeof u&&t instanceof u};function Te(t,e,i){p(t,t=>{t.call(r,e,i,fe)})}const Ae=function(t){let e=null;if(Te(ft.beforeSanitizeElements,t,null),ve(t))return ke(t),!0;const i=pe(t.nodeName);if(Te(ft.uponSanitizeElement,t,{tagName:i,allowedTags:vt}),Kt&&t.hasChildNodes()&&!Se(t.firstElementChild)&&S(/<[/\w!]/g,t.innerHTML)&&S(/<[/\w!]/g,t.textContent))return ke(t),!0;if(t.nodeType===it)return ke(t),!0;if(Kt&&t.nodeType===nt&&S(/<[/\w]/g,t.data))return ke(t),!0;if(!(Ft.tagCheck instanceof Function&&Ft.tagCheck(i))&&(!vt[i]||Bt[i])){if(!Bt[i]&&Be(i)){if(Mt.tagNameCheck instanceof RegExp&&S(Mt.tagNameCheck,i))return!1;if(Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(i))return!1}if(Ut&&!Xt[i]){const e=J(t)||t.parentNode,r=Z(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const n=Y(r[i],!0);n.__removalCount=(t.__removalCount||0)+1,e.insertBefore(n,V(t))}}}return ke(t),!0}return t instanceof d&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:ne,tagName:"template"});const r=x(t.tagName),i=x(e.tagName);return!!oe[t.namespaceURI]&&(t.namespaceURI===re?e.namespaceURI===ie?"svg"===r:e.namespaceURI===ee?"svg"===r&&("annotation-xml"===i||le[i]):Boolean(xe[r]):t.namespaceURI===ee?e.namespaceURI===ie?"math"===r:e.namespaceURI===re?"math"===r&&ce[i]:Boolean(be[r]):t.namespaceURI===ie?!(e.namespaceURI===re&&!ce[i])&&!(e.namespaceURI===ee&&!le[i])&&!be[r]&&(he[r]||!xe[r]):!("application/xhtml+xml"!==ue||!oe[t.namespaceURI]))}(t)?(ke(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!S(/<\/no(script|embed|frames)/i,t.innerHTML)?(Rt&&t.nodeType===rt&&(e=t.textContent,p([gt,yt,mt],t=>{e=w(e,t," ")}),t.textContent!==e&&(y(r.removed,{element:t.cloneNode()}),t.textContent=e)),Te(ft.afterSanitizeElements,t,null),!1):(ke(t),!0)},Me=function(t,e,r){if(Wt&&("id"===e||"name"===e)&&(r in n||r in ge))return!1;if(Et&&!Lt[e]&&S(xt,e));else if($t&&S(bt,e));else if(Ft.attributeCheck instanceof Function&&Ft.attributeCheck(e,t));else if(!Tt[e]||Lt[e]){if(!(Be(t)&&(Mt.tagNameCheck instanceof RegExp&&S(Mt.tagNameCheck,t)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(t))&&(Mt.attributeNameCheck instanceof RegExp&&S(Mt.attributeNameCheck,e)||Mt.attributeNameCheck instanceof Function&&Mt.attributeNameCheck(e,t))||"is"===e&&Mt.allowCustomizedBuiltInElements&&(Mt.tagNameCheck instanceof RegExp&&S(Mt.tagNameCheck,r)||Mt.tagNameCheck instanceof Function&&Mt.tagNameCheck(r))))return!1}else if(Jt[e]);else if(S(_t,w(r,wt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==C(r,"data:")||!Zt[t]){if(Dt&&!S(kt,w(r,wt,"")));else if(r)return!1}else;return!0},Be=function(t){return"annotation-xml"!==t&&k(t,Ct)},Le=function(t){Te(ft.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||ve(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Tt,forceKeepAttr:void 0};let n=e.length;for(;n--;){const o=e[n],{name:s,namespaceURI:l,value:c}=o,h=pe(s),u=c;let d="value"===s?u:_(u);if(i.attrName=h,i.attrValue=d,i.keepAttr=!0,i.forceKeepAttr=void 0,Te(ft.uponSanitizeAttribute,t,i),d=i.attrValue,!Ht||"id"!==h&&"name"!==h||(we(s,t),d="user-content-"+d),Kt&&S(/((--!?|])>)|<\/(style|title|textarea)/i,d)){we(s,t);continue}if("attributename"===h&&k(d,"href")){we(s,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){we(s,t);continue}if(!Ot&&S(/\/>/i,d)){we(s,t);continue}Rt&&p([gt,yt,mt],t=>{d=w(d,t," ")});const f=pe(t.nodeName);if(Me(f,h,d)){if(st&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(l);else switch(H.getAttributeType(f,h)){case"TrustedHTML":d=st.createHTML(d);break;case"TrustedScriptURL":d=st.createScriptURL(d)}if(d!==u)try{l?t.setAttributeNS(l,s,d):t.setAttribute(s,d),ve(t)?ke(t):g(r.removed)}catch(a){we(s,t)}}else we(s,t)}Te(ft.afterSanitizeAttributes,t,null)},Fe=function t(e){let r=null;const i=_e(e);for(Te(ft.beforeSanitizeShadowDOM,e,null);r=i.nextNode();)Te(ft.uponSanitizeShadowNode,r,null),Ae(r),Le(r),r.content instanceof s&&t(r.content);Te(ft.afterSanitizeShadowDOM,e,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,n=null,o=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!Se(t)){if("function"!=typeof t.toString)throw T("toString is not a function");if("string"!=typeof(t=t.toString()))throw T("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Nt||me(e),r.removed=[],"string"==typeof t&&(Yt=!1),Yt){if(t.nodeName){const e=pe(t.nodeName);if(!vt[e]||Bt[e])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof u)i=Ce("\x3c!----\x3e"),n=i.ownerDocument.importNode(t,!0),n.nodeType===et&&"BODY"===n.nodeName||"HTML"===n.nodeName?i=n:i.appendChild(n);else{if(!zt&&!Rt&&!It&&-1===t.indexOf("<"))return st&&jt?st.createHTML(t):t;if(i=Ce(t),!i)return zt?null:jt?lt:""}i&&Pt&&ke(i.firstChild);const c=_e(Yt?t:i);for(;o=c.nextNode();)Ae(o),Le(o),o.content instanceof s&&Fe(o.content);if(Yt)return t;if(zt){if(qt)for(l=ut.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(Tt.shadowroot||Tt.shadowrootmode)&&(l=pt.call(a,l,!0)),l}let h=It?i.outerHTML:i.innerHTML;return It&&vt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&S(Q,i.ownerDocument.doctype.name)&&(h="\n"+h),Rt&&p([gt,yt,mt],t=>{h=w(h,t," ")}),st&&jt?st.createHTML(h):h},r.setConfig=function(){me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Nt=!0},r.clearConfig=function(){fe=null,Nt=!1},r.isValidAttribute=function(t,e,r){fe||me({});const i=pe(t),n=pe(e);return Me(i,n,r)},r.addHook=function(t,e){"function"==typeof e&&y(ft[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=f(ft[t],e);return-1===r?void 0:m(ft[t],r,1)[0]}return g(ft[t])},r.removeHooks=function(t){ft[t]=[]},r.removeAllHooks=function(){ft={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},3539(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(2453),n=r(3122);const a=class{constructor(){this.type=n.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.Z.ALL}is(t){return this.type===t}};const o=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},4886(t,e,r){"use strict";r.d(e,{A:()=>g});var i=r(3539),n=r(3122);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],n=parseInt(r,16),o=r.length,s=o%4==0,l=o>4,c=l?1:17,h=l?8:4,u=s?0:-1,d=l?255:15;return i.A.set({r:(n>>h*(u+3)&d)*c,g:(n>>h*(u+2)&d)*c,b:(n>>h*(u+1)&d)*c,a:s?(n&d)*c/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}${n.Y[Math.round(255*a)]}`:`#${n.Y[Math.round(e)]}${n.Y[Math.round(r)]}${n.Y[Math.round(i)]}`}},o=a;var s=r(2453);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.A.channel.clamp.h(.9*parseFloat(t));case"rad":return s.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.A.channel.clamp.h(360*parseFloat(t))}}return s.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,a,o,c,h]=r;return i.A.set({h:l._hue2deg(n),s:s.A.channel.clamp.s(parseFloat(a)),l:s.A.channel.clamp.l(parseFloat(o)),a:c?s.A.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%, ${n})`:`hsl(${s.A.lang.round(e)}, ${s.A.lang.round(r)}%, ${s.A.lang.round(i)}%)`}},c=l,h={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=h.colors[t];if(e)return o.parse(e)},stringify:t=>{const e=o.stringify(t);for(const r in h.colors)if(h.colors[r]===e)return r}},u=h,d={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,a,o,l,c,h,u,p]=r;return i.A.set({r:s.A.channel.clamp.r(a?2.55*parseFloat(n):parseFloat(n)),g:s.A.channel.clamp.g(l?2.55*parseFloat(o):parseFloat(o)),b:s.A.channel.clamp.b(h?2.55*parseFloat(c):parseFloat(c)),a:u?s.A.channel.clamp.a(p?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)}, ${s.A.lang.round(n)})`:`rgb(${s.A.lang.round(e)}, ${s.A.lang.round(r)}, ${s.A.lang.round(i)})`}},p=d,f={format:{keyword:h,hex:o,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=o.parse(t)||p.parse(t)||c.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.Z.HSL)||void 0===t.data.r?c.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):o.stringify(t)},g=f},3122(t,e,r){"use strict";r.d(e,{Y:()=>n,Z:()=>a});var i=r(2453);const n={};for(let o=0;o<=255;o++)n[o]=i.A.unit.dec2hex(o);const a={ALL:0,RGB:1,HSL:2}},5635(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(2453),n=r(4886);const a=(t,e,r)=>{const a=n.A.parse(t),o=a[e],s=i.A.channel.clamp[e](o+r);return o!==s&&(a[e]=s),n.A.stringify(a)}},8232(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(2453),n=r(4886);const a=(t,e)=>{const r=n.A.parse(t);for(const n in e)r[n]=i.A.channel.clamp[n](e[n]);return n.A.stringify(r)}},5263(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",-e)},3219(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(2453),n=r(4886);const a=t=>{const{r:e,g:r,b:a}=n.A.parse(t),o=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(o)},o=t=>a(t)>=.5,s=t=>!o(t)},8041(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(5635);const n=(t,e)=>(0,i.A)(t,"l",e)},5582(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(2453),n=r(3539),a=r(4886),o=r(8232);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,o.A)(t,{a:e});const l=n.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(s)});return a.A.stringify(l)}},2453(t,e,r){"use strict";r.d(e,{A:()=>n});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,o=2*r-a;switch(n){case"r":return 255*i.hue2rgb(o,a,t+1/3);case"g":return 255*i.hue2rgb(o,a,t);case"b":return 255*i.hue2rgb(o,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),a=Math.min(t,e,r),o=(n+a)/2;if("l"===i)return 100*o;if(n===a)return 0;const s=n-a;if("s"===i)return 100*(o>.5?s/(2-n-a):s/(n+a));switch(n){case t:return 60*((e-r)/s+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},127(t,e,r){"use strict";r.d(e,{A:()=>d});const i=function(){this.__data__=[],this.size=0};var n=r(6984);const a=function(t,e){for(var r=t.length;r--;)if((0,n.A)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;const s=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():o.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const c=function(t){return a(this.__data__,t)>-1};const h=function(t,e){var r=this.__data__,i=a(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++ea});var i=r(8744),n=r(1917);const a=(0,i.A)(n.A,"Map")},9471(t,e,r){"use strict";r.d(e,{A:()=>_});const i=(0,r(8744).A)(Object,"create");const n=function(){this.__data__=i?i(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var o=Object.prototype.hasOwnProperty;const s=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return o.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const c=function(t){var e=this.__data__;return i?void 0!==e[t]:l.call(e,t)};const h=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++ea});var i=r(8744),n=r(1917);const a=(0,i.A)(n.A,"Set")},1754(t,e,r){"use strict";r.d(e,{A:()=>d});var i=r(127);const n=function(){this.__data__=new i.A,this.size=0};const a=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const o=function(t){return this.__data__.get(t)};const s=function(t){return this.__data__.has(t)};var l=r(8335),c=r(9471);const h=function(t,e){var r=this.__data__;if(r instanceof i.A){var n=r.__data__;if(!l.A||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new c.A(n)}return r.set(t,e),this.size=r.size,this};function u(t){var e=this.__data__=new i.A(t);this.size=e.size}u.prototype.clear=n,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=h;const d=u},241(t,e,r){"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Symbol},3988(t,e,r){"use strict";r.d(e,{A:()=>i});const i=r(1917).A.Uint8Array},3607(t,e,r){"use strict";r.d(e,{A:()=>h});const i=function(t,e){for(var r=-1,i=Array(t);++ro});var i=r(2528),n=r(6984),a=Object.prototype.hasOwnProperty;const o=function(t,e,r){var o=t[e];a.call(t,e)&&(0,n.A)(o,r)&&(void 0!==r||e in t)||(0,i.A)(t,e,r)}},2528(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(4171);const n=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},4574(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e,r,i){for(var n=-1,a=Object(e),o=i(e),s=o.length;s--;){var l=o[t?s:++n];if(!1===r(a[l],l,a))break}return e}}()},8496(t,e,r){"use strict";r.d(e,{A:()=>d});var i=r(241),n=Object.prototype,a=n.hasOwnProperty,o=n.toString,s=i.A?i.A.toStringTag:void 0;const l=function(t){var e=a.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(l){}var n=o.call(t);return i&&(e?t[s]=r:delete t[s]),n};var c=Object.prototype.toString;const h=function(t){return c.call(t)};var u=i.A?i.A.toStringTag:void 0;const d=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?l(t):h(t)}},1852(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(7271);const n=(0,r(367).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const o=function(t){if(!(0,i.A)(t))return n(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},4326(t,e,r){"use strict";r.d(e,{A:()=>o});var i=r(9008),n=r(6875),a=r(7525);const o=function(t,e){return(0,a.A)((0,n.A)(t,e,i.A),t+"")}},2789(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return t(e)}}},565(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(3988);const n=function(t){var e=new t.constructor(t.byteLength);return new i.A(e).set(new i.A(t)),e}},154(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(1917),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===n?i.A.Buffer:void 0,s=o?o.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}},1801(t,e,r){"use strict";r.d(e,{A:()=>n});var i=r(565);const n=function(t,e){var r=e?(0,i.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},9759(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++ra});var i=r(2851),n=r(2528);const a=function(t,e,r,a){var o=!r;r||(r={});for(var s=-1,l=e.length;++sa});var i=r(4326),n=r(6832);const a=function(t){return(0,i.A)(function(e,r){var i=-1,a=r.length,o=a>1?r[a-1]:void 0,s=a>2?r[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&(0,n.A)(r[0],r[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++in});var i=r(8744);const n=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},2136(t,e,r){"use strict";r.d(e,{A:()=>i});const i="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},8744(t,e,r){"use strict";r.d(e,{A:()=>x});var i=r(9610);const n=r(1917).A["__core-js_shared__"];var a,o=(a=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const s=function(t){return!!o&&o in t};var l=r(3149),c=r(1121),h=/^\[object .+?Constructor\]$/,u=Function.prototype,d=Object.prototype,p=u.toString,f=d.hasOwnProperty,g=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,l.A)(t)||s(t))&&((0,i.A)(t)?g:h).test((0,c.A)(t))};const m=function(t,e){return null==t?void 0:t[e]};const x=function(t,e){var r=m(t,e);return y(r)?r:void 0}},5647(t,e,r){"use strict";r.d(e,{A:()=>i});const i=(0,r(367).A)(Object.getPrototypeOf,Object)},9779(t,e,r){"use strict";r.d(e,{A:()=>_});var i=r(8744),n=r(1917);const a=(0,i.A)(n.A,"DataView");var o=r(8335);const s=(0,i.A)(n.A,"Promise");var l=r(9857);const c=(0,i.A)(n.A,"WeakMap");var h=r(8496),u=r(1121),d="[object Map]",p="[object Promise]",f="[object Set]",g="[object WeakMap]",y="[object DataView]",m=(0,u.A)(a),x=(0,u.A)(o.A),b=(0,u.A)(s),k=(0,u.A)(l.A),w=(0,u.A)(c),C=h.A;(a&&C(new a(new ArrayBuffer(1)))!=y||o.A&&C(new o.A)!=d||s&&C(s.resolve())!=p||l.A&&C(new l.A)!=f||c&&C(new c)!=g)&&(C=function(t){var e=(0,h.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,u.A)(r):"";if(i)switch(i){case m:return y;case x:return d;case b:return p;case k:return f;case w:return g}return e});const _=C},8598(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(3149),n=Object.create;const a=function(){function t(){}return function(e){if(!(0,i.A)(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var o=r(5647),s=r(7271);const l=function(t){return"function"!=typeof t.constructor||(0,s.A)(t)?{}:a((0,o.A)(t))}},5353(t,e,r){"use strict";r.d(e,{A:()=>n});var i=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&ts});var i=r(6984),n=r(8446),a=r(5353),o=r(3149);const s=function(t,e,r){if(!(0,o.A)(r))return!1;var s=typeof e;return!!("number"==s?(0,n.A)(r)&&(0,a.A)(e,r.length):"string"==s&&e in r)&&(0,i.A)(r[e],t)}},7271(t,e,r){"use strict";r.d(e,{A:()=>n});var i=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},4841(t,e,r){"use strict";r.d(e,{A:()=>s});var i=r(2136),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=n&&"object"==typeof module&&module&&!module.nodeType&&module,o=a&&a.exports===n&&i.A.process;const s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(e){}}()},367(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},6875(t,e,r){"use strict";r.d(e,{A:()=>a});const i=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var n=Math.max;const a=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=n(a.length-e,0),l=Array(s);++oa});var i=r(2136),n="object"==typeof self&&self&&self.Object===Object&&self;const a=i.A||n||Function("return this")()},7525(t,e,r){"use strict";r.d(e,{A:()=>c});var i=r(9142),n=r(4171),a=r(9008);const o=n.A?function(t,e){return(0,n.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:a.A;var s=Date.now;const l=function(t){var e=0,r=0;return function(){var i=s(),n=16-(i-r);if(r=i,n>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}};const c=l(o)},1121(t,e,r){"use strict";r.d(e,{A:()=>n});var i=Function.prototype.toString;const n=function(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},9142(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},6984(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},9008(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},2274(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(8496),n=r(3098);const a=function(t){return(0,n.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable,c=a(function(){return arguments}())?a:function(t){return(0,n.A)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const h=c},2049(t,e,r){"use strict";r.d(e,{A:()=>i});const i=Array.isArray},8446(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(9610),n=r(5254);const a=function(t){return null!=t&&(0,n.A)(t.length)&&!(0,i.A)(t)}},3533(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(8446),n=r(3098);const a=function(t){return(0,n.A)(t)&&(0,i.A)(t)}},9912(t,e,r){"use strict";r.d(e,{A:()=>l});var i=r(1917);const n=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=a&&"object"==typeof module&&module&&!module.nodeType&&module,s=o&&o.exports===a?i.A.Buffer:void 0;const l=(s?s.isBuffer:void 0)||n},6401(t,e,r){"use strict";r.d(e,{A:()=>d});var i=r(1852),n=r(9779),a=r(2274),o=r(2049),s=r(8446),l=r(9912),c=r(7271),h=r(3858),u=Object.prototype.hasOwnProperty;const d=function(t){if(null==t)return!0;if((0,s.A)(t)&&((0,o.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,h.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,n.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,c.A)(t))return!(0,i.A)(t).length;for(var r in t)if(u.call(t,r))return!1;return!0}},9610(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(8496),n=r(3149);const a=function(t){if(!(0,n.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5254(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},3149(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},3098(t,e,r){"use strict";r.d(e,{A:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},3858(t,e,r){"use strict";r.d(e,{A:()=>u});var i=r(8496),n=r(5254),a=r(3098),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1;const s=function(t){return(0,a.A)(t)&&(0,n.A)(t.length)&&!!o[(0,i.A)(t)]};var l=r(2789),c=r(4841),h=c.A&&c.A.isTypedArray;const u=h?(0,l.A)(h):s},5615(t,e,r){"use strict";r.d(e,{A:()=>h});var i=r(3607),n=r(3149),a=r(7271);const o=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var s=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,n.A)(t))return o(t);var e=(0,a.A)(t),r=[];for(var i in t)("constructor"!=i||!e&&s.call(t,i))&&r.push(i);return r};var c=r(8446);const h=function(t){return(0,c.A)(t)?(0,i.A)(t,!0):l(t)}},6632(t,e,r){"use strict";r.d(e,{A:()=>a});var i=r(9471);function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],a=r.cache;if(a.has(n))return a.get(n);var o=t.apply(this,i);return r.cache=a.set(n,o)||a,o};return r.cache=new(n.Cache||i.A),r}n.Cache=i.A;const a=n},2837(t,e,r){"use strict";r.d(e,{A:()=>D});var i=r(1754),n=r(2528),a=r(6984);const o=function(t,e,r){(void 0!==r&&!(0,a.A)(t[e],r)||void 0===r&&!(e in t))&&(0,n.A)(t,e,r)};var s=r(4574),l=r(154),c=r(1801),h=r(9759),u=r(8598),d=r(2274),p=r(2049),f=r(3533),g=r(9912),y=r(9610),m=r(3149),x=r(8496),b=r(5647),k=r(3098),w=Function.prototype,C=Object.prototype,_=w.toString,v=C.hasOwnProperty,S=_.call(Object);const T=function(t){if(!(0,k.A)(t)||"[object Object]"!=(0,x.A)(t))return!1;var e=(0,b.A)(t);if(null===e)return!0;var r=v.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&_.call(r)==S};var A=r(3858);const M=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var B=r(2031),L=r(5615);const F=function(t){return(0,B.A)(t,(0,L.A)(t))};const $=function(t,e,r,i,n,a,s){var x=M(t,r),b=M(e,r),k=s.get(b);if(k)o(t,r,k);else{var w=a?a(x,b,r+"",t,e,s):void 0,C=void 0===w;if(C){var _=(0,p.A)(b),v=!_&&(0,g.A)(b),S=!_&&!v&&(0,A.A)(b);w=b,_||v||S?(0,p.A)(x)?w=x:(0,f.A)(x)?w=(0,h.A)(x):v?(C=!1,w=(0,l.A)(b,!0)):S?(C=!1,w=(0,c.A)(b,!0)):w=[]:T(b)||(0,d.A)(b)?(w=x,(0,d.A)(x)?w=F(x):(0,m.A)(x)&&!(0,y.A)(x)||(w=(0,u.A)(b))):C=!1}C&&(s.set(b,w),n(w,b,i,a,s),s.delete(b)),o(t,r,w)}};const E=function t(e,r,n,a,l){e!==r&&(0,s.A)(r,function(s,c){if(l||(l=new i.A),(0,m.A)(s))$(e,r,c,n,t,a,l);else{var h=a?a(M(e,c),s,c+"",e,r,l):void 0;void 0===h&&(h=s),o(e,c,h)}},L.A)};const D=(0,r(3767).A)(function(t,e,r){E(t,e,r)})},7633(t,e,r){"use strict";r.d(e,{C0:()=>x,xA:()=>nt,hH:()=>S,Dl:()=>Dt,IU:()=>Zt,Wt:()=>Ut,Y2:()=>Kt,a$:()=>Pt,sb:()=>U,ME:()=>le,UI:()=>j,Ch:()=>k,mW:()=>b,DB:()=>y,_3:()=>vt,EJ:()=>g,m7:()=>ee,iN:()=>Jt,zj:()=>rt,D7:()=>oe,Gs:()=>fe,J$:()=>_,ab:()=>ie,Q2:()=>tt,P$:()=>D,ID:()=>_t,TM:()=>ht,Wi:()=>Et,H1:()=>ut,QO:()=>At,Js:()=>pe,Xd:()=>w,dj:()=>Rt,cL:()=>at,$i:()=>W,jZ:()=>mt,oB:()=>ce,wZ:()=>Q,EI:()=>te,SV:()=>Qt,Nk:()=>et,XV:()=>se,ke:()=>re,UU:()=>Z,ot:()=>zt,mj:()=>he,tM:()=>Ht,H$:()=>I,B6:()=>J});var i=r(797),n=r(4886),a=r(8232);const o=(t,e)=>{const r=n.A.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return(0,a.A)(t,i)};var s=r(5582);const l=(t,e,r=50)=>{const{r:i,g:a,b:o,a:l}=n.A.parse(t),{r:c,g:h,b:u,a:d}=n.A.parse(e),p=r/100,f=2*p-1,g=l-d,y=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,m=1-y,x=i*y+c*m,b=a*y+h*m,k=o*y+u*m,w=l*p+d*(1-p);return(0,s.A)(x,b,k,w)},c=(t,e=100)=>{const r=n.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var h,u=r(5263),d=r(8041),p=r(3219),f=r(9418),g=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,y=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,x=class extends Error{static{(0,i.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},b={},k=(0,i.K2)(function(t,e){t=t.replace(g,"").replace(y,"").replace(m,"\n");for(const[r,{detector:i}]of Object.entries(b)){if(i(t,e))return r}throw new x(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),w=(0,i.K2)((...t)=>{for(const{id:e,detector:r,loader:i}of t)C(e,r,i)},"registerLazyLoadedDiagrams"),C=(0,i.K2)((t,e,r)=>{b[t]&&i.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),b[t]={detector:e,loader:r},i.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),_=(0,i.K2)(t=>b[t].loader,"getDiagramLoader"),v=(0,i.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>v(t,e,n)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(n=>{"object"!=typeof e[n]||void 0!==t[n]&&"object"!=typeof t[n]?(i||"object"!=typeof t[n]&&"object"!=typeof e[n])&&(t[n]=e[n]):(void 0===t[n]&&(t[n]=Array.isArray(e[n])?[]:{}),t[n]=v(t[n],e[n],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),S=v,T="#ffffff",A="#f2f2f2",M=(0,i.K2)((t,e)=>o(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),B=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||o(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||o(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||M(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||M(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||M(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||c(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||c(this.tertiaryColor),this.lineColor=this.lineColor||c(this.background),this.arrowheadColor=this.arrowheadColor||c(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||c(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,i.K2)(t=>{const e=new B;return e.calculate(t),e},"getThemeVariables"),F=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.A)(this.primaryColor,16),this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=c(this.background),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.A)(c("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,s.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=(0,u.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,s.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,s.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=(0,d.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,d.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=o(this.primaryColor,{h:64}),this.fillType3=o(this.secondaryColor,{h:64}),this.fillType4=o(this.primaryColor,{h:-64}),this.fillType5=o(this.secondaryColor,{h:-64}),this.fillType6=o(this.primaryColor,{h:128}),this.fillType7=o(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$=(0,i.K2)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),E=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=o(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,s.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,i.K2)(t=>{const e=new E;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.A)("#cde498",10),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.primaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=(0,u.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||o(this.primaryColor,{h:30}),this.cScale4=this.cScale4||o(this.primaryColor,{h:60}),this.cScale5=this.cScale5||o(this.primaryColor,{h:90}),this.cScale6=this.cScale6||o(this.primaryColor,{h:120}),this.cScale7=this.cScale7||o(this.primaryColor,{h:150}),this.cScale8=this.cScale8||o(this.primaryColor,{h:210}),this.cScale9=this.cScale9||o(this.primaryColor,{h:270}),this.cScale10=this.cScale10||o(this.primaryColor,{h:300}),this.cScale11=this.cScale11||o(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},R=(0,i.K2)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),K=class{static{(0,i.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=o(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.primaryColor,this.darkMode),this.secondaryBorderColor=M(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=M(this.tertiaryColor,this.darkMode),this.primaryTextColor=c(this.primaryColor),this.secondaryTextColor=c(this.secondaryColor),this.tertiaryTextColor=c(this.tertiaryColor),this.lineColor=c(this.background),this.textColor=c(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=(0,d.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},I={base:{getThemeVariables:L},dark:{getThemeVariables:$},default:{getThemeVariables:D},forest:{getThemeVariables:R},neutral:{getThemeVariables:(0,i.K2)(t=>{const e=new K;return e.calculate(t),e},"getThemeVariables")}},N={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},P={...N,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:I.default.getThemeVariables(),sequence:{...N.sequence,messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,i.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,i.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...N.gantt,tickInterval:void 0,useWidth:void 0},c4:{...N.c4,useWidth:void 0,personFont:(0,i.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...N.flowchart,inheritDir:!1},external_personFont:(0,i.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,i.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,i.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,i.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,i.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,i.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,i.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,i.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,i.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,i.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,i.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,i.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,i.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,i.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...N.pie,useWidth:984},xyChart:{...N.xyChart,useWidth:void 0},requirement:{...N.requirement,useWidth:void 0},packet:{...N.packet},radar:{...N.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},z=(0,i.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...z(t[i],"")]:[...r,e+i],[]),"keyify"),q=new Set(z(P,"")),j=P,W=(0,i.K2)(t=>{if(i.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>W(t));else{for(const e of Object.keys(t)){if(i.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!q.has(e)||null==t[e]){i.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){i.Rm.debug("sanitizing object",e),W(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(i.Rm.debug("sanitizing css option",e),t[e]=H(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.Rm.debug("After sanitization",t)}},"sanitizeDirective"),H=(0,i.K2)(t=>{let e=0,r=0;for(const i of t){if(e{let r=S({},t),i={};for(const n of e)it(n),i=S(i,n);if(r=S(r,i),i.theme&&i.theme in I){const t=S({},h),e=S(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in I&&(r.themeVariables=I[r.theme].getThemeVariables(e))}return ct(X=r),X},"updateCurrentConfig"),Z=(0,i.K2)(t=>(Y=S({},U),Y=S(Y,t),t.theme&&I[t.theme]&&(Y.themeVariables=I[t.theme].getThemeVariables(t.themeVariables)),V(Y,G),Y),"setSiteConfig"),Q=(0,i.K2)(t=>{h=S({},t)},"saveConfigFromInitialize"),J=(0,i.K2)(t=>(Y=S(Y,t),V(Y,G),Y),"updateSiteConfig"),tt=(0,i.K2)(()=>S({},Y),"getSiteConfig"),et=(0,i.K2)(t=>(ct(t),S(X,t),rt()),"setConfig"),rt=(0,i.K2)(()=>S({},X),"getConfig"),it=(0,i.K2)(t=>{t&&(["secure",...Y.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&it(t[e])}))},"sanitize"),nt=(0,i.K2)(t=>{W(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),G.push(t),V(Y,G)},"addDirective"),at=(0,i.K2)((t=Y)=>{V(t,G=[])},"reset"),ot={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},st={},lt=(0,i.K2)(t=>{st[t]||(i.Rm.warn(ot[t]),st[t]=!0)},"issueWarning"),ct=(0,i.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&<("LAZY_LOAD_DEPRECATED")},"checkConfig"),ht=(0,i.K2)(()=>{let t={};h&&(t=S(t,h));for(const e of G)t=S(t,e);return t},"getUserDefinedConfig"),ut=//gi,dt=(0,i.K2)(t=>{if(!t)return[""];return Ct(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),pt=(()=>{let t=!1;return()=>{t||(ft(),t=!0)}})();function ft(){const t="data-temp-href-target";f.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),f.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(ft,"setupDompurifyHooks");var gt=(0,i.K2)(t=>{pt();return f.A.sanitize(t)},"removeScript"),yt=(0,i.K2)((t,e)=>{if(!1!==e.flowchart?.htmlLabels){const r=e.securityLevel;"antiscript"===r||"strict"===r?t=gt(t):"loose"!==r&&(t=(t=(t=Ct(t)).replace(//g,">")).replace(/=/g,"="),t=wt(t))}return t},"sanitizeMore"),mt=(0,i.K2)((t,e)=>t?t=e.dompurifyConfig?f.A.sanitize(yt(t,e),e.dompurifyConfig).toString():f.A.sanitize(yt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),xt=(0,i.K2)((t,e)=>"string"==typeof t?mt(t,e):t.flat().map(t=>mt(t,e)),"sanitizeTextOrArray"),bt=(0,i.K2)(t=>ut.test(t),"hasBreaks"),kt=(0,i.K2)(t=>t.split(ut),"splitBreaks"),wt=(0,i.K2)(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Ct=(0,i.K2)(t=>t.replace(ut,"#br#"),"breakToPlaceholder"),_t=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),vt=(0,i.K2)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),St=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Tt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),At=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),Bt=(0,i.K2)((t,e)=>{const r=Mt(t,"~"),i=Mt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Lt=(0,i.K2)(t=>{const e=Mt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==n&&-1!==a&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Ft=(0,i.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),$t=/\$\$(.*)\$\$/g,Et=(0,i.K2)(t=>(t.match($t)?.length??0)>0,"hasKatex"),Dt=(0,i.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Rt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Ot=(0,i.K2)(async(t,e)=>{if(!Et(t))return t;if(!(Ft()||e.legacyMathML||e.forceLegacyMathML))return t.replace($t,"MathML is unsupported in this environment.");{const{default:i}=await r.e(2130).then(r.bind(r,2130)),n=e.forceLegacyMathML||!Ft()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(ut).map(t=>Et(t)?`
${t}
`:`
${t}
`).join("").replace($t,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Rt=(0,i.K2)(async(t,e)=>mt(await Ot(t,e),e),"renderKatexSanitized"),Kt={getRows:dt,sanitizeText:mt,sanitizeTextOrArray:xt,hasBreaks:bt,splitBreaks:kt,lineBreakRegex:ut,removeScript:gt,getUrl:_t,evaluate:vt,getMax:St,getMin:Tt},It=(0,i.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Nt=(0,i.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Pt=(0,i.K2)(function(t,e,r,i){const n=Nt(e,r,i);It(t,n)},"configureSvgSize"),zt=(0,i.K2)(function(t,e,r,n){const a=e.node().getBBox(),o=a.width,s=a.height;i.Rm.info(`SVG bounds: ${o}x${s}`,a);let l=0,c=0;i.Rm.info(`Graph bounds: ${l}x${c}`,t),l=o+2*r,c=s+2*r,i.Rm.info(`Calculated bounds: ${l}x${c}`),Pt(e,c,l,n);const h=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",h)},"setupGraphViewbox"),qt={},jt=(0,i.K2)((t,e,r)=>{let n="";return t in qt&&qt[t]?n=qt[t](r):i.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: 1px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${n}\n\n ${e}\n`},"getStyles"),Wt=(0,i.K2)((t,e)=>{void 0!==e&&(qt[t]=e)},"addStylesForDiagram"),Ht=jt,Ut={};(0,i.VA)(Ut,{clear:()=>Zt,getAccDescription:()=>ee,getAccTitle:()=>Jt,getDiagramTitle:()=>ie,setAccDescription:()=>te,setAccTitle:()=>Qt,setDiagramTitle:()=>re});var Yt="",Gt="",Xt="",Vt=(0,i.K2)(t=>mt(t,rt()),"sanitizeText"),Zt=(0,i.K2)(()=>{Yt="",Xt="",Gt=""},"clear"),Qt=(0,i.K2)(t=>{Yt=Vt(t).replace(/^\s+/g,"")},"setAccTitle"),Jt=(0,i.K2)(()=>Yt,"getAccTitle"),te=(0,i.K2)(t=>{Xt=Vt(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ee=(0,i.K2)(()=>Xt,"getAccDescription"),re=(0,i.K2)(t=>{Gt=Vt(t)},"setDiagramTitle"),ie=(0,i.K2)(()=>Gt,"getDiagramTitle"),ne=i.Rm,ae=i.He,oe=rt,se=et,le=U,ce=(0,i.K2)(t=>mt(t,oe()),"sanitizeText"),he=zt,ue=(0,i.K2)(()=>Ut,"getCommonDb"),de={},pe=(0,i.K2)((t,e,r)=>{de[t]&&ne.warn(`Diagram with id ${t} already registered. Overwriting.`),de[t]=e,r&&C(t,r),Wt(t,e.styles),e.injectUtils?.(ne,ae,oe,ce,he,ue(),()=>{})},"registerDiagram"),fe=(0,i.K2)(t=>{if(t in de)return de[t];throw new ge(t)},"getDiagram"),ge=class extends Error{static{(0,i.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},797(t,e,r){"use strict";r.d(e,{He:()=>c,K2:()=>a,Rm:()=>l,VA:()=>o});var i=r(4353),n=Object.defineProperty,a=(t,e)=>n(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},s={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},c=a(function(t="fatal"){let e=s.fatal;"string"==typeof t?t.toLowerCase()in s&&(e=s[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=s.fatal&&(l.fatal=console.error?console.error.bind(console,h("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",h("FATAL"))),e<=s.error&&(l.error=console.error?console.error.bind(console,h("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",h("ERROR"))),e<=s.warn&&(l.warn=console.warn?console.warn.bind(console,h("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",h("WARN"))),e<=s.info&&(l.info=console.info?console.info.bind(console,h("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",h("INFO"))),e<=s.debug&&(l.debug=console.debug?console.debug.bind(console,h("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",h("DEBUG"))),e<=s.trace&&(l.trace=console.debug?console.debug.bind(console,h("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",h("TRACE")))},"setLogLevel"),h=a(t=>`%c${i().format("ss.SSS")} : ${t} : `,"format")},2387(t,e,r){"use strict";r.d(e,{Fr:()=>h,GX:()=>c,KX:()=>l,WW:()=>o,ue:()=>a});var i=r(7633),n=r(797),a=(0,n.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),o=(0,n.K2)(t=>{const e=s([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),s=(0,n.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,n.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,n.K2)(t=>{const{stylesArray:e}=o(t),r=[],i=[],n=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:a}},"styles2String"),h=(0,n.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,i.D7)(),{nodeBorder:a,mainBkg:s}=r,{stylesMap:l}=o(t);return Object.assign({roughness:.7,fill:l.get("fill")||s,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:n,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),u=(0,n.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},3245(t,e,r){"use strict";r.d(e,{O:()=>i});var i=(0,r(797).K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins")},5553(t,e,r){"use strict";r.d(e,{n:()=>i});var i={name:"mermaid",version:"11.12.3",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.23",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}},3590(t,e,r){"use strict";r.d(e,{D:()=>o});var i=r(7633),n=r(797),a=r(451),o=(0,n.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},8698(t,e,r){"use strict";r.d(e,{Nq:()=>a,RI:()=>l,hq:()=>n});var i=r(797),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4},a={arrow_point:9,arrow_cross:12.5,arrow_circle:12.5};function o(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=s(t),e=s(e);const[r,i]=[t.x,t.y],[n,a]=[e.x,e.y],o=n-r,l=a-i;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}(0,i.K2)(o,"calculateDeltaAndAngle");var s=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),l=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let a=0;const l=s(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaX:r}=o(i[i.length-1],i[i.length-2]);a=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const c=Math.abs(s(e).x-s(i[i.length-1]).x),h=Math.abs(s(e).y-s(i[i.length-1]).y),u=Math.abs(s(e).x-s(i[0]).x),d=Math.abs(s(e).y-s(i[0]).y),p=n[t.arrowTypeStart],f=n[t.arrowTypeEnd];if(c0&&h0&&d=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){const{angle:e,deltaY:r}=o(i[i.length-1],i[i.length-2]);a=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const c=Math.abs(s(e).y-s(i[i.length-1]).y),h=Math.abs(s(e).x-s(i[i.length-1]).x),u=Math.abs(s(e).y-s(i[0]).y),d=Math.abs(s(e).x-s(i[0]).x),p=n[t.arrowTypeStart],f=n[t.arrowTypeEnd];if(c0&&h0&&die,GZ:()=>se,WY:()=>Wt,pC:()=>zt,hE:()=>oe,Gc:()=>It});var i=r(3226),n=r(7633),a=r(797);const o=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c=Object.freeze({...s,...l}),h=Object.freeze({...c,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in h)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let a={};function o(t){a=u(i[t]||n[t],a)}return o(e),r.forEach(o),u(t,a)}function p(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(n[e]=[r].concat(a))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}const f=Object.freeze({width:null,height:null}),g=Object.freeze({...f,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function x(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const n=[];let a=i.shift(),o=m.test(a);for(;;){if(o){const t=parseFloat(a);isNaN(t)?n.push(a):n.push(Math.ceil(t*e*r)/r)}else n.push(a);if(a=i.shift(),void 0===a)return n.join("");o=!o}}const b=/\sid="(\S+)"/g,k=new Map;function w(t){const e=[];let r;for(;r=b.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=k.get(t)||0;return k.set(t,e+1),e?`${t}${e}`:t}(e),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var C=r(451);function _(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var v={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function S(t){v=t}var T={exec:()=>null};function A(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(B.caret,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}var M=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},L=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,F=/(?:[*+-]|\d{1,9}[.)])/,$=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,E=A($).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),D=A($).replace(/bull/g,F).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),O=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,K=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",R).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),I=A(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,F).getRegex(),N="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",P=/|$))/,z=A("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",P).replace("tag",N).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),q=A(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),j={blockquote:A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",q).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:K,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:L,html:z,lheading:E,list:I,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:q,table:T,text:/^[^\n]+/},W=A("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex(),H={...j,lheading:D,table:W,paragraph:A(O).replace("hr",L).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",W).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",N).getRegex()},U={...j,html:A("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",P).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:T,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:A(O).replace("hr",L).replace("heading"," *#{1,6} *[^\n]").replace("lheading",E).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Y=/^( {2,}|\\)\n(?!\s*$)/,G=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,Z=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",M?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=A(tt,"u").replace(/punct/g,G).getRegex(),rt=A(tt,"u").replace(/punct/g,Q).getRegex(),it="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",nt=A(it,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,G).getRegex(),at=A(it,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),ot=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,G).getRegex(),st=A(/\\(punct)/,"gu").replace(/punct/g,G).getRegex(),lt=A(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ct=A(P).replace("(?:--\x3e|$)","--\x3e").getRegex(),ht=A("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ct).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ut=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,dt=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ut).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=A(/^!?\[(label)\]\[(ref)\]/).replace("label",ut).replace("ref",R).getRegex(),ft=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",R).getRegex(),gt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yt={_backpedal:T,anyPunctuation:st,autolink:lt,blockSkip:J,br:Y,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:T,emStrongLDelim:et,emStrongRDelimAst:nt,emStrongRDelimUnd:ot,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:dt,nolink:ft,punctuation:Z,reflink:pt,reflinkSearch:A("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",ft).getRegex(),tag:ht,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},_t=t=>Ct[t];function vt(t,e){if(e){if(B.escapeTest.test(t))return t.replace(B.escapeReplace,_t)}else if(B.escapeTestNoEncode.test(t))return t.replace(B.escapeReplaceNoEncode,_t);return t}function St(t){try{t=encodeURI(t).replace(B.percentDecode,"%")}catch{return null}return t}function Tt(t,e){let r=t.replace(B.findPipe,(t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(B.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:At(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let n=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=n.length?t.slice(n.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=At(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:At(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=At(e[0],"\n").split("\n"),r="",i="",n=[];for(;t.length>0;){let e,a=!1,o=[];for(e=0;e1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;t;){let r=!1,i="",s="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),c=t.split("\n",1)[0],h=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):h?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),h&&this.rules.other.blankLine.test(c)&&(i+=c+"\n",t=t.substring(c.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),a=this.rules.other.headingBeginRegex(u),o=this.rules.other.htmlBeginRegex(u);for(;t;){let d,p=t.split("\n",1)[0];if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),d=c):d=c.replace(this.rules.other.tabCharGlobal," "),n.test(c)||a.test(c)||o.test(c)||e.test(c)||r.test(c))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!c.trim())s+="\n"+d.slice(u);else{if(h||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(l)||a.test(l)||r.test(l))break;s+="\n"+c}!h&&!c.trim()&&(h=!0),i+=p+"\n",t=t.substring(p.length+1),l=d.slice(u)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(o=!0));let d,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(d="[ ] "!==p[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:i,task:!!p,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}let s=n.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));n.loose=r}if(n.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=At(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),Mt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return Mt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,a=[...i[0]].length-1,o=a,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(n=[...r].length,i[3]||i[4]){o+=n;continue}if((i[5]||i[6])&&a%3&&!((a+n)%3)){s+=n;continue}if(o-=n,o>0)continue;n=Math.min(n,n+o+s);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+n);if(Math.min(a,n)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Lt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||v,this.options.tokenizer=this.options.tokenizer||new Bt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:B,block:kt.normal,inline:wt.normal};this.options.pedantic?(e.block=kt.pedantic,e.inline=wt.pedantic):this.options.gfm&&(e.block=kt.gfm,this.options.breaks?e.inline=wt.breaks:e.inline=wt.gfm),this.tokenizer.rules=e}static get rules(){return{block:kt,inline:wt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(B.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,n=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(i));)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,o="";for(;t;){let r;if(a||(o=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,o)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let n=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(o=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},Ft=class{options;parser;constructor(t){this.options=t||v}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(B.notSpaceStart)?.[0],n=t.replace(B.endingNewline,"")+"\n";return i?'
'+(r?n:vt(n,!0))+"
\n":"
"+(r?n:vt(n,!0))+"
\n"}blockquote({tokens:t}){return`
\n${this.parser.parse(t)}
\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
\n"}list(t){let e=t.ordered,r=t.start,i="";for(let a=0;a\n"+i+"\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+vt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let n=0;n${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${vt(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=St(t);if(null===n)return i;let a='
    ",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=St(t);if(null===n)return vt(r);let a=`${r}{let n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new Ft(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,n=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Bt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,n=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Dt;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,n=t.hooks[i],a=e[i];Dt.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Dt.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(e,t);return a.call(e,r)})();let i=n.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=n.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Lt.lex(t,e??this.defaults)}parser(t,e){return Et.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(e):e,i=await(n.hooks?await n.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(r,n),a=n.hooks?await n.hooks.processAllTokens(i):i;n.walkTokens&&await Promise.all(this.walkTokens(a,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser():t?Et.parse:Et.parseInline)(a,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(a);try{n.hooks&&(e=n.hooks.preprocess(e));let r=(n.hooks?n.hooks.provideLexer():t?Lt.lex:Lt.lexInline)(e,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let i=(n.hooks?n.hooks.provideParser():t?Et.parse:Et.parseInline)(r,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(o){return a(o)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+vt(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Rt(t,e){return Ot.parse(t,e)}Rt.options=Rt.setOptions=function(t){return Ot.setOptions(t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.getDefaults=_,Rt.defaults=v,Rt.use=function(...t){return Ot.use(...t),Rt.defaults=Ot.defaults,S(Rt.defaults),Rt},Rt.walkTokens=function(t,e){return Ot.walkTokens(t,e)},Rt.parseInline=Ot.parseInline,Rt.Parser=Et,Rt.parser=Et.parse,Rt.Renderer=Ft,Rt.TextRenderer=$t,Rt.Lexer=Lt,Rt.lexer=Lt.lex,Rt.Tokenizer=Bt,Rt.Hooks=Dt,Rt.parse=Rt;Rt.options,Rt.setOptions,Rt.use,Rt.walkTokens,Rt.parseInline,Et.parse,Lt.lex;var Kt=r(513),It={body:'?',height:80,width:80},Nt=new Map,Pt=new Map,zt=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)Pt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Nt.set(e.name,e.icons)}}},"registerIconPacks"),qt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,i="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),r=n.pop(),a={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!o(a)?null:a}const a=n[0],s=a.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!o(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:a};return e&&!o(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let n=Nt.get(i);if(!n){const t=Pt.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await t(),prefix:i},Nt.set(i,n)}catch(l){throw a.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=p(n,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),jt=(0,a.K2)(async t=>{try{return await qt(t),!0}catch{return!1}},"isIconAvailable"),Wt=(0,a.K2)(async(t,e,r)=>{let i;try{i=await qt(t,e?.fallbackPrefix)}catch(l){a.Rm.error(l),i=It}const o=function(t,e){const r={...c,...t},i={...g,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let o,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):i&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:o=n.height/2+n.top,e.unshift("rotate(90 "+o.toString()+" "+o.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:o=n.width/2+n.left,e.unshift("rotate(-90 "+o.toString()+" "+o.toString()+")")}s%2==1&&(n.left!==n.top&&(o=n.left,n.left=n.top,n.top=o),n.width!==n.height&&(o=n.width,n.width=n.height,n.height=o)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),a=t.indexOf("",a);if(-1===o)break;r+=t.slice(n+1,a).trim(),t=t.slice(0,i).trim()+t.slice(o+1)}return{defs:r,content:t}}(t);return n=i.defs,a=e+i.content+r,n?""+n+""+a:a;var n,a}(a,'',""))});const o=i.width,s=i.height,l=n.width,h=n.height;let u,d;null===o?(d=null===s?"1em":"auto"===s?h:s,u=x(d,l/h)):(u="auto"===o?l:o,d=null===s?x(u,h/l):"auto"===s?h:s);const p={},f=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};f("width",u),f("height",d);const y=[n.left,n.top,l,h];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}(i,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}(w(o.body),{...o.attributes,...r});return(0,n.jZ)(s,(0,n.zj)())},"getIconSVG");function Ht(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n"),i=(0,Kt.T)(r);return!1===e?i.replace(/ /g," "):i}function Ut(t,e={}){const r=Ht(t,e),i=Rt.lexer(r),n=[[]];let o=0;function s(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,a.K2)(s,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function Yt(t,{markdownAutoWrap:e}={}){const r=Rt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(i,"output"),r.map(i).join("")}function Gt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Xt(t,e){return Vt(t,[],Gt(e.content),e.type)}function Vt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...a]=r,o=[...e,n];return t([{content:o.join(""),type:i}])?Vt(t,o,a,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Zt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return Qt(t,e)}function Qt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},o=[...i];if(""!==n&&o.push({content:n,type:"normal"}),o.push(a),e(o))return Qt(t,e,r,o);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,n]=Xt(e,a);r.push([i]),n.content&&t.unshift(n)}return Qt(t,e,r)}function Jt(t,e){e&&t.attr("style",e)}async function te(t,e,r,i,a=!1,o=(0,n.zj)()){const s=t.append("foreignObject");s.attr("width",10*r+"px"),s.attr("height",10*r+"px");const l=s.append("xhtml:div"),c=(0,n.Wi)(e.label)?await(0,n.dj)(e.label.replace(n.Y2.lineBreakRegex,"\n"),o):(0,n.jZ)(e.label,o),h=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");u.html(c),Jt(u,e.labelStyle),u.attr("class",`${h} ${i}`),Jt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),l.style("max-width",r+"px"),l.style("text-align","center"),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let d=l.node().getBoundingClientRect();return d.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),d=l.node().getBoundingClientRect()),s.node()}function ee(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function re(t,e,r){const i=t.append("text"),n=ee(i,1,e);ae(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}function ie(t,e,r){const i=t.append("text"),n=ee(i,1,e);ae(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function ne(t,e,r,i=!1){const n=e.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),s=n.append("text").attr("y","-10.1");let l=0;for(const c of r){const e=(0,a.K2)(e=>re(n,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Zt(c,e);for(const t of r){ae(ee(s,l,1.1),t),l++}}if(i){const t=s.node().getBBox(),e=2;return o.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),n.node()}return s.node()}function ae(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(e.content):i.text(" "+e.content)})}async function oe(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{const r=`${i}:${a}`;return await jt(r)?await Wt(r,void 0,{class:"label-icon"}):``})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(Ht,"preprocessMarkdown"),(0,a.K2)(Ut,"markdownToLines"),(0,a.K2)(Yt,"markdownToHTML"),(0,a.K2)(Gt,"splitTextToChars"),(0,a.K2)(Xt,"splitWordToFitWidth"),(0,a.K2)(Vt,"splitWordToFitWidthRecursion"),(0,a.K2)(Zt,"splitLineToFitWidth"),(0,a.K2)(Qt,"splitLineToFitWidthRecursion"),(0,a.K2)(Jt,"applyStyle"),(0,a.K2)(te,"addHtmlSpan"),(0,a.K2)(ee,"createTspan"),(0,a.K2)(re,"computeWidthOfText"),(0,a.K2)(ie,"computeDimensionOfText"),(0,a.K2)(ne,"createFormattedText"),(0,a.K2)(ae,"updateTextContentAndStyles"),(0,a.K2)(oe,"replaceIconSubstring");var se=(0,a.K2)(async(t,e="",{style:r="",isTitle:o=!1,classes:s="",useHtmlLabels:l=!0,isNode:c=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(a.Rm.debug("XYZ createText",e,r,o,s,l,c,"addSvgBackground: ",u),l){const a=Yt(e,d),o=await oe((0,i.Sm)(a),d),l=e.replace(/\\\\/g,"\\"),p={isNode:c,label:(0,n.Wi)(e)?l:o,labelStyle:r.replace("fill:","color:")};return await te(t,p,h,s,u,d)}{const i=ne(h,t,Ut(e.replace(//g,"
    ").replace("
    ","
    "),d),!!e&&u);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,C.Ltv)(i).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,C.Ltv)(i).select("text").attr("style",e)}return i}},"createText")},5894(t,e,r){"use strict";r.d(e,{DA:()=>w,IU:()=>L,U:()=>B,U7:()=>Te,U_:()=>Me,Zk:()=>u,aP:()=>_e,gh:()=>Ae,lC:()=>p,on:()=>Se});var i=r(3245),n=r(2387),a=r(92),o=r(3226),s=r(7633),l=r(797),c=r(451),h=r(9893),u=(0,l.K2)(async(t,e,r)=>{let i;const n=e.useHtmlLabels||(0,s._3)((0,s.D7)()?.htmlLabels);i=r||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),u=h.insert("g").attr("class","label").attr("style",(0,o.KL)(e.labelStyle));let d;d=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=await(0,a.GZ)(u,(0,s.jZ)((0,o.Sm)(d),(0,s.D7)()),{useHtmlLabels:n,width:e.width||(0,s.D7)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img});let f=p.getBBox();const g=(e?.padding??0)/2;if(n){const t=p.children[0],e=(0,c.Ltv)(p),r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=(0,s.D7)().fontSize?(0,s.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=s.UI.fontSize]=(0,o.I5)(t),n=i*r+"px";e.style.minWidth=n,e.style.maxWidth=n}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return n?u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):u.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:h,bbox:f,halfPadding:g,label:u}},"labelHelper"),d=(0,l.K2)(async(t,e,r)=>{const i=r.useHtmlLabels||(0,s._3)((0,s.D7)()?.flowchart?.htmlLabels),n=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(n,(0,s.jZ)((0,o.Sm)(e),(0,s.D7)()),{useHtmlLabels:i,width:r.width||(0,s.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let h=l.getBBox();const u=r.padding/2;if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=l.children[0],e=(0,c.Ltv)(l);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}return i?n.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"):n.attr("transform","translate(0, "+-h.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:h,halfPadding:u,label:n}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),f=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function g(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function y(t,e,r,i,n,a){const o=[],s=r-t,l=i-e,c=s/a,h=2*Math.PI/c,u=e+l/2;for(let d=0;d<=50;d++){const e=t+d/50*s,r=u+n*Math.sin(h*(e-t));o.push({x:e,y:r})}return o}function m(t,e,r,i,n,a){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let c=0;c{var r,i,n=t.x,a=t.y,o=e.x-n,s=e.y-a,l=t.width/2,c=t.height/2;return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),r=0===s?0:c*o/s,i=c):(o<0&&(l=-l),r=l,i=0===o?0:l*s/o),{x:n+r,y:a+i}},"intersectRect");function b(t,e){e&&t.attr("style",e)}async function k(t){const e=(0,c.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=(0,s.D7)();let n=t.label;t.label&&(0,s.Wi)(t.label)&&(n=await(0,s.dj)(t.label.replace(s.Y2.lineBreakRegex,"\n"),i));const a='"+n+"";return r.html((0,s.jZ)(a,i)),b(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,l.K2)(b,"applyStyle"),(0,l.K2)(k,"addHtmlLabel");var w=(0,l.K2)(async(t,e,r,i)=>{let n=t||"";if("object"==typeof n&&(n=n[0]),(0,s._3)((0,s.D7)().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),l.Rm.info("vertexText"+n);const t={isNode:i,label:(0,o.Sm)(n).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e?e.replace("fill:","color:"):e};return await k(t)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let i=[];i="string"==typeof n?n.split(/\\n|\n|/gi):Array.isArray(n)?n:[];for(const e of i){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),r?i.setAttribute("class","title-row"):i.setAttribute("class","row"),i.textContent=e.trim(),t.appendChild(i)}return t}},"createLabel"),C=(0,l.K2)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),_=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,c.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:u}),i=t.path(C(A,M,S,T,0),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"rect"),v=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,a=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const o=i.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),S=(0,l.K2)(async(t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=i,d=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),p=d.insert("g",":first-child"),f=d.insert("g").attr("class","cluster-label");let g=d.append("rect");const y=f.node().appendChild(await w(e.label,e.labelStyle,void 0,!0));let m=y.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=y.children[0],e=(0,c.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const b=0*e.padding,k=b/2,_=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+b;e.width<=m.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const v=e.height+b,S=e.height+b-m.height-6,T=e.x-_/2,A=e.y-v/2;e.width=_;const M=e.y-e.height/2-k+m.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=h.A.svg(d),i=e.rx||e.ry?r.path(C(T,A,_,v,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:n}):r.rectangle(T,A,_,v,{seed:n});B=d.insert(()=>i,":first-child");const s=r.rectangle(T,M,_,S,{fill:t?a:o,fillStyle:t?"hachure":"solid",stroke:u,seed:n});B=d.insert(()=>i,":first-child"),g=d.insert(()=>s)}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",T).attr("y",A).attr("width",_).attr("height",v).attr("data-look",e.look),g.attr("class","inner").attr("x",T).attr("y",M).attr("width",_).attr("height",S)}f.attr("transform",`translate(${e.x-m.width/2}, ${A+1-((0,s._3)(r.flowchart.htmlLabels)?0:3)})`);const L=B.node().getBBox();return e.height=L.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:d,labelBBox:m}},"roundedWithTitle"),T=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,s.D7)(),{themeVariables:o,handDrawnSeed:u}=r,{clusterBkg:d,clusterBorder:p}=o,{labelStyles:f,nodeStyles:g,borderStyles:y,backgroundStyles:m}=(0,n.GX)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),k=(0,s._3)(r.flowchart.htmlLabels),w=b.insert("g").attr("class","cluster-label "),_=await(0,a.GZ)(w,e.label,{style:e.labelStyle,useHtmlLabels:k,isNode:!0,width:e.width});let v=_.getBBox();if((0,s._3)(r.flowchart.htmlLabels)){const t=_.children[0],e=(0,c.Ltv)(_);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.width<=v.width+e.padding?v.width+e.padding:e.width;e.width<=v.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const T=e.height,A=e.x-S/2,M=e.y-T/2;let B;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=h.A.svg(b),r=(0,n.Fr)(e,{roughness:.7,fill:d,stroke:p,fillWeight:4,seed:u}),i=t.path(C(A,M,S,T,e.rx),r);B=b.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),B.select("path:nth-child(2)").attr("style",y.join(";")),B.select("path").attr("style",m.join(";").replace("fill","stroke"))}else B=b.insert("rect",":first-child"),B.attr("style",g).attr("rx",e.rx).attr("ry",e.ry).attr("x",A).attr("y",M).attr("width",S).attr("height",T);const{subGraphTitleTopMargin:L}=(0,i.O)(r);if(w.attr("transform",`translate(${e.x-v.width/2}, ${e.y-e.height/2+L})`),f){const t=w.select("span");t&&t.attr("style",f)}const F=B.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=v.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:b,labelBBox:v}},"kanbanSection"),A={rect:_,squareRect:_,roundedWithTitle:S,noteGroup:v,divider:(0,l.K2)((t,e)=>{const r=(0,s.D7)(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,o=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),l=o.insert("g",":first-child"),c=0*e.padding,u=e.width+c;e.diff=-e.padding;const d=e.height+c,p=e.x-u/2,f=e.y-d/2;let g;if(e.width=u,"handDrawn"===e.look){const t=h.A.svg(o).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});g=o.insert(()=>t,":first-child")}else{g=l.insert("rect",":first-child");const t="divider";g.attr("class",t).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",e.look)}const y=g.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:T},M=new Map,B=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await A[r](t,e);return M.set(e.id,i),i},"insertCluster"),L=(0,l.K2)(()=>{M=new Map},"clear");function F(t,e){return t.intersect(e)}(0,l.K2)(F,"intersectNode");var $=F;function E(t,e,r,i){var n=t.x,a=t.y,o=n-i.x,s=a-i.y,l=Math.sqrt(e*e*s*s+r*r*o*o),c=Math.abs(e*r*o/l);i.x0}(0,l.K2)(K,"intersectLine"),(0,l.K2)(I,"sameSign");var N=K;function P(t,e,r){let i=t.x,n=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}):(o=Math.min(o,e.x),s=Math.min(s,e.y));let l=i-t.width/2-o,c=n-t.height/2-s;for(let h=0;h1&&a.sort(function(t,e){let i=t.x-r.x,n=t.y-r.y,a=Math.sqrt(i*i+n*n),o=e.x-r.x,s=e.y-r.y,l=Math.sqrt(o*o+s*s);return ag,":first-child");return y.attr("class","anchor").attr("style",(0,o.KL)(c)),p(e,y),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),z.circle(e,1,t)},s}function j(t,e,r,i,n,a,o){const s=(t+r)/2,l=(e+i)/2,c=Math.atan2(i-e,r-t),h=(r-t)/2/n,u=(i-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(c)*(o?-1:1),g=l-p*n*Math.cos(c)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/n);let m=Math.atan2((i-g)/a,(r-f)/n)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=y+b/19*m,e=f+n*Math.cos(t),r=g+a*Math.sin(t);x.push({x:e,y:r})}return x}async function W(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+20,l=o.height+e.padding,c=l/2,d=c/(2.5+l/50),{cssStyles:y}=e,m=[{x:s/2,y:-l/2},{x:-s/2,y:-l/2},...j(-s/2,-l/2,-s/2,l/2,d,c,!1),{x:s/2,y:l/2},...j(s/2,l/2,s/2,-l/2,d,c,!0)],x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(m),w=x.path(k,b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${d/2}, 0)`),p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},a}function H(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}async function U(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+e.padding+12,c=-s,d=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:c+12},{x:12,y:c}];let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=g(d),o=t.path(i,r);y=a.insert(()=>o,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&y.attr("style",m)}else y=H(a,l,s,d);return i&&y.attr("style",i),p(e,y),e.intersect=function(t){return z.polygon(e,d,t)},a}function Y(t,e){const{nodeStyles:r}=(0,n.GX)(e);e.label="";const i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,o=Math.max(28,e.width??0),s=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],l=h.A.svg(i),c=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const u=g(s),d=l.path(u,c),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return z.polygon(e,s,t)},i}async function G(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:c,halfPadding:d}=await u(t,e,f(e)),g=r?.padding??d,y=c.width/2+g;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(s),r=(0,n.Fr)(e,{}),i=t.circle(0,0,2*y,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else m=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0);return p(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return z.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,y,t),z.circle(e,y,t)},s}function X(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function V(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),o=Math.max(30,e?.width??0),{cssStyles:s}=e,c=h.A.svg(a),u=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");const d=c.circle(0,0,2*o,u),g=X(o),y=c.path(g,u),m=a.insert(()=>d,":first-child");return m.insert(()=>y),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),p(e,m),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:o,point:t});return z.circle(e,o,t)},a}function Z(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let c=0;cv,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-l/2+d-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,x,t)},a}function J(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let c=0;cv,":first-child").attr("stroke-opacity",0),S.insert(()=>C,":first-child"),S.attr("class","text"),y&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,S),e.intersect=function(t){return z.polygon(e,x,t)},a}function et(t,e,r,i=100,n=0,a=180){const o=[],s=n*Math.PI/180,l=(a*Math.PI/180-s)/(i-1);for(let c=0;cA,":first-child").attr("stroke-opacity",0),M.insert(()=>_,":first-child"),M.insert(()=>S,":first-child"),M.attr("class","text"),y&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-l/2+(e.padding??0)/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,M),e.intersect=function(t){return z.polygon(e,b,t)},a}async function it(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,1.25*(o.width+2*(e.padding??0)),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),c=l/2,{cssStyles:d}=e,y=h.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=s-c,k=l/4,w=[{x:b,y:0},{x:k,y:0},{x:0,y:l/2},{x:k,y:l},{x:b,y:l},...m(-b,-l/2,c,50,270,90)],C=g(w),_=y.path(C,x),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-s/2}, ${-l/2})`),p(e,v),e.intersect=function(t){return z.polygon(e,w,t)},a}(0,l.K2)(q,"anchor"),(0,l.K2)(j,"generateArcPoints"),(0,l.K2)(W,"bowTieRect"),(0,l.K2)(H,"insertPolygonShape"),(0,l.K2)(U,"card"),(0,l.K2)(Y,"choice"),(0,l.K2)(G,"circle"),(0,l.K2)(X,"createLine"),(0,l.K2)(V,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(it,"curvedTrapezoid");var nt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),at=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),ot=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function st(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),c=Math.max(s.width+e.padding,e.width??0),d=c/2,g=d/(2.5+c/50),y=Math.max(s.height+g+e.padding,e.height??0);let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=at(0,0,c,y,d,g),i=ot(0,g,c,y,d,g),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));m=a.insert(()=>s,":first-child"),m=a.insert(()=>o,":first-child"),m.attr("class","basic label-container"),x&&m.attr("style",x)}else{const t=nt(0,0,c,y,d,g);m=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(x)).attr("style",i)}return m.attr("label-offset-y",g),m.attr("transform",`translate(${-c/2}, ${-(y/2+g)})`),p(e,m),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+(e.padding??0)/1.5-(s.y-(s.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=o.width+e.padding,c=o.height+e.padding,d=.2*c,g=-l/2,y=-c/2-d/2,{cssStyles:m}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:g,y:y+d},{x:-g,y:y+d},{x:-g,y:-y},{x:g,y:-y},{x:g,y:y},{x:-g,y:y},{x:-g,y:y+d}],w=x.polygon(k.map(t=>[t.x,t.y]),b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${g+(e.padding??0)/2-(o.x-(o.left??0))}, ${y+d+(e.padding??0)/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.rect(e,t)},a}async function ct(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:c}=await u(t,e,f(e)),d=s.width/2+c+5,g=s.width/2+c;let y;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,n.Fr)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*d,r),l=t.circle(0,0,2*g,i);y=a.insert("g",":first-child"),y.attr("class",(0,o.KL)(e.cssClasses)).attr("style",(0,o.KL)(m)),y.node()?.appendChild(s),y.node()?.appendChild(l)}else{y=a.insert("g",":first-child");const t=y.insert("circle",":first-child"),e=y.insert("circle");y.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",g).attr("cx",0).attr("cy",0)}return p(e,y),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,d,t),z.circle(e,d,t)},a}function ht(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.label="",e.labelStyle=i;const o=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,c=h.A.svg(o),{nodeBorder:u}=r,d=(0,n.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const g=c.circle(0,0,14,d),y=o.insert(()=>g,":first-child");return y.selectAll("path").attr("style",`fill: ${u} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",s),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),p(e,y),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return z.circle(e,7,t)},o}async function ut(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),c=o.width+(e.padding??0),d=c+o.height,y=c+o.height,m=[{x:0,y:-d},{x:y,y:-d},{x:y/2,y:0}],{cssStyles:x}=e,b=h.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=g(m),C=b.path(w,k),_=a.insert(()=>C,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return x&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),e.width=c,e.height=d,p(e,_),s.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-d/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,m,t),z.polygon(e,m,t)},a}function dt(t,e,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:o}=(0,n.GX)(e);e.label="";const s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let c=Math.max(70,e?.width??0),u=Math.max(10,e?.height??0);"LR"===r&&(c=Math.max(10,e?.width??0),u=Math.max(70,e?.height??0));const d=-1*c/2,g=-1*u/2,y=h.A.svg(s),m=(0,n.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const x=y.rectangle(d,g,c,u,m),b=s.insert(()=>x,":first-child");l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),p(e,b);const k=i?.padding??0;return e.width&&e.height&&(e.width+=k/2||0,e.height+=k/2||0),e.intersect=function(t){return z.rect(e,t)},s}async function pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(80,o.width+2*(e.padding??0),e?.width??0),c=Math.max(50,o.height+2*(e.padding??0),e?.height??0),d=c/2,{cssStyles:y}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-s/2,y:-c/2},{x:s/2-d,y:-c/2},...m(-s/2+d,0,d,50,90,270),{x:s/2-d,y:c/2},{x:-s/2,y:c/2}],w=g(k),C=x.path(w,b),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",y),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),p(e,_),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:d,point:t});return z.polygon(e,k,t)},a}async function ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+(e.padding??0),l=o.width+2.5*(e.padding??0),{cssStyles:c}=e,d=h.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=l/2;m+=m/6;const x=s/2,b=m-x/2,k=[{x:-b,y:-x},{x:0,y:-x},{x:b,y:-x},{x:m,y:0},{x:b,y:x},{x:0,y:x},{x:-b,y:x},{x:-m,y:0}],w=g(k),C=d.path(w,y),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),e.width=l,e.height=s,p(e,_),e.intersect=function(t){return z.polygon(e,k,t)},a}async function gt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await u(t,e,f(e)),o=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),k.attr("transform",`translate(${-o/2}, ${-s/2})`),p(e,k),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:m});return z.polygon(e,m,t)},a}async function yt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x="t"===e.pos,b=d,k=d,{nodeBorder:w}=r,{stylesMap:C}=(0,n.WW)(e),_=-k/2,v=-b/2,S=e.label?8:0,T=h.A.svg(g),A=(0,n.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const M=T.rectangle(_,v,k,b,A),B=Math.max(k,y.width),L=b+y.height+S,F=T.rectangle(-B/2,-L/2,B,L,{...A,fill:"transparent",stroke:"none"}),$=g.insert(()=>M,":first-child"),E=g.insert(()=>F);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${x?y.height/2+S/2-n/2-s:-y.height/2-S/2-n/2-s})`),t.attr("style",`color: ${C.get("stroke")??w};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-L/2:L/2-y.height})`),$.attr("transform",`translate(0,${x?y.height/2+S/2:-y.height/2-S/2})`),p(e,E),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];a=x?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+S},{x:r+k/2,y:i-n/2+y.height+S},{x:r+k/2,y:i+n/2},{x:r-k/2,y:i+n/2},{x:r-k/2,y:i-n/2+y.height+S},{x:r-y.width/2,y:i-n/2+y.height+S}]:[{x:r-k/2,y:i-n/2},{x:r+k/2,y:i-n/2},{x:r+k/2,y:i-n/2+b},{x:r+y.width/2,y:i-n/2+b},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+b},{x:r-k/2,y:i-n/2+b}];return z.polygon(e,a,t)},g}async function mt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,label:m}=await u(t,e,"icon-shape default"),x=e.label?8:0,b="t"===e.pos,{nodeBorder:k,mainBkg:w}=r,{stylesMap:C}=(0,n.WW)(e),_=h.A.svg(g),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=C.get("fill");v.stroke=S??w;const T=g.append("g");e.icon&&T.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const A=T.node().getBBox(),M=A.width,B=A.height,L=A.x,F=A.y,$=Math.max(M,B)*Math.SQRT2+40,E=_.circle(0,0,$,v),D=Math.max($,y.width),O=$+y.height+x,R=_.rectangle(-D/2,-O/2,D,O,{...v,fill:"transparent",stroke:"none"}),K=g.insert(()=>E,":first-child"),I=g.insert(()=>R);return T.attr("transform",`translate(${-M/2-L},${b?y.height/2+x/2-B/2-F:-y.height/2-x/2-B/2-F})`),T.attr("style",`color: ${C.get("stroke")??k};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-O/2:O/2-y.height})`),K.attr("transform",`translate(0,${b?y.height/2+x/2:-y.height/2-x/2})`),p(e,I),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return z.rect(e,t)},g}async function xt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,k=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-k/2,M=e.label?8:0,B=h.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(C(T,A,w,k,5),L),E=Math.max(w,y.width),D=k+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child").attr("class","icon-shape2"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+k},{x:r+y.width/2,y:i-n/2+k},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+k},{x:r-w/2,y:i-n/2+k}];return z.polygon(e,a,t)},g}async function bt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:o}=(0,n.GX)(e);e.labelStyle=o;const s=e.assetHeight??48,c=e.assetWidth??48,d=Math.max(s,c),f=i?.wrappingWidth;e.width=Math.max(d,f??0);const{shapeSvg:g,bbox:y,halfPadding:m,label:x}=await u(t,e,"icon-shape default"),b="t"===e.pos,k=d+2*m,w=d+2*m,{nodeBorder:_,mainBkg:v}=r,{stylesMap:S}=(0,n.WW)(e),T=-w/2,A=-k/2,M=e.label?8:0,B=h.A.svg(g),L=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const F=S.get("fill");L.stroke=F??v;const $=B.path(C(T,A,w,k,.1),L),E=Math.max(w,y.width),D=k+y.height+M,O=B.rectangle(-E/2,-D/2,E,D,{...L,fill:"transparent",stroke:"none"}),R=g.insert(()=>$,":first-child"),K=g.insert(()=>O);if(e.icon){const t=g.append("g");t.html(`${await(0,a.WY)(e.icon,{height:d,width:d,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,n=r.height,o=r.x,s=r.y;t.attr("transform",`translate(${-i/2-o},${b?y.height/2+M/2-n/2-s:-y.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??_};`)}return x.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${b?-D/2:D/2-y.height})`),R.attr("transform",`translate(0,${b?y.height/2+M/2:-y.height/2-M/2})`),p(e,K),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];a=b?[{x:r-y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2},{x:r+y.width/2,y:i-n/2+y.height+M},{x:r+w/2,y:i-n/2+y.height+M},{x:r+w/2,y:i+n/2},{x:r-w/2,y:i+n/2},{x:r-w/2,y:i-n/2+y.height+M},{x:r-y.width/2,y:i-n/2+y.height+M}]:[{x:r-w/2,y:i-n/2},{x:r+w/2,y:i-n/2},{x:r+w/2,y:i-n/2+k},{x:r+y.width/2,y:i-n/2+k},{x:r+y.width/2/2,y:i+n/2},{x:r-y.width/2,y:i+n/2},{x:r-y.width/2,y:i-n/2+k},{x:r-w/2,y:i-n/2+k}];return z.polygon(e,a,t)},g}async function kt(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/o;const{labelStyles:s}=(0,n.GX)(e);e.labelStyle=s;const c=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const d=Math.max(e.label?c??0:0,e?.assetWidth??a),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??o;e.width=Math.max(f,c??0);const{shapeSvg:y,bbox:m,label:x}=await u(t,e,"image-shape default"),b="t"===e.pos,k=-f/2,w=-g/2,C=e.label?8:0,_=h.A.svg(y),v=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=_.rectangle(k,w,f,g,v),T=Math.max(f,m.width),A=g+m.height+C,M=_.rectangle(-T/2,-A/2,T,A,{...v,fill:"none",stroke:"none"}),B=y.insert(()=>S,":first-child"),L=y.insert(()=>M);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${b?A/2-g:-A/2})`)}return x.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${b?-g/2-m.height/2-C/2:g/2-m.height/2+C/2})`),B.attr("transform",`translate(0,${b?m.height/2+C/2:-m.height/2-C/2})`),p(e,L),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let a=[];a=b?[{x:r-m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2+m.height+C},{x:r+f/2,y:i-n/2+m.height+C},{x:r+f/2,y:i+n/2},{x:r-f/2,y:i+n/2},{x:r-f/2,y:i-n/2+m.height+C},{x:r-m.width/2,y:i-n/2+m.height+C}]:[{x:r-f/2,y:i-n/2},{x:r+f/2,y:i-n/2},{x:r+f/2,y:i-n/2+g},{x:r+m.width/2,y:i-n/2+g},{x:r+m.width/2/2,y:i+n/2},{x:r-m.width/2,y:i+n/2},{x:r-m.width/2,y:i-n/2+g},{x:r-f/2,y:i-n/2+g}];return z.polygon(e,a,t)},y}async function wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=g(c),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,c);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,c,t)},a}async function Ct(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{shapeSvg:s,bbox:l}=await u(t,e,f(e)),c=Math.max(l.width+2*r.labelPaddingX,e?.width||0),d=Math.max(l.height+2*r.labelPaddingY,e?.height||0),g=-c/2,y=-d/2;let m,{rx:x,ry:b}=e;const{cssStyles:k}=e;if(r?.rx&&r.ry&&(x=r.rx,b=r.ry),"handDrawn"===e.look){const t=h.A.svg(s),r=(0,n.Fr)(e,{}),i=x||b?t.path(C(g,y,c,d,x||0),r):t.rectangle(g,y,c,d,r);m=s.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,o.KL)(k))}else m=s.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",a).attr("rx",(0,o.KL)(x)).attr("ry",(0,o.KL)(b)).attr("x",g).attr("y",y).attr("width",c).attr("height",d);return p(e,m),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},s}async function _t(t,e){const{shapeSvg:r,bbox:i,label:n}=await u(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),p(e,a),e.intersect=function(t){return z.rect(e,t)},r}async function vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:0,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:-3*l/6,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=g(c),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,c);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,c,t)},a}async function St(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+(e.padding??0),e?.width??0),l=Math.max(o.height+(e.padding??0),e?.height??0),c=[{x:-3*l/6,y:0},{x:s,y:0},{x:s+3*l/6,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=g(c),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,c);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,c,t)},a}function Tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,s=Math.max(35,e?.width??0),c=Math.max(35,e?.height??0),u=[{x:s,y:0},{x:0,y:c+3.5},{x:s-14,y:c+3.5},{x:0,y:2*c},{x:s,y:c-3.5},{x:14,y:c-3.5}],d=h.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=g(u),x=d.path(m,y),b=a.insert(()=>x,":first-child");return o&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",o),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(-${s/2},${-c})`),p(e,b),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return z.polygon(e,u,t)},a}(0,l.K2)(st,"cylinder"),(0,l.K2)(lt,"dividedRectangle"),(0,l.K2)(ct,"doublecircle"),(0,l.K2)(ht,"filledCircle"),(0,l.K2)(ut,"flippedTriangle"),(0,l.K2)(dt,"forkJoin"),(0,l.K2)(pt,"halfRoundedRectangle"),(0,l.K2)(ft,"hexagon"),(0,l.K2)(gt,"hourglass"),(0,l.K2)(yt,"icon"),(0,l.K2)(mt,"iconCircle"),(0,l.K2)(xt,"iconRounded"),(0,l.K2)(bt,"iconSquare"),(0,l.K2)(kt,"imageSquare"),(0,l.K2)(wt,"inv_trapezoid"),(0,l.K2)(Ct,"drawRect"),(0,l.K2)(_t,"labelRect"),(0,l.K2)(vt,"lean_left"),(0,l.K2)(St,"lean_right"),(0,l.K2)(Tt,"lightningBolt");var At=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Mt=(0,l.K2)((t,e,r,i,n,a,o)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+o}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Bt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),c=Math.max(s.width+(e.padding??0),e.width??0),d=c/2,g=d/(2.5+c/50),y=Math.max(s.height+g+(e.padding??0),e.height??0),m=.1*y;let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=Mt(0,0,c,y,d,g,m),i=Bt(0,g,c,y,d,g),o=(0,n.Fr)(e,{}),s=t.path(r,o),l=t.path(i,o);a.insert(()=>l,":first-child").attr("class","line"),x=a.insert(()=>s,":first-child"),x.attr("class","basic label-container"),b&&x.attr("style",b)}else{const t=At(0,0,c,y,d,g,m);x=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i)}return x.attr("label-offset-y",g),x.attr("transform",`translate(${-c/2}, ${-(y/2+g)})`),p(e,x),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-s.height/2+g-(s.y-(s.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=d&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-g)){let n=g*g*(1-i*i/(d*d));n>0&&(n=Math.sqrt(n)),n=g-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},a}async function Ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=c/4,g=c+d,{cssStyles:m}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...y(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,d,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],w=x.polygon(k.map(t=>[t.x,t.y]),b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)+l/2*.1/2-(o.x-(o.left??0))},${-c/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,k,t)},a}async function $t(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-c/2,{cssStyles:m}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{}),k=[{x:d-5,y:y+5},{x:d-5,y:y+c+5},{x:d+l-5,y:y+c+5},{x:d+l-5,y:y+c},{x:d+l,y:y+c},{x:d+l,y:y+c-5},{x:d+l+5,y:y+c-5},{x:d+l+5,y:y-5},{x:d+5,y:y-5},{x:d+5,y:y},{x:d,y:y},{x:d,y:y+5}],w=[{x:d,y:y+5},{x:d+l-5,y:y+5},{x:d+l-5,y:y+c},{x:d+l,y:y+c},{x:d+l,y:y},{x:d,y:y}];"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const C=g(k),_=x.path(C,b),v=g(w),S=x.path(v,{...b,fill:"none"}),T=a.insert(()=>S,":first-child");return T.insert(()=>_,":first-child"),T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return z.polygon(e,k,t)},a}async function Et(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=c/4,m=c+d,x=-l/2,b=-m/2,{cssStyles:k}=e,w=y(x-5,b+m+5,x+l-5,b+m+5,d,.8),C=w?.[w.length-1],_=[{x:x-5,y:b+5},{x:x-5,y:b+m+5},...w,{x:x+l-5,y:C.y-5},{x:x+l,y:C.y-5},{x:x+l,y:C.y-10},{x:x+l+5,y:C.y-10},{x:x+l+5,y:b-5},{x:x+5,y:b-5},{x:x+5,y:b},{x:x,y:b},{x:x,y:b+5}],v=[{x:x,y:b+5},{x:x+l-5,y:b+5},{x:x+l-5,y:C.y-5},{x:x+l,y:C.y-5},{x:x+l,y:b},{x:x,y:b}],S=h.A.svg(a),T=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const A=g(_),M=S.path(A,T),B=g(v),L=S.path(B,T),F=a.insert(()=>M,":first-child");return F.insert(()=>L),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-o.width/2-5-(o.x-(o.left??0))}, ${-o.height/2+5-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return z.polygon(e,_,t)},a}async function Dt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;e.useHtmlLabels||!1!==(0,s.zj)().flowchart?.htmlLabels||(e.centerLabel=!0);const{shapeSvg:o,bbox:l,label:c}=await u(t,e,f(e)),d=Math.max(l.width+2*(e.padding??0),e?.width??0),g=Math.max(l.height+2*(e.padding??0),e?.height??0),y=-d/2,m=-g/2,{cssStyles:x}=e,b=h.A.svg(o),k=(0,n.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(y,m,d,g,k),C=o.insert(()=>w,":first-child");return C.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",x),a&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",a),c.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,C),e.intersect=function(t){return z.rect(e,t)},o}(0,l.K2)(Lt,"linedCylinder"),(0,l.K2)(Ft,"linedWaveEdgedRect"),(0,l.K2)($t,"multiRect"),(0,l.K2)(Et,"multiWaveEdgedRectangle"),(0,l.K2)(Dt,"note");var Ot=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding+(o.height+e.padding),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let c;const{cssStyles:d}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=Ot(0,0,s),o=t.path(i,r);c=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),d&&c.attr("style",d)}else c=H(a,s,s,l),c.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return i&&c.attr("style",i),p(e,c),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],n=z.polygon(t,i,e);return{x:n.x-.5,y:n.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=-Math.max(o.width+(e.padding??0),e?.width??0)/2,c=-Math.max(o.height+(e.padding??0),e?.height??0)/2,d=c/2,y=[{x:l+d,y:c},{x:l,y:0},{x:l+d,y:-c},{x:-l,y:-c},{x:-l,y:c}],{cssStyles:m}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=g(y),w=x.path(k,b),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-d/2},0)`),s.attr("transform",`translate(${-d/2-o.width/2-(o.x-(o.left??0))}, ${-o.height/2-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,y,t)},a}async function It(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const o=t.insert("g").attr("class",a).attr("id",e.domId||e.id),u=o.insert("g"),d=o.insert("g").attr("class","label").attr("style",i),f=e.description,g=e.label,y=d.node().appendChild(await w(g,e.labelStyle,!0,!0));let m={width:0,height:0};if((0,s._3)((0,s.D7)()?.flowchart?.htmlLabels)){const t=y.children[0],e=(0,c.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.Rm.info("Text 2",f);const x=f||[],b=y.getBBox(),k=d.node().appendChild(await w(x.join?x.join("
    "):x,e.labelStyle,!0,!0)),_=k.children[0],v=(0,c.Ltv)(k);m=_.getBoundingClientRect(),v.attr("width",m.width),v.attr("height",m.height);const S=(e.padding||0)/2;(0,c.Ltv)(k).attr("transform","translate( "+(m.width>b.width?0:(b.width-m.width)/2)+", "+(b.height+S+5)+")"),(0,c.Ltv)(y).attr("transform","translate( "+(m.width(l.Rm.debug("Rough node insert CXC",i),a),":first-child"),L=o.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child")}else L=u.insert("rect",":first-child"),F=u.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-S).attr("y",-m.height/2-S).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),F.attr("class","divider").attr("x1",-m.width/2-S).attr("x2",m.width/2+S).attr("y1",-m.height/2-S+b.height+S).attr("y2",-m.height/2-S+b.height+S);return p(e,L),e.intersect=function(t){return z.rect(e,t)},o}function Nt(t,e,r,i,n,a,o){const s=(t+r)/2,l=(e+i)/2,c=Math.atan2(i-e,r-t),h=(r-t)/2/n,u=(i-e)/2/a,d=Math.sqrt(h**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-d**2),f=s+p*a*Math.sin(c)*(o?-1:1),g=l-p*n*Math.cos(c)*(o?-1:1),y=Math.atan2((e-g)/a,(t-f)/n);let m=Math.atan2((i-g)/a,(r-f)/n)-y;o&&m<0&&(m+=2*Math.PI),!o&&m>0&&(m-=2*Math.PI);const x=[];for(let b=0;b<20;b++){const t=y+b/19*m,e=f+n*Math.cos(t),r=g+a*Math.sin(t);x.push({x:e,y:r})}return x}async function Pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=e?.padding??0,l=e?.padding??0,c=(e?.width?e?.width:o.width)+2*s,d=(e?.height?e?.height:o.height)+2*l,y=e.radius||5,m=e.taper||5,{cssStyles:x}=e,b=h.A.svg(a),k=(0,n.Fr)(e,{});e.stroke&&(k.stroke=e.stroke),"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-c/2+m,y:-d/2},{x:c/2-m,y:-d/2},...Nt(c/2-m,-d/2,c/2,-d/2+m,y,y,!0),{x:c/2,y:-d/2+m},{x:c/2,y:d/2-m},...Nt(c/2,d/2-m,c/2-m,d/2,y,y,!0),{x:c/2-m,y:d/2},{x:-c/2+m,y:d/2},...Nt(-c/2+m,d/2,-c/2,d/2-m,y,y,!0),{x:-c/2,y:d/2-m},{x:-c/2,y:-d/2+m},...Nt(-c/2,-d/2+m,-c/2+m,-d/2,y,y,!0)],C=g(w),_=b.path(C,k),v=a.insert(()=>_,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),p(e,v),e.intersect=function(t){return z.polygon(e,w,t)},a}async function zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l}=await u(t,e,f(e)),c=e?.padding??0,d=Math.max(s.width+2*(e.padding??0),e?.width??0),g=Math.max(s.height+2*(e.padding??0),e?.height??0),y=-s.width/2-c,m=-s.height/2-c,{cssStyles:x}=e,b=h.A.svg(a),k=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:y,y:m},{x:y+d+8,y:m},{x:y+d+8,y:m+g},{x:y-8,y:m+g},{x:y-8,y:m},{x:y,y:m},{x:y,y:m+g}],C=b.polygon(w.map(t=>[t.x,t.y]),k),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container").attr("style",(0,o.KL)(x)),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),x&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),l.attr("transform",`translate(${-d/2+4+(e.padding??0)-(s.x-(s.left??0))},${-g/2+(e.padding??0)-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return z.rect(e,t)},a}async function qt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,y=-c/2,{cssStyles:m}=e,x=h.A.svg(a),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=[{x:d,y:y},{x:d,y:y+c},{x:d+l,y:y+c},{x:d+l,y:y-c/2}],w=g(k),C=x.path(w,b),_=a.insert(()=>C,":first-child");return _.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(0, ${c/4})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))}, ${-c/4+(e.padding??0)-(o.y-(o.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,k,t)},a}async function jt(t,e){return Ct(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)})}async function Wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.height+e.padding,l=o.width+s/4+e.padding,c=s/2,{cssStyles:d}=e,y=h.A.svg(a),x=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-l/2+c,y:-s/2},{x:l/2-c,y:-s/2},...m(-l/2+c,0,c,50,90,270),{x:l/2-c,y:s/2},...m(l/2-c,0,c,50,270,450)],k=g(b),w=y.path(k,x),C=a.insert(()=>w,":first-child");return C.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",d),i&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",i),p(e,C),e.intersect=function(t){return z.polygon(e,b,t)},a}async function Ht(t,e){return Ct(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function Ut(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i;const{cssStyles:o}=e,{lineColor:s,stateBorder:l,nodeBorder:c}=r,u=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),d=h.A.svg(u),f=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const g=d.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),y=l??c,m=d.circle(0,0,5,{...f,fill:y,stroke:y,strokeWidth:2,fillStyle:"solid"}),x=u.insert(()=>g,":first-child");return x.insert(()=>m),o&&x.selectAll("path").attr("style",o),a&&x.selectAll("path").attr("style",a),p(e,x),e.intersect=function(t){return z.circle(e,7,t)},u}function Yt(t,e,{config:{themeVariables:r}}){const{lineColor:i}=r,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let o;if("handDrawn"===e.look){const t=h.A.svg(a).circle(0,0,14,(0,n.ue)(i));o=a.insert(()=>t),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return p(e,o),e.intersect=function(t){return z.circle(e,7,t)},a}async function Gt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await u(t,e,f(e)),l=(e?.padding||0)/2,c=s.width+e.padding,d=s.height+e.padding,g=-s.width/2-l,y=-s.height/2-l,m=[{x:0,y:0},{x:c,y:0},{x:c,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=t.rectangle(g-8,y,c+16,d,r),s=t.line(g,y,g,y+d,r),l=t.line(g+c,y,g+c,y+d,r);a.insert(()=>s,":first-child"),a.insert(()=>l,":first-child");const u=a.insert(()=>i,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,o.KL)(f)),p(e,u)}else{const t=H(a,c,d,m);i&&t.attr("style",i),p(e,t)}return e.intersect=function(t){return z.polygon(e,m,t)},a}async function Xt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=-s/2,d=-l/2,y=.2*l,m=.2*l,{cssStyles:x}=e,b=h.A.svg(a),k=(0,n.Fr)(e,{}),w=[{x:c-y/2,y:d},{x:c+s+y/2,y:d},{x:c+s+y/2,y:d+l},{x:c-y/2,y:d+l}],C=[{x:c+s-y/2,y:d+l},{x:c+s+y/2,y:d+l},{x:c+s+y/2,y:d+l-m}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const _=g(w),v=b.path(_,k),S=g(C),T=b.path(S,{...k,fillStyle:"solid"}),A=a.insert(()=>T,":first-child");return A.insert(()=>v,":first-child"),A.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),p(e,A),e.intersect=function(t){return z.polygon(e,w,t)},a}async function Vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=c/4,m=.2*l,x=.2*c,b=c+d,{cssStyles:k}=e,w=h.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-l/2-l/2*.1,y:b/2},...y(-l/2-l/2*.1,b/2,l/2+l/2*.1,b/2,d,.8),{x:l/2+l/2*.1,y:-b/2},{x:-l/2-l/2*.1,y:-b/2}],v=-l/2+l/2*.1,S=-b/2-.4*x,T=[{x:v+l-m,y:1.4*(S+c)},{x:v+l,y:S+c-x},{x:v+l,y:.9*(S+c)},...y(v+l,1.3*(S+c),v+l-m,1.5*(S+c),.03*-c,.5)],A=g(_),M=w.path(A,C),B=g(T),L=w.path(B,{...C,fillStyle:"solid"}),F=a.insert(()=>L,":first-child");return F.insert(()=>M,":first-child"),F.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-d/2-(o.y-(o.top??0))})`),p(e,F),e.intersect=function(t){return z.polygon(e,_,t)},a}async function Zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+e.padding,e?.width||0),l=Math.max(o.height+e.padding,e?.height||0),c=-s/2,h=-l/2,d=a.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",s).attr("height",l),p(e,d),e.intersect=function(t){return z.rect(e,t)},a}(0,l.K2)(Rt,"question"),(0,l.K2)(Kt,"rect_left_inv_arrow"),(0,l.K2)(It,"rectWithTitle"),(0,l.K2)(Nt,"generateArcPoints"),(0,l.K2)(Pt,"roundedRect"),(0,l.K2)(zt,"shadedProcess"),(0,l.K2)(qt,"slopedRect"),(0,l.K2)(jt,"squareRect"),(0,l.K2)(Wt,"stadium"),(0,l.K2)(Ht,"state"),(0,l.K2)(Ut,"stateEnd"),(0,l.K2)(Yt,"stateStart"),(0,l.K2)(Gt,"subroutine"),(0,l.K2)(Xt,"taggedRect"),(0,l.K2)(Vt,"taggedWaveEdgedRectangle"),(0,l.K2)(Zt,"text");var Qt=(0,l.K2)((t,e,r,i,n,a)=>`M${t},${e}\n a${n},${a} 0,0,1 0,${-i}\n l${r},0\n a${n},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${n},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Jt=(0,l.K2)((t,e,r,i,n,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.K2)((t,e,r,i,n,a)=>[`M${t+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:l,halfPadding:c}=await u(t,e,f(e)),d="neo"===e.look?2*c:c,g=s.height+d,y=g/2,m=y/(2.5+g/50),x=s.width+m+d,{cssStyles:b}=e;let k;if("handDrawn"===e.look){const t=h.A.svg(a),r=Jt(0,0,x,g,m,y),i=te(0,0,x,g,m,y),o=t.path(r,(0,n.Fr)(e,{})),s=t.path(i,(0,n.Fr)(e,{fill:"none"}));k=a.insert(()=>s,":first-child"),k=a.insert(()=>o,":first-child"),k.attr("class","basic label-container"),b&&k.attr("style",b)}else{const t=Qt(0,0,x,g,m,y);k=a.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,o.KL)(b)).attr("style",i),k.attr("class","basic label-container"),b&&k.selectAll("path").attr("style",b),i&&k.selectAll("path").attr("style",i)}return k.attr("label-offset-x",m),k.attr("transform",`translate(${-x/2}, ${g/2} )`),l.attr("transform",`translate(${-s.width/2-m-(s.x-(s.left??0))}, ${-s.height/2-(s.y-(s.top??0))})`),p(e,k),e.intersect=function(t){const r=z.rect(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let n=m*m*(1-i*i/(y*y));0!=n&&(n=Math.sqrt(Math.abs(n))),n=m-n,t.x-(e.x??0)>0&&(n=-n),r.x+=n}return r},a}async function re(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=o.width+e.padding,l=o.height+e.padding,c=[{x:-3*l/6,y:0},{x:s+3*l/6,y:0},{x:s,y:-l},{x:0,y:-l}];let d;const{cssStyles:y}=e;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=g(c),o=t.path(i,r);d=a.insert(()=>o,":first-child").attr("transform",`translate(${-s/2}, ${l/2})`),y&&d.attr("style",y)}else d=H(a,s,l,c);return i&&d.attr("style",i),e.width=s,e.height=l,p(e,d),e.intersect=function(t){return z.polygon(e,c,t)},a}async function ie(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(60,o.width+2*(e.padding??0),e?.width??0),l=Math.max(20,o.height+2*(e.padding??0),e?.height??0),{cssStyles:c}=e,d=h.A.svg(a),y=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:-s/2*.8,y:-l/2},{x:s/2*.8,y:-l/2},{x:s/2,y:-l/2*.6},{x:s/2,y:l/2},{x:-s/2,y:l/2},{x:-s/2,y:-l/2*.6}],x=g(m),b=d.path(x,y),k=a.insert(()=>b,":first-child");return k.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",c),i&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",i),p(e,k),e.intersect=function(t){return z.polygon(e,m,t)},a}async function ne(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:c}=await u(t,e,f(e)),d=(0,s._3)((0,s.D7)().flowchart?.htmlLabels),y=o.width+(e.padding??0),m=y+o.height,x=y+o.height,b=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-m}],{cssStyles:k}=e,w=h.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=g(b),v=w.path(_,C),S=a.insert(()=>v,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return k&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=y,e.height=m,p(e,S),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${m/2-(o.height+(e.padding??0)/(d?2:1)-(o.y-(o.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),z.polygon(e,b,t)},a}async function ae(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=c/8,m=c+d,{cssStyles:x}=e,b=70-l,k=b>0?b/2:0,w=h.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-l/2-k,y:m/2},...y(-l/2-k,m/2,l/2+k,m/2,d,.8),{x:l/2+k,y:-m/2},{x:-l/2-k,y:-m/2}],v=g(_),S=w.path(v,C),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),T.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(o.x-(o.left??0))},${-c/2+(e.padding??0)-d-(o.y-(o.top??0))})`),p(e,T),e.intersect=function(t){return z.polygon(e,_,t)},a}async function oe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o}=await u(t,e,f(e)),s=Math.max(o.width+2*(e.padding??0),e?.width??0),l=Math.max(o.height+2*(e.padding??0),e?.height??0),c=s/l;let d=s,m=l;d>m*c?m=d/c:d=m*c,d=Math.max(d,100),m=Math.max(m,50);const x=Math.min(.2*m,m/4),b=m+2*x,{cssStyles:k}=e,w=h.A.svg(a),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=[{x:-d/2,y:b/2},...y(-d/2,b/2,d/2,b/2,x,1),{x:d/2,y:-b/2},...y(d/2,-b/2,-d/2,-b/2,x,-1)],v=g(_),S=w.path(v,C),T=a.insert(()=>S,":first-child");return T.attr("class","basic label-container"),k&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",i),p(e,T),e.intersect=function(t){return z.polygon(e,_,t)},a}async function se(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,label:s}=await u(t,e,f(e)),l=Math.max(o.width+2*(e.padding??0),e?.width??0),c=Math.max(o.height+2*(e.padding??0),e?.height??0),d=-l/2,g=-c/2,{cssStyles:y}=e,m=h.A.svg(a),x=(0,n.Fr)(e,{}),b=[{x:d-5,y:g-5},{x:d-5,y:g+c},{x:d+l,y:g+c},{x:d+l,y:g-5}],k=`M${d-5},${g-5} L${d+l},${g-5} L${d+l},${g+c} L${d-5},${g+c} L${d-5},${g-5}\n M${d-5},${g} L${d+l},${g}\n M${d},${g-5} L${d},${g+c}`;"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const w=m.path(k,x),C=a.insert(()=>w,":first-child");return C.attr("transform","translate(2.5, 2.5)"),C.attr("class","basic label-container"),y&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),s.attr("transform",`translate(${-o.width/2+2.5-(o.x-(o.left??0))}, ${-o.height/2+2.5-(o.y-(o.top??0))})`),p(e,C),e.intersect=function(t){return z.polygon(e,b,t)},a}async function le(t,e){const r=e;if(r.alias&&(e.label=r.alias),"handDrawn"===e.look){const{themeVariables:r}=(0,s.zj)(),{background:i}=r,n={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await le(t,n)}const i=(0,s.zj)();e.useHtmlLabels=i.htmlLabels;let a=i.er?.diagramPadding??10,l=i.er?.entityPadding??6;const{cssStyles:u}=e,{labelStyles:d,nodeStyles:g}=(0,n.GX)(e);if(0===r.attributes.length&&e.label){const r={rx:0,ry:0,labelPaddingX:a,labelPaddingY:1.5*a,classes:""};(0,o.Un)(e.label,i)+2*r.labelPaddingX0){const t=x.width+2*a-(C+_+v+S);C+=t/M,_+=t/M,v>0&&(v+=t/M),S>0&&(S+=t/M)}const L=C+_+v+S,F=h.A.svg(m),$=(0,n.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let E=0;w.length>0&&(E=w.reduce((t,e)=>t+(e?.rowHeight??0),0));const D=Math.max(B.width+2*a,e?.width||0,L),O=Math.max((E??0)+x.height,e?.height||0),R=-D/2,K=-O/2;m.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),n=i.attr("transform");let o=0,s=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(o=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?o+=C:i.attr("class").includes("attribute-keys")?o+=C+_:i.attr("class").includes("attribute-comment")&&(o+=C+_+v))}i.attr("transform",`translate(${R+a/2+o}, ${s+K+x.height+l/2})`)}),m.select(".name").attr("transform","translate("+-x.width/2+", "+(K+l/2)+")");const I=F.rectangle(R,K,D,O,$),N=m.insert(()=>I,":first-child").attr("style",u.join("")),{themeVariables:P}=(0,s.zj)(),{rowEven:q,rowOdd:j,nodeBorder:W}=P;k.push(0);for(const[n,o]of w.entries()){const t=(n+1)%2==0&&0!==o.yOffset,e=F.rectangle(R,x.height+K+o?.yOffset,D,o?.rowHeight,{...$,fill:t?q:j,stroke:W});m.insert(()=>e,"g.label").attr("style",u.join("")).attr("class","row-rect-"+(t?"even":"odd"))}let H=F.line(R,x.height+K,D+R,x.height+K,$);m.insert(()=>H).attr("class","divider"),H=F.line(C+R,x.height+K,C+R,O+K,$),m.insert(()=>H).attr("class","divider"),T&&(H=F.line(C+_+R,x.height+K,C+_+R,O+K,$),m.insert(()=>H).attr("class","divider")),A&&(H=F.line(C+_+v+R,x.height+K,C+_+v+R,O+K,$),m.insert(()=>H).attr("class","divider"));for(const n of k)H=F.line(R,x.height+K+n,D+R,x.height+K+n,$),m.insert(()=>H).attr("class","divider");if(p(e,N),g&&"handDrawn"!==e.look){const t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");m.selectAll("path").attr("style",e??""),m.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return z.rect(e,t)},m}async function ce(t,e,r,i=0,n=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",h);e!==(0,s.QO)(e)&&(e=(e=(0,s.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,a.GZ)(u,e,{width:(0,o.Un)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=d.getBBox();if((0,s._3)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,c.Ltv)(d);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}async function he(t,e,r,i,n=r.class.padding??12){const a=i?0:3,o=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id);let s=null,l=null,c=null,h=null,u=0,d=0,p=0;if(s=o.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await ue(s,{text:`\xab${t}\xbb`},0);u=s.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ue(l,e,0,["font-weight: bolder"]);const g=l.node().getBBox();d=g.height,c=o.insert("g").attr("class","members-group text");let y=0;for(const f of e.members){y+=await ue(c,f,y,[f.parseClassifier()])+a}p=c.node().getBBox().height,p<=0&&(p=n/2),h=o.insert("g").attr("class","methods-group text");let m=0;for(const f of e.methods){m+=await ue(h,f,m,[f.parseClassifier()])+a}let x=o.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=o.node().getBBox(),c.attr("transform",`translate(0, ${u+d+2*n})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${u+d+(p?p+4*n:2*n)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function ue(t,e,r,i=[]){const n=t.insert("g").attr("class","label").attr("style",i.join("; ")),h=(0,s.zj)();let u="useHtmlLabels"in e?e.useHtmlLabels:(0,s._3)(h.htmlLabels)??!0,d="";d="text"in e?e.text:e.label,!u&&d.startsWith("\\")&&(d=d.substring(1)),(0,s.Wi)(d)&&(u=!0);const p=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(d)),{width:(0,o.Un)(d,h)+50,classes:"markdown-node-label",useHtmlLabels:u},h);let f,g=1;if(u){const t=p.children[0],e=(0,c.Ltv)(p);g=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(g+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===d.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=h.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{i.includes("font-weight: bolder")&&(0,c.Ltv)(p).selectAll("tspan").attr("font-weight",""),g=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes(">")){t.textContent=d[0]+d.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===d[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),f=p.getBBox()}return n.attr("transform","translate(0,"+(-f.height/(2*g)+r)+")"),f.height}async function de(t,e){const r=(0,s.D7)(),i=r.class.padding??12,a=i,o=e.useHtmlLabels??(0,s._3)(r.htmlLabels)??!0,l=e;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:u,bbox:d}=await he(t,e,r,o,a),{labelStyles:f,nodeStyles:g}=(0,n.GX)(e);e.labelStyle=f,e.cssStyles=l.styles||"";const y=l.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=y.replaceAll("!important","").split(";"));const m=0===l.members.length&&0===l.methods.length&&!r.class?.hideEmptyMembersBox,x=h.A.svg(u),b=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=d.width;let w=d.height;0===l.members.length&&0===l.methods.length?w+=a:l.members.length>0&&0===l.methods.length&&(w+=2*a);const C=-k/2,_=-w/2,v=x.rectangle(C-i,_-i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0),k+2*i,w+2*i+(m?2*i:0===l.members.length&&0===l.methods.length?-i:0),b),S=u.insert(()=>v,":first-child");S.attr("class","basic label-container");const T=S.node().getBBox();u.selectAll(".text").each((t,e,r)=>{const n=(0,c.Ltv)(r[e]),a=n.attr("transform");let s=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(s=parseFloat(t[2]))}let h=s+_+i-(m?i:0===l.members.length&&0===l.methods.length?-i/2:0);o||(h-=4);let d=C;(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group"))&&(d=-n.node()?.getBBox().width/2||0,u.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(d=0)})),n.attr("transform",`translate(${d}, ${h})`)});const A=u.select(".annotation-group").node().getBBox().height-(m?i/2:0)||0,M=u.select(".label-group").node().getBBox().height-(m?i/2:0)||0,B=u.select(".members-group").node().getBBox().height-(m?i/2:0)||0;if(l.members.length>0||l.methods.length>0||m){const t=x.line(T.x,A+M+_+i,T.x+T.width,A+M+_+i,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if(m||l.members.length>0||l.methods.length>0){const t=x.line(T.x,A+M+B+_+2*a+i,T.x+T.width,A+M+B+_+i+2*a,b);u.insert(()=>t).attr("class","divider").attr("style",y)}if("handDrawn"!==l.look&&u.selectAll("path").attr("style",y),S.select(":nth-child(2)").attr("style",y),u.selectAll(".divider").select("path").attr("style",y),e.labelStyle?u.selectAll("span").attr("style",e.labelStyle):u.selectAll("span").attr("style",y),!o){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(y);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}else if(f){const e=t.exec(f);if(e){const t=e[0].replace("color","fill");u.selectAll("tspan").attr("style",t)}}}return p(e,S),e.intersect=function(t){return z.rect(e,t)},u}async function pe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const a=e,o=e,s="verifyMethod"in e,l=f(e),u=t.insert("g").attr("class",l).attr("id",e.domId??e.id);let d;d=s?await fe(u,`<<${a.type}>>`,0,e.labelStyle):await fe(u,"<<Element>>",0,e.labelStyle);let g=d;const y=await fe(u,a.name,g,e.labelStyle+"; font-weight: bold;");if(g+=y+20,s){g+=await fe(u,""+(a.requirementId?`ID: ${a.requirementId}`:""),g,e.labelStyle);g+=await fe(u,""+(a.text?`Text: ${a.text}`:""),g,e.labelStyle);g+=await fe(u,""+(a.risk?`Risk: ${a.risk}`:""),g,e.labelStyle),await fe(u,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),g,e.labelStyle)}else{g+=await fe(u,""+(o.type?`Type: ${o.type}`:""),g,e.labelStyle),await fe(u,""+(o.docRef?`Doc Ref: ${o.docRef}`:""),g,e.labelStyle)}const m=(u.node()?.getBBox().width??200)+20,x=(u.node()?.getBBox().height??200)+20,b=-m/2,k=-x/2,w=h.A.svg(u),C=(0,n.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=w.rectangle(b,k,m,x,C),v=u.insert(()=>_,":first-child");if(v.attr("class","basic label-container").attr("style",i),u.selectAll(".label").each((t,e,r)=>{const i=(0,c.Ltv)(r[e]),n=i.attr("transform");let a=0,o=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(a=parseFloat(t[1]),o=parseFloat(t[2]))}const s=o-x/2;let l=b+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${s+20})`)}),g>d+y+20){const t=w.line(b,k+d+y+20,b+m,k+d+y+20,C);u.insert(()=>t).attr("style",i)}return p(e,v),e.intersect=function(t){return z.rect(e,t)},u}async function fe(t,e,r,i=""){if(""===e)return 0;const n=t.insert("g").attr("class","label").attr("style",i),l=(0,s.D7)(),h=l.htmlLabels??!0,u=await(0,a.GZ)(n,(0,s.oB)((0,o.Sm)(e)),{width:(0,o.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:h,style:i},l);let d;if(h){const t=u.children[0],e=(0,c.Ltv)(u);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}else{const t=u.children[0];for(const e of t.children)e.textContent=e.textContent.replaceAll(">",">").replaceAll("<","<"),i&&e.setAttribute("style",i);d=u.getBBox(),d.height+=6}return n.attr("transform",`translate(${-d.width/2},${-d.height/2+r})`),d.height}(0,l.K2)(ee,"tiltedCylinder"),(0,l.K2)(re,"trapezoid"),(0,l.K2)(ie,"trapezoidalPentagon"),(0,l.K2)(ne,"triangle"),(0,l.K2)(ae,"waveEdgedRectangle"),(0,l.K2)(oe,"waveRectangle"),(0,l.K2)(se,"windowPane"),(0,l.K2)(le,"erBox"),(0,l.K2)(ce,"addText"),(0,l.K2)(he,"textHelper"),(0,l.K2)(ue,"addText"),(0,l.K2)(de,"classBox"),(0,l.K2)(pe,"requirementBox"),(0,l.K2)(fe,"addText");var ge=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function ye(t,e,{config:r}){const{labelStyles:i,nodeStyles:a}=(0,n.GX)(e);e.labelStyle=i||"";const o=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:c}=await u(t,e,f(e)),g=e.padding||10;let y,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),y=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const x={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let b,k;({label:b,bbox:k}=y?await d(y,"ticket"in e&&e.ticket||"",x):await d(s,"ticket"in e&&e.ticket||"",x));const{label:w,bbox:_}=await d(s,"assigned"in e&&e.assigned||"",x);e.width=o;const v=e?.width||0,S=Math.max(k.height,_.height)/2,T=Math.max(l.height+20,e?.height||0)+S,A=-v/2,M=-T/2;let B;c.attr("transform","translate("+(g-v/2)+", "+(-S-l.height/2)+")"),b.attr("transform","translate("+(g-v/2)+", "+(-S+l.height/2)+")"),w.attr("transform","translate("+(g+v/2-_.width-20)+", "+(-S+l.height/2)+")");const{rx:L,ry:F}=e,{cssStyles:$}=e;if("handDrawn"===e.look){const t=h.A.svg(s),r=(0,n.Fr)(e,{}),i=L||F?t.path(C(A,M,v,T,L||0),r):t.rectangle(A,M,v,T,r);B=s.insert(()=>i,":first-child"),B.attr("class","basic label-container").attr("style",$||null)}else{B=s.insert("rect",":first-child"),B.attr("class","basic label-container __APA__").attr("style",a).attr("rx",L??5).attr("ry",F??5).attr("x",A).attr("y",M).attr("width",v).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=A+2,i=M+Math.floor((L??0)/2),n=M+T-Math.floor((L??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width","4").attr("stroke",ge(t))}}return p(e,B),e.height=T,e.intersect=function(t){return z.rect(e,t)},s}async function me(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:c,label:d}=await u(t,e,f(e)),g=s.width+10*c,y=s.height+8*c,m=.15*g,{cssStyles:x}=e,b=s.width+20,k=s.height+20,w=Math.max(g,b),C=Math.max(y,k);let _;d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const v=`M0 0 \n a${m},${m} 1 0,0 ${.25*w},${-1*C*.1}\n a${m},${m} 1 0,0 ${.25*w},0\n a${m},${m} 1 0,0 ${.25*w},0\n a${m},${m} 1 0,0 ${.25*w},${.1*C}\n\n a${m},${m} 1 0,0 ${.15*w},${.33*C}\n a${.8*m},${.8*m} 1 0,0 0,${.34*C}\n a${m},${m} 1 0,0 ${-1*w*.15},${.33*C}\n\n a${m},${m} 1 0,0 ${-1*w*.25},${.15*C}\n a${m},${m} 1 0,0 ${-1*w*.25},0\n a${m},${m} 1 0,0 ${-1*w*.25},0\n a${m},${m} 1 0,0 ${-1*w*.25},${-1*C*.15}\n\n a${m},${m} 1 0,0 ${-1*w*.1},${-1*C*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*C*.34}\n a${m},${m} 1 0,0 ${.1*w},${-1*C*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(v,r);_=a.insert(()=>i,":first-child"),_.attr("class","basic label-container").attr("style",(0,o.KL)(x))}else _=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return _.attr("transform",`translate(${-w/2}, ${-C/2})`),p(e,_),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),z.rect(e,t)},a}async function xe(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:c,label:d}=await u(t,e,f(e)),g=s.width+2*c,y=s.height+2*c,m=.15*g,x=.25*g,b=.35*g,k=.2*g,{cssStyles:w}=e;let C;const _=`M0 0 \n a${m},${m} 0 0,1 ${.25*g},${-1*g*.1}\n a${b},${b} 1 0,1 ${.4*g},${-1*g*.1}\n a${x},${x} 1 0,1 ${.35*g},${.2*g}\n\n a${m},${m} 1 0,1 ${.15*g},${.35*y}\n a${k},${k} 1 0,1 ${-1*g*.15},${.65*y}\n\n a${x},${m} 1 0,1 ${-1*g*.25},${.15*g}\n a${b},${b} 1 0,1 ${-1*g*.5},0\n a${m},${m} 1 0,1 ${-1*g*.25},${-1*g*.15}\n\n a${m},${m} 1 0,1 ${-1*g*.1},${-1*y*.35}\n a${k},${k} 1 0,1 ${.1*g},${-1*y*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=h.A.svg(a),r=(0,n.Fr)(e,{}),i=t.path(_,r);C=a.insert(()=>i,":first-child"),C.attr("class","basic label-container").attr("style",(0,o.KL)(w))}else C=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",_);return d.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),C.attr("transform",`translate(${-g/2}, ${-y/2})`),p(e,C),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),z.rect(e,t)},a}async function be(t,e){const{labelStyles:r,nodeStyles:i}=(0,n.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:o,halfPadding:s,label:l}=await u(t,e,f(e)),c=o.width+8*s,h=o.height+2*s,d=`\n M${-c/2} ${h/2-5}\n v${10-h}\n q0,-5 5,-5\n h${c-10}\n q5,0 5,5\n v${h-10}\n q0,5 -5,5\n h${10-c}\n q-5,0 -5,-5\n Z\n `,g=a.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",d);return a.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),l.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.append(()=>l.node()),p(e,g),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},a}async function ke(t,e){return G(t,e,{padding:e.padding??0})}(0,l.K2)(ye,"kanbanItem"),(0,l.K2)(me,"bang"),(0,l.K2)(xe,"cloud"),(0,l.K2)(be,"defaultMindmapNode"),(0,l.K2)(ke,"mindmapCircle");var we=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Pt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Wt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Gt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:st},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:G},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:me},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:xe},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Rt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ft},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:St},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:vt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:re},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:wt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ct},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:U},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Yt},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Ut},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:dt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:gt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Tt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Lt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:it},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ne},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:se},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ht},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ie},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:ut},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Et},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$t},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:W},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:oe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ft}],Ce=(0,l.K2)(()=>{const t={state:Ht,choice:Y,note:Dt,rectWithTitle:It,labelRect:_t,iconSquare:bt,iconCircle:mt,icon:yt,iconRounded:xt,imageSquare:kt,anchor:q,kanbanItem:ye,mindmapCircle:ke,defaultMindmapNode:be,classBox:de,erBox:le,requirementBox:pe},e=[...Object.entries(t),...we.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function _e(t){return t in Ce}(0,l.K2)(_e,"isValidShape");var ve=new Map;async function Se(t,e,r){let i,n;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Ce[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let o;"sandbox"===r.config.securityLevel?o="_top":e.linkTarget&&(o=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",o??null),n=await a(i,e,r)}else n=await a(t,e,r),i=n;return e.tooltip&&n.attr("title",e.tooltip),ve.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,l.K2)(Se,"insertNode");var Te=(0,l.K2)((t,e)=>{ve.set(e.id,t)},"setNodeElem"),Ae=(0,l.K2)(()=>{ve.clear()},"clear"),Me=(0,l.K2)(t=>{const e=ve.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},3981(t,e,r){"use strict";r.d(e,{H:()=>rr,r:()=>er});var i=r(797);function n(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:n(t)?[]:[t]}function s(t,e){var r,i,n,a;if(e)for(r=0,i=(a=Object.keys(e)).length;rs&&(e=i-s+(a=" ... ").length),r-i>s&&(r=i+s-(o=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+o,pos:i-e+a.length}}function g(t,e){return h.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,n=[0],a=[],o=-1;r=i.exec(t.buffer);)a.push(r.index),n.push(r.index+r[0].length),t.position<=r.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var s,l,c="",u=Math.min(t.line+e.linesAfter,a.length).toString().length,d=e.maxLength-(e.indent+u+3);for(s=1;s<=e.linesBefore&&!(o-s<0);s++)l=f(t.buffer,n[o-s],a[o-s],t.position-(n[o]-n[o-s]),d),c=h.repeat(" ",e.indent)+g((t.line-s+1).toString(),u)+" | "+l.str+"\n"+c;for(l=f(t.buffer,n[o],a[o],t.position,d),c+=h.repeat(" ",e.indent)+g((t.line+1).toString(),u)+" | "+l.str+"\n",c+=h.repeat("-",e.indent+u+3+l.pos)+"^\n",s=1;s<=e.linesAfter&&!(o+s>=a.length);s++)l=f(t.buffer,n[o+s],a[o+s],t.position-(n[o]-n[o+s]),d),c+=h.repeat(" ",e.indent)+g((t.line+s+1).toString(),u)+" | "+l.str+"\n";return c.replace(/\n$/,"")}(0,i.K2)(f,"getLine"),(0,i.K2)(g,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,x=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],b=["scalar","sequence","mapping"];function k(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function w(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===x.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=k(e.styleAliases||null),-1===b.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(k,"compileStyleAliases"),(0,i.K2)(w,"Type$1");var C=w;function _(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function v(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(n,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),q=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function j(t){return null!==t&&!(!q.test(t)||"_"===t[t.length-1])}function W(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(j,"resolveYamlFloat"),(0,i.K2)(W,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function U(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(h.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function Y(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||h.isNegativeZero(t))}(0,i.K2)(U,"representYamlFloat"),(0,i.K2)(Y,"isFloat");var G=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:j,construct:W,predicate:Y,represent:U,defaultStyle:"lowercase"}),X=T.extend({implicit:[L,D,z,G]}),V=X,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,n,a,o,s,l,c=0,h=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(a=+e[4],o=+e[5],s=+e[6],e[7]){for(c=e[7].slice(0,3);c.length<3;)c+="0";c=+c}return e[9]&&(h=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(h=-h)),l=new Date(Date.UTC(r,i,n,a,o,s,c)),h&&l.setTime(l.getTime()-h),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var nt=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function ot(t){if(null===t)return!1;var e,r,i=0,n=t.length,a=at;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function st(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,a=at,o=0,s=[];for(e=0;e>16&255),s.push(o>>8&255),s.push(255&o)),o=o<<6|a.indexOf(i.charAt(e));return 0===(r=n%4*6)?(s.push(o>>16&255),s.push(o>>8&255),s.push(255&o)):18===r?(s.push(o>>10&255),s.push(o>>2&255)):12===r&&s.push(o>>4&255),new Uint8Array(s)}function lt(t){var e,r,i="",n=0,a=t.length,o=at;for(e=0;e>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]),n=(n<<8)+t[e];return 0===(r=a%3)?(i+=o[n>>18&63],i+=o[n>>12&63],i+=o[n>>6&63],i+=o[63&n]):2===r?(i+=o[n>>10&63],i+=o[n>>4&63],i+=o[n<<2&63],i+=o[64]):1===r&&(i+=o[n>>2&63],i+=o[n<<4&63],i+=o[64],i+=o[64]),i}function ct(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(ot,"resolveYamlBinary"),(0,i.K2)(st,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ct,"isBinary");var ht=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ot,construct:st,predicate:ct,represent:lt}),ut=Object.prototype.hasOwnProperty,dt=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,n,a,o=[],s=t;for(e=0,r=s.length;e>10),56320+(t-65536&1023))}(0,i.K2)(Ft,"_class"),(0,i.K2)($t,"is_EOL"),(0,i.K2)(Et,"is_WHITE_SPACE"),(0,i.K2)(Dt,"is_WS_OR_EOL"),(0,i.K2)(Ot,"is_FLOW_INDICATOR"),(0,i.K2)(Rt,"fromHexCode"),(0,i.K2)(Kt,"escapedHexLen"),(0,i.K2)(It,"fromDecimalCode"),(0,i.K2)(Nt,"simpleEscapeSequence"),(0,i.K2)(Pt,"charFromCodepoint");var zt,qt=new Array(256),jt=new Array(256);for(zt=0;zt<256;zt++)qt[zt]=Nt(zt)?1:0,jt[zt]=Nt(zt);function Wt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||vt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ht(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Ut(t,e){throw Ht(t,e)}function Yt(t,e){t.onWarning&&t.onWarning.call(null,Ht(t,e))}(0,i.K2)(Wt,"State$1"),(0,i.K2)(Ht,"generateError"),(0,i.K2)(Ut,"throwError"),(0,i.K2)(Yt,"throwWarning");var Gt={YAML:(0,i.K2)(function(t,e,r){var i,n,a;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),1!==n&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Yt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K2)(function(t,e,r){var i,n;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],Bt.test(i)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),St.call(t.tagMap,i)&&Ut(t,'there is a previously declared suffix for "'+i+'" tag handle'),Lt.test(n)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch(a){Ut(t,"tag prefix is malformed: "+n)}t.tagMap[i]=n},"handleTagDirective")};function Xt(t,e,r,i){var n,a,o,s;if(e1&&(t.result+=h.repeat("\n",e-1))}function re(t,e,r){var i,n,a,o,s,l,c,h,u=t.kind,d=t.result;if(Dt(h=t.input.charCodeAt(t.position))||Ot(h)||35===h||38===h||42===h||33===h||124===h||62===h||39===h||34===h||37===h||64===h||96===h)return!1;if((63===h||45===h)&&(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i)))return!1;for(t.kind="scalar",t.result="",n=a=t.position,o=!1;0!==h;){if(58===h){if(Dt(i=t.input.charCodeAt(t.position+1))||r&&Ot(i))break}else if(35===h){if(Dt(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&te(t)||r&&Ot(h))break;if($t(h)){if(s=t.line,l=t.lineStart,c=t.lineIndent,Jt(t,!1,-1),t.lineIndent>=e){o=!0,h=t.input.charCodeAt(t.position);continue}t.position=a,t.line=s,t.lineStart=l,t.lineIndent=c;break}}o&&(Xt(t,n,a,!1),ee(t,t.line-s),n=a=t.position,o=!1),Et(h)||(a=t.position+1),h=t.input.charCodeAt(++t.position)}return Xt(t,n,a,!1),!!t.result||(t.kind=u,t.result=d,!1)}function ie(t,e){var r,i,n;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Xt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,n=t.position}else $t(r)?(Xt(t,i,n,!0),ee(t,Jt(t,!1,e)),i=n=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ne(t,e){var r,i,n,a,o,s;if(34!==(s=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(s=t.input.charCodeAt(t.position));){if(34===s)return Xt(t,r,t.position,!0),t.position++,!0;if(92===s){if(Xt(t,r,t.position,!0),$t(s=t.input.charCodeAt(++t.position)))Jt(t,!1,e);else if(s<256&&qt[s])t.result+=jt[s],t.position++;else if((o=Kt(s))>0){for(n=o,a=0;n>0;n--)(o=Rt(s=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+o:Ut(t,"expected hexadecimal character");t.result+=Pt(a),t.position++}else Ut(t,"unknown escape sequence");r=i=t.position}else $t(s)?(Xt(t,r,i,!0),ee(t,Jt(t,!1,e)),r=i=t.position):t.position===t.lineStart&&te(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function ae(t,e){var r,i,n,a,o,s,l,c,h,u,d,p,f=!0,g=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))o=93,c=!1,a=[];else{if(123!==p)return!1;o=125,c=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(Jt(t,!0,e),(p=t.input.charCodeAt(t.position))===o)return t.position++,t.tag=g,t.anchor=y,t.kind=c?"mapping":"sequence",t.result=a,!0;f?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),d=null,s=l=!1,63===p&&Dt(t.input.charCodeAt(t.position+1))&&(s=l=!0,t.position++,Jt(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,de(t,e,1,!1,!0),u=t.tag,h=t.result,Jt(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(s=!0,p=t.input.charCodeAt(++t.position),Jt(t,!0,e),de(t,e,1,!1,!0),d=t.result),c?Zt(t,a,m,u,h,d,r,i,n):s?a.push(Zt(t,null,m,u,h,d,r,i,n)):a.push(h),Jt(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(f=!0,p=t.input.charCodeAt(++t.position)):f=!1}Ut(t,"unexpected end of the stream within a flow collection")}function oe(t,e){var r,i,n,a,o=1,s=!1,l=!1,c=e,u=0,d=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===o?o=43===a?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((n=It(a))>=0))break;0===n?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(c=e+n-1,l=!0)}if(Et(a)){do{a=t.input.charCodeAt(++t.position)}while(Et(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!$t(a)&&0!==a)}for(;0!==a;){for(Qt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndentc&&(c=t.lineIndent),$t(a))u++;else{if(t.lineIndente)&&0!==i)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(o=t.line,s=t.lineStart,l=t.position),de(t,e,4,!0,n)&&(m?g=t.result:y=t.result),m||(Zt(t,d,p,f,g,y,o,s,l),f=g=y=null),Jt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndente?f=1:t.lineIndent===e?f=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function pe(t){var e,r,i,n,a=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(n=t.input.charCodeAt(t.position))&&(Jt(t,!0,-1),n=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==n));){for(o=!0,n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==n;){for(;Et(n);)n=t.input.charCodeAt(++t.position);if(35===n){do{n=t.input.charCodeAt(++t.position)}while(0!==n&&!$t(n));break}if($t(n))break;for(e=t.position;0!==n&&!Dt(n);)n=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==n&&Qt(t),St.call(Gt,r)?Gt[r](t,r,i):Yt(t,'unknown document directive "'+r+'"')}Jt(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,Jt(t,!0,-1)):o&&Ut(t,"directives end mark is expected"),de(t,t.lineIndent-1,4,!1,!0),Jt(t,!0,-1),t.checkLineBreaks&&At.test(t.input.slice(a,t.position))&&Yt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&te(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,Jt(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Ke(t){return/^\n* /.test(t)}(0,i.K2)(Te,"State"),(0,i.K2)(Ae,"indentString"),(0,i.K2)(Me,"generateNextLine"),(0,i.K2)(Be,"testImplicitResolving"),(0,i.K2)(Le,"isWhitespace"),(0,i.K2)(Fe,"isPrintable"),(0,i.K2)($e,"isNsCharOrWhitespace"),(0,i.K2)(Ee,"isPlainSafe"),(0,i.K2)(De,"isPlainSafeFirst"),(0,i.K2)(Oe,"isPlainSafeLast"),(0,i.K2)(Re,"codePointAt"),(0,i.K2)(Ke,"needIndentIndicator");function Ie(t,e,r,i,n,a,o,s){var l,c=0,h=null,u=!1,d=!1,p=-1!==i,f=-1,g=De(Re(t,0))&&Oe(Re(t,t.length-1));if(e||o)for(l=0;l=65536?l+=2:l++){if(!Fe(c=Re(t,l)))return 5;g=g&&Ee(c,h,s),h=c}else{for(l=0;l=65536?l+=2:l++){if(10===(c=Re(t,l)))u=!0,p&&(d=d||l-f-1>i&&" "!==t[f+1],f=l);else if(!Fe(c))return 5;g=g&&Ee(c,h,s),h=c}d=d||p&&l-f-1>i&&" "!==t[f+1]}return u||d?r>9&&Ke(t)?5:o?2===a?5:2:d?4:3:!g||o||n(t)?2===a?5:2:1}function Ne(t,e,r,n,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Ce.indexOf(e)||_e.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var o=t.indent*Math.max(1,r),s=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),l=n||t.flowLevel>-1&&r>=t.flowLevel;function c(e){return Be(t,e)}switch((0,i.K2)(c,"testAmbiguity"),Ie(e,l,t.indent,s,c,t.quotingType,t.forceQuotes&&!n,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Pe(e,t.indent)+ze(Ae(e,o));case 4:return">"+Pe(e,t.indent)+ze(Ae(qe(e,s),o));case 5:return'"'+We(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Pe(t,e){var r=Ke(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function ze(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function qe(t,e){for(var r,i,n,a=/(\n+)([^\n]*)/g,o=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,je(t.slice(0,r),e)),s="\n"===t[0]||" "===t[0];n=a.exec(t);){var l=n[1],c=n[2];i=" "===c[0],o+=l+(s||i||""===c?"":"\n")+je(c,e),s=i}return o}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,n=/ [^ ]/g,a=0,o=0,s=0,l="";r=n.exec(t);)(s=r.index)-a>e&&(i=o>a?o:s,l+="\n"+t.slice(a,i),a=i+1),o=s;return l+="\n",t.length-a>e&&o>a?l+=t.slice(a,o)+"\n"+t.slice(o+1):l+=t.slice(a),l.slice(1)}function We(t){for(var e,r="",i=0,n=0;n=65536?n+=2:n++)i=Re(t,n),!(e=we[i])&&Fe(i)?(r+=t[n],i>=65536&&(r+=t[n+1])):r+=e||Se(i);return r}function He(t,e,r){var i,n,a,o="",s=t.tag;for(i=0,n=r.length;i1024&&(s+="? "),s+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ve(t,e,o,!1,!1)&&(l+=s+=t.dump));t.tag=c,t.dump="{"+l+"}"}function Ge(t,e,r,i){var n,a,o,s,l,c,h="",u=t.tag,d=Object.keys(r);if(!0===t.sortKeys)d.sort();else if("function"==typeof t.sortKeys)d.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(n=0,a=d.length;n1024)&&(t.dump&&10===t.dump.charCodeAt(0)?c+="?":c+="? "),c+=t.dump,l&&(c+=Me(t,e)),Ve(t,e+1,s,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?c+=":":c+=": ",h+=c+=t.dump));t.tag=u,t.dump=h||"{}"}function Xe(t,e,r){var i,n,a,o,s,l;for(a=0,o=(n=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');i=s.represent[l](e,l)}t.dump=i}return!0}return!1}function Ve(t,e,r,i,n,a,o){t.tag=null,t.dump=r,Xe(t,r,!1)||Xe(t,r,!0);var s,l=xe.call(t.dump),c=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var h,u,d="[object Object]"===l||"[object Array]"===l;if(d&&(u=-1!==(h=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(n=!1),u&&t.usedDuplicates[h])t.dump="*ref_"+h;else{if(d&&u&&!t.usedDuplicates[h]&&(t.usedDuplicates[h]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Ge(t,e,t.dump,n),u&&(t.dump="&ref_"+h+t.dump)):(Ye(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!o&&e>0?Ue(t,e-1,t.dump,n):Ue(t,e,t.dump,n),u&&(t.dump="&ref_"+h+t.dump)):(He(t,e,t.dump),u&&(t.dump="&ref_"+h+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&Ne(t,t.dump,e,a,c)}null!==t.tag&&"?"!==t.tag&&(s=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),s="!"===t.tag[0]?"!"+s:"tag:yaml.org,2002:"===s.slice(0,18)?"!!"+s.slice(18):"!<"+s+">",t.dump=s+" "+t.dump)}return!0}function Ze(t,e){var r,i,n=[],a=[];for(Qe(t,n,a),r=0,i=a.length;ru,q7:()=>d,sO:()=>h});var i=r(5164),n=r(5894),a=r(3226),o=r(7633),s=r(797),l={common:o.Y2,getConfig:o.zj,insertCluster:n.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:n.on,interpolateToCurve:a.Ib,labelHelper:n.Zk,log:s.Rm,positionEdgeLabel:i.T_},c={},h=(0,s.K2)(t=>{for(const e of t)c[e.name]=e},"registerLayoutLoaders");(0,s.K2)(()=>{h([{name:"dagre",loader:(0,s.K2)(async()=>await Promise.all([r.e(3624),r.e(2334),r.e(7873)]).then(r.bind(r,7873)),"loader")},{name:"cose-bilkent",loader:(0,s.K2)(async()=>await Promise.all([r.e(165),r.e(7928)]).then(r.bind(r,7928)),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,s.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in c))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);const r=c[t.layoutAlgorithm];return(await r.loader()).render(t,e,l,{algorithm:r.algorithm})},"render"),d=(0,s.K2)((t="",{fallback:e="dagre"}={})=>{if(t in c)return t;if(e in c)return s.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},5164(t,e,r){"use strict";r.d(e,{IU:()=>x,Jo:()=>L,T_:()=>C,g0:()=>R,jP:()=>k});var i=r(8698),n=r(5894),a=r(3245),o=r(2387),s=r(92),l=r(3226),c=r(7633),h=r(797),u=r(451),d=r(9893),p=(0,h.K2)((t,e,r,i,n,a)=>{e.arrowTypeStart&&g(t,"start",e.arrowTypeStart,r,i,n,a),e.arrowTypeEnd&&g(t,"end",e.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),f={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},g=(0,h.K2)((t,e,r,i,n,a,o)=>{const s=f[r];if(!s)return void h.Rm.warn(`Unknown arrow type: ${r}`);const l=`${n}_${a}-${s.type}${"start"===e?"Start":"End"}`;if(o&&""!==o.trim()){const r=`${l}_${o.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(l);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",o),s.fill&&t.setAttribute("fill",o)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${l})`)},"addEdgeMarker"),y=new Map,m=new Map,x=(0,h.K2)(()=>{y.clear(),m.clear()},"clear"),b=(0,h.K2)(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),k=(0,h.K2)(async(t,e)=>{let r=(0,c._3)((0,c.D7)().flowchart.htmlLabels);const{labelStyles:i}=(0,o.GX)(e);e.labelStyle=i;const a=await(0,s.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});h.Rm.info("abc82",e,e.labelType);const l=t.insert("g").attr("class","edgeLabel"),d=l.insert("g").attr("class","label").attr("data-id",e.id);d.node().appendChild(a);let p,f=a.getBBox();if(r){const t=a.children[0],e=(0,u.Ltv)(a);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}if(d.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),y.set(e.id,l),e.width=f.width,e.height=f.height,e.startLabelLeft){const r=await(0,n.DA)(e.startLabelLeft,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),m.get(e.id)||m.set(e.id,{}),m.get(e.id).startLeft=i,w(p,e.startLabelLeft)}if(e.startLabelRight){const r=await(0,n.DA)(e.startLabelRight,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=i.node().appendChild(r),a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),m.get(e.id)||m.set(e.id,{}),m.get(e.id).startRight=i,w(p,e.startLabelRight)}if(e.endLabelLeft){const r=await(0,n.DA)(e.endLabelLeft,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),m.get(e.id)||m.set(e.id,{}),m.get(e.id).endLeft=i,w(p,e.endLabelLeft)}if(e.endLabelRight){const r=await(0,n.DA)(e.endLabelRight,b(e.labelStyle)),i=t.insert("g").attr("class","edgeTerminals"),a=i.insert("g").attr("class","inner");p=a.node().appendChild(r);const o=r.getBBox();a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.node().appendChild(r),m.get(e.id)||m.set(e.id,{}),m.get(e.id).endRight=i,w(p,e.endLabelRight)}return a},"insertEdgeLabel");function w(t,e){(0,c.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,h.K2)(w,"setTerminalWidth");var C=(0,h.K2)((t,e)=>{h.Rm.debug("Moving label abc88 ",t.id,t.label,y.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,c.D7)(),{subGraphTitleTotalMargin:n}=(0,a.O)(i);if(t.label){const i=y.get(t.id);let a=t.x,o=t.y;if(r){const i=l._K.calcLabelPosition(r);h.Rm.debug("Moving label "+t.label+" from (",a,",",o,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,o=i.y)}i.attr("transform",`translate(${a}, ${o+n/2})`)}if(t.startLabelLeft){const e=m.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=m.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=m.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=m.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),_=(0,h.K2)((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),a=Math.abs(e.y-i),o=t.width/2,s=t.height/2;return n>=o||a>=s},"outsideNode"),v=(0,h.K2)((t,e,r)=>{h.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,a=Math.abs(i-r.x),o=t.width/2;let s=r.xMath.abs(i-e.x)*l){let t=r.y{h.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(t=>{if(h.Rm.info("abc88 checking point",t,e),_(e,t)||n)h.Rm.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const a=v(e,i,t);h.Rm.debug("abc88 inside",t,i,a),h.Rm.debug("abc88 intersection",a,e);let o=!1;r.forEach(t=>{o=o||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?h.Rm.warn("abc88 no intersect",a,r):r.push(a),n=!0}}),h.Rm.debug("returning points",r),r},"cutPathAtIntersect");function T(t){const e=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===o.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-o.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,h.K2)(T,"extractCornerPoints");var A=(0,h.K2)(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,a=r/Math.sqrt(i*i+n*n);return{x:e.x-a*i,y:e.y-a*n}},"findAdjacentPoint"),M=(0,h.K2)(function(t){const{cornerPointPositions:e}=T(t),r=[];for(let i=0;i10&&Math.abs(n.y-e.y)>=10){h.Rm.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=a.x===o.x?{x:l<0?o.x-t+u:o.x+t-u,y:c<0?o.y-u:o.y+u}:{x:l<0?o.x-u:o.x+u,y:c<0?o.y-t+u:o.y+t-u}}else h.Rm.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,s)}else r.push(t[i]);return r},"fixCorners"),B=(0,h.K2)((t,e,r)=>{const i=t-e-r,n=Math.floor(i/4);return`0 ${e} ${Array(n).fill("2 2").join(" ")} ${r}`},"generateDashArray"),L=(0,h.K2)(function(t,e,r,n,a,s,f,g=!1){const{handDrawnSeed:y}=(0,c.D7)();let m=e.points,x=!1;const b=a;var k=s;const w=[];for(const i in e.cssCompiledStyles)(0,o.KX)(i)||w.push(e.cssCompiledStyles[i]);h.Rm.debug("UIO intersect check",e.points,k.x,b.x),k.intersect&&b.intersect&&!g&&(m=m.slice(1,e.points.length-1),m.unshift(b.intersect(m[0])),h.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,m[m.length-1],k,k.intersect(m[m.length-1])),m.push(k.intersect(m[m.length-1])));const C=btoa(JSON.stringify(m));e.toCluster&&(h.Rm.info("to cluster abc88",r.get(e.toCluster)),m=S(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(h.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(m,null,2)),m=S(m.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let _=m.filter(t=>!Number.isNaN(t.y));_=M(_);let v=u.qrM;switch(v=u.lUB,e.curve){case"linear":v=u.lUB;break;case"basis":default:v=u.qrM;break;case"cardinal":v=u.y8u;break;case"bumpX":v=u.Wi0;break;case"bumpY":v=u.PGM;break;case"catmullRom":v=u.oDi;break;case"monotoneX":v=u.nVG;break;case"monotoneY":v=u.uxU;break;case"natural":v=u.Xf2;break;case"step":v=u.GZz;break;case"stepAfter":v=u.UPb;break;case"stepBefore":v=u.dyv}const{x:T,y:A}=(0,i.RI)(e),L=(0,u.n8j)().x(T).y(A).curve(v);let $,D;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let O="rounded"===e.curve?F(E(_,e),5):L(_);const R=Array.isArray(e.style)?e.style:[e.style];let K=R.find(t=>t?.startsWith("stroke:")),I=!1;if("handDrawn"===e.look){const r=d.A.svg(t);Object.assign([],_);const i=r.path(O,{roughness:.3,seed:y});$+=" transition",D=(0,u.Ltv)(i).select("path").attr("id",e.id).attr("class"," "+$+(e.classes?" "+e.classes:"")).attr("style",R?R.reduce((t,e)=>t+";"+e,""):"");let n=D.attr("d");D.attr("d",n),t.node().appendChild(D.node())}else{const r=w.join(";"),n=R?R.reduce((t,e)=>t+e+";",""):"";let a="";e.animate&&(a=" edge-animation-fast"),e.animation&&(a=" edge-animation-"+e.animation);const o=(r?r+";"+n+";":n)+";"+(R?R.reduce((t,e)=>t+";"+e,""):"");D=t.append("path").attr("d",O).attr("id",e.id).attr("class"," "+$+(e.classes?" "+e.classes:"")+(a??"")).attr("style",o),K=o.match(/stroke:([^;]+)/)?.[1],I=!0===e.animate||!!e.animation||r.includes("animation");const s=D.node(),l="function"==typeof s.getTotalLength?s.getTotalLength():0,c=i.Nq[e.arrowTypeStart]||0,h=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!I){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?B(l,c,h):`0 ${c} ${l-c-h} ${h}`}; stroke-dashoffset: 0;`;D.attr("style",t+D.attr("style"))}}D.attr("data-edge",!0),D.attr("data-et","edge"),D.attr("data-id",e.id),D.attr("data-points",C),e.showPoints&&_.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let N="";((0,c.D7)().flowchart.arrowMarkerAbsolute||(0,c.D7)().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.Rm.info("arrowTypeStart",e.arrowTypeStart),h.Rm.info("arrowTypeEnd",e.arrowTypeEnd),p(D,e,N,f,n,K);const P=m[Math.floor(m.length/2)];l._K.isLabelCoordinateInPath(P,D.attr("d"))||(x=!0);let z={};return x&&(z.updatedPath=m),z.originalPath=e.points,z},"insertEdge");function F(t,e){if(t.length<2)return"";let r="";const i=t.length,n=1e-5;for(let a=0;a({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){const n=i.hq[e.arrowTypeStart],a=t[0],o=t[1],{angle:s}=$(a,o),l=n*Math.cos(s),c=n*Math.sin(s);r[0].x=a.x+l,r[0].y=a.y+c}const n=t.length;if(n>=2&&i.hq[e.arrowTypeEnd]){const a=i.hq[e.arrowTypeEnd],o=t[n-1],s=t[n-2],{angle:l}=$(s,o),c=a*Math.cos(l),h=a*Math.sin(l);r[n-1].x=o.x-c,r[n-1].y=o.y-h}return r}(0,h.K2)(F,"generateRoundedPath"),(0,h.K2)($,"calculateDeltaAndAngle"),(0,h.K2)(E,"applyMarkerOffsetsToPoints");var D=(0,h.K2)((t,e,r,i)=>{e.forEach(e=>{O[e](t,r,i)})},"insertMarkers"),O={extension:(0,h.K2)((t,e,r)=>{h.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,h.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),only_one:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),zero_or_one:(0,h.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),one_or_more:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),zero_or_more:(0,h.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),requirement_arrow:(0,h.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),requirement_contains:(0,h.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains")},R=D},3226(t,e,r){"use strict";r.d(e,{$C:()=>M,$t:()=>W,C4:()=>U,I5:()=>j,Ib:()=>y,KL:()=>X,Sm:()=>Y,Un:()=>R,_K:()=>H,bH:()=>E,dq:()=>z,pe:()=>c,rY:()=>G,ru:()=>O,sM:()=>T,vU:()=>f,yT:()=>L});var i=r(7633),n=r(797),a=r(6750),o=r(451),s=r(6632),l=r(2837),c="\u200b",h={curveBasis:o.qrM,curveBasisClosed:o.Yu4,curveBasisOpen:o.IA3,curveBumpX:o.Wi0,curveBumpY:o.PGM,curveBundle:o.OEq,curveCardinalClosed:o.olC,curveCardinalOpen:o.IrU,curveCardinal:o.y8u,curveCatmullRomClosed:o.Q7f,curveCatmullRomOpen:o.cVp,curveCatmullRom:o.oDi,curveLinear:o.lUB,curveLinearClosed:o.Lx9,curveMonotoneX:o.nVG,curveMonotoneY:o.uxU,curveNatural:o.Xf2,curveStep:o.GZz,curveStepAfter:o.UPb,curveStepBefore:o.dyv},u=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,d=(0,n.K2)(function(t,e){const r=p(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),n=(0,i.hH)(n,[...t])}else n=r.args;if(!n)return;let a=(0,i.Ch)(t,e);const o="config";return void 0!==n[o]&&("flowchart-v2"===a&&(a="flowchart"),n[a]=n[o],delete n[o]),n},"detectInit"),p=(0,n.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${u.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const o=[];for(;null!==(a=i.DB.exec(t));)if(a.index===i.DB.lastIndex&&i.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:t,args:e})}return 0===o.length?{type:t,args:null}:1===o.length?o[0]:o}catch(r){return n.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),f=(0,n.K2)(function(t){return t.replace(i.DB,"")},"removeDirectives"),g=(0,n.K2)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function y(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return h[r]??e}function m(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,n.K2)(y,"interpolateToCurve"),(0,n.K2)(m,"formatUrl");var x=(0,n.K2)((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let o=window;for(let s=0;s{r+=b(t,e),e=t});return _(t,r/2)}function w(t){return 1===t.length?t[0]:k(t)}(0,n.K2)(b,"distance"),(0,n.K2)(k,"traverseEdge"),(0,n.K2)(w,"calcLabelPosition");var C=(0,n.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),_=(0,n.K2)((t,e)=>{let r,i=e;for(const n of t){if(r){const t=b(n,r);if(0===t)return r;if(t=1)return{x:n.x,y:n.y};if(e>0&&e<1)return{x:C((1-e)*r.x+e*n.x,5),y:C((1-e)*r.y+e*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),v=(0,n.K2)((t,e,r)=>{n.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=_(e,25),a=t?10:5,o=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(e[0].x+i.x)/2,s.y=-Math.cos(o)*a+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function S(t,e,r){const i=structuredClone(r);n.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=_(i,25+t),o=10+.5*t,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(s)*o+(i[0].x+a.x)/2,l.y=-Math.cos(s)*o+(i[0].y+a.y)/2),l}function T(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,n.K2)(S,"calcTerminalLabelPosition"),(0,n.K2)(T,"getStylesFromArray");var A=0,M=(0,n.K2)(()=>(A++,"id-"+Math.random().toString(36).substr(2,12)+"-"+A),"generateId");function B(t){let e="";const r="0123456789abcdef";for(let i=0;iB(t.length),"random"),F=(0,n.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),$=(0,n.K2)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,n]=j(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",n),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const o=a.append("tspan");return o.attr("x",e.x+2*e.textMargin),o.attr("fill",e.fill),o.text(r),a},"drawSimpleText"),E=(0,s.A)((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),i.Y2.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),a=[];let o="";return n.forEach((t,i)=>{const s=R(`${t} `,r),l=R(o,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=D(t,e,"-",r);a.push(o,...i),o=n}else l+s>=e?(a.push(o),o=t):o=[o,t].filter(Boolean).join(" ");i+1===n.length&&a.push(o)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),D=(0,s.A)((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],a=[];let o="";return n.forEach((t,s)=>{const l=`${o}${t}`;if(R(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;a.push(e?l:i),o=""}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function O(t,e){return I(t,e).height}function R(t,e){return I(t,e).width}(0,n.K2)(O,"calculateTextHeight"),(0,n.K2)(R,"calculateTextWidth");var K,I=(0,s.A)((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,s]=j(r),l=["sans-serif",n],h=t.split(i.Y2.lineBreakRegex),u=[],d=(0,o.Ltv)("body");if(!d.remove)return{width:0,height:0,lineHeight:0};const p=d.append("svg");for(const i of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of h){const n=F();n.text=r||c;const o=$(p,n).style("font-size",s).style("font-weight",a).style("font-family",i),l=(o._groups||o)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}u.push(e)}p.remove();return u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),N=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,n.K2)(this,"InitIDGenerator")}},P=(0,n.K2)(function(t){return K=K||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),K.innerHTML=t,unescape(K.textContent)},"entityDecode");function z(t){return"str"in t}(0,n.K2)(z,"isDetailedError");var q=(0,n.K2)((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),j=(0,n.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function W(t,e){return(0,l.A)({},t,e)}(0,n.K2)(W,"cleanAndMerge");var H={assignWithDepth:i.hH,wrapLabel:E,calculateTextHeight:O,calculateTextWidth:R,calculateTextDimensions:I,cleanAndMerge:W,detectInit:d,detectDirective:p,isSubstringInArray:g,interpolateToCurve:y,calcLabelPosition:w,calcCardinalityPosition:v,calcTerminalLabelPosition:S,formatUrl:m,getStylesFromArray:T,generateId:M,random:L,runFunc:x,entityDecode:P,insertTitle:q,isLabelCoordinateInPath:V,parseFontSize:j,InitIDGenerator:N},U=(0,n.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"}),e},"encodeEntities"),Y=(0,n.K2)(function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},"decodeEntities"),G=(0,n.K2)((t,e,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function X(t){return t??null}function V(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return n.includes(r.toString())||n.includes(i.toString())}(0,n.K2)(X,"handleUndefinedAttr"),(0,n.K2)(V,"isLabelCoordinateInPath")},2279(t,e,r){"use strict";r.r(e),r.d(e,{default:()=>Ge});var i=r(5553),n=r(3590),a=r(3981),o=r(45),s=(r(5164),r(8698),r(5894),r(3245),r(2387),r(92)),l=r(3226),c=r(7633),h=r(797),u=r(513),d=r(451),p="comm",f="rule",g="decl",y=Math.abs,m=String.fromCharCode;Object.assign;function x(t){return t.trim()}function b(t,e,r){return t.replace(e,r)}function k(t,e,r){return t.indexOf(e,r)}function w(t,e){return 0|t.charCodeAt(e)}function C(t,e,r){return t.slice(e,r)}function _(t){return t.length}function v(t,e){return e.push(t),t}function S(t,e){for(var r="",i=0;i0?w($,--L):0,M--,10===F&&(M=1,A--),F}function O(){return F=L2||N(F)>3?"":" "}function W(t,e){for(;--e&&O()&&!(F<48||F>102||F>57&&F<65||F>70&&F<97););return I(t,K()+(e<6&&32==R()&&32==O()))}function H(t){for(;O();)switch(F){case t:return L;case 34:case 39:34!==t&&39!==t&&H(F);break;case 40:41===t&&H(t);break;case 92:O()}return L}function U(t,e){for(;O()&&t+F!==57&&(t+F!==84||47!==R()););return"/*"+I(e,L-1)+"*"+m(47===t?t:O())}function Y(t){for(;!N(R());)O();return I(t,L)}function G(t){return z(X("",null,null,null,[""],t=P(t),0,[0],t))}function X(t,e,r,i,n,a,o,s,l){for(var c=0,h=0,u=o,d=0,p=0,f=0,g=1,x=1,S=1,T=0,A="",M=n,B=a,L=i,F=A;x;)switch(f=T,T=O()){case 40:if(108!=f&&58==w(F,u-1)){-1!=k(F+=b(q(T),"&","&\f"),"&\f",y(c?s[c-1]:0))&&(S=-1);break}case 34:case 39:case 91:F+=q(T);break;case 9:case 10:case 13:case 32:F+=j(f);break;case 92:F+=W(K()-1,7);continue;case 47:switch(R()){case 42:case 47:v(Z(U(O(),K()),e,r,l),l),5!=N(f||1)&&5!=N(R()||1)||!_(F)||" "===C(F,-1,void 0)||(F+=" ");break;default:F+="/"}break;case 123*g:s[c++]=_(F)*S;case 125*g:case 59:case 0:switch(T){case 0:case 125:x=0;case 59+h:-1==S&&(F=b(F,/\f/g,"")),p>0&&(_(F)-u||0===g&&47===f)&&v(p>32?Q(F+";",i,r,u-1,l):Q(b(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(v(L=V(F,e,r,c,h,n,s,A,M=[],B=[],u,a),a),123===T)if(0===h)X(F,e,L,L,M,a,u,s,B);else{switch(d){case 99:if(110===w(F,3))break;case 108:if(97===w(F,2))break;default:h=0;case 100:case 109:case 115:}h?X(t,L,L,i&&v(V(t,L,L,0,0,n,s,A,n,M=[],u,B),B),n,B,u,s,i?M:B):X(F,L,L,L,[""],B,0,s,B)}}c=h=p=0,g=S=1,A=F="",u=o;break;case 58:u=1+_(F),p=f;default:if(g<1)if(123==T)--g;else if(125==T&&0==g++&&125==D())continue;switch(F+=m(T),T*g){case 38:S=h>0?1:(F+="\f",-1);break;case 44:s[c++]=(_(F)-1)*S,S=1;break;case 64:45===R()&&(F+=q(O())),d=R(),h=u=_(A=F+=Y(K())),T++;break;case 45:45===f&&2==_(F)&&(g=0)}}return a}function V(t,e,r,i,n,a,o,s,l,c,h,u){for(var d=n-1,p=0===n?a:[""],g=function(t){return t.length}(p),m=0,k=0,w=0;m0?p[_]+" "+v:b(v,/&\f/g,p[_])))&&(l[w++]=S);return E(t,e,r,0===n?f:s,l,c,h,u)}function Z(t,e,r,i){return E(t,e,r,p,m(F),C(t,2,-2),0,i)}function Q(t,e,r,i,n){return E(t,e,r,g,C(t,0,i),C(t,i+1,-1),i,n)}var J=r(9418),tt=r(6401),et={id:"c4",detector:(0,h.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(4981).then(r.bind(r,4981));return{id:"c4",diagram:t}},"loader")},rt="flowchart",it={id:rt,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2291).then(r.bind(r,2291));return{id:rt,diagram:t}},"loader")},nt="flowchart-v2",at={id:nt,detector:(0,h.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2291).then(r.bind(r,2291));return{id:nt,diagram:t}},"loader")},ot={id:"er",detector:(0,h.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(8756).then(r.bind(r,8756));return{id:"er",diagram:t}},"loader")},st="gitGraph",lt={id:st,detector:(0,h.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(4312)]).then(r.bind(r,4312));return{id:st,diagram:t}},"loader")},ct="gantt",ht={id:ct,detector:(0,h.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2492).then(r.bind(r,2492));return{id:ct,diagram:t}},"loader")},ut="info",dt={id:ut,detector:(0,h.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(9620)]).then(r.bind(r,9620));return{id:ut,diagram:t}},"loader")},pt={id:"pie",detector:(0,h.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(9412)]).then(r.bind(r,9412));return{id:"pie",diagram:t}},"loader")},ft="quadrantChart",gt={id:ft,detector:(0,h.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(1203).then(r.bind(r,1203));return{id:ft,diagram:t}},"loader")},yt="xychart",mt={id:yt,detector:(0,h.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5955).then(r.bind(r,5955));return{id:yt,diagram:t}},"loader")},xt="requirement",bt={id:xt,detector:(0,h.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9032).then(r.bind(r,9032));return{id:xt,diagram:t}},"loader")},kt="sequence",wt={id:kt,detector:(0,h.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(7592).then(r.bind(r,7592));return{id:kt,diagram:t}},"loader")},Ct="class",_t={id:Ct,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(1746),r.e(9510)]).then(r.bind(r,9510));return{id:Ct,diagram:t}},"loader")},vt="classDiagram",St={id:vt,detector:(0,h.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(1746),r.e(3815)]).then(r.bind(r,3815));return{id:vt,diagram:t}},"loader")},Tt="state",At={id:Tt,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(2334),r.e(4616),r.e(8142)]).then(r.bind(r,8142));return{id:Tt,diagram:t}},"loader")},Mt="stateDiagram",Bt={id:Mt,detector:(0,h.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(4616),r.e(4802)]).then(r.bind(r,4802));return{id:Mt,diagram:t}},"loader")},Lt="journey",Ft={id:Lt,detector:(0,h.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5480).then(r.bind(r,5480));return{id:Lt,diagram:t}},"loader")},$t={draw:(0,h.K2)((t,e,r)=>{h.Rm.debug("rendering svg for syntax error\n");const i=(0,n.D)(e),a=i.append("g");i.attr("viewBox","0 0 2412 512"),(0,c.a$)(i,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Et=$t,Dt={db:{},renderer:$t,parser:{parse:(0,h.K2)(()=>{},"parse")}},Ot="flowchart-elk",Rt={id:Ot,detector:(0,h.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2291).then(r.bind(r,2291));return{id:Ot,diagram:t}},"loader")},Kt="timeline",It={id:Kt,detector:(0,h.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(291).then(r.bind(r,291));return{id:Kt,diagram:t}},"loader")},Nt="mindmap",Pt={id:Nt,detector:(0,h.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9717).then(r.bind(r,9717));return{id:Nt,diagram:t}},"loader")},zt="kanban",qt={id:zt,detector:(0,h.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(6241).then(r.bind(r,6241));return{id:zt,diagram:t}},"loader")},jt="sankey",Wt={id:jt,detector:(0,h.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(1741).then(r.bind(r,1741));return{id:jt,diagram:t}},"loader")},Ht="packet",Ut={id:Ht,detector:(0,h.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(6567)]).then(r.bind(r,6567));return{id:Ht,diagram:t}},"loader")},Yt="radar",Gt={id:Yt,detector:(0,h.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(6992)]).then(r.bind(r,6992));return{id:Yt,diagram:t}},"loader")},Xt="block",Vt={id:Xt,detector:(0,h.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(5996)]).then(r.bind(r,5996));return{id:Xt,diagram:t}},"loader")},Zt="architecture",Qt={id:Zt,detector:(0,h.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(165),r.e(8249)]).then(r.bind(r,8249));return{id:Zt,diagram:t}},"loader")},Jt="treemap",te={id:Jt,detector:(0,h.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(3624),r.e(8731),r.e(2821)]).then(r.bind(r,2821));return{id:Jt,diagram:t}},"loader")},ee=!1,re=(0,h.K2)(()=>{ee||(ee=!0,(0,c.Js)("error",Dt,t=>"error"===t.toLowerCase().trim()),(0,c.Js)("---",{db:{clear:(0,h.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.K2)(()=>{},"draw")},parser:{parse:(0,h.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,h.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,c.Xd)(Rt,Pt,Qt),(0,c.Xd)(et,qt,St,_t,ot,ht,dt,pt,bt,wt,at,it,It,lt,Bt,At,Ft,gt,Wt,Ut,mt,Vt,Gt,te))},"addDiagrams"),ie=(0,h.K2)(async()=>{h.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(c.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,c.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,c.Js)(i,t,e)}catch(i){throw h.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete c.mW[t],i}}}))).filter(t=>"rejected"===t.status);if(t.length>0){h.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function ne(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ae(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,h.K2)(ne,"setA11yDiagramInfo"),(0,h.K2)(ae,"addSVGa11yTitleDescription");var oe=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,h.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,c.zj)(),n=(0,c.Ch)(e,i);e=(0,l.C4)(e)+"\n";try{(0,c.Gs)(n)}catch{const t=(0,c.J$)(n);if(!t)throw new c.C0(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,c.Js)(e,r)}const{db:a,parser:o,renderer:s,init:h}=(0,c.Gs)(n);return o.parser&&(o.parser.yy=a),a.clear?.(),h?.(i),r.title&&a.setDiagramTitle?.(r.title),await o.parse(e),new t(n,e,a,o,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},se=[],le=(0,h.K2)(()=>{se.forEach(t=>{t()}),se=[]},"attachFunctions"),ce=(0,h.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function he(t){const e=t.match(c.EJ);if(!e)return{text:t,metadata:{}};let r=(0,a.H)(e[1],{schema:a.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}(0,h.K2)(he,"extractFrontMatter");var ue=(0,h.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),de=(0,h.K2)(t=>{const{text:e,metadata:r}=he(t),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:e}},"processFrontmatter"),pe=(0,h.K2)(t=>{const e=l._K.detectInit(t)??{},r=l._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,l.vU)(t),directive:e}},"processDirectives");function fe(t){const e=ue(t),r=de(e),i=pe(r.text),n=(0,l.$t)(r.config,i.directive);return{code:t=ce(i.text),title:r.title,config:n}}function ge(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,h.K2)(fe,"preprocessDiagram"),(0,h.K2)(ge,"toBase64");var ye=["foreignobject"],me=["dominant-baseline"];function xe(t){const e=fe(t);return(0,c.cL)(),(0,c.xA)(e.config??{}),e}async function be(t,e){re();try{const{code:e,config:r}=xe(t);return{diagramType:(await Le(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,h.K2)(xe,"processAndSetConfigs"),(0,h.K2)(be,"parse");var ke=(0,h.K2)((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),we=(0,h.K2)((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=t.htmlLabels??t.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,tt.A)(t.styles)||i.forEach(e=>{r+=ke(t.id,e,t.styles)}),(0,tt.A)(t.textStyles)||(r+=ke(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),Ce=(0,h.K2)((t,e,r,i)=>{const n=we(t,r);return S(G(`${i}{${(0,c.tM)(e,n,t.themeVariables)}}`),T)},"createUserStyles"),_e=(0,h.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,l.Sm)(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),ve=(0,h.K2)((t="",e)=>``,"putIntoIFrame"),Se=(0,h.K2)((t,e,r,i,n)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const o=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&o.attr("xmlns:xlink",n),o.append("g"),t},"appendDivSvgG");function Te(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)(Te,"sandboxedIframe");var Ae=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Me=(0,h.K2)(async function(t,e,r){re();const n=xe(e);e=n.code;const a=(0,c.zj)();h.Rm.debug(a),e.length>(a?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o="#"+t,s="i"+t,l="#"+s,u="d"+t,p="#"+u,f=(0,h.K2)(()=>{const t=y?l:p,e=(0,d.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,d.Ltv)("body");const y="sandbox"===a.securityLevel,m="loose"===a.securityLevel,x=a.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),y){const t=Te((0,d.Ltv)(r),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)(r);Se(g,t,u,`font-family: ${x}`,"http://www.w3.org/1999/xlink")}else{if(Ae(document,t,u,s),y){const t=Te((0,d.Ltv)("body"),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)("body");Se(g,t,u)}let b,k;try{b=await oe.fromText(e,{title:n.title})}catch($){if(a.suppressErrorRendering)throw f(),$;b=await oe.fromText("error"),k=$}const w=g.select(p).node(),C=b.type,_=w.firstChild,v=_.firstChild,S=b.renderer.getClasses?.(e,b),T=Ce(a,C,S,o),A=document.createElement("style");A.innerHTML=T,_.insertBefore(A,v);try{await b.renderer.draw(e,t,i.n.version,b)}catch(E){throw a.suppressErrorRendering?f():Et.draw(e,t,i.n.version),E}const M=g.select(`${p} svg`),B=b.db.getAccTitle?.(),L=b.db.getAccDescription?.();Fe(C,M,B,L),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let F=g.select(p).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),F=_e(F,y,(0,c._3)(a.arrowMarkerAbsolute)),y){const t=g.select(p+" svg").node();F=ve(F,t)}else m||(F=J.A.sanitize(F,{ADD_TAGS:ye,ADD_ATTR:me,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(le(),k)throw k;return f(),{diagramType:C,svg:F,bindFunctions:b.db.bindFunctions}},"render");function Be(t={}){const e=(0,c.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,c.wZ)(e),e?.theme&&e.theme in c.H$?e.themeVariables=c.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=c.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,c.UU)(e):(0,c.Q2)();(0,h.He)(r.logLevel),re()}(0,h.K2)(Be,"initialize");var Le=(0,h.K2)((t,e={})=>{const{code:r}=fe(t);return oe.fromText(r,e)},"getDiagramFromText");function Fe(t,e,r,i){ne(e,t),ae(e,r,i,e.attr("id"))}(0,h.K2)(Fe,"addA11yInfo");var $e=Object.freeze({render:Me,parse:be,getDiagramFromText:Le,initialize:Be,getConfig:c.zj,setConfig:c.Nk,getSiteConfig:c.Q2,updateSiteConfig:c.B6,reset:(0,h.K2)(()=>{(0,c.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,c.cL)(c.sb)},"globalReset"),defaultConfig:c.sb});(0,h.He)((0,c.zj)().logLevel),(0,c.cL)((0,c.zj)());var Ee=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,l.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),De=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await Oe(t)}catch(e){if((0,l.dq)(e)&&h.Rm.error(e.str),Ye.parseError&&Ye.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),Oe=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=$e.getConfig();let n;if(h.Rm.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}h.Rm.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(h.Rm.debug("Start On Load: "+i?.startOnLoad),$e.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new l._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let o;const s=[];for(const d of Array.from(n)){if(h.Rm.info("Rendering diagram: "+d.id),d.getAttribute("data-processed"))continue;d.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;o=d.innerHTML,o=(0,u.T)(l._K.entityDecode(o)).trim().replace(//gi,"
    ");const r=l._K.detectInit(o);r&&h.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await He(e,o,d);d.innerHTML=r,t&&await t(e),i&&i(d)}catch(c){Ee(c,s,Ye.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),Re=(0,h.K2)(function(t){$e.initialize(t)},"initialize"),Ke=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Re(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await De(i)},"init"),Ie=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{re(),(0,c.Xd)(...t),!1===e&&await ie()},"registerExternalDiagrams"),Ne=(0,h.K2)(function(){if(Ye.startOnLoad){const{startOnLoad:t}=$e.getConfig();t&&Ye.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ne,!1);var Pe=(0,h.K2)(function(t){Ye.parseError=t},"setParseErrorHandler"),ze=[],qe=!1,je=(0,h.K2)(async()=>{if(!qe){for(qe=!0;ze.length>0;){const e=ze.shift();if(e)try{await e()}catch(t){h.Rm.error("Error executing queue",t)}}qe=!1}},"executeQueue"),We=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{const n=(0,h.K2)(()=>new Promise((n,a)=>{$e.parse(t,e).then(t=>{n(t),r(t)},t=>{h.Rm.error("Error parsing",t),Ye.parseError?.(t),a(t),i(t)})}),"performCall");ze.push(n),je().catch(i)}),"parse"),He=(0,h.K2)((t,e,r)=>new Promise((i,n)=>{const a=(0,h.K2)(()=>new Promise((a,o)=>{$e.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.Rm.error("Error parsing",t),Ye.parseError?.(t),o(t),n(t)})}),"performCall");ze.push(a),je().catch(n)}),"render"),Ue=(0,h.K2)(()=>Object.keys(c.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),Ye={startOnLoad:!0,mermaidAPI:$e,parse:We,render:He,init:Ke,run:De,registerExternalDiagrams:Ie,registerLayoutLoaders:o.sO,initialize:Re,parseError:void 0,contentLoaded:Ne,setParseErrorHandler:Pe,detectType:c.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:Ue},Ge=Ye}}]); \ No newline at end of file diff --git a/assets/js/2279.14e9bbca.js.LICENSE.txt b/assets/js/2279.14e9bbca.js.LICENSE.txt deleted file mode 100644 index 2d1bc56..0000000 --- a/assets/js/2279.14e9bbca.js.LICENSE.txt +++ /dev/null @@ -1 +0,0 @@ -/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */ diff --git a/assets/js/2291.742b3f1e.js b/assets/js/2291.742b3f1e.js deleted file mode 100644 index 2c65fd4..0000000 --- a/assets/js/2291.742b3f1e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2291],{5937(t,e,s){s.d(e,{A:()=>r});var i=s(2453),n=s(4886);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},9625(t,e,s){s.d(e,{A:()=>r});var i=s(797),n=s(451),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},2501(t,e,s){s.d(e,{o:()=>i});var i=(0,s(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},1152(t,e,s){s.d(e,{P:()=>r});var i=s(7633),n=s(797),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:o,height:l,x:c,y:h}=a(t,e);(0,i.a$)(t,l,o,r);const d=u(c,h,o,l,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),u=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},2291(t,e,s){s.d(e,{diagram:()=>C});var i=s(2501),n=s(3981),r=s(9625),a=s(1152),u=s(45),o=(s(5164),s(8698),s(5894)),l=(s(3245),s(2387),s(92),s(3226)),c=s(7633),h=s(797),d=s(451),p=s(5582),g=s(5937),A=class{constructor(){this.vertexCounter=0,this.config=(0,c.D7)(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=c.SV,this.setAccDescription=c.EI,this.setDiagramTitle=c.ke,this.getAccTitle=c.iN,this.getAccDescription=c.m7,this.getDiagramTitle=c.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,h.K2)(this,"FlowDB")}sanitizeText(t){return c.Y2.sanitizeText(t,this.config)}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(t,e,s,i,r,a,u={},l){if(!t||0===t.trim().length)return;let h;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",h=(0,n.H)(t,{schema:n.r})}const d=this.edges.find(e=>e.id===t);if(d){const t=h;return void 0!==t?.animate&&(d.animate=t.animate),void 0!==t?.animation&&(d.animation=t.animation),void(void 0!==t?.curve&&(d.interpolate=t.curve))}let p,g=this.vertices.get(t);if(void 0===g&&(g={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,void 0!==e?(this.config=(0,c.D7)(),p=this.sanitizeText(e.text.trim()),g.labelType=e.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),g.text=p):void 0===g.text&&(g.text=t),void 0!==s&&(g.type=s),null!=i&&i.forEach(t=>{g.styles.push(t)}),null!=r&&r.forEach(t=>{g.classes.push(t)}),void 0!==a&&(g.dir=a),void 0===g.props?g.props=u:void 0!==u&&Object.assign(g.props,u),void 0!==h){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(h.shape))throw new Error(`No such shape: ${h.shape}.`);g.type=h?.shape}h?.label&&(g.text=h?.label),h?.icon&&(g.icon=h?.icon,h.label?.trim()||g.text!==t||(g.text="")),h?.form&&(g.form=h?.form),h?.pos&&(g.pos=h?.pos),h?.img&&(g.img=h?.img,h.label?.trim()||g.text!==t||(g.text="")),h?.constraint&&(g.constraint=h.constraint),h.w&&(g.assetWidth=Number(h.w)),h.h&&(g.assetHeight=Number(h.h))}}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};h.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=this.sanitizeText(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=r.type),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=(0,l.rY)(n.start,n.end,{counter:0,prefix:"L"}):n.id=(0,l.rY)(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);h.Rm.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;h.Rm.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],u=r===e[0];a&&u?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){const i=this.lookUpDomId(t);if("loose"!==(0,c.D7)().securityLevel)return;if(void 0===e)return;let n=[];if("string"==typeof s){n=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",()=>{l._K.runFunc(e,...n)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=l._K.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let e=(0,d.Ltv)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=(0,d.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0));(0,d.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=(0,d.Ltv)(t.currentTarget);if(null===s.attr("title"))return;const i=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+i.left+(i.right-i.left)/2+"px").style("top",window.scrollY+i.bottom+"px"),e.html(e.html().replace(/<br\/>/g,"
    ")),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,d.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,c.D7)(),(0,c.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s){let i=t.text.trim(),n=s.text;t===s&&/\s/.exec(s.text)&&(i=void 0);const r=(0,h.K2)(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),a=r.nodeList;let u=r.dir;const o=(0,c.D7)().flowchart??{};if(u=u??(o.inheritDir?this.getDirection()??(0,c.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let c=0;c2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let n="normal",r=s.length-1;s.startsWith("=")&&(n="thick"),s.startsWith("~")&&(n="invisible");const a=this.countChar(".",s);return a&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;if(e){if(i=this.destructStartLink(e),i.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=s.type;else{if(i.type!==s.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=s.length,i}return s}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),u=i.get(t.id)??!1,o=this.findNode(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=this.getCompiledStyles(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelStyle:"",parentId:a,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,c.D7)(),e=[],s=[],i=this.getSubGraphs(),n=new Map,r=new Map;for(let u=i.length-1;u>=0;u--){const t=i[u];t.nodes.length>0&&r.set(t.id,!0);for(const e of t.nodes)n.set(e,t.id)}for(let u=i.length-1;u>=0;u--){const s=i[u];e.push({id:s.id,label:s.title,labelStyle:"",parentId:n.get(s.id),padding:8,cssCompiledStyles:this.getCompiledStyles(s.classes),cssClasses:s.classes.join(" "),shape:"rect",dir:s.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(s=>{this.addNodeFromVertex(s,e,n,r,t,t.look||"classic")});const a=this.getEdges();return a.forEach((e,i)=>{const{arrowTypeStart:n,arrowTypeEnd:r}=this.destructEdgeType(e.type),u=[...a.defaultStyle??[]];e.style&&u.push(...e.style);const o={id:(0,l.rY)(e.start,e.end,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:u,style:u,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(o)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return c.ME.flowchart}},b={getClasses:(0,h.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,h.K2)(async function(t,e,s,i){h.Rm.info("REF0:"),h.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:n,flowchart:o,layout:p}=(0,c.D7)();let g;"sandbox"===n&&(g=(0,d.Ltv)("#i"+e));const A="sandbox"===n?g.nodes()[0].contentDocument:document;h.Rm.debug("Before getData: ");const b=i.db.getData();h.Rm.debug("Data: ",b);const y=(0,r.A)(e,n),k=i.db.getDirection();b.type=i.type,b.layoutAlgorithm=(0,u.q7)(p),"dagre"===b.layoutAlgorithm&&"elk"===p&&h.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),b.direction=k,b.nodeSpacing=o?.nodeSpacing||50,b.rankSpacing=o?.rankSpacing||50,b.markers=["point","circle","cross"],b.diagramId=e,h.Rm.debug("REF1:",b),await(0,u.XX)(b,y);const f=b.config.flowchart?.diagramPadding??8;l._K.insertTitle(y,"flowchartTitleText",o?.titleTopMargin||0,i.db.getDiagramTitle()),(0,a.P)(y,f,"flowchart",o?.useMaxWidth||!1);for(const r of b.nodes){const t=(0,d.Ltv)(`#${e} [id="${r.id}"]`);if(!t||!r.link)continue;const s=A.createElementNS("http://www.w3.org/2000/svg","a");s.setAttributeNS("http://www.w3.org/2000/svg","class",r.cssClasses),s.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===n?s.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):r.linkTarget&&s.setAttributeNS("http://www.w3.org/2000/svg","target",r.linkTarget);const i=t.insert(function(){return s},":first-child"),a=t.select(".label-container");a&&i.append(function(){return a.node()});const u=t.select(".label");u&&i.append(function(){return u.node()})}},"draw")},y=function(){var t=(0,h.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],i=[1,5],n=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],r=[2,2],a=[1,13],u=[1,14],o=[1,15],l=[1,16],c=[1,23],d=[1,25],p=[1,26],g=[1,27],A=[1,49],b=[1,48],y=[1,29],k=[1,30],f=[1,31],m=[1,32],E=[1,33],D=[1,44],C=[1,46],x=[1,42],T=[1,47],S=[1,43],F=[1,50],_=[1,45],v=[1,51],B=[1,52],w=[1,34],L=[1,35],$=[1,36],I=[1,37],R=[1,57],N=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],P=[1,61],K=[1,60],G=[1,62],O=[8,9,11,75,77,78],V=[1,78],M=[1,91],U=[1,96],W=[1,95],Y=[1,92],j=[1,88],z=[1,94],X=[1,90],H=[1,97],q=[1,93],Q=[1,98],Z=[1,89],J=[8,9,10,11,40,75,77,78],tt=[8,9,10,11,40,46,75,77,78],et=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],st=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],it=[44,60,89,102,105,106,109,111,114,115,116],nt=[1,121],rt=[1,122],at=[1,124],ut=[1,123],ot=[44,60,62,74,89,102,105,106,109,111,114,115,116],lt=[1,133],ct=[1,147],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,135],At=[1,137],bt=[1,141],yt=[1,142],kt=[1,143],ft=[1,144],mt=[1,145],Et=[1,146],Dt=[1,151],Ct=[1,152],xt=[1,131],Tt=[1,132],St=[1,139],Ft=[1,134],_t=[1,138],vt=[1,136],Bt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],wt=[1,154],Lt=[1,156],$t=[8,9,11],It=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Rt=[1,176],Nt=[1,172],Pt=[1,173],Kt=[1,177],Gt=[1,174],Ot=[1,175],Vt=[77,116,119],Mt=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Ut=[10,106],Wt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Yt=[1,247],jt=[1,245],zt=[1,249],Xt=[1,243],Ht=[1,244],qt=[1,246],Qt=[1,248],Zt=[1,250],Jt=[1,268],te=[8,9,11,106],ee=[8,9,10,11,60,84,105,106,109,110,111,112],se={trace:(0,h.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:(0,h.K2)(function(t,e,s,i,n,r,a){var u=r.length-1;switch(n){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(r[u])||r[u].length>0)&&r[u-1].push(r[u]),this.$=r[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=r[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(r[u-1]),this.$=r[u-1];break;case 27:this.$=r[u-1].nodes;break;case 33:this.$=i.addSubGraph(r[u-6],r[u-1],r[u-4]);break;case 34:this.$=i.addSubGraph(r[u-3],r[u-1],r[u-3]);break;case 35:this.$=i.addSubGraph(void 0,r[u-1],void 0);break;case 37:this.$=r[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=r[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=r[u-1]+r[u];break;case 45:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 46:i.addLink(r[u-2].stmt,r[u],r[u-1]),this.$={stmt:r[u],nodes:r[u].concat(r[u-2].nodes)};break;case 47:i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 48:this.$={stmt:r[u-1],nodes:r[u-1]};break;case 49:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),this.$={stmt:r[u-1],nodes:r[u-1],shapeData:r[u]};break;case 50:this.$={stmt:r[u],nodes:r[u]};break;case 51:case 128:case 130:this.$=[r[u]];break;case 52:i.addVertex(r[u-5][r[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u-4]),this.$=r[u-5].concat(r[u]);break;case 53:this.$=r[u-4].concat(r[u]);break;case 55:this.$=r[u-2],i.setClass(r[u-2],r[u]);break;case 56:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"square");break;case 57:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"doublecircle");break;case 58:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"circle");break;case 59:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"ellipse");break;case 60:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"stadium");break;case 61:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"subroutine");break;case 62:this.$=r[u-7],i.addVertex(r[u-7],r[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[u-5],r[u-3]]]));break;case 63:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"cylinder");break;case 64:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"round");break;case 65:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"diamond");break;case 66:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"hexagon");break;case 67:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"odd");break;case 68:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"trapezoid");break;case 69:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"inv_trapezoid");break;case 70:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_right");break;case 71:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_left");break;case 72:this.$=r[u],i.addVertex(r[u]);break;case 73:r[u-1].text=r[u],this.$=r[u-1];break;case 74:case 75:r[u-2].text=r[u-1],this.$=r[u-2];break;case 77:var o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1]};break;case 78:o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1],id:r[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:r[u],type:"text"};break;case 80:case 87:case 102:this.$={text:r[u-1].text+""+r[u],type:r[u-1].type};break;case 81:case 88:this.$={text:r[u],type:"string"};break;case 82:case 89:case 104:this.$={text:r[u],type:"markdown"};break;case 83:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length,id:r[u-1]};break;case 85:this.$=r[u-1];break;case 105:this.$=r[u-4],i.addClass(r[u-2],r[u]);break;case 106:this.$=r[u-4],i.setClass(r[u-2],r[u]);break;case 107:case 115:this.$=r[u-1],i.setClickEvent(r[u-1],r[u]);break;case 108:case 116:this.$=r[u-3],i.setClickEvent(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 109:this.$=r[u-2],i.setClickEvent(r[u-2],r[u-1],r[u]);break;case 110:this.$=r[u-4],i.setClickEvent(r[u-4],r[u-3],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 111:this.$=r[u-2],i.setLink(r[u-2],r[u]);break;case 112:this.$=r[u-4],i.setLink(r[u-4],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 113:this.$=r[u-4],i.setLink(r[u-4],r[u-2],r[u]);break;case 114:this.$=r[u-6],i.setLink(r[u-6],r[u-4],r[u]),i.setTooltip(r[u-6],r[u-2]);break;case 117:this.$=r[u-1],i.setLink(r[u-1],r[u]);break;case 118:this.$=r[u-3],i.setLink(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 119:this.$=r[u-3],i.setLink(r[u-3],r[u-2],r[u]);break;case 120:this.$=r[u-5],i.setLink(r[u-5],r[u-4],r[u]),i.setTooltip(r[u-5],r[u-2]);break;case 121:this.$=r[u-4],i.addVertex(r[u-2],void 0,void 0,r[u]);break;case 122:this.$=r[u-4],i.updateLink([r[u-2]],r[u]);break;case 123:this.$=r[u-4],i.updateLink(r[u-2],r[u]);break;case 124:this.$=r[u-8],i.updateLinkInterpolate([r[u-6]],r[u-2]),i.updateLink([r[u-6]],r[u]);break;case 125:this.$=r[u-8],i.updateLinkInterpolate(r[u-6],r[u-2]),i.updateLink(r[u-6],r[u]);break;case 126:this.$=r[u-6],i.updateLinkInterpolate([r[u-4]],r[u]);break;case 127:this.$=r[u-6],i.updateLinkInterpolate(r[u-4],r[u]);break;case 129:case 131:r[u-2].push(r[u]),this.$=r[u-2];break;case 182:case 184:this.$=r[u-1]+""+r[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:i},{1:[3]},t(n,r,{5:6}),{4:7,9:e,10:s,12:i},{4:8,9:e,10:s,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),{8:[1,54],9:[1,55],10:R,15:53,18:56},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:P,9:K,11:G,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:P,9:K,11:G,21:67},{8:P,9:K,11:G,21:68},{8:P,9:K,11:G,21:69},{8:P,9:K,11:G,21:70},{8:P,9:K,11:G,21:71},{8:P,9:K,10:[1,72],11:G,21:73},t(N,[2,36]),{35:[1,74]},{37:[1,75]},t(N,[2,39]),t(O,[2,50],{18:76,39:77,10:R,40:V}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:M,44:U,60:W,80:[1,86],89:Y,95:[1,83],97:[1,84],101:85,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z,120:87},t(N,[2,185]),t(N,[2,186]),t(N,[2,187]),t(N,[2,188]),t(J,[2,51]),t(J,[2,54],{46:[1,99]}),t(tt,[2,72],{113:112,29:[1,100],44:A,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:b,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:D,102:C,105:x,106:T,109:S,111:F,114:_,115:v,116:B}),t(et,[2,181]),t(et,[2,142]),t(et,[2,143]),t(et,[2,144]),t(et,[2,145]),t(et,[2,146]),t(et,[2,147]),t(et,[2,148]),t(et,[2,149]),t(et,[2,150]),t(et,[2,151]),t(et,[2,152]),t(n,[2,12]),t(n,[2,18]),t(n,[2,19]),{9:[1,113]},t(st,[2,26],{18:114,10:R}),t(N,[2,27]),{42:115,43:38,44:A,45:39,47:40,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},t(N,[2,40]),t(N,[2,41]),t(N,[2,42]),t(it,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:nt,81:rt,116:at,119:ut},{75:[1,125],77:[1,126]},t(ot,[2,83]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),t(N,[2,32]),{10:lt,12:ct,14:ht,27:dt,28:127,32:pt,44:gt,60:At,75:bt,80:[1,129],81:[1,130],83:140,84:yt,85:kt,86:ft,87:mt,88:Et,89:Dt,90:Ct,91:128,105:xt,109:Tt,111:St,114:Ft,115:_t,116:vt},t(Bt,r,{5:153}),t(N,[2,37]),t(N,[2,38]),t(O,[2,48],{44:wt}),t(O,[2,49],{18:155,10:R,40:Lt}),t(J,[2,44]),{44:A,47:157,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},{102:[1,158],103:159,105:[1,160]},{44:A,47:161,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},{44:A,47:162,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},t($t,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t($t,[2,115],{120:167,10:[1,166],14:M,44:U,60:W,89:Y,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z}),t($t,[2,117],{10:[1,168]}),t(It,[2,183]),t(It,[2,170]),t(It,[2,171]),t(It,[2,172]),t(It,[2,173]),t(It,[2,174]),t(It,[2,175]),t(It,[2,176]),t(It,[2,177]),t(It,[2,178]),t(It,[2,179]),t(It,[2,180]),{44:A,47:169,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},{30:170,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:178,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:180,50:[1,179],67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:181,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:182,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:183,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{109:[1,184]},{30:185,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:186,65:[1,187],67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:188,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:189,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{30:190,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},t(et,[2,182]),t(n,[2,20]),t(st,[2,25]),t(O,[2,46],{39:191,18:192,10:R,40:V}),t(it,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{77:[1,196],79:197,116:at,119:ut},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,168]),t(Vt,[2,169]),{76:198,79:120,80:nt,81:rt,116:at,119:ut},t(ot,[2,84]),{8:P,9:K,10:lt,11:G,12:ct,14:ht,21:200,27:dt,29:[1,199],32:pt,44:gt,60:At,75:bt,83:140,84:yt,85:kt,86:ft,87:mt,88:Et,89:Dt,90:Ct,91:201,105:xt,109:Tt,111:St,114:Ft,115:_t,116:vt},t(Mt,[2,101]),t(Mt,[2,103]),t(Mt,[2,104]),t(Mt,[2,157]),t(Mt,[2,158]),t(Mt,[2,159]),t(Mt,[2,160]),t(Mt,[2,161]),t(Mt,[2,162]),t(Mt,[2,163]),t(Mt,[2,164]),t(Mt,[2,165]),t(Mt,[2,166]),t(Mt,[2,167]),t(Mt,[2,90]),t(Mt,[2,91]),t(Mt,[2,92]),t(Mt,[2,93]),t(Mt,[2,94]),t(Mt,[2,95]),t(Mt,[2,96]),t(Mt,[2,97]),t(Mt,[2,98]),t(Mt,[2,99]),t(Mt,[2,100]),{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,202],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},{10:R,18:203},{44:[1,204]},t(J,[2,43]),{10:[1,205],44:A,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:112,114:_,115:v,116:B},{10:[1,206]},{10:[1,207],106:[1,208]},t(Ut,[2,128]),{10:[1,209],44:A,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:112,114:_,115:v,116:B},{10:[1,210],44:A,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:112,114:_,115:v,116:B},{80:[1,211]},t($t,[2,109],{10:[1,212]}),t($t,[2,111],{10:[1,213]}),{80:[1,214]},t(It,[2,184]),{80:[1,215],98:[1,216]},t(J,[2,55],{113:112,44:A,60:b,89:D,102:C,105:x,106:T,109:S,111:F,114:_,115:v,116:B}),{31:[1,217],67:Rt,82:218,116:Kt,117:Gt,118:Ot},t(Wt,[2,86]),t(Wt,[2,88]),t(Wt,[2,89]),t(Wt,[2,153]),t(Wt,[2,154]),t(Wt,[2,155]),t(Wt,[2,156]),{49:[1,219],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{30:220,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{51:[1,221],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{53:[1,222],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{55:[1,223],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{57:[1,224],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{60:[1,225]},{64:[1,226],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{66:[1,227],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{30:228,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},{31:[1,229],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{67:Rt,69:[1,230],71:[1,231],82:218,116:Kt,117:Gt,118:Ot},{67:Rt,69:[1,233],71:[1,232],82:218,116:Kt,117:Gt,118:Ot},t(O,[2,45],{18:155,10:R,40:Lt}),t(O,[2,47],{44:wt}),t(it,[2,75]),t(it,[2,74]),{62:[1,234],67:Rt,82:218,116:Kt,117:Gt,118:Ot},t(it,[2,77]),t(Vt,[2,80]),{77:[1,235],79:197,116:at,119:ut},{30:236,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},t(Bt,r,{5:237}),t(Mt,[2,102]),t(N,[2,35]),{43:238,44:A,45:39,47:40,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},{10:R,18:239},{10:Yt,60:jt,84:zt,92:240,105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},{10:Yt,60:jt,84:zt,92:251,104:[1,252],105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},{10:Yt,60:jt,84:zt,92:253,104:[1,254],105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},{105:[1,255]},{10:Yt,60:jt,84:zt,92:256,105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},{44:A,47:257,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},t($t,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t($t,[2,116]),t($t,[2,118],{10:[1,261]}),t($t,[2,119]),t(tt,[2,56]),t(Wt,[2,87]),t(tt,[2,57]),{51:[1,262],67:Rt,82:218,116:Kt,117:Gt,118:Ot},t(tt,[2,64]),t(tt,[2,59]),t(tt,[2,60]),t(tt,[2,61]),{109:[1,263]},t(tt,[2,63]),t(tt,[2,65]),{66:[1,264],67:Rt,82:218,116:Kt,117:Gt,118:Ot},t(tt,[2,67]),t(tt,[2,68]),t(tt,[2,70]),t(tt,[2,69]),t(tt,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(it,[2,78]),{31:[1,265],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,266],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},t(J,[2,53]),{43:267,44:A,45:39,47:40,60:b,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B},t($t,[2,121],{106:Jt}),t(te,[2,130],{108:269,10:Yt,60:jt,84:zt,105:Xt,109:Ht,110:qt,111:Qt,112:Zt}),t(ee,[2,132]),t(ee,[2,134]),t(ee,[2,135]),t(ee,[2,136]),t(ee,[2,137]),t(ee,[2,138]),t(ee,[2,139]),t(ee,[2,140]),t(ee,[2,141]),t($t,[2,122],{106:Jt}),{10:[1,270]},t($t,[2,123],{106:Jt}),{10:[1,271]},t(Ut,[2,129]),t($t,[2,105],{106:Jt}),t($t,[2,106],{113:112,44:A,60:b,89:D,102:C,105:x,106:T,109:S,111:F,114:_,115:v,116:B}),t($t,[2,110]),t($t,[2,112],{10:[1,272]}),t($t,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:P,9:K,11:G,21:277},t(N,[2,34]),t(J,[2,52]),{10:Yt,60:jt,84:zt,105:Xt,107:278,108:242,109:Ht,110:qt,111:Qt,112:Zt},t(ee,[2,133]),{14:M,44:U,60:W,89:Y,101:279,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z,120:87},{14:M,44:U,60:W,89:Y,101:280,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z,120:87},{98:[1,281]},t($t,[2,120]),t(tt,[2,58]),{30:282,67:Rt,80:Nt,81:Pt,82:171,116:Kt,117:Gt,118:Ot},t(tt,[2,66]),t(Bt,r,{5:283}),t(te,[2,131],{108:269,10:Yt,60:jt,84:zt,105:Xt,109:Ht,110:qt,111:Qt,112:Zt}),t($t,[2,126],{120:167,10:[1,284],14:M,44:U,60:W,89:Y,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z}),t($t,[2,127],{120:167,10:[1,285],14:M,44:U,60:W,89:Y,105:j,106:z,109:X,111:H,114:q,115:Q,116:Z}),t($t,[2,114]),{31:[1,286],67:Rt,82:218,116:Kt,117:Gt,118:Ot},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,287],33:24,34:d,36:p,38:g,42:28,43:38,44:A,45:39,47:40,60:b,84:y,85:k,86:f,87:m,88:E,89:D,102:C,105:x,106:T,109:S,111:F,113:41,114:_,115:v,116:B,121:w,122:L,123:$,124:I},{10:Yt,60:jt,84:zt,92:288,105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},{10:Yt,60:jt,84:zt,92:289,105:Xt,107:241,108:242,109:Ht,110:qt,111:Qt,112:Zt},t(tt,[2,62]),t(N,[2,33]),t($t,[2,124],{106:Jt}),t($t,[2,125],{106:Jt})],defaultActions:{},parseError:(0,h.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,h.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,u="",o=0,l=0,c=0,d=r.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(g.yy[A]=this.yy[A]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;r.push(b);var y=p.options&&p.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,h.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,h.K2)(k,"lex");for(var f,m,E,D,C,x,T,S,F,_={};;){if(E=s[s.length-1],this.defaultActions[E]?D=this.defaultActions[E]:(null==f&&(f=k()),D=a[E]&&a[E][f]),void 0===D||!D.length||!D[0]){var v="";for(x in F=[],a[E])this.terminals_[x]&&x>2&&F.push("'"+this.terminals_[x]+"'");v=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+F.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[f]||f,line:p.yylineno,loc:b,expected:F})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+f);switch(D[0]){case 1:s.push(f),n.push(p.yytext),r.push(p.yylloc),s.push(D[1]),f=null,m?(f=m,m=null):(l=p.yyleng,u=p.yytext,o=p.yylineno,b=p.yylloc,c>0&&c--);break;case 2:if(T=this.productions_[D[1]][1],_.$=n[n.length-T],_._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},y&&(_._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(C=this.performAction.apply(_,[u,l,o,g.yy,D[1],n,r].concat(d))))return C;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[D[1]][0]),n.push(_.$),r.push(_._$),S=a[s[s.length-2]][s[s.length-1]],s.push(S);break;case 3:return!0}}return!0},"parse")},ie=function(){return{EOF:1,parseError:(0,h.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,h.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,h.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,h.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,h.K2)(function(){return this._more=!0,this},"more"),reject:(0,h.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,h.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,h.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,h.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,h.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,h.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,h.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,h.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,h.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,h.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,h.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,h.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,h.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,h.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,h.K2)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
    "),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:case 102:return 111;case 62:return 46;case 63:return 60;case 64:case 103:return 44;case 65:return 8;case 66:return 106;case 67:case 101:return 115;case 68:case 71:case 74:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:case 73:case 76:return 119;case 72:return this.pushState("thickEdgeText"),75;case 75:return this.pushState("dottedEdgeText"),75;case 77:return 77;case 78:return this.popState(),53;case 79:case 115:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}}}();function ne(){this.yy={}}return se.lexer=ie,(0,h.K2)(ne,"Parser"),ne.prototype=se,se.Parser=ne,new ne}();y.parser=y;var k=y,f=Object.assign({},k);f.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return k.parse(e)};var m=f,E=(0,h.K2)((t,e)=>{const s=g.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return p.A(i,n,r,e)},"fade"),D=(0,h.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${E(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles"),C={parser:m,get db(){return new A},renderer:b,styles:D,init:(0,h.K2)(t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,c.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,c.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.d275db6e.js b/assets/js/22dd74f7.d275db6e.js deleted file mode 100644 index 785f883..0000000 --- a/assets/js/22dd74f7.d275db6e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1567],{5226(e){e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","href":"/","label":"Introduction","docId":"README","unlisted":false},{"type":"category","label":"Getting Started","items":[{"type":"link","href":"/getting-started/quickstart","label":"Quickstart","docId":"getting-started/quickstart","unlisted":false},{"type":"category","label":"Deployment","items":[{"type":"link","href":"/getting-started/deployment/railway","label":"Railway","docId":"getting-started/deployment/railway","unlisted":false},{"type":"link","href":"/getting-started/deployment/docker","label":"Docker","docId":"getting-started/deployment/docker","unlisted":false},{"type":"link","href":"/getting-started/deployment/other","label":"Other","docId":"getting-started/deployment/other","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","href":"/getting-started/authentication","label":"Authentication","docId":"getting-started/authentication","unlisted":false},{"type":"link","href":"/getting-started/configuration","label":"Configuration","docId":"getting-started/configuration","unlisted":false},{"type":"link","href":"/getting-started/dashboard","label":"Dashboard","docId":"getting-started/dashboard","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Tutorials","items":[{"type":"link","href":"/tutorials/statusphere","label":"Statusphere","docId":"tutorials/statusphere","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Guides","items":[{"type":"link","href":"/guides/lexicons","label":"Lexicons","docId":"guides/lexicons","unlisted":false},{"type":"link","href":"/guides/scripting","label":"Lua Scripting","docId":"guides/scripting","unlisted":false},{"type":"link","href":"/guides/index-hooks","label":"Index Hooks","docId":"guides/index-hooks","unlisted":false},{"type":"link","href":"/guides/backfill","label":"Backfill","docId":"guides/backfill","unlisted":false},{"type":"link","href":"/guides/event-logs","label":"Event Logs","docId":"guides/event-logs","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Reference","items":[{"type":"link","href":"/reference/xrpc-api","label":"XRPC API","docId":"reference/xrpc-api","unlisted":false},{"type":"link","href":"/reference/admin-api","label":"Admin API","docId":"reference/admin-api","unlisted":false},{"type":"category","label":"Script Examples","items":[{"type":"link","href":"/reference/scripts/get-record","label":"Get a Record","docId":"reference/scripts/get-record","unlisted":false},{"type":"link","href":"/reference/scripts/create-record","label":"Create Record","docId":"reference/scripts/create-record","unlisted":false},{"type":"link","href":"/reference/scripts/upsert-record","label":"Upsert Record","docId":"reference/scripts/upsert-record","unlisted":false},{"type":"link","href":"/reference/scripts/paginated-list","label":"Paginated List","docId":"reference/scripts/paginated-list","unlisted":false},{"type":"link","href":"/reference/scripts/list-or-fetch","label":"List or Fetch","docId":"reference/scripts/list-or-fetch","unlisted":false},{"type":"link","href":"/reference/scripts/expanded-query","label":"Expanded Query","docId":"reference/scripts/expanded-query","unlisted":false},{"type":"link","href":"/reference/scripts/update-or-delete","label":"Update or Delete","docId":"reference/scripts/update-or-delete","unlisted":false},{"type":"link","href":"/reference/scripts/batch-save","label":"Batch Save","docId":"reference/scripts/batch-save","unlisted":false},{"type":"link","href":"/reference/scripts/sidecar-records","label":"Sidecar Records","docId":"reference/scripts/sidecar-records","unlisted":false},{"type":"link","href":"/reference/scripts/cascading-delete","label":"Cascading Delete","docId":"reference/scripts/cascading-delete","unlisted":false},{"type":"link","href":"/reference/scripts/complex-mutations","label":"Complex Mutations","docId":"reference/scripts/complex-mutations","unlisted":false},{"type":"link","href":"/reference/scripts/algolia-sync","label":"Algolia Sync","docId":"reference/scripts/algolia-sync","unlisted":false},{"type":"link","href":"/reference/scripts/meilisearch-sync","label":"Meilisearch Sync","docId":"reference/scripts/meilisearch-sync","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","href":"/reference/glossary","label":"Glossary","docId":"reference/glossary","unlisted":false},{"type":"link","href":"/reference/architecture","label":"Architecture","docId":"reference/architecture","unlisted":false},{"type":"link","href":"/reference/troubleshooting","label":"Troubleshooting","docId":"reference/troubleshooting","unlisted":false},{"type":"link","href":"/reference/production-deployment","label":"Production","docId":"reference/production-deployment","unlisted":false}],"collapsed":true,"collapsible":true}]},"docs":{"getting-started/authentication":{"id":"getting-started/authentication","title":"Authentication","description":"HappyView uses AT Protocol OAuth for authentication, handled by an external AIP instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP.","sidebar":"docs"},"getting-started/configuration":{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","sidebar":"docs"},"getting-started/dashboard":{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend.","sidebar":"docs"},"getting-started/deployment/docker":{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs the full HappyView stack locally using Docker Compose: Postgres, Tap, HappyView, and the web dashboard.","sidebar":"docs"},"getting-started/deployment/other":{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run, with you managing Postgres, AIP, and Tap separately. If you\'d rather use Docker Compose to run everything together, see Local Development with Docker.","sidebar":"docs"},"getting-started/deployment/railway":{"id":"getting-started/deployment/railway","title":"Deploy on Railway","description":"The fastest way to get HappyView running is with Railway. This template deploys HappyView, AIP (OAuth provider), Tap (real-time data and backfill), and Postgres with a single click:","sidebar":"docs"},"getting-started/quickstart":{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints.","sidebar":"docs"},"guides/api-keys":{"id":"guides/api-keys","title":"API Keys","description":"API keys let you authenticate with the admin API without going through the OAuth flow. They\'re useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically."},"guides/backfill":{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Tap. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap.","sidebar":"docs"},"guides/event-logs":{"id":"guides/event-logs","title":"Event Logs","description":"HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. Events are stored in a Postgres table and queryable via the admin API.","sidebar":"docs"},"guides/index-hooks":{"id":"guides/index-hooks","title":"Index Hooks","description":"Index hooks are Lua scripts that run automatically whenever a record in a collection is created, updated, or deleted on the network. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.","sidebar":"docs"},"guides/lexicons":{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re AT Protocol schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","sidebar":"docs"},"guides/scripting":{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","sidebar":"docs"},"README":{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","sidebar":"docs"},"reference/admin-api":{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under /admin and require an AIP-issued Bearer token from a DID that exists in the admins table. You can also manage all of this through the web dashboard.","sidebar":"docs"},"reference/architecture":{"id":"reference/architecture","title":"Architecture","description":"Guide for contributors working on HappyView itself. For a user-facing overview, see the Introduction.","sidebar":"docs"},"reference/changelog":{"id":"reference/changelog","title":"Changelog","description":"v1.9.0 \u2014 Event Logs"},"reference/glossary":{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the official ATProto glossary.","sidebar":"docs"},"reference/production-deployment":{"id":"reference/production-deployment","title":"Deployment","description":"HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.","sidebar":"docs"},"reference/scripts/algolia-sync":{"id":"reference/scripts/algolia-sync","title":"Index Hook: Algolia Sync","description":"Push records to an Algolia search index whenever they are created, updated, or deleted on the network.","sidebar":"docs"},"reference/scripts/batch-save":{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","sidebar":"docs"},"reference/scripts/cascading-delete":{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","sidebar":"docs"},"reference/scripts/complex-mutations":{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","sidebar":"docs"},"reference/scripts/create-record":{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","sidebar":"docs"},"reference/scripts/expanded-query":{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","sidebar":"docs"},"reference/scripts/get-record":{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","sidebar":"docs"},"reference/scripts/list-or-fetch":{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","sidebar":"docs"},"reference/scripts/meilisearch-sync":{"id":"reference/scripts/meilisearch-sync","title":"Index Hook: Meilisearch Sync","description":"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network.","sidebar":"docs"},"reference/scripts/paginated-list":{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","sidebar":"docs"},"reference/scripts/sidecar-records":{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","sidebar":"docs"},"reference/scripts/update-or-delete":{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","sidebar":"docs"},"reference/scripts/upsert-record":{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","sidebar":"docs"},"reference/troubleshooting":{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","sidebar":"docs"},"reference/xrpc-api":{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","sidebar":"docs"},"tutorials/statusphere":{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example AT Protocol application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.e7d0ca31.js b/assets/js/22dd74f7.e7d0ca31.js new file mode 100644 index 0000000..b65e0fe --- /dev/null +++ b/assets/js/22dd74f7.e7d0ca31.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1567],{5226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","href":"/","label":"Introduction","docId":"README","unlisted":false},{"type":"category","label":"Getting Started","items":[{"type":"link","href":"/getting-started/quickstart","label":"Quickstart","docId":"getting-started/quickstart","unlisted":false},{"type":"category","label":"Deployment","items":[{"type":"link","href":"/getting-started/deployment/railway","label":"Railway","docId":"getting-started/deployment/railway","unlisted":false},{"type":"link","href":"/getting-started/deployment/docker","label":"Docker","docId":"getting-started/deployment/docker","unlisted":false},{"type":"link","href":"/getting-started/deployment/other","label":"From Source","docId":"getting-started/deployment/other","unlisted":false},{"type":"link","href":"/reference/production-deployment","label":"Production","docId":"reference/production-deployment","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","href":"/getting-started/configuration","label":"Configuration","docId":"getting-started/configuration","unlisted":false},{"type":"link","href":"/getting-started/authentication","label":"Authentication","docId":"getting-started/authentication","unlisted":false},{"type":"link","href":"/getting-started/dashboard","label":"Dashboard","docId":"getting-started/dashboard","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Tutorials","items":[{"type":"link","href":"/tutorials/statusphere","label":"Statusphere","docId":"tutorials/statusphere","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Guides","items":[{"type":"category","label":"Indexing","items":[{"type":"link","href":"/guides/lexicons","label":"Lexicons","docId":"guides/lexicons","unlisted":false},{"type":"link","href":"/guides/backfill","label":"Backfill","docId":"guides/backfill","unlisted":false},{"type":"link","href":"/guides/index-hooks","label":"Index Hooks","docId":"guides/index-hooks","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Scripting","items":[{"type":"link","href":"/guides/scripting","label":"Lua Scripting","docId":"guides/scripting","unlisted":false},{"type":"category","label":"Script Examples","items":[{"type":"link","href":"/reference/scripts/get-record","label":"Get a Record","docId":"reference/scripts/get-record","unlisted":false},{"type":"link","href":"/reference/scripts/create-record","label":"Create Record","docId":"reference/scripts/create-record","unlisted":false},{"type":"link","href":"/reference/scripts/upsert-record","label":"Upsert Record","docId":"reference/scripts/upsert-record","unlisted":false},{"type":"link","href":"/reference/scripts/paginated-list","label":"Paginated List","docId":"reference/scripts/paginated-list","unlisted":false},{"type":"link","href":"/reference/scripts/list-or-fetch","label":"List or Fetch","docId":"reference/scripts/list-or-fetch","unlisted":false},{"type":"link","href":"/reference/scripts/expanded-query","label":"Expanded Query","docId":"reference/scripts/expanded-query","unlisted":false},{"type":"link","href":"/reference/scripts/update-or-delete","label":"Update or Delete","docId":"reference/scripts/update-or-delete","unlisted":false},{"type":"link","href":"/reference/scripts/batch-save","label":"Batch Save","docId":"reference/scripts/batch-save","unlisted":false},{"type":"link","href":"/reference/scripts/sidecar-records","label":"Sidecar Records","docId":"reference/scripts/sidecar-records","unlisted":false},{"type":"link","href":"/reference/scripts/cascading-delete","label":"Cascading Delete","docId":"reference/scripts/cascading-delete","unlisted":false},{"type":"link","href":"/reference/scripts/complex-mutations","label":"Complex Mutations","docId":"reference/scripts/complex-mutations","unlisted":false},{"type":"link","href":"/reference/scripts/algolia-sync","label":"Algolia Sync","docId":"reference/scripts/algolia-sync","unlisted":false},{"type":"link","href":"/reference/scripts/meilisearch-sync","label":"Meilisearch Sync","docId":"reference/scripts/meilisearch-sync","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Features","items":[{"type":"link","href":"/guides/labelers","label":"Labelers","docId":"guides/labelers","unlisted":false},{"type":"link","href":"/guides/plugins","label":"Plugins","docId":"guides/plugins","unlisted":false},{"type":"link","href":"/guides/developing-plugins","label":"Developing Plugins","docId":"guides/developing-plugins","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Administration","items":[{"type":"link","href":"/guides/api-keys","label":"API Keys","docId":"guides/api-keys","unlisted":false},{"type":"link","href":"/guides/permissions","label":"Permissions","docId":"guides/permissions","unlisted":false},{"type":"link","href":"/guides/event-logs","label":"Event Logs","docId":"guides/event-logs","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Database","items":[{"type":"link","href":"/guides/database-setup","label":"Database Setup","docId":"guides/database-setup","unlisted":false},{"type":"link","href":"/guides/postgres-to-sqlite-migration","label":"Postgres \u2192 SQLite Migration","docId":"guides/postgres-to-sqlite-migration","unlisted":false},{"type":"link","href":"/guides/sqlite-to-postgres-migration","label":"SQLite \u2192 Postgres Migration","docId":"guides/sqlite-to-postgres-migration","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"JavaScript SDK","items":[{"type":"link","href":"/sdk/overview","label":"Overview","docId":"sdk/overview","unlisted":false},{"type":"link","href":"/sdk/lex-agent","label":"Lex Agent","docId":"sdk/lex-agent","unlisted":false},{"type":"link","href":"/sdk/oauth-client","label":"OAuth Client","docId":"sdk/oauth-client","unlisted":false},{"type":"link","href":"/sdk/oauth-client-browser","label":"Browser Client","docId":"sdk/oauth-client-browser","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Reference","items":[{"type":"link","href":"/reference/xrpc-api","label":"XRPC API","docId":"reference/xrpc-api","unlisted":false},{"type":"category","label":"Admin API","items":[{"type":"link","href":"/reference/admin-api","label":"Overview","docId":"reference/admin-api","unlisted":false},{"type":"link","href":"/reference/admin/lexicons","label":"Lexicons","docId":"reference/admin/lexicons","unlisted":false},{"type":"link","href":"/reference/admin/stats","label":"Stats","docId":"reference/admin/stats","unlisted":false},{"type":"link","href":"/reference/admin/backfill","label":"Backfill","docId":"reference/admin/backfill","unlisted":false},{"type":"link","href":"/reference/admin/events","label":"Event Logs","docId":"reference/admin/events","unlisted":false},{"type":"link","href":"/reference/admin/api-keys","label":"API Keys","docId":"reference/admin/api-keys","unlisted":false},{"type":"link","href":"/reference/admin/users","label":"Users","docId":"reference/admin/users","unlisted":false},{"type":"link","href":"/reference/admin/labelers","label":"Labelers","docId":"reference/admin/labelers","unlisted":false},{"type":"link","href":"/reference/admin/settings","label":"Instance Settings","docId":"reference/admin/settings","unlisted":false},{"type":"link","href":"/reference/admin/domains","label":"Domains","docId":"reference/admin/domains","unlisted":false},{"type":"link","href":"/reference/admin/script-variables","label":"Script Variables","docId":"reference/admin/script-variables","unlisted":false},{"type":"link","href":"/reference/admin/api-clients","label":"API Clients","docId":"reference/admin/api-clients","unlisted":false},{"type":"link","href":"/reference/admin/plugins","label":"Plugins","docId":"reference/admin/plugins","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Lua API","items":[{"type":"link","href":"/reference/lua/record-api","label":"Record API","docId":"reference/lua/record-api","unlisted":false},{"type":"link","href":"/reference/lua/database-api","label":"Database API","docId":"reference/lua/database-api","unlisted":false},{"type":"link","href":"/reference/lua/http-api","label":"HTTP API","docId":"reference/lua/http-api","unlisted":false},{"type":"link","href":"/reference/lua/atproto-api","label":"atproto API","docId":"reference/lua/atproto-api","unlisted":false},{"type":"link","href":"/reference/lua/json-api","label":"JSON API","docId":"reference/lua/json-api","unlisted":false},{"type":"link","href":"/reference/lua/utility-globals","label":"Utility Globals","docId":"reference/lua/utility-globals","unlisted":false},{"type":"link","href":"/reference/lua/standard-libraries","label":"Standard Libraries","docId":"reference/lua/standard-libraries","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","href":"/reference/glossary","label":"Glossary","docId":"reference/glossary","unlisted":false},{"type":"link","href":"/reference/architecture","label":"Architecture","docId":"reference/architecture","unlisted":false},{"type":"link","href":"/reference/troubleshooting","label":"Troubleshooting","docId":"reference/troubleshooting","unlisted":false}],"collapsed":true,"collapsible":true}]},"docs":{"getting-started/authentication":{"id":"getting-started/authentication","title":"Authentication","description":"HappyView has two distinct authentication surfaces:","sidebar":"docs"},"getting-started/configuration":{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","sidebar":"docs"},"getting-started/dashboard":{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers. It runs as a separate Next.js application alongside the Rust backend and authenticates via atproto OAuth.","sidebar":"docs"},"getting-started/deployment/docker":{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs HappyView and the dashboard locally using Docker Compose.","sidebar":"docs"},"getting-started/deployment/other":{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run. If you\'d rather use Docker Compose, see Local Development with Docker.","sidebar":"docs"},"getting-started/deployment/railway":{"id":"getting-started/deployment/railway","title":"Deploy on Railway","description":"The fastest way to get HappyView running is with Railway. This template deploys HappyView and Postgres with a single click:","sidebar":"docs"},"getting-started/quickstart":{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the atproto network and serves XRPC endpoints.","sidebar":"docs"},"guides/api-keys":{"id":"guides/api-keys","title":"API Keys","description":"API keys let you authenticate with the admin API without going through the OAuth flow. They\'re useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically.","sidebar":"docs"},"guides/backfill":{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Jetstream. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and fetches records directly from each user\'s PDS.","sidebar":"docs"},"guides/database-setup":{"id":"guides/database-setup","title":"Database Setup","description":"HappyView supports two database backends: SQLite (default) and PostgreSQL. The backend is auto-detected from your DATABASEURL scheme, or you can set DATABASEBACKEND explicitly.","sidebar":"docs"},"guides/developing-plugins":{"id":"guides/developing-plugins","title":"Developing Plugins","description":"This guide covers how to build your own HappyView WASM plugins. For installing and configuring plugins, see the Plugins guide.","sidebar":"docs"},"guides/event-logs":{"id":"guides/event-logs","title":"Event Logs","description":"HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, user actions, API key events, backfill jobs, and Jetstream connectivity. Events are stored in the database and queryable via the admin API.","sidebar":"docs"},"guides/index-hooks":{"id":"guides/index-hooks","title":"Index Hooks","description":"Index hooks are Lua scripts that run whenever a record in a collection is created, updated, or deleted. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.","sidebar":"docs"},"guides/labelers":{"id":"guides/labelers","title":"Labelers","description":"Labelers are external services that apply content labels to records. They operate out-of-band \u2014 labeler data does not appear in repos or flow through relays. HappyView can subscribe to labelers and store the labels they emit, making them available on records in the admin dashboard and via Lua scripts.","sidebar":"docs"},"guides/lexicons":{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re atproto schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","sidebar":"docs"},"guides/permissions":{"id":"guides/permissions","title":"Permissions","description":"HappyView uses a granular permission system to control access to the admin API. Each user has a set of permissions that determine which endpoints they can access. Permissions can be assigned individually, via templates, or both.","sidebar":"docs"},"guides/plugins":{"id":"guides/plugins","title":"Plugins","description":"HappyView uses WASM plugins to extend its functionality. Plugins can integrate with external platforms, sync data to users\' atproto identities, and more. Auth plugins \u2014 the first supported plugin type \u2014 enable users to link accounts from platforms like Steam, Xbox, itch.io, and others, then sync data like game libraries.","sidebar":"docs"},"guides/postgres-to-sqlite-migration":{"id":"guides/postgres-to-sqlite-migration","title":"Migrating from Postgres to SQLite","description":"This guide covers migrating an existing HappyView deployment from Postgres to SQLite. If you are staying on Postgres, no action is required.","sidebar":"docs"},"guides/scripting":{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","sidebar":"docs"},"guides/sqlite-to-postgres-migration":{"id":"guides/sqlite-to-postgres-migration","title":"Migrating from SQLite to Postgres","description":"This guide covers migrating an existing HappyView deployment from SQLite to Postgres. If you are staying on SQLite, no action is required.","sidebar":"docs"},"README":{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","sidebar":"docs"},"reference/admin-api":{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control user access. All endpoints live under /admin and require authentication from a DID that exists in the users table, with the appropriate permissions for the endpoint being called. You can also manage all of this through the web dashboard.","sidebar":"docs"},"reference/admin/api-clients":{"id":"reference/admin/api-clients","title":"Admin API: API Clients","description":"API clients identify third-party applications that call HappyView\'s XRPC endpoints. Every request \u2014 authenticated or not \u2014 needs an X-Client-Key header (or client_key query param). Requests without one get 401 Unauthorized. The client key is HappyView\'s rate-limit bucket.","sidebar":"docs"},"reference/admin/api-keys":{"id":"reference/admin/api-keys","title":"Admin API: API Keys","description":"Manage API keys for programmatic access. See the API Keys guide for usage details.","sidebar":"docs"},"reference/admin/backfill":{"id":"reference/admin/backfill","title":"Admin API: Backfill","description":"Create and monitor historical backfill jobs. See the Backfill guide for background.","sidebar":"docs"},"reference/admin/domains":{"id":"reference/admin/domains","title":"Admin API: Domains","description":"Manage the domains a HappyView instance serves. Each domain gets its own atproto OAuth client identity. The primary domain is set from PUBLIC_URL on first boot. All endpoints require the settings:manage permission.","sidebar":"docs"},"reference/admin/events":{"id":"reference/admin/events","title":"Admin API: Event Logs","description":"HappyView logs system events \u2014 lexicon changes, record operations, script errors, user actions, and more. See the Event Logs guide for details on event types and retention.","sidebar":"docs"},"reference/admin/labelers":{"id":"reference/admin/labelers","title":"Admin API: Labelers","description":"Manage external labeler subscriptions. See the Labelers guide for background.","sidebar":"docs"},"reference/admin/lexicons":{"id":"reference/admin/lexicons","title":"Admin API: Lexicons","description":"Manage lexicons and network lexicons. See the Lexicons guide for background on how lexicons drive indexing and XRPC routing.","sidebar":"docs"},"reference/admin/plugins":{"id":"reference/admin/plugins","title":"Admin API: Plugins","description":"Plugins extend HappyView with WebAssembly modules sourced from the official plugin registry or any URL serving a manifest.json. Most endpoints take a plugin manifest URL and load (or reload) the plugin in place \u2014 no restart needed. Encrypted plugin secrets require TOKENENCRYPTIONKEY to be configured.","sidebar":"docs"},"reference/admin/script-variables":{"id":"reference/admin/script-variables","title":"Admin API: Script Variables","description":"Script variables are encrypted key/value pairs available to Lua scripts via the vars global. Use them for secrets like API tokens.","sidebar":"docs"},"reference/admin/settings":{"id":"reference/admin/settings","title":"Admin API: Instance Settings","description":"Instance settings override environment variables at runtime \u2014 things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the settings:manage permission.","sidebar":"docs"},"reference/admin/stats":{"id":"reference/admin/stats","title":"Admin API: Stats","description":"Record counts","sidebar":"docs"},"reference/admin/users":{"id":"reference/admin/users","title":"Admin API: Users","description":"Manage admin users and their permissions. See the Permissions guide for available permissions and templates.","sidebar":"docs"},"reference/architecture":{"id":"reference/architecture","title":"Architecture","description":"Guide for contributors working on HappyView itself. For a user-facing overview, see the Introduction.","sidebar":"docs"},"reference/changelog":{"id":"reference/changelog","title":"Changelog","description":"v2.1.0 \u2014 Native OAuth & Instance Settings"},"reference/glossary":{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the atproto, see the official ATProto glossary.","sidebar":"docs"},"reference/lua/atproto-api":{"id":"reference/lua/atproto-api","title":"atproto API","description":"The atproto table provides atproto utility functions. Available in queries, procedures, and index hooks.","sidebar":"docs"},"reference/lua/database-api":{"id":"reference/lua/database-api","title":"Database API","description":"The db table provides access to the database. Available in queries, procedures, and index hooks.","sidebar":"docs"},"reference/lua/http-api":{"id":"reference/lua/http-api","title":"HTTP API","description":"The http table provides async HTTP client functions. Available in queries, procedures, and index hooks.","sidebar":"docs"},"reference/lua/json-api":{"id":"reference/lua/json-api","title":"JSON API","description":"The json global provides JSON serialization and deserialization. Available in queries, procedures, and index hooks.","sidebar":"docs"},"reference/lua/record-api":{"id":"reference/lua/record-api","title":"Record API","description":"The Record API is only available in procedure scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller\'s PDS and indexed locally.","sidebar":"docs"},"reference/lua/standard-libraries":{"id":"reference/lua/standard-libraries","title":"Standard Libraries","description":"The following Lua 5.4 standard library modules and builtins are available in the HappyView sandbox.","sidebar":"docs"},"reference/lua/utility-globals":{"id":"reference/lua/utility-globals","title":"Utility Globals","description":"Global functions available in queries, procedures, and index hooks. These don\'t belong to a specific API table \u2014 they\'re available at the top level of any Lua script.","sidebar":"docs"},"reference/production-deployment":{"id":"reference/production-deployment","title":"Production","description":"This page covers what to change when taking a HappyView instance from local development to production. For setup instructions, see Deployment. This page assumes you already have a working deployment and focuses on hardening and operational concerns.","sidebar":"docs"},"reference/scripts/algolia-sync":{"id":"reference/scripts/algolia-sync","title":"Index Hook: Algolia Sync","description":"Push records to an Algolia search index whenever they are created, updated, or deleted on the network.","sidebar":"docs"},"reference/scripts/batch-save":{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","sidebar":"docs"},"reference/scripts/cascading-delete":{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","sidebar":"docs"},"reference/scripts/complex-mutations":{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","sidebar":"docs"},"reference/scripts/create-record":{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","sidebar":"docs"},"reference/scripts/expanded-query":{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","sidebar":"docs"},"reference/scripts/get-record":{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","sidebar":"docs"},"reference/scripts/list-or-fetch":{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","sidebar":"docs"},"reference/scripts/meilisearch-sync":{"id":"reference/scripts/meilisearch-sync","title":"Index Hook: Meilisearch Sync","description":"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network.","sidebar":"docs"},"reference/scripts/paginated-list":{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","sidebar":"docs"},"reference/scripts/sidecar-records":{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","sidebar":"docs"},"reference/scripts/update-or-delete":{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","sidebar":"docs"},"reference/scripts/upsert-record":{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","sidebar":"docs"},"reference/troubleshooting":{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","sidebar":"docs"},"reference/xrpc-api":{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the atproto. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","sidebar":"docs"},"sdk/lex-agent":{"id":"sdk/lex-agent","title":"Lex Agent","description":"The Lex agent adapter is the recommended way to interact with HappyView from JavaScript. It creates an @atproto/lex Agent from a HappyViewSession, so you can use @atproto/lex\'s type-safe Client to make XRPC calls with HappyView\'s DPoP authentication. All requests are routed to your HappyView instance, which handles its own lexicons locally and proxies standard atproto methods (e.g., com.atproto.repo.createRecord) to the user\'s PDS.","sidebar":"docs"},"sdk/oauth-client":{"id":"sdk/oauth-client","title":"OAuth Client","description":"The core OAuth client handles DPoP key provisioning, session registration, and session restoration against a HappyView instance. It\'s platform-agnostic \u2014 you provide a CryptoAdapter and optional StorageAdapter for your environment.","sidebar":"docs"},"sdk/oauth-client-browser":{"id":"sdk/oauth-client-browser","title":"Browser Client","description":"The browser client handles the full OAuth redirect flow for browser apps authenticating with a HappyView instance. It wraps the OAuth Client with Web Crypto, localStorage, and atproto handle/DID resolution.","sidebar":"docs"},"sdk/overview":{"id":"sdk/overview","title":"JavaScript SDK","description":"HappyView provides JavaScript packages for building third-party apps that authenticate with a HappyView instance and make XRPC requests on behalf of users.","sidebar":"docs"},"tutorials/statusphere":{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example atproto application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/2334.0d54c30f.js b/assets/js/2334.0d54c30f.js deleted file mode 100644 index aa81e9a..0000000 --- a/assets/js/2334.0d54c30f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2334],{2334(e,n,t){t.d(n,{Zp:()=>Rn});var r=t(8058),o=t(8894),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=t(9142),s=t(4098),d=t(4722),c=Math.ceil,h=Math.max;const f=function(e,n,t,r){for(var o=-1,i=h(c((n-e)/(t||1)),0),u=Array(i);i--;)u[r?i:++o]=e,e+=t;return u};var l=t(6832),v=t(4342);const g=function(e){return function(n,t,r){return r&&"number"!=typeof r&&(0,l.A)(n,t,r)&&(t=r=void 0),n=(0,v.A)(n),void 0===t?(t=n,n=0):t=(0,v.A)(t),r=void 0===r?n0;--a)if(r=n[a].dequeue()){o=o.concat(_(e,n,t,r,!0));break}}return o}(t.graph,t.buckets,t.zeroIdx);return s.A(d.A(o,function(n){return e.outEdges(n.v,n.w)}))}function _(e,n,t,o,i){var u=i?[]:void 0;return r.A(e.inEdges(o.v),function(r){var o=e.edge(r),a=e.node(r.v);i&&u.push({v:r.v,w:r.w}),a.out-=o,E(n,t,a)}),r.A(e.outEdges(o.v),function(r){var o=e.edge(r),i=r.w,u=e.node(i);u.in-=o,E(n,t,u)}),e.removeNode(o.v),u}function E(e,n,t){t.out?t.in?e[t.out-t.in+n].enqueue(t):e[e.length-1].enqueue(t):e[0].enqueue(t)}function O(e){var n="greedy"===e.graph().acyclicer?y(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],t={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,t[u]=!0,r.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(t,e.w)?n.push(e):i(e.w)}),delete t[u])}return r.A(e.nodes(),i),n}(e);r.A(n,function(n){var t=e.edge(n);e.removeEdge(n),t.forwardName=n.name,t.reversed=!0,e.setEdge(n.w,n.v,t,u("rev"))})}var x=t(2837),k=t(9354),N=t(9188);const P=function(e,n){return(0,k.A)(e,n,function(n,t){return(0,N.A)(e,t)})};var j=t(6875),C=t(7525);const I=function(e){return(0,C.A)((0,j.A)(e,void 0,s.A),e+"")}(function(e,n){return null==e?{}:P(e,n)});var L=t(3068),T=t(2559);const M=function(e,n){return e>n};var R=t(9008);const F=function(e){return e&&e.length?(0,T.A)(e,R.A,M):void 0};var D=t(6666),S=t(2528),G=t(9841),V=t(3958);const B=function(e,n){var t={};return n=(0,V.A)(n,3),(0,G.A)(e,function(e,r,o){(0,S.A)(t,r,n(e,r,o))}),t};var q=t(9592),Y=t(6452),z=t(8585),$=t(1917);const J=function(){return $.A.Date.now()};function Z(e,n,t,r){var o;do{o=u(r)}while(e.hasNode(o));return t.dummy=n,e.setNode(o,t),o}function H(e){var n=new p.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.A(e.nodes(),function(t){e.children(t).length||n.setNode(t,e.node(t))}),r.A(e.edges(),function(t){n.setEdge(t,e.edge(t))}),n}function K(e,n){var t,r,o=e.x,i=e.y,u=n.x-o,a=n.y-i,s=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*s>Math.abs(u)*d?(a<0&&(d=-d),t=d*u/a,r=d):(u<0&&(s=-s),t=s,r=s*a/u),{x:o+t,y:i+r}}function Q(e){var n=d.A(g(W(e)+1),function(){return[]});return r.A(e.nodes(),function(t){var r=e.node(t),o=r.rank;q.A(o)||(n[o][r.order]=t)}),n}function U(e,n,t,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=t,o.order=r),Z(e,"border",o,n)}function W(e){return F(d.A(e.nodes(),function(n){var t=e.node(n).rank;if(!q.A(t))return t}))}function X(e,n){var t=J();try{return n()}finally{console.log(e+" time: "+(J()-t)+"ms")}}function ee(e,n){return n()}function ne(e,n,t,r,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],s=Z(e,"border",u,t);o[n][i]=s,e.setParent(s,r),a&&e.setEdge(a,s,{weight:1})}function te(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){r.A(e.nodes(),function(n){ie(e.node(n))}),r.A(e.edges(),function(n){var t=e.edge(n);r.A(t.points,ie),Object.prototype.hasOwnProperty.call(t,"y")&&ie(t)})}(e),"lr"!==n&&"rl"!==n||(!function(e){r.A(e.nodes(),function(n){ue(e.node(n))}),r.A(e.edges(),function(n){var t=e.edge(n);r.A(t.points,ue),Object.prototype.hasOwnProperty.call(t,"x")&&ue(t)})}(e),re(e))}function re(e){r.A(e.nodes(),function(n){oe(e.node(n))}),r.A(e.edges(),function(n){oe(e.edge(n))})}function oe(e){var n=e.width;e.width=e.height,e.height=n}function ie(e){e.y=-e.y}function ue(e){var n=e.x;e.x=e.y,e.y=n}function ae(e){e.graph().dummyChains=[],r.A(e.edges(),function(n){!function(e,n){var t=n.v,r=e.node(t).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),s=a.labelRank;if(i===r+1)return;e.removeEdge(n);var d,c,h=void 0;for(c=0,++r;ru.lim&&(a=u,s=!0);var d=Ae.A(n.edges(),function(n){return s===Be(e,e.node(n.v),a)&&s!==Be(e,e.node(n.w),a)});return de(d,function(e){return he(n,e)})}function Ve(e,n,t,o){var i=t.v,u=t.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),Fe(e),Me(e,n),function(e,n){var t=pe.A(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return Ie(e,n,"pre")}(e,t);o=o.slice(1),r.A(o,function(t){var r=e.node(t).parent,o=n.edge(t,r),i=!1;o||(o=n.edge(r,t),i=!0),n.node(t).rank=n.node(r).rank+(i?o.minlen:-o.minlen)})}(e,n)}function Be(e,n,t){return t.low<=n.lim&&n.lim<=t.lim}function qe(e){switch(e.graph().ranker){case"network-simplex":default:ze(e);break;case"tight-tree":!function(e){ce(e),fe(e)}(e);break;case"longest-path":Ye(e)}}Te.initLowLimValues=Fe,Te.initCutValues=Me,Te.calcCutValue=Re,Te.leaveEdge=Se,Te.enterEdge=Ge,Te.exchangeEdges=Ve;var Ye=ce;function ze(e){Te(e)}var $e=t(8207),Je=t(9463);function Ze(e){var n=Z(e,"root",{},"_root"),t=function(e){var n={};function t(o,i){var u=e.children(o);u&&u.length&&r.A(u,function(e){t(e,i+1)}),n[o]=i}return r.A(e.children(),function(e){t(e,1)}),n}(e),o=F($e.A(t))-1,i=2*o+1;e.graph().nestingRoot=n,r.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return Je.A(e.edges(),function(n,t){return n+e.edge(t).weight},0)}(e)+1;r.A(e.children(),function(r){He(e,n,i,u,o,t,r)}),e.graph().nodeRankFactor=i}function He(e,n,t,o,i,u,a){var s=e.children(a);if(s.length){var d=U(e,"_bt"),c=U(e,"_bb"),h=e.node(a);e.setParent(d,a),h.borderTop=d,e.setParent(c,a),h.borderBottom=c,r.A(s,function(r){He(e,n,t,o,i,u,r);var s=e.node(r),h=s.borderTop?s.borderTop:r,f=s.borderBottom?s.borderBottom:r,l=s.borderTop?o:2*o,v=h!==f?1:i-u[a]+1;e.setEdge(d,h,{weight:l,minlen:v,nestingEdge:!0}),e.setEdge(f,c,{weight:l,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:t})}var Ke=t(8675);const Qe=function(e){return(0,Ke.A)(e,5)};function Ue(e,n,t){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new p.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return r.A(e.nodes(),function(u){var a=e.node(u),s=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,s||o),r.A(e[t](u),function(n){var t=n.v===u?n.w:n.v,r=i.edge(t,u),o=q.A(r)?0:r.weight;i.setEdge(t,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}var We=t(2851);const Xe=function(e,n,t){for(var r=-1,o=e.length,i=n.length,u={};++rn||i&&u&&s&&!a&&!d||r&&u&&s||!t&&s||!o)return 1;if(!r&&!i&&!d&&e=a?s:s*("desc"==t[r]?-1:1)}return e.index-n.index};const hn=function(e,n,t){n=n.length?(0,tn.A)(n,function(e){return(0,Ce.A)(e)?function(n){return(0,rn.A)(n,1===e.length?e[0]:e)}:e}):[R.A];var r=-1;n=(0,tn.A)(n,(0,an.A)(V.A));var o=(0,on.A)(e,function(e,t,o){return{criteria:(0,tn.A)(n,function(n){return n(e)}),index:++r,value:e}});return un(o,function(e,n){return cn(e,n,t)})};const fn=(0,t(4326).A)(function(e,n){if(null==e)return[];var t=n.length;return t>1&&(0,l.A)(e,n[0],n[1])?n=[]:t>2&&(0,l.A)(n[0],n[1],n[2])&&(n=[n[0]]),hn(e,(0,nn.A)(n,1),[])});function ln(e,n){for(var t=0,r=1;r0;)n%2&&(t+=c[n+1]),c[n=n-1>>1]+=e.weight;h+=e.weight*t})),h}function gn(e,n){var t={};return r.A(e,function(e,n){var r=t[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};q.A(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),r.A(n.edges(),function(e){var n=t[e.v],r=t[e.w];q.A(n)||q.A(r)||(r.indegree++,n.out.push(t[e.w]))}),function(e){var n=[];function t(e){return function(n){n.merged||(q.A(n.barycenter)||q.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var t=0,r=0;e.weight&&(t+=e.barycenter*e.weight,r+=e.weight);n.weight&&(t+=n.barycenter*n.weight,r+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=t/r,e.weight=r,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(t){t.in.push(n),0===--t.indegree&&e.push(t)}}for(;e.length;){var i=e.pop();n.push(i),r.A(i.in.reverse(),t(i)),r.A(i.out,o(i))}return d.A(Ae.A(n,function(e){return!e.merged}),function(e){return I(e,["vs","i","barycenter","weight"])})}(Ae.A(t,function(e){return!e.indegree}))}function pn(e,n){var t,o=function(e,n){var t={lhs:[],rhs:[]};return r.A(e,function(e){n(e)?t.lhs.push(e):t.rhs.push(e)}),t}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=fn(o.rhs,function(e){return-e.i}),a=[],d=0,c=0,h=0;i.sort((t=!!n,function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i})),h=An(a,u,h),r.A(i,function(e){h+=e.vs.length,a.push(e.vs),d+=e.barycenter*e.weight,c+=e.weight,h=An(a,u,h)});var f={vs:s.A(a)};return c&&(f.barycenter=d/c,f.weight=c),f}function An(e,n,t){for(var r;n.length&&(r=D.A(n)).i<=t;)n.pop(),e.push(r.vs),t++;return t}function wn(e,n,t,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,c=u?u.borderRight:void 0,h={};a&&(i=Ae.A(i,function(e){return e!==a&&e!==c}));var f=function(e,n){return d.A(n,function(n){var t=e.inEdges(n);if(t.length){var r=Je.A(t,function(n,t){var r=e.edge(t),o=e.node(t.v);return{sum:n.sum+r.weight*o.order,weight:n.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}})}(e,i);r.A(f,function(n){if(e.children(n.v).length){var r=wn(e,n.v,t,o);h[n.v]=r,Object.prototype.hasOwnProperty.call(r,"barycenter")&&(i=n,u=r,q.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var l=gn(f,t);!function(e,n){r.A(e,function(e){e.vs=s.A(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(l,h);var v=pn(l,o);if(a&&(v.vs=s.A([a,v.vs,c]),e.predecessors(a).length)){var g=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(c)[0]);Object.prototype.hasOwnProperty.call(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+g.order+p.order)/(v.weight+2),v.weight+=2}return v}function bn(e){var n=W(e),t=mn(e,g(1,n+1),"inEdges"),o=mn(e,g(n-1,-1,-1),"outEdges"),i=function(e){var n={},t=Ae.A(e.nodes(),function(n){return!e.children(n).length}),o=F(d.A(t,function(n){return e.node(n).rank})),i=d.A(g(o+1),function(){return[]}),u=fn(t,function(n){return e.node(n).rank});return r.A(u,function t(o){if(!z.A(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),r.A(e.successors(o),t)}}),i}(e);_n(e,i);for(var u,a=Number.POSITIVE_INFINITY,s=0,c=0;c<4;++s,++c){yn(s%2?t:o,s%4>=2);var h=ln(e,i=Q(e));hs||d>n[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,s=0,d=u[s],c=!0;t!==o.w;){if(r=e.node(t),c){for(;(d=u[s])!==a&&e.node(d).maxRankt){var r=n;n=t,t=r}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,t,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function In(e,n,t){if(n>t){var r=n;n=t,t=r}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],t)}function Ln(e,n,t,o,i){var u={},a=function(e,n,t,o){var i=new p.T,u=e.graph(),a=function(e,n,t){return function(r,o,i){var u,a=r.node(o),s=r.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(d+=t?u:-u),u=0,d+=(a.dummy?n:e)/2,d+=(s.dummy?n:e)/2,d+=s.width/2,Object.prototype.hasOwnProperty.call(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2}return u&&(d+=t?u:-u),u=0,d}}(u.nodesep,u.edgesep,o);return r.A(n,function(n){var o;r.A(n,function(n){var r=t[n];if(i.setNode(r),o){var u=t[o],s=i.edge(u,r);i.setEdge(u,r,Math.max(a(e,n,o),s||0))}o=n})}),i}(e,n,t,i),s=i?"borderLeft":"borderRight";function d(e,n){for(var t=a.nodes(),r=t.pop(),o={};r;)o[r]?e(r):(o[r]=!0,t.push(r),t=t.concat(n(r))),r=t.pop()}return d(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),d(function(n){var t=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),r=e.node(n);t!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(u[n]=Math.max(u[n],t))},a.successors.bind(a)),r.A(o,function(e){u[e]=u[t[e]]}),u}function Tn(e){var n,t=Q(e),o=x.A(jn(e,t),function(e,n){var t={};function o(n,o,i,u,a){var s;r.A(g(o,i),function(o){s=n[o],e.node(s).dummy&&r.A(e.predecessors(s),function(n){var r=e.node(n);r.dummy&&(r.ordera)&&Cn(t,n,s)})})}return Je.A(n,function(n,t){var i,u=-1,a=0;return r.A(t,function(r,s){if("border"===e.node(r).dummy){var d=e.predecessors(r);d.length&&(i=e.node(d[0]).order,o(t,a,s,u,i),a=s,u=i)}o(t,a,t.length,i,n.length)}),t}),t}(e,t)),i={};r.A(["u","d"],function(u){n="u"===u?t:$e.A(t).reverse(),r.A(["l","r"],function(t){"r"===t&&(n=d.A(n,function(e){return $e.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),s=function(e,n,t,o){var i={},u={},a={};return r.A(n,function(e){r.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),r.A(n,function(e){var n=-1;r.A(e,function(e){var r=o(e);if(r.length){r=fn(r,function(e){return a[e]});for(var s=(r.length-1)/2,d=Math.floor(s),c=Math.ceil(s);d<=c;++d){var h=r[d];u[e]===e&&n{var n=t(" buildLayoutGraph",()=>function(e){var n=new p.T({multigraph:!0,compound:!0}),t=$n(e.graph());return n.setGraph(x.A({},Dn,zn(t,Fn),I(t,Sn))),r.A(e.nodes(),function(t){var r=$n(e.node(t));n.setNode(t,L.A(zn(r,Gn),Vn)),n.setParent(t,e.parent(t))}),r.A(e.edges(),function(t){var r=$n(e.edge(t));n.setEdge(t,x.A({},qn,zn(r,Bn),I(r,Yn)))}),n}(e));t(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,r.A(e.edges(),function(t){var r=e.edge(t);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){r.A(e.edges(),function(n){if(n.v===n.w){var t=e.node(n.v);t.selfEdges||(t.selfEdges=[]),t.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>O(e)),n(" nestingGraph.run",()=>Ze(e)),n(" rank",()=>qe(H(e))),n(" injectEdgeLabelProxies",()=>function(e){r.A(e.edges(),function(n){var t=e.edge(n);if(t.width&&t.height){var r=e.node(n.v),o={rank:(e.node(n.w).rank-r.rank)/2+r.rank,e:n};Z(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=Y.A(d.A(e.nodes(),function(n){return e.node(n).rank})),t=[];r.A(e.nodes(),function(r){var o=e.node(r).rank-n;t[o]||(t[o]=[]),t[o].push(r)});var o=0,i=e.graph().nodeRankFactor;r.A(t,function(n,t){q.A(n)&&t%i!==0?--o:o&&r.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,r.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=Y.A(d.A(e.nodes(),function(n){return e.node(n).rank}));r.A(e.nodes(),function(t){var r=e.node(t);z.A(r,"rank")&&(r.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;r.A(e.nodes(),function(t){var r=e.node(t);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,n=F(n,r.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){r.A(e.nodes(),function(n){var t=e.node(n);"edge-proxy"===t.dummy&&(e.edge(t.e).labelRank=t.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>ae(e)),n(" parentDummyChains",()=>En(e)),n(" addBorderSegments",()=>function(e){r.A(e.children(),function n(t){var o=e.children(t),i=e.node(t);if(o.length&&r.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;ubn(e)),n(" insertSelfEdges",()=>function(e){var n=Q(e);r.A(n,function(n){var t=0;r.A(n,function(n,o){var i=e.node(n);i.order=o+t,r.A(i.selfEdges,function(n){Z(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++t,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||re(e)}(e)),n(" position",()=>Mn(e)),n(" positionSelfEdges",()=>function(e){r.A(e.nodes(),function(n){var t=e.node(n);if("selfedge"===t.dummy){var r=e.node(t.e.v),o=r.x+r.width/2,i=r.y,u=t.x-o,a=r.height/2;e.setEdge(t.e,t.label),e.removeNode(n),t.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],t.label.x=t.x,t.label.y=t.y}})}(e)),n(" removeBorderNodes",()=>function(e){r.A(e.nodes(),function(n){if(e.children(n).length){var t=e.node(n),r=e.node(t.borderTop),o=e.node(t.borderBottom),i=e.node(D.A(t.borderLeft)),u=e.node(D.A(t.borderRight));t.width=Math.abs(u.x-i.x),t.height=Math.abs(o.y-r.y),t.x=i.x+t.width/2,t.y=r.y+t.height/2}}),r.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){r.A(e.graph().dummyChains,function(n){var t,r=e.node(n),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)t=e.successors(n)[0],e.removeNode(n),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),n=t,r=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){r.A(e.edges(),function(n){var t=e.edge(n);if(Object.prototype.hasOwnProperty.call(t,"x"))switch("l"!==t.labelpos&&"r"!==t.labelpos||(t.width-=t.labeloffset),t.labelpos){case"l":t.x-=t.width/2+t.labeloffset;break;case"r":t.x+=t.width/2+t.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>te(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,t=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,s=u.marginy||0;function d(e){var r=e.x,u=e.y,a=e.width,s=e.height;n=Math.min(n,r-a/2),t=Math.max(t,r+a/2),o=Math.min(o,u-s/2),i=Math.max(i,u+s/2)}r.A(e.nodes(),function(n){d(e.node(n))}),r.A(e.edges(),function(n){var t=e.edge(n);Object.prototype.hasOwnProperty.call(t,"x")&&d(t)}),n-=a,o-=s,r.A(e.nodes(),function(t){var r=e.node(t);r.x-=n,r.y-=o}),r.A(e.edges(),function(t){var i=e.edge(t);r.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=t-n+a,u.height=i-o+s}(e)),n(" assignNodeIntersects",()=>function(e){r.A(e.edges(),function(n){var t,r,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(t=o.points[0],r=o.points[o.points.length-1]):(o.points=[],t=u,r=i),o.points.unshift(K(i,t)),o.points.push(K(u,r))})}(e)),n(" reversePoints",()=>function(e){r.A(e.edges(),function(n){var t=e.edge(n);t.reversed&&t.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){r.A(e.edges(),function(n){var t=e.edge(n);if(t.reversed){e.removeEdge(n);var r=t.forwardName;delete t.reversed,delete t.forwardName,e.setEdge(n.w,n.v,t,r)}})}(e))}(n,t)),t(" updateInputGraph",()=>function(e,n){r.A(e.nodes(),function(t){var r=e.node(t),o=n.node(t);r&&(r.x=o.x,r.y=o.y,n.children(t).length&&(r.width=o.width,r.height=o.height))}),r.A(e.edges(),function(t){var r=e.edge(t),o=n.edge(t);r.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var Fn=["nodesep","edgesep","ranksep","marginx","marginy"],Dn={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Sn=["acyclicer","ranker","rankdir","align"],Gn=["width","height"],Vn={width:0,height:0},Bn=["minlen","weight","width","height","labeloffset"],qn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Yn=["labelpos"];function zn(e,n){return B(I(e,n),Number)}function $n(e){var n={};return r.A(e,function(e,t){n[t.toLowerCase()]=e}),n}},7981(e,n,t){t.d(n,{T:()=>w});var r=t(9142),o=t(9610),i=t(7422),u=t(4092),a=t(6401),s=t(8058),d=t(9592),c=t(3588),h=t(4326),f=t(9902),l=t(3533);const v=(0,h.A)(function(e){return(0,f.A)((0,c.A)(e,1,l.A,!0))});var g=t(8207),p=t(9463),A="\0";class w{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.A(void 0),this._defaultEdgeLabelFn=r.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[A]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var e=this;return u.A(this.nodes(),function(n){return a.A(e._in[n])})}sinks(){var e=this;return u.A(this.nodes(),function(n){return a.A(e._out[n])})}setNodes(e,n){var t=arguments,r=this;return s.A(e,function(e){t.length>1?r.setNode(e,n):r.setNode(e)}),this}setNode(e,n){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=n),this):(this._nodes[e]=arguments.length>1?n:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=A,this._children[e]={},this._children[A][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var n=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],s.A(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),s.A(i.A(this._in[e]),n),delete this._in[e],delete this._preds[e],s.A(i.A(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d.A(n))n=A;else{for(var t=n+="";!d.A(t);t=this.parent(t))if(t===e)throw new Error("Setting "+n+" as parent of "+e+" would create a cycle");this.setNode(n)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=n,this._children[n][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var n=this._parent[e];if(n!==A)return n}}children(e){if(d.A(e)&&(e=A),this._isCompound){var n=this._children[e];if(n)return i.A(n)}else{if(e===A)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var n=this._preds[e];if(n)return i.A(n)}successors(e){var n=this._sucs[e];if(n)return i.A(n)}neighbors(e){var n=this.predecessors(e);if(n)return v(n,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var t=this;s.A(this._nodes,function(t,r){e(r)&&n.setNode(r,t)}),s.A(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,t.edge(e))});var r={};function o(e){var i=t.parent(e);return void 0===i||n.hasNode(i)?(r[e]=i,i):i in r?r[i]:o(i)}return this._isCompound&&s.A(n.nodes(),function(e){n.setParent(e,o(e))}),n}setDefaultEdgeLabel(e){return o.A(e)||(e=r.A(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return g.A(this._edgeObjs)}setPath(e,n){var t=this,r=arguments;return p.A(e,function(e,o){return r.length>1?t.setEdge(e,o,n):t.setEdge(e,o),o}),this}setEdge(){var e,n,t,r,o=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,n=i.w,t=i.name,2===arguments.length&&(r=arguments[1],o=!0)):(e=i,n=arguments[1],t=arguments[3],arguments.length>2&&(r=arguments[2],o=!0)),e=""+e,n=""+n,d.A(t)||(t=""+t);var u=y(this._isDirected,e,n,t);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return o&&(this._edgeLabels[u]=r),this;if(!d.A(t)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(n),this._edgeLabels[u]=o?r:this._defaultEdgeLabelFn(e,n,t);var a=function(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,e,n,t);return e=a.v,n=a.w,Object.freeze(a),this._edgeObjs[u]=a,b(this._preds[n],e),b(this._sucs[e],n),this._in[n][u]=a,this._out[e][u]=a,this._edgeCount++,this}edge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return this._edgeLabels[r]}hasEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,n,t){var r=1===arguments.length?_(this._isDirected,arguments[0]):y(this._isDirected,e,n,t),o=this._edgeObjs[r];return o&&(e=o.v,n=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],m(this._preds[n],e),m(this._sucs[e],n),delete this._in[n][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,n){var t=this._in[e];if(t){var r=g.A(t);return n?u.A(r,function(e){return e.v===n}):r}}outEdges(e,n){var t=this._out[e];if(t){var r=g.A(t);return n?u.A(r,function(e){return e.w===n}):r}}nodeEdges(e,n){var t=this.inEdges(e,n);if(t)return t.concat(this.outEdges(e,n))}}function b(e,n){e[n]?e[n]++:e[n]=1}function m(e,n){--e[n]||delete e[n]}function y(e,n,t,r){var o=""+n,i=""+t;if(!e&&o>i){var u=o;o=i,i=u}return o+"\x01"+i+"\x01"+(d.A(r)?"\0":r)}function _(e,n){return y(e,n.v,n.w,n.name)}w.prototype._nodeCount=0,w.prototype._edgeCount=0},697(e,n,t){t.d(n,{T:()=>r.T});var r=t(7981)},2559(e,n,t){t.d(n,{A:()=>o});var r=t(1882);const o=function(e,n,t){for(var o=-1,i=e.length;++or});const r=function(e,n){return ei});var r=t(6240),o=t(8446);const i=function(e,n){var t=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,r.A)(e,function(e,r,o){i[++t]=n(e,r,o)}),i}},9354(e,n,t){t.d(n,{A:()=>c});var r=t(6318),o=t(2851),i=t(7819),u=t(5353),a=t(3149),s=t(901);const d=function(e,n,t,r){if(!(0,a.A)(e))return e;for(var d=-1,c=(n=(0,i.A)(n,e)).length,h=c-1,f=e;null!=f&&++dd});var r=t(4326),o=t(6984),i=t(6832),u=t(5615),a=Object.prototype,s=a.hasOwnProperty;const d=(0,r.A)(function(e,n){e=Object(e);var t=-1,r=n.length,d=r>2?n[2]:void 0;for(d&&(0,i.A)(n[0],n[1],d)&&(r=1);++tc});var r=t(3958),o=t(8446),i=t(7422);const u=function(e){return function(n,t,u){var a=Object(n);if(!(0,o.A)(n)){var s=(0,r.A)(t,3);n=(0,i.A)(n),t=function(e){return s(a[e],e,a)}}var d=e(n,t,u);return d>-1?a[s?n[d]:d]:void 0}};var a=t(5707),s=t(8593),d=Math.max;const c=u(function(e,n,t){var o=null==e?0:e.length;if(!o)return-1;var i=null==t?0:(0,s.A)(t);return i<0&&(i=d(o+i,0)),(0,a.A)(e,(0,r.A)(n,3),i)})},4098(e,n,t){t.d(n,{A:()=>o});var r=t(3588);const o=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},8585(e,n,t){t.d(n,{A:()=>u});var r=Object.prototype.hasOwnProperty;const o=function(e,n){return null!=e&&r.call(e,n)};var i=t(5054);const u=function(e,n){return null!=e&&(0,i.A)(e,n,o)}},9703(e,n,t){t.d(n,{A:()=>u});var r=t(8496),o=t(2049),i=t(3098);const u=function(e){return"string"==typeof e||!(0,o.A)(e)&&(0,i.A)(e)&&"[object String]"==(0,r.A)(e)}},6666(e,n,t){t.d(n,{A:()=>r});const r=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}},4722(e,n,t){t.d(n,{A:()=>a});var r=t(5572),o=t(3958),i=t(2568),u=t(2049);const a=function(e,n){return((0,u.A)(e)?r.A:i.A)(e,(0,o.A)(n,3))}},6452(e,n,t){t.d(n,{A:()=>u});var r=t(2559),o=t(6224),i=t(9008);const u=function(e){return e&&e.length?(0,r.A)(e,i.A,o.A):void 0}},4342(e,n,t){t.d(n,{A:()=>g});var r=/\s/;const o=function(e){for(var n=e.length;n--&&r.test(e.charAt(n)););return n};var i=/^\s+/;const u=function(e){return e?e.slice(0,o(e)+1).replace(i,""):e};var a=t(3149),s=t(1882),d=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,h=/^0o[0-7]+$/i,f=parseInt;const l=function(e){if("number"==typeof e)return e;if((0,s.A)(e))return NaN;if((0,a.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=u(e);var t=c.test(e);return t||h.test(e)?f(e.slice(2),t?2:8):d.test(e)?NaN:+e};var v=1/0;const g=function(e){return e?(e=l(e))===v||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593(e,n,t){t.d(n,{A:()=>o});var r=t(4342);const o=function(e){var n=(0,r.A)(e),t=n%1;return n==n?t?n-t:n:0}}}]); \ No newline at end of file diff --git a/assets/js/23374ca6.a8726fc2.js b/assets/js/23374ca6.a8726fc2.js new file mode 100644 index 0000000..8d67976 --- /dev/null +++ b/assets/js/23374ca6.a8726fc2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2278],{4447:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","source":"@site/docs/README.md","sourceDirName":".","slug":"/","permalink":"/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","next":{"title":"Quickstart","permalink":"/getting-started/quickstart"}}');var r=i(199),t=i(2560);const a={},o="HappyView",l={},c=[{value:"Features",id:"features",level:2},{value:"Design Principles",id:"design-principles",level:2},{value:"Next Steps",id:"next-steps",level:2}];function d(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"happyview",children:"HappyView"})}),"\n",(0,r.jsxs)(n.p,{children:["HappyView is the best way to build an ",(0,r.jsx)(n.a,{href:"https://atproto.com/guides/glossary#app-view",children:"AppView"})," for the ",(0,r.jsx)(n.a,{href:"https://atproto.com",children:"AT Protocol"}),". Upload your ",(0,r.jsx)(n.a,{href:"/reference/glossary#atproto-terms",children:"lexicon"})," schemas and get a fully functional AppView, complete with ",(0,r.jsx)(n.a,{href:"/reference/glossary#atproto-terms",children:"XRPC"})," endpoints, OAuth, real-time network sync, and historical ",(0,r.jsx)(n.a,{href:"/guides/backfill",children:"backfill"}),", without writing a single line of server code."]}),"\n",(0,r.jsx)(n.p,{children:"Building an AppView from scratch means wiring up real-time event streams, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app."}),"\n",(0,r.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Schema-driven endpoints:"})," Upload a ",(0,r.jsx)(n.a,{href:"/guides/lexicons",children:"lexicon"})," and HappyView generates XRPC query and procedure routes, storage, and indexing from it \u2014 updatable at runtime with no restart."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Network sync built in:"})," Real-time record streaming via ",(0,r.jsx)(n.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"}),", historical ",(0,r.jsx)(n.a,{href:"/guides/backfill",children:"backfill"})," from each user's PDS, and atproto OAuth with DPoP-bound proxy writes back to the PDS."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Customize with Lua, hooks, and plugins:"})," ",(0,r.jsx)(n.a,{href:"/guides/scripting",children:"Lua scripts"})," for query and procedure logic, ",(0,r.jsx)(n.a,{href:"/guides/index-hooks",children:"index hooks"})," that fire on every record change, WASM ",(0,r.jsx)(n.a,{href:"/guides/plugins",children:"plugins"})," for external platform integration, and ",(0,r.jsx)(n.a,{href:"/guides/labelers",children:"labeler"})," subscriptions for content moderation."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Protocol-native:"})," Works with any PDS, resolves DIDs through the directory, and fetches ",(0,r.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"network lexicons"})," via DNS authority resolution."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Full admin surface:"})," Built-in ",(0,r.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"})," and ",(0,r.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," for managing lexicons, users, API keys, API clients, backfill jobs, and plugins."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"design-principles",children:"Design Principles"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Schema-first"}),": Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe ",(0,r.jsx)(n.em,{children:"what"})," your data looks like; HappyView figures out the rest."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Zero boilerplate"}),": HappyView handles AppView infrastructure (Jetstream, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Runtime-configurable"}),": Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Protocol-native"}),": HappyView works with ",(0,r.jsx)(n.em,{children:"any"})," PDS, resolves DIDs through the directory, and follows atproto conventions. It's a first-class citizen of the network, not a wrapper around it."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"}),": Deploy HappyView on Railway or run it locally"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons"}),": Upload lexicon schemas and start indexing records"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Write custom query and procedure logic"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": React to record changes in real time"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/labelers",children:"Labelers"}),": Subscribe to external labelers and manage content labels"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/plugins",children:"Plugins"}),": Integrate with external platforms using WASM plugins"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/event-logs",children:"Event Logs"}),": Monitor system activity, debug script errors, and audit admin actions"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},2560:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>o});var s=i(63);const r={},t=s.createContext(r);function a(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/23374ca6.a9405a6f.js b/assets/js/23374ca6.a9405a6f.js deleted file mode 100644 index 17e3bbf..0000000 --- a/assets/js/23374ca6.a9405a6f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2278],{7403(e,n,i){i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","source":"@site/docs/README.md","sourceDirName":".","slug":"/","permalink":"/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","next":{"title":"Quickstart","permalink":"/getting-started/quickstart"}}');var r=i(4848),s=i(8453);const o={},a="HappyView",l={},c=[{value:"Features",id:"features",level:2},{value:"Design Principles",id:"design-principles",level:2},{value:"Next Steps",id:"next-steps",level:2}];function d(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"happyview",children:"HappyView"})}),"\n",(0,r.jsxs)(n.p,{children:["HappyView is the best way to build an ",(0,r.jsx)(n.a,{href:"https://atproto.com/guides/glossary#app-view",children:"AppView"})," for the ",(0,r.jsx)(n.a,{href:"https://atproto.com",children:"AT Protocol"}),". Upload your ",(0,r.jsx)(n.a,{href:"/reference/glossary#at-protocol-terms",children:"lexicon"})," schemas and get a fully functional AppView, complete with ",(0,r.jsx)(n.a,{href:"/reference/glossary#at-protocol-terms",children:"XRPC"})," endpoints, OAuth, real-time network sync, and historical ",(0,r.jsx)(n.a,{href:"/guides/backfill",children:"backfill"}),", without writing a single line of server code."]}),"\n",(0,r.jsx)(n.p,{children:"Building an AppView from scratch means wiring up firehose connections, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app."}),"\n",(0,r.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcdc ",(0,r.jsx)(n.strong,{children:"Lexicon-Driven"}),": Upload your lexicon schemas and HappyView generates fully functional XRPC query and procedure endpoints automatically, no code required"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd04 ",(0,r.jsx)(n.strong,{children:"Real-Time Sync"}),": Records stream in from the AT Protocol network in real-time via ",(0,r.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", with cryptographic verification and backfill via the admin API"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd10 ",(0,r.jsx)(n.strong,{children:"OAuth Built In"}),": ",(0,r.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," handles authentication, and writes are proxied back to the user's PDS, so there's no session management needed"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf19 ",(0,r.jsx)(n.strong,{children:"Lua Scripting"}),": Add custom query and procedure logic with Lua scripts that have full access to the record database"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\uddc4\ufe0f ",(0,r.jsx)(n.strong,{children:"Automatic Indexing"}),": HappyView indexes relevant records into PostgreSQL as they arrive, ready to query"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83e\ude9d ",(0,r.jsx)(n.strong,{children:"Index Hooks"}),": Attach Lua scripts to record collections that fire on every create, update, or delete \u2014 sync to search engines, trigger webhooks, or build materialized views in real time"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf10 ",(0,r.jsx)(n.strong,{children:"Network Lexicons"}),": Fetch lexicon schemas directly from the AT Protocol network via DNS authority resolution"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"Hot Reloading"}),": Upload or update lexicons at runtime, and new endpoints are available immediately with no restart"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"Admin Dashboard"}),": Manage lexicons, monitor record stats, and run backfill jobs through a built-in admin API"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"design-principles",children:"Design Principles"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Schema-first"}),": Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe ",(0,r.jsx)(n.em,{children:"what"})," your data looks like; HappyView figures out the rest."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Zero boilerplate"}),": HappyView handles AppView infrastructure (firehose, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Runtime-configurable"}),": Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Protocol-native"}),": HappyView works with ",(0,r.jsx)(n.em,{children:"any"})," PDS, resolves DIDs through the directory, and follows AT Protocol conventions. It's a first-class citizen of the network, not a wrapper around it."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"}),": Deploy HappyView on Railway or run it locally"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons"}),": Upload lexicon schemas and start indexing records"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Write custom query and procedure logic"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": React to record changes in real time"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/event-logs",children:"Event Logs"}),": Monitor system activity, debug script errors, and audit admin actions"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>a});var t=i(6540);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2391.383149c0.js b/assets/js/2391.383149c0.js new file mode 100644 index 0000000..f733988 --- /dev/null +++ b/assets/js/2391.383149c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2391],{7214:(t,e,n)=>{n.d(e,{o:()=>i});var i=(0,n(8894).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},4772:(t,e,n)=>{n.d(e,{diagram:()=>I});var i=n(6417),s=n(7214),r=n(8712),o=n(5707),a=(n(3276),n(4061),n(7127),n(2101),n(5691)),c=n(8894),l=n(4713),h=n(279),u=n(5485),g=function(){var t=(0,c.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,c.K2)(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,a="",l=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,l=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,l,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,(0,c.K2)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();g.parser=g;var d=g,p=[],y=[],f=0,m={},b=(0,c.K2)(()=>{p=[],y=[],f=0,m={}},"clear"),_=(0,c.K2)(t=>{if(0===p.length)return null;const e=p[0].level;let n=null;for(let i=p.length-1;i>=0;i--)if(p[i].level!==e||n||(n=p[i]),p[i].levelt.parentId===i.id);for(const r of s){const e={id:r.id,parentId:i.id,label:(0,a.jZ)(r.label??"",n),labelType:"markdown",isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),S=(0,c.K2)((t,e,n,i,s)=>{const o=(0,a.D7)();let c=o.mindmap?.padding??a.UI.mindmap.padding;switch(i){case N.ROUNDED_RECT:case N.RECT:case N.HEXAGON:c*=2}const l={id:(0,a.jZ)(e,o)||"kbn"+f++,level:t,label:(0,a.jZ)(n,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";const e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon.toString()),e?.assigned&&(l.assigned=e?.assigned.toString()),e?.ticket&&(l.ticket=e?.ticket.toString()),e?.priority&&(l.priority=e?.priority)}const h=_(t);h?l.parentId=h.id||"kbn"+f++:y.push(l),p.push(l)},"addNode"),N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x={clear:b,addNode:S,getSections:k,getData:E,nodeType:N,getType:(0,c.K2)((t,e)=>{switch(c.Rm.debug("In get type",t,e),t){case"[":return N.RECT;case"(":return")"===e?N.ROUNDED_RECT:N.CLOUD;case"((":return N.CIRCLE;case")":return N.CLOUD;case"))":return N.BANG;case"{{":return N.HEXAGON;default:return N.DEFAULT}},"getType"),setElementForId:(0,c.K2)((t,e)=>{m[t]=e},"setElementForId"),decorateNode:(0,c.K2)(t=>{if(!t)return;const e=(0,a.D7)(),n=p[p.length-1];t.icon&&(n.icon=(0,a.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),type2Str:(0,c.K2)(t=>{switch(t){case N.DEFAULT:return"no-border";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded-rect";case N.CIRCLE:return"circle";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,c.K2)(()=>c.Rm,"getLogger"),getElementById:(0,c.K2)(t=>m[t],"getElementById")},D={draw:(0,c.K2)(async(t,e,n,s)=>{c.Rm.debug("Rendering kanban diagram\n"+t);const r=s.db.getData(),l=(0,a.D7)();l.htmlLabels=!1;const h=(0,i.D)(e);for(const i of r.nodes)i.domId=`${e}-${i.id}`;const u=h.append("g");u.attr("class","sections");const g=h.append("g");g.attr("class","items");const d=r.nodes.filter(t=>t.isGroup);let p=0;const y=[];let f=25;for(const i of d){const t=l?.kanban?.sectionWidth||200;p+=1,i.x=t*p+10*(p-1)/2,i.width=t,i.y=0,i.height=3*t,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+p;const e=await(0,o.U)(u,i);f=Math.max(f,e?.labelBBox?.height),y.push(e)}let m=0;for(const i of d){const t=y[m];m+=1;const e=l?.kanban?.sectionWidth||200,n=3*-e/2+f;let s=n;const a=r.nodes.filter(t=>t.parentId===i.id);for(const r of a){if(r.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");r.x=i.x,r.width=e-15;const t=(await(0,o.on)(g,r,{config:l})).node().getBBox();r.y=s+t.height/2,await(0,o.U_)(r),s=r.y+t.height/2+5}const c=t.cluster.select("rect"),h=Math.max(s-n+30,50)+(f-25);c.attr("height",h)}(0,a.ot)(void 0,h,l.mindmap?.padding??a.UI.kanban.padding,l.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw")},L=(0,c.K2)(t=>{let e="";for(let i=0;it.darkMode?(0,u.A)(e,n):(0,h.A)(e,n),"adjuster");for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${L(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,s.o)()}\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/2492.04a5c13d.js b/assets/js/2492.04a5c13d.js deleted file mode 100644 index c012551..0000000 --- a/assets/js/2492.04a5c13d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2492],{7375(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return i.bind(this)(r)}}}()},445(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,m=s.week,y=new Date,k=o||(r||a?1:y.getDate()),p=r||y.getFullYear(),g=0;r&&!a||(g=a>0?a-1:y.getMonth());var v,b=c||0,T=l||0,x=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,b,T,x,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,b,T,x,w)):(v=new Date(p,g,k,b,T,x,w),m&&(v=i(v).week(m).toDate()),v)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,m=1;m<=h;m+=1){r[1]=o[m-1];var y=n.apply(this,r);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}m===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},3522(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,s=36e5,r=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,o=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:o,months:c,days:r,hours:s,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof g},h=function(t,e,n){return new g(t,n,e.$l)},f=function(t){return e.p(t)+"s"},m=function(t){return t<0},y=function(t){return m(t)?Math.ceil(t):Math.floor(t)},k=function(t){return Math.abs(t)},p=function(t,e){return t?m(t)?{negative:!0,format:""+k(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},g=function(){function m(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return h(t*d[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[f(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(l);if(s){var r=s.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var k=m.prototype;return k.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*d[n]},0)},k.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=y(t/o),t%=o,this.$d.months=y(t/c),t%=c,this.$d.days=y(t/r),t%=r,this.$d.hours=y(t/s),t%=s,this.$d.minutes=y(t/i),t%=i,this.$d.seconds=y(t/n),t%=n,this.$d.milliseconds=t},k.toISOString=function(){var t=p(this.$d.years,"Y"),e=p(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=p(n,"D"),s=p(this.$d.hours,"H"),r=p(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=p(a,"S"),c=t.negative||e.negative||i.negative||s.negative||r.negative||o.negative,l=s.format||r.format||o.format?"T":"",d=(c?"-":"")+"P"+t.format+e.format+i.format+l+s.format+r.format+o.format;return"P"===d||"-P"===d?"P0D":d},k.toJSON=function(){return this.toISOString()},k.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(a,function(t,e){return e||String(i[t])})},k.as=function(t){return this.$ms/d[f(t)]},k.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?y(e/d[n]):this.$d[n],e||0},k.add=function(t,e,n){var i;return i=e?t*d[f(e)]:u(t)?t.$ms:h(t,this).$ms,h(this.$ms+i*(n?-1:1),this)},k.subtract=function(t,e){return this.add(t,e,!0)},k.locale=function(t){var e=this.clone();return e.$l=t,e},k.clone=function(){return h(this.$ms,this)},k.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},m}(),v=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,s){t=s,e=s().$utils(),s.duration=function(t,e){var n=s.locale();return h(t,{$l:n},e)},s.isDuration=u;var r=i.prototype.add,a=i.prototype.subtract;i.prototype.add=function(t,e){return u(t)?v(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return u(t)?v(this,t,-1):a.bind(this)(t,e)}}}()},8313(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},2492(t,e,n){"use strict";n.d(e,{diagram:()=>Ot});var i=n(3226),s=n(7633),r=n(797),a=n(6750),o=n(4353),c=n(8313),l=n(445),d=n(7375),u=n(3522),h=n(451),f=function(){var t=(0,r.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],s=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],m=[1,11],y=[1,12],k=[1,13],p=[1,14],g=[1,15],v=[1,16],b=[1,19],T=[1,20],x=[1,21],w=[1,22],$=[1,23],_=[1,25],D=[1,35],S={trace:(0,r.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,r.K2)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:b,31:T,33:x,35:w,36:$,37:24,38:_,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:s,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:b,31:T,33:x,35:w,36:$,37:24,38:_,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,r.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,r.K2)(function(t){var e=this,n=[0],i=[],s=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(m.yy[y]=this.yy[y]);f.setInput(t,m.yy),m.yy.lexer=f,m.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var k=f.yylloc;a.push(k);var p=f.options&&f.options.ranges;function g(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),(0,r.K2)(g,"lex");for(var v,b,T,x,w,$,_,D,S,C={};;){if(T=n[n.length-1],this.defaultActions[T]?x=this.defaultActions[T]:(null==v&&(v=g()),x=o[T]&&o[T][v]),void 0===x||!x.length||!x[0]){var M="";for($ in S=[],o[T])this.terminals_[$]&&$>2&&S.push("'"+this.terminals_[$]+"'");M=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(M,{text:f.match,token:this.terminals_[v]||v,line:f.yylineno,loc:k,expected:S})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+T+", token: "+v);switch(x[0]){case 1:n.push(v),s.push(f.yytext),a.push(f.yylloc),n.push(x[1]),v=null,b?(v=b,b=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,k=f.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[x[1]][1],C.$=s[s.length-_],C._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},p&&(C._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(C,[c,d,l,m.yy,x[1],s,a].concat(h))))return w;_&&(n=n.slice(0,-1*_*2),s=s.slice(0,-1*_),a=a.slice(0,-1*_)),n.push(this.productions_[x[1]][0]),s.push(C.$),a.push(C._$),D=o[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},C=function(){return{EOF:1,parseError:(0,r.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K2)(function(){return this._more=!0,this},"more"),reject:(0,r.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,r.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K2)(function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function M(){this.yy={}}return S.lexer=C,(0,r.K2)(M,"Parser"),M.prototype=S,S.Parser=M,new M}();f.parser=f;var m=f;o.extend(c),o.extend(l),o.extend(d);var y,k,p={friday:5,saturday:6},g="",v="",b=void 0,T="",x=[],w=[],$=new Map,_=[],D=[],S="",C="",M=["active","done","crit","milestone","vert"],K=[],E=!1,Y=!1,A="sunday",I="saturday",L=0,F=(0,r.K2)(function(){_=[],D=[],S="",K=[],mt=0,y=void 0,k=void 0,gt=[],g="",v="",C="",b=void 0,T="",x=[],w=[],E=!1,Y=!1,L=0,$=new Map,(0,s.IU)(),A="sunday",I="saturday"},"clear"),O=(0,r.K2)(function(t){v=t},"setAxisFormat"),W=(0,r.K2)(function(){return v},"getAxisFormat"),P=(0,r.K2)(function(t){b=t},"setTickInterval"),H=(0,r.K2)(function(){return b},"getTickInterval"),N=(0,r.K2)(function(t){T=t},"setTodayMarker"),B=(0,r.K2)(function(){return T},"getTodayMarker"),z=(0,r.K2)(function(t){g=t},"setDateFormat"),G=(0,r.K2)(function(){E=!0},"enableInclusiveEndDates"),R=(0,r.K2)(function(){return E},"endDatesAreInclusive"),j=(0,r.K2)(function(){Y=!0},"enableTopAxis"),U=(0,r.K2)(function(){return Y},"topAxisEnabled"),V=(0,r.K2)(function(t){C=t},"setDisplayMode"),Z=(0,r.K2)(function(){return C},"getDisplayMode"),X=(0,r.K2)(function(){return g},"getDateFormat"),q=(0,r.K2)(function(t){x=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),Q=(0,r.K2)(function(){return x},"getIncludes"),J=(0,r.K2)(function(t){w=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),tt=(0,r.K2)(function(){return w},"getExcludes"),et=(0,r.K2)(function(){return $},"getLinks"),nt=(0,r.K2)(function(t){S=t,_.push(t)},"addSection"),it=(0,r.K2)(function(){return _},"getSections"),st=(0,r.K2)(function(){let t=wt();let e=0;for(;!t&&e<10;)t=wt(),e++;return D=gt},"getTasks"),rt=(0,r.K2)(function(t,e,n,i){const s=t.format(e.trim()),r=t.format("YYYY-MM-DD");return!i.includes(s)&&!i.includes(r)&&(!(!n.includes("weekends")||t.isoWeekday()!==p[I]&&t.isoWeekday()!==p[I]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(s)||n.includes(r))))},"isInvalidDate"),at=(0,r.K2)(function(t){A=t},"setWeekday"),ot=(0,r.K2)(function(){return A},"getWeekday"),ct=(0,r.K2)(function(t){I=t},"setWeekend"),lt=(0,r.K2)(function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?o(t.startTime):o(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?o(t.endTime):o(t.endTime,e,!0);const[a,c]=dt(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=c},"checkTaskDates"),dt=(0,r.K2)(function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=rt(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},"fixTaskDates"),ut=(0,r.K2)(function(t,e,n){n=n.trim();if((0,r.K2)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=Tt(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let s=o(n,e.trim(),!0);if(s.isValid())return s.toDate();{r.Rm.debug("Invalid date:"+n),r.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),ht=(0,r.K2)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),ft=(0,r.K2)(function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=Tt(n);void 0!==e&&(!t||e.startTime{window.open(n,"_self")}),$.set(t,n))}),_t(t,"clickable")},"setLink"),_t=(0,r.K2)(function(t,e){t.split(",").forEach(function(t){let n=Tt(t);void 0!==n&&n.classes.push(e)})},"setClass"),Dt=(0,r.K2)(function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)})},"setClickFun"),St=(0,r.K2)(function(t,e){K.push(function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",function(){e()})})},"pushFun"),Ct=(0,r.K2)(function(t,e,n){t.split(",").forEach(function(t){Dt(t,e,n)}),_t(t,"clickable")},"setClickEvent"),Mt=(0,r.K2)(function(t){K.forEach(function(e){e(t)})},"bindFunctions"),Kt={getConfig:(0,r.K2)(()=>(0,s.D7)().gantt,"getConfig"),clear:F,setDateFormat:z,getDateFormat:X,enableInclusiveEndDates:G,endDatesAreInclusive:R,enableTopAxis:j,topAxisEnabled:U,setAxisFormat:O,getAxisFormat:W,setTickInterval:P,getTickInterval:H,setTodayMarker:N,getTodayMarker:B,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDisplayMode:V,getDisplayMode:Z,setAccDescription:s.EI,getAccDescription:s.m7,addSection:nt,getSections:it,getTasks:st,addTask:bt,findTaskById:Tt,addTaskOrg:xt,setIncludes:q,getIncludes:Q,setExcludes:J,getExcludes:tt,setClickEvent:Ct,setLink:$t,getLinks:et,bindFunctions:Mt,parseDuration:ht,isInvalidDate:rt,setWeekday:at,getWeekday:ot,setWeekend:ct};function Et(t,e,n){let i=!0;for(;i;)i=!1,n.forEach(function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)})}(0,r.K2)(Et,"getTaskTags"),o.extend(u);var Yt,At=(0,r.K2)(function(){r.Rm.debug("Something is calling, setConf, remove the call")},"setConf"),It={monday:h.ABi,tuesday:h.PGu,wednesday:h.GuW,thursday:h.Mol,friday:h.TUC,saturday:h.rGn,sunday:h.YPH},Lt=(0,r.K2)((t,e)=>{let n=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s},"getMaxIntersections"),Ft=1e4,Ot={parser:m,db:Kt,renderer:{setConf:At,draw:(0,r.K2)(function(t,e,n,i){const a=(0,s.D7)().gantt,c=(0,s.D7)().securityLevel;let l;"sandbox"===c&&(l=(0,h.Ltv)("#i"+e));const d="sandbox"===c?(0,h.Ltv)(l.nodes()[0].contentDocument.body):(0,h.Ltv)("body"),u="sandbox"===c?l.nodes()[0].contentDocument:document,f=u.getElementById(e);void 0===(Yt=f.parentElement.offsetWidth)&&(Yt=1200),void 0!==a.useWidth&&(Yt=a.useWidth);const m=i.db.getTasks();let y=[];for(const s of m)y.push(s.type);y=C(y);const k={};let p=2*a.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===a.displayMode){const t={};for(const n of m)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=Lt(t[n],e)+1;e+=i,p+=i*(a.barHeight+a.barGap),k[n]=i}}else{p+=m.length*(a.barHeight+a.barGap);for(const t of y)k[t]=m.filter(e=>e.type===t).length}f.setAttribute("viewBox","0 0 "+Yt+" "+p);const g=d.select(`[id="${e}"]`),v=(0,h.w7C)().domain([(0,h.jkA)(m,function(t){return t.startTime}),(0,h.T9B)(m,function(t){return t.endTime})]).rangeRound([0,Yt-a.leftPadding-a.rightPadding]);function b(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.vert===e.vert?0:t.vert?1:-1);const u=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));g.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+r-2}).attr("width",function(){return d-a.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%a.numberSectionStyles;return"section section0"}).enter();const f=g.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();f.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?v(t.startTime)+o+.5*(v(t.endTime)-v(t.startTime))-.5*c:v(t.startTime)+o}).attr("y",function(t,e){return e=t.order,t.vert?a.gridLineStartPadding:e*n+r}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:v(t.renderEndTime||t.endTime)-v(t.startTime)}).attr("height",function(t){return t.vert?m.length*(a.barHeight+a.barGap)+2*a.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(v(t.startTime)+o+.5*(v(t.endTime)-v(t.startTime))).toString()+"px "+(e*n+r+.5*c).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,r]of y.entries())t.type===r&&(n=s%a.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),t.vert&&(i=" vert "+i),i+=n,i+=" "+e,"task"+i}),f.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",a.fontSize).attr("x",function(t){let e=v(t.startTime),n=v(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(v(t.endTime)-v(t.startTime))-.5*c,n=e+c),t.vert)return v(t.startTime)+o;const i=this.getBBox().width;return i>n-e?n+i+1.5*a.leftPadding>d?e+o-5:n+o+5:(n-e)/2+e+o}).attr("y",function(t,e){return t.vert?a.gridLineStartPadding+m.length*(a.barHeight+a.barGap)+60:t.order*n+a.barHeight/2+(a.fontSize/2-2)+r}).attr("text-height",c).attr("class",function(t){const e=v(t.startTime);let n=v(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let r=0;for(const[c,l]of y.entries())t.type===l&&(r=c%a.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+r:"activeText"+r),t.done?o=t.crit?o+" doneCritText"+r:o+" doneText"+r:t.crit&&(o=o+" critText"+r),t.milestone&&(o+=" milestoneText"),t.vert&&(o+=" vertText"),i>n-e?n+i+1.5*a.leftPadding>d?s+" taskTextOutsideLeft taskTextOutside"+r+" "+o:s+" taskTextOutsideRight taskTextOutside"+r+" "+o+" width-"+i:s+" taskText taskText"+r+" "+o+" width-"+i});if("sandbox"===(0,s.D7)().securityLevel){let t;t=(0,h.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter(function(t){return k.has(t.id)}).each(function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",k.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)})}}function w(t,e,n,s,c,l,d,u){if(0===d.length&&0===u.length)return;let h,f;for(const{startTime:i,endTime:r}of l)(void 0===h||if)&&(f=r);if(!h||!f)return;if(o(f).diff(o(h),"year")>5)return void r.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const m=i.db.getDateFormat(),y=[];let k=null,p=o(h);for(;p.valueOf()<=f;)i.db.isInvalidDate(p,m,d,u)?k?k.end=p:k={start:p,end:p}:k&&(y.push(k),k=null),p=p.add(1,"d");g.append("g").selectAll("rect").data(y).enter().append("rect").attr("id",t=>"exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>v(t.start.startOf("day"))+n).attr("y",a.gridLineStartPadding).attr("width",t=>v(t.end.endOf("day"))-v(t.start.startOf("day"))).attr("height",c-e-a.gridLineStartPadding).attr("transform-origin",function(e,i){return(v(e.start)+n+.5*(v(e.end)-v(e.start))).toString()+"px "+(i*t+.5*c).toString()+"px"}).attr("class","exclude-range")}function $(t,e,n,i){if(n<=0||t>e)return 1/0;const s=e-t,r=o.duration({[i??"day"]:n}).asMilliseconds();return r<=0?1/0:Math.ceil(s/r)}function _(t,e,n,s){const o=i.db.getDateFormat(),c=i.db.getAxisFormat();let l;l=c||("D"===o?"%d":a.axisFormat??"%Y-%m-%d");let d=(0,h.l78)(v).tickSize(-s+e+a.gridLineStartPadding).tickFormat((0,h.DCK)(l));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||a.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],n=i.db.getWeekday()||a.weekday,s=v.domain(),o=$(s[0],s[1],t,e);if(o>Ft)r.Rm.warn(`The tick interval "${t}${e}" would generate ${o} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":d.ticks(h.t6C.every(t));break;case"second":d.ticks(h.ucG.every(t));break;case"minute":d.ticks(h.wXd.every(t));break;case"hour":d.ticks(h.Agd.every(t));break;case"day":d.ticks(h.UAC.every(t));break;case"week":d.ticks(It[n].every(t));break;case"month":d.ticks(h.Ui6.every(t))}}}if(g.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||a.topAxis){let n=(0,h.tlR)(v).tickSize(-s+e+a.gridLineStartPadding).tickFormat((0,h.DCK)(l));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],s=i.db.getWeekday()||a.weekday,r=v.domain();if($(r[0],r[1],t,e)<=Ft)switch(e){case"millisecond":n.ticks(h.t6C.every(t));break;case"second":n.ticks(h.ucG.every(t));break;case"minute":n.ticks(h.wXd.every(t));break;case"hour":n.ticks(h.Agd.every(t));break;case"day":n.ticks(h.UAC.every(t));break;case"week":n.ticks(It[s].every(t));break;case"month":n.ticks(h.Ui6.every(t))}}}g.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function D(t,e){let n=0;const i=Object.keys(k).map(t=>[t,k[t]]);g.append("g").selectAll("text").data(i).enter().append(function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i}).attr("x",10).attr("y",function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/2613.ac78cea0.js b/assets/js/2613.ac78cea0.js new file mode 100644 index 0000000..f6e70d9 --- /dev/null +++ b/assets/js/2613.ac78cea0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2613],{4994:(e,s,c)=>{c.d(s,{createPieServices:()=>p.f});var p=c(643);c(3580)}}]); \ No newline at end of file diff --git a/assets/js/2712.0002b7ed.js b/assets/js/2712.0002b7ed.js new file mode 100644 index 0000000..8b86f21 --- /dev/null +++ b/assets/js/2712.0002b7ed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2712],{2528:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(8894).K2)(r,"populateCommonDb")},2712:(t,e,a)=>{a.d(e,{diagram:()=>m});var r=a(6417),i=a(2528),s=a(2101),o=a(5691),n=a(8894),l=a(4419),c=o.UI.packet,d=class{constructor(){this.packet=[],this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,n.K2)(this,"PacketDB")}getConfig(){const t=(0,s.$t)({...c,...(0,o.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,o.IU)(),this.packet=[]}},p=(0,n.K2)((t,e)=>{(0,i.S)(t,e);let a=-1,r=[],s=1;const{bitsPerRow:o}=e.getConfig();for(let{start:i,end:l,bits:c,label:d}of t.blocks){if(void 0!==i&&void 0!==l&&l{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];const r=e*a-1,i=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),b={parser:{yy:void 0},parse:(0,n.K2)(async t=>{const e=await(0,l.qg)("packet",t),a=b.parser?.yy;if(!(a instanceof d))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");n.Rm.debug(e),p(e,a)},"parse")},k=(0,n.K2)((t,e,a,i)=>{const s=i.db,n=s.getConfig(),{rowHeight:l,paddingY:c,bitWidth:d,bitsPerRow:p}=n,h=s.getPacket(),b=s.getDiagramTitle(),k=l+c,f=k*(h.length+1)-(b?0:l),u=d*p+2,w=(0,r.D)(e);w.attr("viewBox",`0 0 ${u} ${f}`),(0,o.a$)(w,f,u,n.useMaxWidth);for(const[r,o]of h.entries())g(w,o,r,n);w.append("text").text(b).attr("x",u/2).attr("y",f-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),g=(0,n.K2)((t,e,a,{rowHeight:r,paddingX:i,paddingY:s,bitWidth:o,bitsPerRow:n,showBits:l})=>{const c=t.append("g"),d=a*(r+s)+s;for(const p of e){const t=p.start%n*o+1,e=(p.end-p.start+1)*o-i;if(c.append("rect").attr("x",t).attr("y",d).attr("width",e).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(p.label),!l)continue;const a=p.end===p.start,s=d-2;c.append("text").attr("x",t+(a?e/2:0)).attr("y",s).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(p.start),a||c.append("text").attr("x",t+e).attr("y",s).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(p.end)}},"drawWord"),f={draw:k},u={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},w=(0,n.K2)(({packet:t}={})=>{const e=(0,s.$t)(u,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),m={parser:b,get db(){return new d},renderer:f,styles:w}}}]); \ No newline at end of file diff --git a/assets/js/2725.454d74d5.js b/assets/js/2725.454d74d5.js new file mode 100644 index 0000000..f338a87 --- /dev/null +++ b/assets/js/2725.454d74d5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2725],{9195:(e,t,i)=>{i.d(t,{A:()=>r});i(63);var n=i(8573),o=i(5819),s=i(7172),a=i(199);function r(e){var t=e.className;return(0,a.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,a.jsx)("div",{className:"row",children:(0,a.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,a.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,a.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,a.jsx)("p",{children:(0,a.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2725:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});i(63);var n=i(5819),o=i(4315),s=i(4498),a=i(9195),r=i(199);function h(){var e=(0,n.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.be,{title:e}),(0,r.jsx)(s.A,{children:(0,r.jsx)(a.A,{})})]})}}}]); \ No newline at end of file diff --git a/assets/js/280f48ec.233dc95f.js b/assets/js/280f48ec.233dc95f.js new file mode 100644 index 0000000..81f850a --- /dev/null +++ b/assets/js/280f48ec.233dc95f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[787],{9344:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","source":"@site/docs/reference/scripts/sidecar-records.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/sidecar-records","permalink":"/reference/scripts/sidecar-records","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"},"next":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"}}');var s=t(199),a=t(2560);const c={},o="Procedure: Create Sidecar Records",i={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-sidecar-records",children:"Procedure: Create Sidecar Records"})}),"\n",(0,s.jsx)(r.p,{children:"Create two records with different collection NSIDs but the same rkey, linking them together by key."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = TID()\n\n local post = Record("xyz.statusphere.post", {\n text = input.text,\n createdAt = now(),\n })\n post:set_rkey(rkey)\n\n local metadata = Record("xyz.statusphere.postMetadata", {\n lang = input.lang or "en",\n source = input.source or "web",\n createdAt = now(),\n })\n metadata:set_rkey(rkey)\n\n Record.save_all({ post, metadata })\n\n return {\n post = { uri = post._uri, cid = post._cid },\n metadata = { uri = metadata._uri, cid = metadata._cid },\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Generate a single ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})})," to use as the rkey for both records."]}),"\n",(0,s.jsxs)(r.li,{children:["Create a ",(0,s.jsx)(r.code,{children:"Record"})," for each collection and call ",(0,s.jsx)(r.code,{children:"r:set_rkey()"})," with the shared rkey."]}),"\n",(0,s.jsxs)(r.li,{children:["Save both records in parallel with ",(0,s.jsx)(r.a,{href:"/reference/lua/record-api#static-methods",children:(0,s.jsx)(r.code,{children:"Record.save_all()"})}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return both URIs so the client knows the identity of each record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "lang": "en", "source": "web" }\'\n'})}),"\n",(0,s.jsx)(r.p,{children:"The response includes URIs for both the post and its metadata:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "post": {\n "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",\n "cid": "bafyrei..."\n },\n "metadata": {\n "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",\n "cid": "bafyrei..."\n }\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Sidecar records are useful when you want to associate related data across collections without embedding everything in a single record. Because they share an rkey, you can derive one URI from the other:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"at:// did:plc:abc /xyz.statusphere.post /3abc123\nat:// did:plc:abc /xyz.statusphere.postMetadata /3abc123\n ^^^^^^^ same rkey\n"})}),"\n",(0,s.jsx)(r.p,{children:"This is a common atproto pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection."})]})}function h(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},2560:(e,r,t)=>{t.d(r,{R:()=>c,x:()=>o});var n=t(63);const s={},a=n.createContext(s);function c(e){const r=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/280f48ec.8ce2f590.js b/assets/js/280f48ec.8ce2f590.js deleted file mode 100644 index 39a038e..0000000 --- a/assets/js/280f48ec.8ce2f590.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[787],{4796(e,r,t){t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","source":"@site/docs/reference/scripts/sidecar-records.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/sidecar-records","permalink":"/reference/scripts/sidecar-records","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"},"next":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"}}');var s=t(4848),a=t(8453);const c={},o="Procedure: Create Sidecar Records",i={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-sidecar-records",children:"Procedure: Create Sidecar Records"})}),"\n",(0,s.jsx)(r.p,{children:"Create two records with different collection NSIDs but the same rkey, linking them together by key."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = TID()\n\n local post = Record("xyz.statusphere.post", {\n text = input.text,\n createdAt = now(),\n })\n post:set_rkey(rkey)\n\n local metadata = Record("xyz.statusphere.postMetadata", {\n lang = input.lang or "en",\n source = input.source or "web",\n createdAt = now(),\n })\n metadata:set_rkey(rkey)\n\n Record.save_all({ post, metadata })\n\n return {\n post = { uri = post._uri, cid = post._cid },\n metadata = { uri = metadata._uri, cid = metadata._cid },\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Generate a single ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})})," to use as the rkey for both records."]}),"\n",(0,s.jsxs)(r.li,{children:["Create a ",(0,s.jsx)(r.code,{children:"Record"})," for each collection and call ",(0,s.jsx)(r.code,{children:"r:set_rkey()"})," with the shared rkey."]}),"\n",(0,s.jsxs)(r.li,{children:["Save both records in parallel with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.save_all()"})}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return both URIs so the client knows the identity of each record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "lang": "en", "source": "web" }\'\n'})}),"\n",(0,s.jsx)(r.p,{children:"The response includes URIs for both the post and its metadata:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "post": {\n "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",\n "cid": "bafyrei..."\n },\n "metadata": {\n "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",\n "cid": "bafyrei..."\n }\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Sidecar records are useful when you want to associate related data across collections without embedding everything in a single record. Because they share an rkey, you can derive one URI from the other:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"at:// did:plc:abc /xyz.statusphere.post /3abc123\nat:// did:plc:abc /xyz.statusphere.postMetadata /3abc123\n ^^^^^^^ same rkey\n"})}),"\n",(0,s.jsx)(r.p,{children:"This is a common AT Protocol pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection."})]})}function h(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var n=t(6540);const s={},a=n.createContext(s);function c(e){const r=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2821.25ddbeb7.js b/assets/js/2821.25ddbeb7.js deleted file mode 100644 index 751b5c6..0000000 --- a/assets/js/2821.25ddbeb7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2821],{5871(e,t,a){function l(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>l}),(0,a(797).K2)(l,"populateCommonDb")},1152(e,t,a){a.d(t,{P:()=>r});var l=a(7633),s=a(797),r=(0,s.K2)((e,t,a,r)=>{e.attr("class",a);const{width:o,height:c,x:d,y:p}=n(e,t);(0,l.a$)(e,c,o,r);const h=i(d,p,o,c,t);e.attr("viewBox",h),s.Rm.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),n=(0,s.K2)((e,t)=>{const a=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*t,height:a.height+2*t,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),i=(0,s.K2)((e,t,a,l,s)=>`${e-s} ${t-s} ${a} ${l}`,"createViewBox")},2821(e,t,a){a.d(t,{diagram:()=>v});var l=a(3590),s=a(1152),r=a(2387),n=a(5871),i=a(3226),o=a(7633),c=a(797),d=a(8731),p=a(451),h=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,c.K2)(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const e=o.UI,t=(0,o.zj)();return(0,i.$t)({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},l=t.replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");l&&l.forEach(e=>{(0,r.KX)(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){(0,o.IU)(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function m(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const l={name:e.name,children:"Leaf"===e.type?void 0:[]};for(l.classSelector=e?.classSelector,e?.cssCompiledStyles&&(l.cssCompiledStyles=[e.cssCompiledStyles]),"Leaf"===e.type&&void 0!==e.value&&(l.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(l);else{const e=a[a.length-1].node;e.children?e.children.push(l):e.children=[l]}"Leaf"!==e.type&&a.push({node:l,level:e.level})}),t}(0,c.K2)(m,"buildHierarchy");var y=(0,c.K2)((e,t)=>{(0,n.S)(e,t);const a=[];for(const r of e.TreemapRows??[])"ClassDefStatement"===r.$type&&t.addClass(r.className??"",r.styleText??"");for(const r of e.TreemapRows??[]){const e=r.item;if(!e)continue;const l=r.indent?parseInt(r.indent):0,s=f(e),n=e.classSelector?t.getStylesForClass(e.classSelector):[],i=n.length>0?n.join(";"):void 0,o={level:l,name:s,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:i};a.push(o)}const l=m(a),s=(0,c.K2)((e,a)=>{for(const l of e)t.addNode(l,a),l.children&&l.children.length>0&&s(l.children,a+1)},"addNodesRecursively");s(l,0)},"populate"),f=(0,c.K2)(e=>e.name?String(e.name):"","getItemName"),u={parser:{yy:void 0},parse:(0,c.K2)(async e=>{try{const t=d.qg,a=await t("treemap",e);c.Rm.debug("Treemap AST:",a);const l=u.parser?.yy;if(!(l instanceof h))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");y(a,l)}catch(t){throw c.Rm.error("Error parsing treemap:",t),t}},"parse")},S=10,g={draw:(0,c.K2)((e,t,a,n)=>{const i=n.db,d=i.getConfig(),h=d.padding??10,m=i.getDiagramTitle(),y=i.getRoot(),{themeVariables:f}=(0,o.zj)();if(!y)return;const u=m?30:0,g=(0,l.D)(t),x=d.nodeWidth?d.nodeWidth*S:960,b=d.nodeHeight?d.nodeHeight*S:500,v=x,$=b+u;let w;g.attr("viewBox",`0 0 ${v} ${$}`),(0,o.a$)(g,$,v,d.useMaxWidth);try{const e=d.valueFormat||",";if("$0,0"===e)w=(0,c.K2)(e=>"$"+(0,p.GPZ)(",")(e),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),a=t?t[0]:"";w=(0,c.K2)(e=>"$"+(0,p.GPZ)(","+a)(e),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);w=(0,c.K2)(e=>"$"+(0,p.GPZ)(t||"")(e),"valueFormat")}else w=(0,p.GPZ)(e)}catch(G){c.Rm.error("Error creating format function:",G),w=(0,p.GPZ)(",")}const C=(0,p.UMr)().range(["transparent",f.cScale0,f.cScale1,f.cScale2,f.cScale3,f.cScale4,f.cScale5,f.cScale6,f.cScale7,f.cScale8,f.cScale9,f.cScale10,f.cScale11]),L=(0,p.UMr)().range(["transparent",f.cScalePeer0,f.cScalePeer1,f.cScalePeer2,f.cScalePeer3,f.cScalePeer4,f.cScalePeer5,f.cScalePeer6,f.cScalePeer7,f.cScalePeer8,f.cScalePeer9,f.cScalePeer10,f.cScalePeer11]),k=(0,p.UMr)().range([f.cScaleLabel0,f.cScaleLabel1,f.cScaleLabel2,f.cScaleLabel3,f.cScaleLabel4,f.cScaleLabel5,f.cScaleLabel6,f.cScaleLabel7,f.cScaleLabel8,f.cScaleLabel9,f.cScaleLabel10,f.cScaleLabel11]);m&&g.append("text").attr("x",v/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(m);const T=g.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),M=(0,p.Sk5)(y).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),P=(0,p.hkb)().size([x,b]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?S:0).paddingRight(e=>e.children&&e.children.length>0?S:0).paddingBottom(e=>e.children&&e.children.length>0?S:0).round(!0)(M),z=P.descendants().filter(e=>e.children&&e.children.length>0),F=T.selectAll(".treemapSection").data(z).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);F.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),F.append("clipPath").attr("id",(e,a)=>`clip-section-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),F.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>C(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>L(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),F.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=(0,p.Ltv)(this),a=e.data.name;t.text(a);const l=e.x1-e.x0;let s;if(!1!==d.showValues&&e.value){s=l-10-30-10-6}else{s=l-6-6}const r=Math.max(15,s),n=t.node();if(n.getComputedTextLength()>r){const e="...";let l=a;for(;l.length>0;){if(l=a.substring(0,l.length-1),0===l.length){t.text(e),n.getComputedTextLength()>r&&t.text("");break}if(t.text(l+e),n.getComputedTextLength()<=r)break}}}),!1!==d.showValues&&F.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?w(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const K=P.leaves(),D=T.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);D.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?C(e.parent.data.name):C(e.data.name)).attr("style",e=>(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?C(e.parent.data.name):C(e.data.name)).attr("stroke-width",3),D.append("clipPath").attr("id",(e,a)=>`clip-${t}-${a}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4));if(D.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>"text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(e.data.name)+";"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.data.name).each(function(e){const t=(0,p.Ltv)(this),a=e.x1-e.x0,l=e.y1-e.y0,s=t.node(),r=a-8,n=l-8;if(r<10||n<10)return void t.style("display","none");let i=parseInt(t.style("font-size"),10);for(;s.getComputedTextLength()>r&&i>8;)i--,t.style("font-size",`${i}px`);let o=Math.max(6,Math.min(28,Math.round(.6*i))),c=i+2+o;for(;c>n&&i>8&&(i--,o=Math.max(6,Math.min(28,Math.round(.6*i))),!(o<6&&8===i));)t.style("font-size",`${i}px`),c=i+2+o;t.style("font-size",`${i}px`),(s.getComputedTextLength()>r||i<8||n(e.x1-e.x0)/2).attr("y",function(e){return(e.y1-e.y0)/2}).attr("style",e=>"text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(e.data.name)+";"+(0,r.GX)({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,a)=>`url(#clip-${t}-${a})`).text(e=>e.value?w(e.value):"").each(function(e){const t=(0,p.Ltv)(this),a=this.parentNode;if(!a)return void t.style("display","none");const l=(0,p.Ltv)(a).select(".treemapLabel");if(l.empty()||"none"===l.style("display"))return void t.style("display","none");const s=parseFloat(l.style("font-size")),r=Math.max(6,Math.min(28,Math.round(.6*s)));t.style("font-size",`${r}px`);const n=(e.y1-e.y0)/2+s/2+2;t.attr("y",n);const i=e.x1-e.x0,o=e.y1-e.y0-4,c=i-8;t.node().getComputedTextLength()>c||n+r>o||r<6?t.style("display","none"):t.style("display",null)})}const N=d.diagramPadding??8;(0,s.P)(g,N,"flowchart",d?.useMaxWidth||!1)},"draw"),getClasses:(0,c.K2)(function(e,t){return t.db.getClasses()},"getClasses")},x={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelColor:"black",labelFontSize:"12px",valueFontSize:"10px",valueColor:"black",titleColor:"black",titleFontSize:"14px"},b=(0,c.K2)(({treemap:e}={})=>{const t=(0,i.$t)(x,e);return`\n .treemapNode.section {\n stroke: ${t.sectionStrokeColor};\n stroke-width: ${t.sectionStrokeWidth};\n fill: ${t.sectionFillColor};\n }\n .treemapNode.leaf {\n stroke: ${t.leafStrokeColor};\n stroke-width: ${t.leafStrokeWidth};\n fill: ${t.leafFillColor};\n }\n .treemapLabel {\n fill: ${t.labelColor};\n font-size: ${t.labelFontSize};\n }\n .treemapValue {\n fill: ${t.valueColor};\n font-size: ${t.valueFontSize};\n }\n .treemapTitle {\n fill: ${t.titleColor};\n font-size: ${t.titleFontSize};\n }\n `},"getStyles"),v={parser:u,get db(){return new h},renderer:g,styles:b}}}]); \ No newline at end of file diff --git a/assets/js/2858.ccd0540d.js b/assets/js/2858.ccd0540d.js new file mode 100644 index 0000000..d41c6a3 --- /dev/null +++ b/assets/js/2858.ccd0540d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2858],{2858:(t,n,e)=>{e.d(n,{diagram:()=>ct});var i=e(5691),s=e(8894),r=e(1485);function o(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e>i||void 0===e&&i>=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e>s||void 0===e&&s>=s)&&(e=s)}return e}function c(t){return t.target.depth}function l(t,n){return t.sourceLinks.length?t.depth:n-1}function a(t,n){let e=0;if(void 0===n)for(let i of t)(i=+i)&&(e+=i);else{let i=-1;for(let s of t)(s=+n(s,++i,t))&&(e+=s)}return e}function h(t,n){let e;if(void 0===n)for(const i of t)null!=i&&(e=i)&&(e=i);else{let i=-1;for(let s of t)null!=(s=n(s,++i,t))&&(e=s)&&(e=s)}return e}function u(t){return function(){return t}}function f(t,n){return d(t.source,n.source)||t.index-n.index}function y(t,n){return d(t.target,n.target)||t.index-n.index}function d(t,n){return t.y0-n.y0}function p(t){return t.value}function g(t){return t.index}function _(t){return t.nodes}function k(t){return t.links}function x(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function m({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function v(){let t,n,e,i=0,s=0,r=1,c=1,v=24,b=8,w=g,L=l,S=_,E=k,K=6;function A(){const l={nodes:S.apply(null,arguments),links:E.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,s]of t.entries())s.index=e,s.sourceLinks=[],s.targetLinks=[];const i=new Map(t.map((n,e)=>[w(n,e,t),n]));for(const[e,s]of n.entries()){s.index=e;let{source:t,target:n}=s;"object"!=typeof t&&(t=s.source=x(i,t)),"object"!=typeof n&&(n=s.target=x(i,n)),t.sourceLinks.push(s),n.targetLinks.push(s)}if(null!=e)for(const{sourceLinks:s,targetLinks:r}of t)s.sort(e),r.sort(e)}(l),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(a(n.sourceLinks,p),a(n.targetLinks,p)):n.fixedValue}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.depth=s;for(const{target:n}of t.sourceLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,s=0;for(;e.size;){for(const t of e){t.height=s;for(const{source:n}of t.targetLinks)i.add(n)}if(++s>n)throw new Error("circular link");e=i,i=new Set}}(l),function(e){const l=function({nodes:t}){const e=h(t,t=>t.depth)+1,s=(r-i-v)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(L.call(null,n,e))));n.layer=t,n.x0=i+t*s,n.x1=n.x0+v,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(b,(c-s)/(h(l,t=>t.length)-1)),function(n){const e=o(n,n=>(c-s-(n.length-1)*t)/a(n,p));for(const i of n){let n=s;for(const s of i){s.y0=n,s.y1=n+s.value*e,n=s.y1+t;for(const t of s.sourceLinks)t.width=t.value*e}n=(c-n+t)/(i.length+1);for(let t=0;t0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function I(t,e,i){for(let s=t.length-2;s>=0;--s){const r=t[s];for(const t of r){let n=0,i=0;for(const{target:e,value:r}of t.sourceLinks){let s=r*(e.layer-t.layer);n+=$(t,e)*s,i+=s}if(!(i>0))continue;let s=(n/i-t.y0)*e;t.y0+=s,t.y1+=s,P(t)}void 0===n&&r.sort(d),T(r,i)}}function T(n,e){const i=n.length>>1,r=n[i];N(n,r.y0-t,i-1,e),D(n,r.y1+t,i+1,e),N(n,c,n.length-1,e),D(n,s,0,e)}function D(n,e,i,s){for(;i1e-6&&(r.y0+=o,r.y1+=o),e=r.y1+t}}function N(n,e,i,s){for(;i>=0;--i){const r=n[i],o=(r.y1-e)*s;o>1e-6&&(r.y0-=o,r.y1-=o),e=r.y0-t}}function P({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(y);for(const{target:{targetLinks:n}}of t)n.sort(f)}}function C(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(y),e.sort(f)}function O(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:s,width:r}of n.sourceLinks){if(s===e)break;i+=r+t}for(const{source:t,width:s}of e.targetLinks){if(t===n)break;i-=s}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:s,width:r}of e.targetLinks){if(s===n)break;i+=r+t}for(const{target:t,width:s}of n.sourceLinks){if(t===e)break;i-=s}return i}return A.update=function(t){return m(t),t},A.nodeId=function(t){return arguments.length?(w="function"==typeof t?t:u(t),A):w},A.nodeAlign=function(t){return arguments.length?(L="function"==typeof t?t:u(t),A):L},A.nodeSort=function(t){return arguments.length?(n=t,A):n},A.nodeWidth=function(t){return arguments.length?(v=+t,A):v},A.nodePadding=function(n){return arguments.length?(b=t=+n,A):b},A.nodes=function(t){return arguments.length?(S="function"==typeof t?t:u(t),A):S},A.links=function(t){return arguments.length?(E="function"==typeof t?t:u(t),A):E},A.linkSort=function(t){return arguments.length?(e=t,A):e},A.size=function(t){return arguments.length?(i=s=0,r=+t[0],c=+t[1],A):[r-i,c-s]},A.extent=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],s=+t[0][1],c=+t[1][1],A):[[i,s],[r,c]]},A.iterations=function(t){return arguments.length?(K=+t,A):K},A}var b=Math.PI,w=2*b,L=1e-6,S=w-L;function E(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function K(){return new E}E.prototype=K.prototype={constructor:E,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,s,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+s)+","+(this._y1=+r)},arcTo:function(t,n,e,i,s){t=+t,n=+n,e=+e,i=+i,s=+s;var r=this._x1,o=this._y1,c=e-t,l=i-n,a=r-t,h=o-n,u=a*a+h*h;if(s<0)throw new Error("negative radius: "+s);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>L)if(Math.abs(h*c-l*a)>L&&s){var f=e-r,y=i-o,d=c*c+l*l,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),k=s*Math.tan((b-Math.acos((d+u-p)/(2*g*_)))/2),x=k/_,m=k/g;Math.abs(x-1)>L&&(this._+="L"+(t+x*a)+","+(n+x*h)),this._+="A"+s+","+s+",0,0,"+ +(h*f>a*y)+","+(this._x1=t+m*c)+","+(this._y1=n+m*l)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,s,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),c=e*Math.sin(i),l=t+o,a=n+c,h=1^r,u=r?i-s:s-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+a:(Math.abs(this._x1-l)>L||Math.abs(this._y1-a)>L)&&(this._+="L"+l+","+a),e&&(u<0&&(u=u%w+w),u>S?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-c)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=a):u>L&&(this._+="A"+e+","+e+",0,"+ +(u>=b)+","+h+","+(this._x1=t+e*Math.cos(s))+","+(this._y1=n+e*Math.sin(s))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};const A=K;var M=Array.prototype.slice;function I(t){return function(){return t}}function T(t){return t[0]}function D(t){return t[1]}function N(t){return t.source}function P(t){return t.target}function C(t){var n=N,e=P,i=T,s=D,r=null;function o(){var o,c=M.call(arguments),l=n.apply(this,c),a=e.apply(this,c);if(r||(r=o=A()),t(r,+i.apply(this,(c[0]=l,c)),+s.apply(this,c),+i.apply(this,(c[0]=a,c)),+s.apply(this,c)),o)return r=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:I(+t),o):i},o.y=function(t){return arguments.length?(s="function"==typeof t?t:I(+t),o):s},o.context=function(t){return arguments.length?(r=null==t?null:t,o):r},o}function O(t,n,e,i,s){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,s,i,s)}function $(t){return[t.source.x1,t.y0]}function j(t){return[t.target.x0,t.y1]}function z(){return C(O).source($).target(j)}var U=function(){var t=(0,s.K2)(function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e},"o"),n=[1,9],e=[1,10],i=[1,5,10,12],r={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:(0,s.K2)(function(t,n,e,i,s,r,o){var c=r.length-1;switch(s){case 7:const t=i.findOrCreateNode(r[c-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(r[c-2].trim().replaceAll('""','"')),e=parseFloat(r[c].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=r[c];break;case 10:this.$=r[c-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:(0,s.K2)(function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var n=this,e=[0],i=[],r=[null],o=[],c=this.table,l="",a=0,h=0,u=0,f=o.slice.call(arguments,1),y=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);y.setInput(t,d.yy),d.yy.lexer=y,d.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;o.push(g);var _=y.options&&y.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||y.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){e.length=e.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),(0,s.K2)(k,"lex");for(var x,m,v,b,w,L,S,E,K,A={};;){if(v=e[e.length-1],this.defaultActions[v]?b=this.defaultActions[v]:(null==x&&(x=k()),b=c[v]&&c[v][x]),void 0===b||!b.length||!b[0]){var M="";for(L in K=[],c[v])this.terminals_[L]&&L>2&&K.push("'"+this.terminals_[L]+"'");M=y.showPosition?"Parse error on line "+(a+1)+":\n"+y.showPosition()+"\nExpecting "+K.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==x?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(M,{text:y.match,token:this.terminals_[x]||x,line:y.yylineno,loc:g,expected:K})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+x);switch(b[0]){case 1:e.push(x),r.push(y.yytext),o.push(y.yylloc),e.push(b[1]),x=null,m?(x=m,m=null):(h=y.yyleng,l=y.yytext,a=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[b[1]][1],A.$=r[r.length-S],A._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},_&&(A._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(w=this.performAction.apply(A,[l,h,a,d.yy,b[1],r,o].concat(f))))return w;S&&(e=e.slice(0,-1*S*2),r=r.slice(0,-1*S),o=o.slice(0,-1*S)),e.push(this.productions_[b[1]][0]),r.push(A.$),o.push(A._$),E=c[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0},"parse")},o=function(){return{EOF:1,parseError:(0,s.K2)(function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},"parseError"),setInput:(0,s.K2)(function(t,n){return this.yy=n||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},"showPosition"),test_match:(0,s.K2)(function(t,n){var e,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;rn[0].length)){if(n=e,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,s[r])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,n,e,i){switch(e){case 0:case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}}();function c(){this.yy={}}return r.lexer=o,(0,s.K2)(c,"Parser"),c.prototype=r,r.Parser=c,new c}();U.parser=U;var F=U,W=[],G=[],V=new Map,X=(0,s.K2)(()=>{W=[],G=[],V=new Map,(0,i.IU)()},"clear"),Y=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}static{(0,s.K2)(this,"SankeyLink")}},q=(0,s.K2)((t,n,e)=>{W.push(new Y(t,n,e))},"addLink"),Q=class{constructor(t){this.ID=t}static{(0,s.K2)(this,"SankeyNode")}},R=(0,s.K2)(t=>{t=i.Y2.sanitizeText(t,(0,i.D7)());let n=V.get(t);return void 0===n&&(n=new Q(t),V.set(t,n),G.push(n)),n},"findOrCreateNode"),B=(0,s.K2)(()=>G,"getNodes"),Z=(0,s.K2)(()=>W,"getLinks"),H=(0,s.K2)(()=>({nodes:G.map(t=>({id:t.ID})),links:W.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),J={nodesMap:V,getConfig:(0,s.K2)(()=>(0,i.D7)().sankey,"getConfig"),getNodes:B,getLinks:Z,getGraph:H,addLink:q,findOrCreateNode:R,getAccTitle:i.iN,setAccTitle:i.SV,getAccDescription:i.m7,setAccDescription:i.EI,getDiagramTitle:i.ab,setDiagramTitle:i.ke,clear:X},tt=class t{static{(0,s.K2)(this,"Uid")}static{this.count=0}static next(n){return new t(n+ ++t.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},nt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o(t.sourceLinks,c)-1:0},justify:l},et=(0,s.K2)(function(t,n,e,o){const{securityLevel:c,sankey:l}=(0,i.D7)(),a=i.ME.sankey;let h;"sandbox"===c&&(h=(0,r.Ltv)("#i"+n));const u="sandbox"===c?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),f="sandbox"===c?u.select(`[id="${n}"]`):(0,r.Ltv)(`[id="${n}"]`),y=l?.width??a.width,d=l?.height??a.width,p=l?.useMaxWidth??a.useMaxWidth,g=l?.nodeAlignment??a.nodeAlignment,_=l?.prefix??a.prefix,k=l?.suffix??a.suffix,x=l?.showValues??a.showValues,m=o.db.getGraph(),b=nt[g];v().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(x?15:0)).nodeAlign(b).extent([[0,0],[y,d]])(m);const w=(0,r.UMr)(r.zt);f.append("g").attr("class","nodes").selectAll(".node").data(m.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=tt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>w(t.id));const L=(0,s.K2)(({id:t,value:n})=>x?`${t}\n${_}${Math.round(100*n)/100}${k}`:t,"getText");f.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(m.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",(x?"0":"0.35")+"em").attr("text-anchor",t=>t.x0(t.uid=tt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0);t.append("stop").attr("offset","0%").attr("stop-color",t=>w(t.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",t=>w(t.target.id))}let K;switch(E){case"gradient":K=(0,s.K2)(t=>t.uid,"coloring");break;case"source":K=(0,s.K2)(t=>w(t.source.id),"coloring");break;case"target":K=(0,s.K2)(t=>w(t.target.id),"coloring");break;default:K=E}S.append("path").attr("d",z()).attr("stroke",K).attr("stroke-width",t=>Math.max(1,t.width)),(0,i.ot)(void 0,f,0,p)},"draw"),it={draw:et},st=(0,s.K2)(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim(),"prepareTextForParsing"),rt=(0,s.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n }`,"getStyles"),ot=F.parse.bind(F);F.parse=t=>ot(st(t));var ct={styles:rt,parser:F,db:J,renderer:it}}}]); \ No newline at end of file diff --git a/assets/js/291.e48169fe.js b/assets/js/291.e48169fe.js deleted file mode 100644 index 54b857b..0000000 --- a/assets/js/291.e48169fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[291],{291(t,e,n){n.d(e,{diagram:()=>Y});var i=n(7633),s=n(797),r=n(451),a=n(3219),o=n(8041),c=n(5263),l=function(){var t=(0,s.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],r=[1,11],a=[1,12],o=[1,13],c=[1,16],l=[1,17],h={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:(0,s.K2)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:i,14:r,16:a,17:o,18:14,19:15,20:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(x,"lex");for(var b,k,_,w,v,K,S,$,E,T={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==b&&(b=x()),w=o[_]&&o[_][b]),void 0===w||!w.length||!w[0]){var I="";for(K in E=[],o[_])this.terminals_[K]&&K>2&&E.push("'"+this.terminals_[K]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+b);switch(w[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(w[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(S=this.productions_[w[1]][1],T.$=r[r.length-S],T._$={first_line:a[a.length-(S||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(S||1)].first_column,last_column:a[a.length-1].last_column},m&&(T._$.range=[a[a.length-(S||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(T,[c,h,l,y.yy,w[1],r,a].concat(u))))return v;S&&(n=n.slice(0,-1*S*2),r=r.slice(0,-1*S),a=a.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),r.push(T.$),a.push(T._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},d=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,s.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();l.parser=l;var h=l,d={};(0,s.VA)(d,{addEvent:()=>v,addSection:()=>b,addTask:()=>w,addTaskOrg:()=>K,clear:()=>x,default:()=>$,getCommonDb:()=>m,getSections:()=>k,getTasks:()=>_});var u="",p=0,y=[],g=[],f=[],m=(0,s.K2)(()=>i.Wt,"getCommonDb"),x=(0,s.K2)(function(){y.length=0,g.length=0,u="",f.length=0,(0,i.IU)()},"clear"),b=(0,s.K2)(function(t){u=t,y.push(t)},"addSection"),k=(0,s.K2)(function(){return y},"getSections"),_=(0,s.K2)(function(){let t=S();let e=0;for(;!t&&e<100;)t=S(),e++;return g.push(...f),g},"getTasks"),w=(0,s.K2)(function(t,e,n){const i={id:p++,section:u,type:u,task:t,score:e||0,events:n?[n]:[]};f.push(i)},"addTask"),v=(0,s.K2)(function(t){f.find(t=>t.id===p-1).events.push(t)},"addEvent"),K=(0,s.K2)(function(t){const e={section:u,type:u,description:t,task:t,classes:[]};g.push(e)},"addTaskOrg"),S=(0,s.K2)(function(){const t=(0,s.K2)(function(t){return f[t].processed},"compileTask");let e=!0;for(const[n,i]of f.entries())t(n),e=e&&i.processed;return e},"compileTasks"),$={clear:x,getCommonDb:m,addSection:b,getSections:k,getTasks:_,addTask:w,addTaskOrg:K,addEvent:v},E=(0,s.K2)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),T=(0,s.K2)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),a=t.append("g");function o(t){const i=(0,r.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function c(t){const i=(0,r.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return a.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(o,"smile"),(0,s.K2)(c,"sad"),(0,s.K2)(l,"ambivalent"),e.score>3?o(a):e.score<3?c(a):l(a),i},"drawFace"),I=(0,s.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),R=(0,s.K2)(function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(n),i},"drawText"),A=(0,s.K2)(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,R(t,e)},"drawLabel"),L=(0,s.K2)(function(t,e,n){const i=t.append("g"),s=H();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="journey-section section-type-"+e.num,s.rx=3,s.ry=3,E(i,s),O(n)(e.text,i,s.x,s.y,s.width,s.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),M=-1,C=(0,s.K2)(function(t,e,n){const i=e.x+n.width/2,s=t.append("g");M++;s.append("line").attr("id","task"+M).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),T(s,{cx:i,cy:300+30*(5-e.score),score:e.score});const r=H();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="task task-type-"+e.num,r.rx=3,r.ry=3,E(s,r),O(n)(e.task,s,r.x,r.y,r.width,r.height,{class:"task"},n,e.colour)},"drawTask"),N=(0,s.K2)(function(t,e){E(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),P=(0,s.K2)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),H=(0,s.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),O=function(){function t(t,e,n,s,r,a,o,c){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let p=0;p)/).reverse(),s=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let r=0;re||"
    "===t)&&(s.pop(),c.text(s.join(" ").trim()),s="
    "===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,s.K2)(D,"wrap");var z=(0,s.K2)(function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(D,e.width).node().getBBox(),l=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),B(a,e,s,i),e},"drawNode"),W=(0,s.K2)(function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(D,e.width).node().getBBox(),r=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),B=(0,s.K2)(function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),F={drawRect:E,drawCircle:I,drawSection:L,drawText:R,drawLabel:A,drawTask:C,drawBackgroundRect:N,getTextObj:P,getNoteRect:H,initGraphics:j,drawNode:z,getVirtualNodeHeight:W},V=(0,s.K2)(function(t,e,n,a){const o=(0,i.D7)(),c=o.timeline?.leftMargin??50;s.Rm.debug("timeline",a.db);const l=o.securityLevel;let h;"sandbox"===l&&(h=(0,r.Ltv)("#i"+e));const d=("sandbox"===l?(0,r.Ltv)(h.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select("#"+e);d.append("g");const u=a.db.getTasks(),p=a.db.getCommonDb().getDiagramTitle();s.Rm.debug("task",u),F.initGraphics(d);const y=a.db.getSections();s.Rm.debug("sections",y);let g=0,f=0,m=0,x=0,b=50+c,k=50;x=50;let _=0,w=!0;y.forEach(function(t){const e={number:_,descr:t,section:_,width:150,padding:20,maxHeight:g},n=F.getVirtualNodeHeight(d,e,o);s.Rm.debug("sectionHeight before draw",n),g=Math.max(g,n+20)});let v=0,K=0;s.Rm.debug("tasks.length",u.length);for(const[i,r]of u.entries()){const t={number:i,descr:r,section:r.section,width:150,padding:20,maxHeight:f},e=F.getVirtualNodeHeight(d,t,o);s.Rm.debug("taskHeight before draw",e),f=Math.max(f,e+20),v=Math.max(v,r.events.length);let n=0;for(const i of r.events){const t={descr:i,section:r.section,number:r.section,width:150,padding:20,maxHeight:50};n+=F.getVirtualNodeHeight(d,t,o)}r.events.length>0&&(n+=10*(r.events.length-1)),K=Math.max(K,n)}s.Rm.debug("maxSectionHeight before draw",g),s.Rm.debug("maxTaskHeight before draw",f),y&&y.length>0?y.forEach(t=>{const e=u.filter(e=>e.section===t),n={number:_,descr:t,section:_,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:g};s.Rm.debug("sectionNode",n);const i=d.append("g"),r=F.drawNode(i,n,_,o);s.Rm.debug("sectionNode output",r),i.attr("transform",`translate(${b}, 50)`),k+=g+50,e.length>0&&G(d,e,_,b,k,f,o,v,K,g,!1),b+=200*Math.max(e.length,1),k=50,_++}):(w=!1,G(d,u,_,b,k,f,o,v,K,g,!0));const S=d.node().getBBox();s.Rm.debug("bounds",S),p&&d.append("text").text(p).attr("x",S.width/2-c).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),m=w?g+f+150:f+100;d.append("g").attr("class","lineWrapper").append("line").attr("x1",c).attr("y1",m).attr("x2",S.width+3*c).attr("y2",m).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.ot)(void 0,d,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},"draw"),G=(0,s.K2)(function(t,e,n,i,r,a,o,c,l,h,d){for(const u of e){const e={descr:u.task,section:n,number:n,width:150,padding:20,maxHeight:a};s.Rm.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),h=F.drawNode(c,e,n,o).height;if(s.Rm.debug("taskHeight after draw",h),c.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,h),u.events){const e=t.append("g").attr("class","lineWrapper");let s=a;r+=100,s+=U(t,u.events,n,i,r,o),r-=100,e.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}i+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10},"drawTasks"),U=(0,s.K2)(function(t,e,n,i,r,a){let o=0;const c=r;r+=100;for(const l of e){const e={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};s.Rm.debug("eventNode",e);const c=t.append("g").attr("class","eventWrapper"),h=F.drawNode(c,e,n,a).height;o+=h,c.attr("transform",`translate(${i}, ${r})`),r=r+10+h}return r=c,o},"drawEvents"),q={setConf:(0,s.K2)(()=>{},"setConf"),draw:V},J=(0,s.K2)(t=>{let e="";for(let n=0;n`\n .edge {\n stroke-width: 3;\n }\n ${J(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/2913.df9d075c.js b/assets/js/2913.df9d075c.js new file mode 100644 index 0000000..a224cd2 --- /dev/null +++ b/assets/js/2913.df9d075c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2913],{2913:(t,e,i)=>{i.d(e,{diagram:()=>I});var a=i(5691),n=i(8894),s=i(1485),r=function(){var t=(0,n.K2)(function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i},"o"),e=[1,3],i=[1,4],a=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],C=[1,28],L=[1,29],v=[1,32],I=[1,33],E=[1,34],D=[1,39],z=[1,40],w=[1,42],K=[1,44],U=[1,62],N=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],B=[1,65],W=[1,66],$=[1,67],Q=[1,68],O=[1,69],X=[1,70],H=[1,71],M=[1,72],Y=[1,73],j=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:(0,n.K2)(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:(0,n.K2)(function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" \u27f6 ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" \u27f6 ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}},"anonymous"),table:[{18:e,26:1,27:2,28:i,55:a,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:i,55:a,56:s,57:r},{18:e,26:9,27:2,28:i,55:a,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(o,[2,34]),{27:45,55:a,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:C,54:L,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:v,61:I,63:E,64:D,65:z,66:w,67:K},{4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,44:[1,57],47:[1,58],58:60,59:59,63:E,64:D,65:z,66:w,67:K},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,77],63:E,64:D,65:z,66:w,67:K}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,49:[1,78],63:E,64:D,65:z,66:w,67:K}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:B,5:W,6:$,7:Q,8:O,9:X,10:H,11:M,12:Y,13:j,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:v,61:I,63:E,64:D,65:z,66:w,67:K}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:U,10:x,12:g,13:f,14:p,18:N,63:E,64:D,65:z,66:w,67:K}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:(0,n.K2)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,n.K2)(function(t){var e=this,i=[0],a=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=0,u=r.slice.call(arguments,1),x=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);x.setInput(t,g.yy),g.yy.lexer=x,g.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var p=x.yylloc;r.push(p);var y=x.options&&x.options.ranges;function T(){var t;return"number"!=typeof(t=a.pop()||x.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,n.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,n.K2)(T,"lex");for(var m,q,A,_,b,S,k,F,P,C={};;){if(A=i[i.length-1],this.defaultActions[A]?_=this.defaultActions[A]:(null==m&&(m=T()),_=o[A]&&o[A][m]),void 0===_||!_.length||!_[0]){var L="";for(S in P=[],o[A])this.terminals_[S]&&S>2&&P.push("'"+this.terminals_[S]+"'");L=x.showPosition?"Parse error on line "+(h+1)+":\n"+x.showPosition()+"\nExpecting "+P.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[m]||m,line:x.yylineno,loc:p,expected:P})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(_[0]){case 1:i.push(m),s.push(x.yytext),r.push(x.yylloc),i.push(_[1]),m=null,q?(m=q,q=null):(c=x.yyleng,l=x.yytext,h=x.yylineno,p=x.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[_[1]][1],C.$=s[s.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},y&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,c,h,g.yy,_[1],s,r].concat(u))))return b;k&&(i=i.slice(0,-1*k*2),s=s.slice(0,-1*k),r=r.slice(0,-1*k)),i.push(this.productions_[_[1]][0]),s.push(C.$),r.push(C._$),F=o[i[i.length-2]][i[i.length-1]],i.push(F);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,n.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,n.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,n.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,n.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,n.K2)(function(){return this._more=!0,this},"more"),reject:(0,n.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,n.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,n.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,n.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,n.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,n.K2)(function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1},"test_match"),next:(0,n.K2)(function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;se[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,n.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,n.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,n.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,n.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,n.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,n.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,n.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,n.K2)(function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,(0,n.K2)(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();r.parser=r;var o=r,l=(0,a.P$)(),h=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{(0,n.K2)(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:a.UI.quadrantChart?.chartWidth||500,chartWidth:a.UI.quadrantChart?.chartHeight||500,titlePadding:a.UI.quadrantChart?.titlePadding||10,titleFontSize:a.UI.quadrantChart?.titleFontSize||20,quadrantPadding:a.UI.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:a.UI.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:a.UI.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:a.UI.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:a.UI.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:a.UI.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:a.UI.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:a.UI.quadrantChart?.pointTextPadding||5,pointLabelFontSize:a.UI.quadrantChart?.pointLabelFontSize||12,pointRadius:a.UI.quadrantChart?.pointRadius||5,xAxisPosition:a.UI.quadrantChart?.xAxisPosition||"top",yAxisPosition:a.UI.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:a.UI.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:l.quadrant1Fill,quadrant2Fill:l.quadrant2Fill,quadrant3Fill:l.quadrant3Fill,quadrant4Fill:l.quadrant4Fill,quadrant1TextFill:l.quadrant1TextFill,quadrant2TextFill:l.quadrant2TextFill,quadrant3TextFill:l.quadrant3TextFill,quadrant4TextFill:l.quadrant4TextFill,quadrantPointFill:l.quadrantPointFill,quadrantPointTextFill:l.quadrantPointTextFill,quadrantXAxisTextFill:l.quadrantXAxisTextFill,quadrantYAxisTextFill:l.quadrantYAxisTextFill,quadrantTitleFill:l.quadrantTitleFill,quadrantInternalBorderStrokeFill:l.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:l.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,n.Rm.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){n.Rm.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){n.Rm.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:r}=e,o=(0,s.m4Y)().domain([0,1]).range([a,r+a]),l=(0,s.m4Y)().domain([0,1]).range([i+n,n]);return this.data.points.map(t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:o(t.x),y:l(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:o(t.x),y:l(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},c=class extends Error{static{(0,n.K2)(this,"InvalidStyleError")}constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}};function d(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function u(t){return!/^\d+$/.test(t)}function x(t){return!/^\d+px$/.test(t)}(0,n.K2)(d,"validateHexCode"),(0,n.K2)(u,"validateNumber"),(0,n.K2)(x,"validateSizeInPixels");var g=(0,a.D7)();function f(t){return(0,a.jZ)(t.trim(),g)}(0,n.K2)(f,"textSanitizer");var p=new h;function y(t){p.setData({quadrant1Text:f(t.text)})}function T(t){p.setData({quadrant2Text:f(t.text)})}function m(t){p.setData({quadrant3Text:f(t.text)})}function q(t){p.setData({quadrant4Text:f(t.text)})}function A(t){p.setData({xAxisLeftText:f(t.text)})}function _(t){p.setData({xAxisRightText:f(t.text)})}function b(t){p.setData({yAxisTopText:f(t.text)})}function S(t){p.setData({yAxisBottomText:f(t.text)})}function k(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(u(a))throw new c(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(d(a))throw new c(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(d(a))throw new c(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(x(a))throw new c(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function F(t,e,i,a,n){const s=k(n);p.addPoints([{x:i,y:a,text:f(t.text),className:e,...s}])}function P(t,e){p.addClass(t,k(e))}function C(t){p.setConfig({chartWidth:t})}function L(t){p.setConfig({chartHeight:t})}function v(){const t=(0,a.D7)(),{themeVariables:e,quadrantChart:i}=t;return i&&p.setConfig(i),p.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),p.setData({titleText:(0,a.ab)()}),p.build()}(0,n.K2)(y,"setQuadrant1Text"),(0,n.K2)(T,"setQuadrant2Text"),(0,n.K2)(m,"setQuadrant3Text"),(0,n.K2)(q,"setQuadrant4Text"),(0,n.K2)(A,"setXAxisLeftText"),(0,n.K2)(_,"setXAxisRightText"),(0,n.K2)(b,"setYAxisTopText"),(0,n.K2)(S,"setYAxisBottomText"),(0,n.K2)(k,"parseStyles"),(0,n.K2)(F,"addPoint"),(0,n.K2)(P,"addClass"),(0,n.K2)(C,"setWidth"),(0,n.K2)(L,"setHeight"),(0,n.K2)(v,"getQuadrantData");var I={parser:o,db:{setWidth:C,setHeight:L,setQuadrant1Text:y,setQuadrant2Text:T,setQuadrant3Text:m,setQuadrant4Text:q,setXAxisLeftText:A,setXAxisRightText:_,setYAxisTopText:b,setYAxisBottomText:S,parseStyles:k,addPoint:F,addClass:P,getQuadrantData:v,clear:(0,n.K2)(function(){p.clear(),(0,a.IU)()},"clear"),setAccTitle:a.SV,getAccTitle:a.iN,setDiagramTitle:a.ke,getDiagramTitle:a.ab,getAccDescription:a.m7,setAccDescription:a.EI},renderer:{draw:(0,n.K2)((t,e,i,r)=>{function o(t){return"top"===t?"hanging":"middle"}function l(t){return"left"===t?"start":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,n.K2)(o,"getDominantBaseLine"),(0,n.K2)(l,"getTextAnchor"),(0,n.K2)(h,"getTransformation");const c=(0,a.D7)();n.Rm.debug("Rendering quadrant chart\n"+t);const d=c.securityLevel;let u;"sandbox"===d&&(u=(0,s.Ltv)("#i"+e));const x=("sandbox"===d?(0,s.Ltv)(u.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${e}"]`),g=x.append("g").attr("class","main"),f=c.quadrantChart?.chartWidth??500,p=c.quadrantChart?.chartHeight??500;(0,a.a$)(x,p,f,c.quadrantChart?.useMaxWidth??!0),x.attr("viewBox","0 0 "+f+" "+p),r.db.setHeight(p),r.db.setWidth(f);const y=r.db.getQuadrantData(),T=g.append("g").attr("class","quadrants"),m=g.append("g").attr("class","border"),q=g.append("g").attr("class","data-points"),A=g.append("g").attr("class","labels"),_=g.append("g").attr("class","title");y.title&&_.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",o(y.title.horizontalPos)).attr("text-anchor",l(y.title.verticalPos)).attr("transform",h(y.title)).text(y.title.text),y.borderLines&&m.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const b=T.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");b.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),b.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>h(t.text)).text(t=>t.text.text);A.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.horizontalPos)).attr("text-anchor",t=>l(t.verticalPos)).attr("transform",t=>h(t));const S=q.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");S.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),S.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>o(t.text.horizontalPos)).attr("text-anchor",t=>l(t.text.verticalPos)).attr("transform",t=>h(t.text))},"draw")},styles:(0,n.K2)(()=>"","styles")}}}]); \ No newline at end of file diff --git a/assets/js/2a23be56.6aa8c0c8.js b/assets/js/2a23be56.6aa8c0c8.js new file mode 100644 index 0000000..feb9db4 --- /dev/null +++ b/assets/js/2a23be56.6aa8c0c8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[339],{9493:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"guides/sqlite-to-postgres-migration","title":"Migrating from SQLite to Postgres","description":"This guide covers migrating an existing HappyView deployment from SQLite to Postgres. If you are staying on SQLite, no action is required.","source":"@site/docs/guides/sqlite-to-postgres-migration.md","sourceDirName":"guides","slug":"/guides/sqlite-to-postgres-migration","permalink":"/guides/sqlite-to-postgres-migration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Postgres \u2192 SQLite Migration","permalink":"/guides/postgres-to-sqlite-migration"},"next":{"title":"Overview","permalink":"/sdk/overview"}}');var n=s(199),r=s(2560);const a={},o="Migrating from SQLite to Postgres",d={},l=[{value:"Overview",id:"overview",level:2},{value:"Step 1: Set up Postgres",id:"step-1-set-up-postgres",level:2},{value:"Step 2: Back up your SQLite database",id:"step-2-back-up-your-sqlite-database",level:2},{value:"Step 3: Update environment variables",id:"step-3-update-environment-variables",level:2},{value:"Step 4: Start HappyView",id:"step-4-start-happyview",level:2},{value:"Step 5: Re-index your data",id:"step-5-re-index-your-data",level:2},{value:"Step 6: Re-create admin settings",id:"step-6-re-create-admin-settings",level:2},{value:"Lua scripts",id:"lua-scripts",level:2},{value:"Rollback",id:"rollback",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"migrating-from-sqlite-to-postgres",children:"Migrating from SQLite to Postgres"})}),"\n",(0,n.jsx)(t.p,{children:"This guide covers migrating an existing HappyView deployment from SQLite to Postgres. If you are staying on SQLite, no action is required."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsxs)(t.p,{children:["HappyView writes all internal SQL in SQLite syntax and translates to Postgres automatically at runtime. This means your ",(0,n.jsx)(t.strong,{children:"Lua scripts do not need any changes"})," when switching from SQLite to Postgres \u2014 they continue to work as-is."]}),"\n",(0,n.jsx)(t.p,{children:"The main steps are: set up the Postgres database, update your environment variables, and re-index your data."}),"\n",(0,n.jsx)(t.h2,{id:"step-1-set-up-postgres",children:"Step 1: Set up Postgres"}),"\n",(0,n.jsx)(t.p,{children:"Create a Postgres database for HappyView:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,n.jsxs)(t.p,{children:["If you are using Docker Compose, uncomment the ",(0,n.jsx)(t.code,{children:"postgres"})," service and ",(0,n.jsx)(t.code,{children:"pgdata"})," volume in your ",(0,n.jsx)(t.code,{children:"docker-compose.yml"}),". See the ",(0,n.jsx)(t.a,{href:"/guides/database-setup#docker-compose",children:"database setup guide"})," for details."]}),"\n",(0,n.jsx)(t.h2,{id:"step-2-back-up-your-sqlite-database",children:"Step 2: Back up your SQLite database"}),"\n",(0,n.jsx)(t.p,{children:"Copy your SQLite database file before making any changes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"cp data/happyview.db data/happyview.db.backup\n"})}),"\n",(0,n.jsx)(t.h2,{id:"step-3-update-environment-variables",children:"Step 3: Update environment variables"}),"\n",(0,n.jsxs)(t.p,{children:["Change your ",(0,n.jsx)(t.code,{children:".env"})," to use Postgres:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"# Before\nDATABASE_URL=sqlite://data/happyview.db?mode=rwc\n\n# After\nDATABASE_URL=postgres://happyview:happyview@localhost/happyview\n"})}),"\n",(0,n.jsxs)(t.p,{children:["If you had ",(0,n.jsx)(t.code,{children:"DATABASE_BACKEND"})," set, update it as well:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"DATABASE_BACKEND=postgres\n"})}),"\n",(0,n.jsx)(t.h2,{id:"step-4-start-happyview",children:"Step 4: Start HappyView"}),"\n",(0,n.jsxs)(t.p,{children:["Start HappyView with the new ",(0,n.jsx)(t.code,{children:"DATABASE_URL"}),". It will connect to Postgres and run migrations automatically, creating all necessary tables."]}),"\n",(0,n.jsx)(t.h2,{id:"step-5-re-index-your-data",children:"Step 5: Re-index your data"}),"\n",(0,n.jsx)(t.p,{children:"Since HappyView indexes records from the atproto network, the simplest way to populate your new Postgres database is to re-run the backfill:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"Upload your lexicons via the dashboard or admin API (or they will already be there if you exported and re-imported them)"}),"\n",(0,n.jsxs)(t.li,{children:["Run a backfill for each collection (dashboard or ",(0,n.jsx)(t.code,{children:"POST /admin/backfill"}),")"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Backfill fetches all records fresh from the network, so no data transfer between databases is needed."}),"\n",(0,n.jsx)(t.admonition,{type:"tip",children:(0,n.jsxs)(t.p,{children:["If you have many lexicons, you can export them from the old instance before switching. Use ",(0,n.jsx)(t.code,{children:"GET /admin/lexicons"})," to list them and ",(0,n.jsx)(t.code,{children:"POST /admin/lexicons"})," to re-upload after switching to Postgres."]})}),"\n",(0,n.jsx)(t.h2,{id:"step-6-re-create-admin-settings",children:"Step 6: Re-create admin settings"}),"\n",(0,n.jsx)(t.p,{children:"Instance settings (app name, logo, TOS/privacy URIs), API keys, users, and labeler subscriptions are stored in the database and are not carried over automatically. Re-create these via the dashboard or admin API after switching."}),"\n",(0,n.jsx)(t.h2,{id:"lua-scripts",children:"Lua scripts"}),"\n",(0,n.jsx)(t.p,{children:"No changes needed. Lua scripts use SQLite syntax by default, and HappyView translates to Postgres automatically at runtime. This includes:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"?"})," placeholders (translated to ",(0,n.jsx)(t.code,{children:"$1"}),", ",(0,n.jsx)(t.code,{children:"$2"}),", etc.)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"json_extract()"})," calls (translated to Postgres JSON operators)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"datetime('now')"})," (translated to ",(0,n.jsx)(t.code,{children:"NOW()"}),")"]}),"\n",(0,n.jsxs)(t.li,{children:["Boolean literals ",(0,n.jsx)(t.code,{children:"1"}),"/",(0,n.jsx)(t.code,{children:"0"})," (work in both backends)"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["If you have scripts that already use Postgres-native syntax (e.g., from direct ",(0,n.jsx)(t.code,{children:"db.raw()"})," calls), they will ",(0,n.jsx)(t.strong,{children:"not"})," work after switching \u2014 HappyView expects SQLite syntax. Use the ",(0,n.jsx)(t.a,{href:"/guides/postgres-to-sqlite-migration#run-the-codemod-tool",children:"codemod tool"})," to convert them."]}),"\n",(0,n.jsx)(t.h2,{id:"rollback",children:"Rollback"}),"\n",(0,n.jsxs)(t.p,{children:["To switch back to SQLite, revert your ",(0,n.jsx)(t.code,{children:"DATABASE_URL"})," to the SQLite connection string. Your SQLite database file remains unchanged \u2014 HappyView does not modify it during the migration to Postgres."]}),"\n",(0,n.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/postgres-to-sqlite-migration",children:"Postgres \u2192 SQLite migration"})," \u2014 migrate in the opposite direction"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/database-setup",children:"Database setup"})," \u2014 choose between SQLite and Postgres for new instances"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/backfill",children:"Backfill"})," \u2014 re-index records from the network after switching backends"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/scripting",children:"Lua scripting"})," \u2014 write SQL that works against either backend"]}),"\n"]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},2560:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>o});var i=s(63);const n={},r=i.createContext(n);function a(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2ce38126.96bfbff8.js b/assets/js/2ce38126.96bfbff8.js new file mode 100644 index 0000000..a02d56d --- /dev/null +++ b/assets/js/2ce38126.96bfbff8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9715],{5037:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"reference/admin/api-keys","title":"Admin API: API Keys","description":"Manage API keys for programmatic access. See the API Keys guide for usage details.","source":"@site/docs/reference/admin/api-keys.md","sourceDirName":"reference/admin","slug":"/reference/admin/api-keys","permalink":"/reference/admin/api-keys","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Event Logs","permalink":"/reference/admin/events"},"next":{"title":"Users","permalink":"/reference/admin/users"}}');var r=s(199),t=s(2560);const a={},d="Admin API: API Keys",c={},l=[{value:"Create an API key",id:"create-an-api-key",level:2},{value:"List API keys",id:"list-api-keys",level:2},{value:"Revoke an API key",id:"revoke-an-api-key",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"admin-api-api-keys",children:"Admin API: API Keys"})}),"\n",(0,r.jsxs)(n.p,{children:["Manage API keys for programmatic access. See the ",(0,r.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys guide"})," for usage details."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"create-an-api-key",children:"Create an API key"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/api-keys\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"api-keys:create"})," permission."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/api-keys \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "name": "CI Deploy",\n "permissions": ["lexicons:read", "lexicons:create", "backfill:create"]\n }\'\n'})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"name"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"yes"}),(0,r.jsx)(n.td,{children:"A label to identify this key's usage"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"permissions"})}),(0,r.jsx)(n.td,{children:"string[]"}),(0,r.jsx)(n.td,{children:"yes"}),(0,r.jsx)(n.td,{children:"Permissions to grant the key (must be a subset of the creating user's own permissions)"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "name": "CI Deploy",\n "key": "hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",\n "key_prefix": "hv_a1b2c3d4",\n "permissions": ["lexicons:read", "lexicons:create", "backfill:create"]\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"key"})," field contains the full API key. It is only returned in this response \u2014 store it securely. The key's effective permissions are the ",(0,r.jsx)(n.strong,{children:"intersection"})," of the permissions specified here and the creating user's permissions at the time of each request."]}),"\n",(0,r.jsx)(n.h2,{id:"list-api-keys",children:"List API keys"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/api-keys\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"api-keys:read"})," permission."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/api-keys -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "name": "CI Deploy",\n "key_prefix": "hv_a1b2c3d4",\n "permissions": ["lexicons:read", "lexicons:create", "backfill:create"],\n "created_at": "2026-03-01T00:00:00Z",\n "last_used_at": "2026-03-06T12:00:00Z",\n "revoked_at": null\n }\n]\n'})}),"\n",(0,r.jsx)(n.p,{children:"Only returns keys belonging to the authenticated user. The full key is never included \u2014 only the prefix."}),"\n",(0,r.jsx)(n.h2,{id:"revoke-an-api-key",children:"Revoke an API key"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DELETE /admin/api-keys/{id}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"api-keys:delete"})," permission."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/api-keys/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Sets ",(0,r.jsx)(n.code,{children:"revoked_at"})," on the key. The key remains in the database for audit purposes but can no longer authenticate."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>d});var i=s(63);const r={},t=i.createContext(r);function a(e){const n=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d1b556d.b658549a.js b/assets/js/2d1b556d.b658549a.js new file mode 100644 index 0000000..5e30aab --- /dev/null +++ b/assets/js/2d1b556d.b658549a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1952],{861:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/algolia-sync","title":"Index Hook: Algolia Sync","description":"Push records to an Algolia search index whenever they are created, updated, or deleted on the network.","source":"@site/docs/reference/scripts/algolia-sync.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/algolia-sync","permalink":"/reference/scripts/algolia-sync","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"},"next":{"title":"Meilisearch Sync","permalink":"/reference/scripts/meilisearch-sync"}}');var s=r(199),i=r(2560);const o={},c="Index Hook: Algolia Sync",d={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Use case",id:"use-case",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"index-hook-algolia-sync",children:"Index Hook: Algolia Sync"})}),"\n",(0,s.jsx)(n.p,{children:"Push records to an Algolia search index whenever they are created, updated, or deleted on the network."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," record (index hook)"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["X-Algolia-API-Key"] = "your-api-key",\n ["X-Algolia-Application-Id"] = "your-app-id",\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers\n })\n else\n http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers,\n body = json.encode({\n objectID = uri,\n collection = collection,\n did = did,\n record = record\n })\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["On ",(0,s.jsx)(n.strong,{children:"create"})," or ",(0,s.jsx)(n.strong,{children:"update"}),": sends a ",(0,s.jsx)(n.code,{children:"PUT"})," request to Algolia's index API with the record data, using the AT URI as the ",(0,s.jsx)(n.code,{children:"objectID"}),". Algolia upserts the object \u2014 if it already exists, it's replaced."]}),"\n",(0,s.jsxs)(n.li,{children:["On ",(0,s.jsx)(n.strong,{children:"delete"}),": sends a ",(0,s.jsx)(n.code,{children:"DELETE"})," request to remove the object from the index by its AT URI."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"json.encode()"})," function converts the Lua table into a JSON string for the request body. See ",(0,s.jsx)(n.a,{href:"/guides/index-hooks#json-api",children:"JSON API"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsx)(n.p,{children:"Replace the placeholder values:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Placeholder"}),(0,s.jsx)(n.th,{children:"Value"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"your-api-key"})}),(0,s.jsx)(n.td,{children:"Your Algolia Admin API key (with write permissions)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"your-app-id"})}),(0,s.jsx)(n.td,{children:"Your Algolia Application ID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"YOUR-APP"})}),(0,s.jsx)(n.td,{children:"Your Algolia application subdomain (same as the Application ID)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"records"})}),(0,s.jsx)(n.td,{children:"The Algolia index name (choose any name you like)"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(n.p,{children:"This hook keeps an external search index in sync with your indexed records in real time. Users searching through Algolia get results that reflect the latest state of the network without polling or scheduled jobs."}),"\n",(0,s.jsxs)(n.p,{children:["Combine this with a ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"query script"})," that searches Algolia instead of the local database for a full-text search experience that goes beyond what ",(0,s.jsx)(n.code,{children:"db.search"})," offers."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},2560:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>c});var t=r(63);const s={},i=t.createContext(s);function o(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2d1b556d.cb991d70.js b/assets/js/2d1b556d.cb991d70.js deleted file mode 100644 index 906bd92..0000000 --- a/assets/js/2d1b556d.cb991d70.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1952],{8385(e,n,r){r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/algolia-sync","title":"Index Hook: Algolia Sync","description":"Push records to an Algolia search index whenever they are created, updated, or deleted on the network.","source":"@site/docs/reference/scripts/algolia-sync.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/algolia-sync","permalink":"/reference/scripts/algolia-sync","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"},"next":{"title":"Meilisearch Sync","permalink":"/reference/scripts/meilisearch-sync"}}');var s=r(4848),i=r(8453);const o={},c="Index Hook: Algolia Sync",d={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Use case",id:"use-case",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"index-hook-algolia-sync",children:"Index Hook: Algolia Sync"})}),"\n",(0,s.jsx)(n.p,{children:"Push records to an Algolia search index whenever they are created, updated, or deleted on the network."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," record (index hook)"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["X-Algolia-API-Key"] = "your-api-key",\n ["X-Algolia-Application-Id"] = "your-app-id",\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers\n })\n else\n http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers,\n body = json.encode({\n objectID = uri,\n collection = collection,\n did = did,\n record = record\n })\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["On ",(0,s.jsx)(n.strong,{children:"create"})," or ",(0,s.jsx)(n.strong,{children:"update"}),": sends a ",(0,s.jsx)(n.code,{children:"PUT"})," request to Algolia's index API with the record data, using the AT URI as the ",(0,s.jsx)(n.code,{children:"objectID"}),". Algolia upserts the object \u2014 if it already exists, it's replaced."]}),"\n",(0,s.jsxs)(n.li,{children:["On ",(0,s.jsx)(n.strong,{children:"delete"}),": sends a ",(0,s.jsx)(n.code,{children:"DELETE"})," request to remove the object from the index by its AT URI."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"json.encode()"})," function converts the Lua table into a JSON string for the request body. See ",(0,s.jsx)(n.a,{href:"/guides/index-hooks#json-api",children:"JSON API"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,s.jsx)(n.p,{children:"Replace the placeholder values:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Placeholder"}),(0,s.jsx)(n.th,{children:"Value"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"your-api-key"})}),(0,s.jsx)(n.td,{children:"Your Algolia Admin API key (with write permissions)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"your-app-id"})}),(0,s.jsx)(n.td,{children:"Your Algolia Application ID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"YOUR-APP"})}),(0,s.jsx)(n.td,{children:"Your Algolia application subdomain (same as the Application ID)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"records"})}),(0,s.jsx)(n.td,{children:"The Algolia index name (choose any name you like)"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(n.p,{children:"This hook keeps an external search index in sync with your indexed records in real time. Users searching through Algolia get results that reflect the latest state of the network without polling or scheduled jobs."}),"\n",(0,s.jsxs)(n.p,{children:["Combine this with a ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"query script"})," that searches Algolia instead of the local database for a full-text search experience that goes beyond what ",(0,s.jsx)(n.code,{children:"db.search"})," offers."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453(e,n,r){r.d(n,{R:()=>o,x:()=>c});var t=r(6540);const s={},i=t.createContext(s);function o(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2df7fd65.045af8d0.js b/assets/js/2df7fd65.045af8d0.js new file mode 100644 index 0000000..d4613fe --- /dev/null +++ b/assets/js/2df7fd65.045af8d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1977],{8941:(e,d,n)=>{n.r(d),n.d(d,{assets:()=>l,contentTitle:()=>c,default:()=>x,frontMatter:()=>i,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"guides/event-logs","title":"Event Logs","description":"HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, user actions, API key events, backfill jobs, and Jetstream connectivity. Events are stored in the database and queryable via the admin API.","source":"@site/docs/guides/event-logs.md","sourceDirName":"guides","slug":"/guides/event-logs","permalink":"/guides/event-logs","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Permissions","permalink":"/guides/permissions"},"next":{"title":"Database Setup","permalink":"/guides/database-setup"}}');var r=n(199),t=n(2560);const i={},c="Event Logs",l={},h=[{value:"Event types",id:"event-types",level:2},{value:"Lexicon events",id:"lexicon-events",level:3},{value:"Record events",id:"record-events",level:3},{value:"Script events",id:"script-events",level:3},{value:"User events",id:"user-events",level:3},{value:"Auth events",id:"auth-events",level:3},{value:"API Key events",id:"api-key-events",level:3},{value:"Script Variable events",id:"script-variable-events",level:3},{value:"Hook events",id:"hook-events",level:3},{value:"Backfill events",id:"backfill-events",level:3},{value:"Jetstream events",id:"jetstream-events",level:3},{value:"Querying events",id:"querying-events",level:2},{value:"Retention",id:"retention",level:2},{value:"Next steps",id:"next-steps",level:2}];function o(e){const d={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.header,{children:(0,r.jsx)(d.h1,{id:"event-logs",children:"Event Logs"})}),"\n",(0,r.jsxs)(d.p,{children:["HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, user actions, API key events, backfill jobs, and Jetstream connectivity. Events are stored in the database and queryable via the ",(0,r.jsx)(d.a,{href:"/reference/admin/events",children:"admin API"}),"."]}),"\n",(0,r.jsx)(d.h2,{id:"event-types",children:"Event types"}),"\n",(0,r.jsxs)(d.p,{children:["Events follow a ",(0,r.jsx)(d.code,{children:"category.action"})," naming convention. Each event has a severity level (",(0,r.jsx)(d.code,{children:"info"}),", ",(0,r.jsx)(d.code,{children:"warn"}),", or ",(0,r.jsx)(d.code,{children:"error"}),"), an optional ",(0,r.jsx)(d.code,{children:"actor_did"})," (the user who triggered it), an optional ",(0,r.jsx)(d.code,{children:"subject"})," (what was affected), and a ",(0,r.jsx)(d.code,{children:"detail"})," JSON object with event-specific data."]}),"\n",(0,r.jsx)(d.h3,{id:"lexicon-events",children:"Lexicon events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicon.created"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Lexicon NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"revision"}),", ",(0,r.jsx)(d.code,{children:"has_script"}),", ",(0,r.jsx)(d.code,{children:"source"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicon.updated"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Lexicon NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"revision"}),", ",(0,r.jsx)(d.code,{children:"has_script"}),", ",(0,r.jsx)(d.code,{children:"source"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicon.deleted"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Lexicon NSID"}),(0,r.jsx)(d.td,{children:"\u2014"})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["Logged when lexicons are uploaded, updated, or deleted via the ",(0,r.jsx)(d.a,{href:"/reference/admin/lexicons",children:"admin API"}),". The ",(0,r.jsx)(d.code,{children:"actor_did"})," is the user who performed the action."]}),"\n",(0,r.jsx)(d.h3,{id:"record-events",children:"Record events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"record.created"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Record AT URI"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"collection"}),", ",(0,r.jsx)(d.code,{children:"did"}),", ",(0,r.jsx)(d.code,{children:"rkey"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"record.deleted"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Record AT URI"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"collection"}),", ",(0,r.jsx)(d.code,{children:"did"}),", ",(0,r.jsx)(d.code,{children:"rkey"})]})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["Logged when records are received from Jetstream and stored or removed from the local database. These are system-triggered events (",(0,r.jsx)(d.code,{children:"actor_did"})," is null). If a database error occurs during the operation, the same event type is logged with ",(0,r.jsx)(d.code,{children:"error"})," severity and the error message is included in the detail."]}),"\n",(0,r.jsx)(d.h3,{id:"script-events",children:"Script events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script.executed"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Method NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"method"}),", ",(0,r.jsx)(d.code,{children:"caller_did"}),", ",(0,r.jsx)(d.code,{children:"duration_ms"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script.error"})}),(0,r.jsx)(d.td,{children:"error"}),(0,r.jsx)(d.td,{children:"Method NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"error"}),", ",(0,r.jsx)(d.code,{children:"script_source"}),", ",(0,r.jsx)(d.code,{children:"input"}),", ",(0,r.jsx)(d.code,{children:"caller_did"}),", ",(0,r.jsx)(d.code,{children:"method"})]})]})]})]}),"\n",(0,r.jsx)(d.p,{children:"Logged when Lua scripts run for XRPC query or procedure endpoints. Script errors capture the full context needed to reproduce and debug the issue: the error message, the complete Lua script source, the input that triggered it, and the caller's DID."}),"\n",(0,r.jsx)(d.admonition,{type:"note",children:(0,r.jsxs)(d.p,{children:["For query scripts (unauthenticated), ",(0,r.jsx)(d.code,{children:"caller_did"})," and ",(0,r.jsx)(d.code,{children:"input"})," are omitted from the detail since queries don't have an authenticated user or request body."]})}),"\n",(0,r.jsx)(d.h3,{id:"user-events",children:"User events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"user.created"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"New user DID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"template"})," (if used)"]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"user.deleted"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Removed user ID"}),(0,r.jsx)(d.td,{children:"\u2014"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"user.bootstrapped"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Bootstrapped user DID"}),(0,r.jsx)(d.td,{children:"\u2014"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"user.permissions_updated"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"User ID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"granted"}),", ",(0,r.jsx)(d.code,{children:"revoked"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"user.super_transferred"})}),(0,r.jsx)(d.td,{children:"warn"}),(0,r.jsx)(d.td,{children:"New super user ID"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"from_user_id"})})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["The ",(0,r.jsx)(d.code,{children:"user.bootstrapped"})," event is logged when the first user is auto-promoted to super user (see ",(0,r.jsx)(d.a,{href:"/reference/admin-api#auth",children:"Auth - Auto-bootstrap"}),")."]}),"\n",(0,r.jsx)(d.h3,{id:"auth-events",children:"Auth events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsx)(d.tbody,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"auth.permission_denied"})}),(0,r.jsx)(d.td,{children:"error"}),(0,r.jsx)(d.td,{children:"Endpoint path"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"required_permission"}),", ",(0,r.jsx)(d.code,{children:"user_id"})]})]})})]}),"\n",(0,r.jsx)(d.p,{children:"Logged when a user attempts to access an endpoint they don't have permission for."}),"\n",(0,r.jsx)(d.h3,{id:"api-key-events",children:"API Key events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api_key.created"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Key ID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"name"}),", ",(0,r.jsx)(d.code,{children:"permissions"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api_key.revoked"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Key ID"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"name"})})]})]})]}),"\n",(0,r.jsx)(d.h3,{id:"script-variable-events",children:"Script Variable events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script_variable.upserted"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Variable key"}),(0,r.jsx)(d.td,{children:"\u2014"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script_variable.deleted"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Variable key"}),(0,r.jsx)(d.td,{children:"\u2014"})]})]})]}),"\n",(0,r.jsx)(d.h3,{id:"hook-events",children:"Hook events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"hook.executed"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Record AT URI"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicon_id"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"hook.dead_lettered"})}),(0,r.jsx)(d.td,{children:"error"}),(0,r.jsx)(d.td,{children:"Record AT URI"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"lexicon_id"}),", ",(0,r.jsx)(d.code,{children:"error"})]})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["Logged when ",(0,r.jsx)(d.a,{href:"/guides/index-hooks",children:"index hooks"})," run. Dead-lettered events indicate a hook failed all retry attempts."]}),"\n",(0,r.jsx)(d.h3,{id:"backfill-events",children:"Backfill events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"backfill.started"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Collection NSID"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"job_id"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"backfill.completed"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"Collection NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"job_id"}),", ",(0,r.jsx)(d.code,{children:"total_repos"})]})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"backfill.failed"})}),(0,r.jsx)(d.td,{children:"error"}),(0,r.jsx)(d.td,{children:"Collection NSID"}),(0,r.jsxs)(d.td,{children:[(0,r.jsx)(d.code,{children:"job_id"}),", ",(0,r.jsx)(d.code,{children:"error"})]})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["See ",(0,r.jsx)(d.a,{href:"/guides/backfill",children:"Backfill"})," for background on backfill jobs."]}),"\n",(0,r.jsx)(d.h3,{id:"jetstream-events",children:"Jetstream events"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Event Type"}),(0,r.jsx)(d.th,{children:"Severity"}),(0,r.jsx)(d.th,{children:"Subject"}),(0,r.jsx)(d.th,{children:"Detail"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"jetstream.connected"})}),(0,r.jsx)(d.td,{children:"info"}),(0,r.jsx)(d.td,{children:"\u2014"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"url"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"jetstream.disconnected"})}),(0,r.jsx)(d.td,{children:"warn"}),(0,r.jsx)(d.td,{children:"\u2014"}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"reason"})})]})]})]}),"\n",(0,r.jsxs)(d.p,{children:["Logged when the WebSocket connection to ",(0,r.jsx)(d.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"})," is established or lost."]}),"\n",(0,r.jsx)(d.h2,{id:"querying-events",children:"Querying events"}),"\n",(0,r.jsx)(d.p,{children:"Use the admin API to query event logs with filters:"}),"\n",(0,r.jsx)(d.pre,{children:(0,r.jsx)(d.code,{className:"language-sh",children:'# Get all errors\ncurl "http://localhost:3000/admin/events?severity=error" -H "$AUTH"\n\n# Get script errors for a specific lexicon\ncurl "http://localhost:3000/admin/events?event_type=script.error&subject=com.example.feed.like" -H "$AUTH"\n\n# Get all lexicon-related events\ncurl "http://localhost:3000/admin/events?category=lexicon" -H "$AUTH"\n\n# Paginate through results\ncurl "http://localhost:3000/admin/events?limit=20&cursor=2026-03-01T11:59:00Z" -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(d.p,{children:["See the ",(0,r.jsx)(d.a,{href:"/reference/admin/events#list-event-logs",children:"Admin API reference"})," for full parameter documentation."]}),"\n",(0,r.jsx)(d.h2,{id:"retention",children:"Retention"}),"\n",(0,r.jsxs)(d.p,{children:["Event logs are automatically cleaned up based on the ",(0,r.jsx)(d.code,{children:"EVENT_LOG_RETENTION_DAYS"})," environment variable (default: 30 days). A background task runs hourly to delete events older than the configured retention period."]}),"\n",(0,r.jsxs)(d.p,{children:["Set ",(0,r.jsx)(d.code,{children:"EVENT_LOG_RETENTION_DAYS=0"})," to disable automatic cleanup and keep logs indefinitely."]}),"\n",(0,r.jsxs)(d.p,{children:["See ",(0,r.jsx)(d.a,{href:"/getting-started/configuration",children:"Configuration"})," for all environment variables."]}),"\n",(0,r.jsx)(d.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(d.ul,{children:["\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.a,{href:"/reference/admin/events",children:"Admin API \u2014 Event Logs"})," \u2014 full query parameters and response format"]}),"\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 control which users can read event logs"]}),"\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.a,{href:"/reference/troubleshooting",children:"Troubleshooting"})," \u2014 using event logs to diagnose issues"]}),"\n"]})]})}function x(e={}){const{wrapper:d}={...(0,t.R)(),...e.components};return d?(0,r.jsx)(d,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},2560:(e,d,n)=>{n.d(d,{R:()=>i,x:()=>c});var s=n(63);const r={},t=s.createContext(r);function i(e){const d=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(d):{...d,...e}},[d,e])}function c(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(t.Provider,{value:d},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2df7fd65.5f144859.js b/assets/js/2df7fd65.5f144859.js deleted file mode 100644 index 16c6aec..0000000 --- a/assets/js/2df7fd65.5f144859.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1977],{853(e,n,d){d.r(n),d.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>s,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"guides/event-logs","title":"Event Logs","description":"HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. Events are stored in a Postgres table and queryable via the admin API.","source":"@site/docs/guides/event-logs.md","sourceDirName":"guides","slug":"/guides/event-logs","permalink":"/guides/event-logs","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Backfill","permalink":"/guides/backfill"},"next":{"title":"XRPC API","permalink":"/reference/xrpc-api"}}');var r=d(4848),i=d(8453);const s={},c="Event Logs",l={},o=[{value:"Event types",id:"event-types",level:2},{value:"Lexicon events",id:"lexicon-events",level:3},{value:"Record events",id:"record-events",level:3},{value:"Script events",id:"script-events",level:3},{value:"Admin events",id:"admin-events",level:3},{value:"Backfill events",id:"backfill-events",level:3},{value:"Tap events",id:"tap-events",level:3},{value:"Querying events",id:"querying-events",level:2},{value:"Retention",id:"retention",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"event-logs",children:"Event Logs"})}),"\n",(0,r.jsxs)(n.p,{children:["HappyView maintains an internal event log that records system activity \u2014 lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. Events are stored in a Postgres table and queryable via the ",(0,r.jsx)(n.a,{href:"/reference/admin-api#event-logs",children:"admin API"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"event-types",children:"Event types"}),"\n",(0,r.jsxs)(n.p,{children:["Events follow a ",(0,r.jsx)(n.code,{children:"category.action"})," naming convention. Each event has a severity level (",(0,r.jsx)(n.code,{children:"info"}),", ",(0,r.jsx)(n.code,{children:"warn"}),", or ",(0,r.jsx)(n.code,{children:"error"}),"), an optional ",(0,r.jsx)(n.code,{children:"actor_did"})," (the user who triggered it), an optional ",(0,r.jsx)(n.code,{children:"subject"})," (what was affected), and a ",(0,r.jsx)(n.code,{children:"detail"})," JSON object with event-specific data."]}),"\n",(0,r.jsx)(n.h3,{id:"lexicon-events",children:"Lexicon events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"lexicon.created"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Lexicon NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"revision"}),", ",(0,r.jsx)(n.code,{children:"has_script"}),", ",(0,r.jsx)(n.code,{children:"source"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"lexicon.updated"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Lexicon NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"revision"}),", ",(0,r.jsx)(n.code,{children:"has_script"}),", ",(0,r.jsx)(n.code,{children:"source"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"lexicon.deleted"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Lexicon NSID"}),(0,r.jsx)(n.td,{children:"\u2014"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Logged when lexicons are uploaded, updated, or deleted via the ",(0,r.jsx)(n.a,{href:"/reference/admin-api#lexicons",children:"admin API"}),". The ",(0,r.jsx)(n.code,{children:"actor_did"})," is the admin who performed the action."]}),"\n",(0,r.jsx)(n.h3,{id:"record-events",children:"Record events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"record.created"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Record AT URI"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"collection"}),", ",(0,r.jsx)(n.code,{children:"did"}),", ",(0,r.jsx)(n.code,{children:"rkey"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"record.deleted"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Record AT URI"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"collection"}),", ",(0,r.jsx)(n.code,{children:"did"}),", ",(0,r.jsx)(n.code,{children:"rkey"})]})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Logged when records are received from Tap and stored or removed from the local database. These are system-triggered events (",(0,r.jsx)(n.code,{children:"actor_did"})," is null). If a database error occurs during the operation, the same event type is logged with ",(0,r.jsx)(n.code,{children:"error"})," severity and the error message is included in the detail."]}),"\n",(0,r.jsx)(n.h3,{id:"script-events",children:"Script events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"script.executed"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Method NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"method"}),", ",(0,r.jsx)(n.code,{children:"caller_did"}),", ",(0,r.jsx)(n.code,{children:"duration_ms"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"script.error"})}),(0,r.jsx)(n.td,{children:"error"}),(0,r.jsx)(n.td,{children:"Method NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"error"}),", ",(0,r.jsx)(n.code,{children:"script_source"}),", ",(0,r.jsx)(n.code,{children:"input"}),", ",(0,r.jsx)(n.code,{children:"caller_did"}),", ",(0,r.jsx)(n.code,{children:"method"})]})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Logged when Lua scripts run for XRPC query or procedure endpoints. Script errors capture the full context needed to reproduce and debug the issue: the error message, the complete Lua script source, the input that triggered it, and the caller's DID."}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["For query scripts (unauthenticated), ",(0,r.jsx)(n.code,{children:"caller_did"})," and ",(0,r.jsx)(n.code,{children:"input"})," are omitted from the detail since queries don't have an authenticated user or request body."]})}),"\n",(0,r.jsx)(n.h3,{id:"admin-events",children:"Admin events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"admin.created"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"New admin DID"}),(0,r.jsx)(n.td,{children:"\u2014"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"admin.deleted"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Removed admin ID"}),(0,r.jsx)(n.td,{children:"\u2014"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"admin.bootstrapped"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Bootstrapped admin DID"}),(0,r.jsx)(n.td,{children:"\u2014"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"admin.bootstrapped"})," event is logged when the first user is auto-promoted to admin (see ",(0,r.jsx)(n.a,{href:"/reference/admin-api#auth",children:"Auth - Auto-bootstrap"}),")."]}),"\n",(0,r.jsx)(n.h3,{id:"backfill-events",children:"Backfill events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"backfill.started"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Collection NSID"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"job_id"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"backfill.completed"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"Collection NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"job_id"}),", ",(0,r.jsx)(n.code,{children:"total_repos"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"backfill.failed"})}),(0,r.jsx)(n.td,{children:"error"}),(0,r.jsx)(n.td,{children:"Collection NSID"}),(0,r.jsxs)(n.td,{children:[(0,r.jsx)(n.code,{children:"job_id"}),", ",(0,r.jsx)(n.code,{children:"error"})]})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["See ",(0,r.jsx)(n.a,{href:"/guides/backfill",children:"Backfill"})," for background on backfill jobs."]}),"\n",(0,r.jsx)(n.h3,{id:"tap-events",children:"Tap events"}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Event Type"}),(0,r.jsx)(n.th,{children:"Severity"}),(0,r.jsx)(n.th,{children:"Subject"}),(0,r.jsx)(n.th,{children:"Detail"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"tap.connected"})}),(0,r.jsx)(n.td,{children:"info"}),(0,r.jsx)(n.td,{children:"\u2014"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"url"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"tap.disconnected"})}),(0,r.jsx)(n.td,{children:"warn"}),(0,r.jsx)(n.td,{children:"\u2014"}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"reason"})})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Logged when the WebSocket connection to ",(0,r.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," is established or lost."]}),"\n",(0,r.jsx)(n.h2,{id:"querying-events",children:"Querying events"}),"\n",(0,r.jsx)(n.p,{children:"Use the admin API to query event logs with filters:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'# Get all errors\ncurl "http://localhost:3000/admin/events?severity=error" -H "$AUTH"\n\n# Get script errors for a specific lexicon\ncurl "http://localhost:3000/admin/events?event_type=script.error&subject=com.example.feed.like" -H "$AUTH"\n\n# Get all lexicon-related events\ncurl "http://localhost:3000/admin/events?category=lexicon" -H "$AUTH"\n\n# Paginate through results\ncurl "http://localhost:3000/admin/events?limit=20&cursor=2026-03-01T11:59:00Z" -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["See the ",(0,r.jsx)(n.a,{href:"/reference/admin-api#list-event-logs",children:"Admin API reference"})," for full parameter documentation."]}),"\n",(0,r.jsx)(n.h2,{id:"retention",children:"Retention"}),"\n",(0,r.jsxs)(n.p,{children:["Event logs are automatically cleaned up based on the ",(0,r.jsx)(n.code,{children:"EVENT_LOG_RETENTION_DAYS"})," environment variable (default: 30 days). A background task runs hourly to delete events older than the configured retention period."]}),"\n",(0,r.jsxs)(n.p,{children:["Set ",(0,r.jsx)(n.code,{children:"EVENT_LOG_RETENTION_DAYS=0"})," to disable automatic cleanup and keep logs indefinitely."]}),"\n",(0,r.jsxs)(n.p,{children:["See ",(0,r.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for all environment variables."]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453(e,n,d){d.d(n,{R:()=>s,x:()=>c});var t=d(6540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/32955cd4.7f42c651.js b/assets/js/32955cd4.7f42c651.js new file mode 100644 index 0000000..c11a0f7 --- /dev/null +++ b/assets/js/32955cd4.7f42c651.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9630],{5624:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>l,toc:()=>o});const l=JSON.parse('{"id":"reference/lua/atproto-api","title":"atproto API","description":"The atproto table provides atproto utility functions. Available in queries, procedures, and index hooks.","source":"@site/docs/reference/lua/atproto-api.md","sourceDirName":"reference/lua","slug":"/reference/lua/atproto-api","permalink":"/reference/lua/atproto-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"HTTP API","permalink":"/reference/lua/http-api"},"next":{"title":"JSON API","permalink":"/reference/lua/json-api"}}');var t=r(199),s=r(2560);const a={},i="atproto API",d={},o=[{value:"atproto.resolve_service_endpoint",id:"atprotoresolve_service_endpoint",level:2},{value:"Examples",id:"examples",level:3},{value:"atproto.get_labels",id:"atprotoget_labels",level:2},{value:"atproto.get_labels_batch",id:"atprotoget_labels_batch",level:2},{value:"Label examples",id:"label-examples",level:3}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"atproto-api",children:"atproto API"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"atproto"})," table provides atproto utility functions. Available in queries, procedures, and ",(0,t.jsx)(n.a,{href:"/guides/index-hooks",children:"index hooks"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"atprotoresolve_service_endpoint",children:"atproto.resolve_service_endpoint"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:"local endpoint = atproto.resolve_service_endpoint(did)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Resolves a DID to its atproto service endpoint URL by fetching the DID document. Supports both ",(0,t.jsx)(n.code,{children:"did:plc:*"})," (via the PLC directory) and ",(0,t.jsx)(n.code,{children:"did:web:*"})," (via ",(0,t.jsx)(n.code,{children:".well-known/did.json"}),")."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"did"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"The DID to resolve"})]})})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns:"})," The service endpoint URL as a string, or ",(0,t.jsx)(n.code,{children:"nil"})," if resolution fails (DID not found, no PDS service in document, network error)."]}),"\n",(0,t.jsx)(n.h3,{id:"examples",children:"Examples"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:'-- Resolve a did:plc DID\nlocal endpoint = atproto.resolve_service_endpoint("did:plc:abc123")\n-- endpoint = "https://pds.example.com"\n\n-- Resolve a did:web DID\nlocal endpoint = atproto.resolve_service_endpoint("did:web:example.com")\n-- endpoint = "https://example.com"\n\n-- Handle resolution failure\nlocal endpoint = atproto.resolve_service_endpoint("did:plc:unknown")\nif not endpoint then\n return { error = "Could not resolve DID" }\nend\n\n-- Use with HTTP API to call a remote XRPC endpoint\nlocal endpoint = atproto.resolve_service_endpoint(did)\nif endpoint then\n local resp = http.get(endpoint .. "/xrpc/com.example.method")\n local data = json.decode(resp.body)\nend\n'})}),"\n",(0,t.jsx)(n.h2,{id:"atprotoget_labels",children:"atproto.get_labels"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:"local labels = atproto.get_labels(uri)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Returns an array of labels for a single AT URI. Merges external labels (from subscribed labelers) with self-labels (from the record's ",(0,t.jsx)(n.code,{children:"labels.values[]"})," field)."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uri"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"AT URI of the record to query"})]})})]}),"\n",(0,t.jsx)(n.p,{children:"Each label in the array is a table with:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"src"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"DID of the labeler (or record author)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uri"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"AT URI this label applies to"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"val"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:'Label value (e.g. "nsfw", "!hide")'})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"cts"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"Timestamp when the label was created"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Expired labels are automatically filtered out. Returns an empty array if no labels exist."}),"\n",(0,t.jsx)(n.h2,{id:"atprotoget_labels_batch",children:"atproto.get_labels_batch"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:"local labels_by_uri = atproto.get_labels_batch(uris)\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Batch version of ",(0,t.jsx)(n.code,{children:"get_labels"}),". Takes an array of AT URIs and returns a table keyed by URI, where each value is an array of labels."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Parameter"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsx)(n.tbody,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"uris"})}),(0,t.jsx)(n.td,{children:"table"}),(0,t.jsx)(n.td,{children:"Array of AT URI strings"})]})})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Returns:"})," A table keyed by URI. Each value is an array of label tables (same shape as ",(0,t.jsx)(n.code,{children:"get_labels"}),"). URIs with no labels have an empty array."]}),"\n",(0,t.jsx)(n.h3,{id:"label-examples",children:"Label examples"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-lua",children:'-- Get labels for a single game\nlocal labels = atproto.get_labels("at://did:plc:abc/games.gamesgamesgamesgames.game/rkey1")\nfor _, label in ipairs(labels) do\n if label.val == "!hide" then\n -- skip this game in feed results\n end\nend\n\n-- Batch fetch labels for multiple games (efficient for feed hydration)\nlocal uris = {}\nfor _, item in ipairs(skeleton) do\n uris[#uris + 1] = item.game\nend\n\nlocal labels_by_uri = atproto.get_labels_batch(uris)\nfor _, uri in ipairs(uris) do\n local labels = labels_by_uri[uri]\n for _, label in ipairs(labels) do\n if label.val == "!hide" then\n -- filter out this game\n end\n end\nend\n'})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},2560:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var l=r(63);const t={},s=l.createContext(t);function a(e){const n=l.useContext(s);return l.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),l.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3356.916f8094.js b/assets/js/3356.916f8094.js deleted file mode 100644 index c97e1ef..0000000 --- a/assets/js/3356.916f8094.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3356],{3356(e,s,c){c.d(s,{createInfoServices:()=>p.v});var p=c(2963);c(808)}}]); \ No newline at end of file diff --git a/assets/js/33ec3d65.4fb486eb.js b/assets/js/33ec3d65.4fb486eb.js new file mode 100644 index 0000000..81e782b --- /dev/null +++ b/assets/js/33ec3d65.4fb486eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6803],{9275:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>c,default:()=>o,frontMatter:()=>i,metadata:()=>d,toc:()=>h});const d=JSON.parse('{"id":"reference/architecture","title":"Architecture","description":"Guide for contributors working on HappyView itself. For a user-facing overview, see the Introduction.","source":"@site/docs/reference/architecture.md","sourceDirName":"reference","slug":"/reference/architecture","permalink":"/reference/architecture","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Glossary","permalink":"/reference/glossary"},"next":{"title":"Troubleshooting","permalink":"/reference/troubleshooting"}}');var r=t(199),n=t(2560);const i={},c="Architecture",l={},h=[{value:"System overview",id:"system-overview",level:2},{value:"Request flow",id:"request-flow",level:2},{value:"Reads (queries)",id:"reads-queries",level:3},{value:"Writes (procedures)",id:"writes-procedures",level:3},{value:"Admin endpoints",id:"admin-endpoints",level:3},{value:"Data flow",id:"data-flow",level:2},{value:"Real-time indexing",id:"real-time-indexing",level:3},{value:"Backfill",id:"backfill",level:3},{value:"Database schema",id:"database-schema",level:2},{value:"records",id:"records",level:3},{value:"lexicons",id:"lexicons",level:3},{value:"users",id:"users",level:3},{value:"user_permissions",id:"user_permissions",level:3},{value:"api_keys",id:"api_keys",level:3},{value:"oauth_sessions",id:"oauth_sessions",level:3},{value:"oauth_state",id:"oauth_state",level:3},{value:"instance_settings",id:"instance_settings",level:3},{value:"event_logs",id:"event_logs",level:3},{value:"script_variables",id:"script_variables",level:3},{value:"backfill_jobs",id:"backfill_jobs",level:3},{value:"Testing",id:"testing",level:2}];function a(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",mermaid:"mermaid",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"architecture",children:"Architecture"})}),"\n",(0,r.jsxs)(s.p,{children:["Guide for contributors working on HappyView itself. For a user-facing overview, see the ",(0,r.jsx)(s.a,{href:"/",children:"Introduction"}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"system-overview",children:"System overview"}),"\n",(0,r.jsx)(s.mermaid,{value:'graph LR\n Application\n\n Application --\x3e|"GET /xrpc/{method}"| Query\n Application --\x3e|"POST /xrpc/{method}"| Procedure\n\n subgraph HappyView\n Query["Query Handler
    Lua Script (Optional)"]\n Procedure["Procedure Handler
    Lua Script (Optional)"]\n end\n\n Procedure --\x3e DB\n Query --\x3e DB\n\n Procedure --\x3e|proxy write| PDS["User PDS"]\n\n DB[("SQLite / PostgreSQL
    records \xb7 lexicons")]\n\n Jetstream["Jetstream
    WebSocket"] --\x3e|record events| DB\n Relay["Relay
    listReposByCollection"] --\x3e|repo discovery| Backfill\n Backfill["Backfill Worker"] --\x3e|listRecords| PDS\n Backfill --\x3e DB\n\n Labeler["Labeler
    WebSocket (out-of-band)"] --\x3e|label events| DB'}),"\n",(0,r.jsxs)(s.p,{children:["Queries go through the query handler to the database (SQLite by default, or Postgres). Writes go through the procedure handler to the user's PDS, then HappyView indexes the record locally. Real-time record events stream in via ",(0,r.jsx)(s.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"}),"; historical records are backfilled in-process by discovering repos via the relay's ",(0,r.jsx)(s.code,{children:"listReposByCollection"})," and fetching records directly from each PDS. ",(0,r.jsx)(s.a,{href:"/guides/labelers",children:"Labelers"})," are external services that emit content labels over a direct WebSocket connection \u2014 they operate out-of-band, outside the relay/repo system."]}),"\n",(0,r.jsx)(s.h2,{id:"request-flow",children:"Request flow"}),"\n",(0,r.jsx)(s.h3,{id:"reads-queries",children:"Reads (queries)"}),"\n",(0,r.jsx)(s.mermaid,{value:"sequenceDiagram\n participant C as Client\n participant X as xrpc_get()\n participant R as LexiconRegistry\n participant L as Lua Script\n participant D as Database\n\n C->>X: GET /xrpc/{method}?params\n X->>R: Lookup (must be Query type)\n alt Lua script attached\n R->>L: Execute script\n L->>D: db.query / db.get / db.raw\n D--\x3e>L: Results\n L--\x3e>X: Response table\n else No script\n R->>D: Default SQL query (collection from target_collection)\n D--\x3e>X: Results\n end\n X--\x3e>C: JSON response"}),"\n",(0,r.jsx)(s.h3,{id:"writes-procedures",children:"Writes (procedures)"}),"\n",(0,r.jsx)(s.mermaid,{value:"sequenceDiagram\n participant C as Client\n participant A as Claims Extractor\n participant X as xrpc_post()\n participant R as LexiconRegistry\n participant L as Lua Script\n participant S as OAuth Session\n participant P as User PDS\n participant D as Database\n\n C->>A: POST /xrpc/{method} + DPoP auth + X-Client-Key\n A->>X: Validated claims\n X->>R: Lookup (must be Procedure type)\n alt Lua script attached\n R->>L: Execute script (Record API)\n L->>S: Record:save()\n else No script\n R->>S: Default create/update (auto-detect from uri field)\n end\n S->>P: Proxy write (createRecord or putRecord)\n P--\x3e>S: PDS response\n S->>D: Upsert record locally\n S--\x3e>C: Forward PDS response"}),"\n",(0,r.jsx)(s.h3,{id:"admin-endpoints",children:"Admin endpoints"}),"\n",(0,r.jsx)(s.mermaid,{value:"sequenceDiagram\n participant C as Client\n participant A as AdminAuth Extractor\n participant U as Users Table\n participant H as Admin Handler\n participant D as Database\n\n C->>A: Request + Bearer token\n A->>A: Validate claims (API key or service auth JWT)\n A->>U: DID lookup\n alt Users table empty\n U--\x3e>A: Auto-bootstrap as super user\n else User found\n U--\x3e>A: Load permissions\n end\n A->>A: Permission check (403 if missing)\n A->>H: Authorized request\n H->>D: Database operation\n D--\x3e>H: Result\n H--\x3e>C: JSON response"}),"\n",(0,r.jsx)(s.h2,{id:"data-flow",children:"Data flow"}),"\n",(0,r.jsx)(s.h3,{id:"real-time-indexing",children:"Real-time indexing"}),"\n",(0,r.jsx)(s.mermaid,{value:"sequenceDiagram\n participant J as Jetstream WebSocket\n participant H as HappyView\n participant D as Database\n participant R as LexiconRegistry\n\n H->>J: Connect (collection filters from indexed lexicons)\n loop Stream events\n J->>H: Record commit event\n alt create / update\n H->>D: UPSERT into records table\n else delete\n H->>D: DELETE from records table\n end\n end\n J->>H: Lexicon schema event (com.atproto.lexicon.schema)\n H->>D: Update tracked network lexicons\n H->>R: Update in-memory registry\n Note over H,D: Cursor persisted to instance_settings for resume on reconnect\n Note over H,J: Reconnects on collection filter changes (lexicon add/remove)"}),"\n",(0,r.jsx)(s.h3,{id:"backfill",children:"Backfill"}),"\n",(0,r.jsx)(s.mermaid,{value:"sequenceDiagram\n participant A as Admin\n participant H as HappyView\n participant D as Database\n participant Relay as Relay\n participant PLC as PLC Directory\n participant PDS as User PDS\n\n A->>H: POST /admin/backfill\n H->>D: Create backfill_jobs record (status = running)\n H->>Relay: listReposByCollection (paginated)\n Relay--\x3e>H: List of DIDs\n loop For each DID\n H->>PLC: Resolve DID document\n PLC--\x3e>H: PDS endpoint\n H->>PDS: listRecords (paginated)\n PDS--\x3e>H: Records\n H->>D: UPSERT each record\n H->>D: Update processed_repos / total_records\n end\n H->>D: Mark job completed (or failed)"}),"\n",(0,r.jsx)(s.h2,{id:"database-schema",children:"Database schema"}),"\n",(0,r.jsx)(s.h3,{id:"records",children:(0,r.jsx)(s.code,{children:"records"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"uri"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsxs)(s.td,{children:["AT URI (",(0,r.jsx)(s.code,{children:"at://did/collection/rkey"}),")"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"did"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Author DID"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"collection"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Lexicon NSID"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"rkey"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Record key"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"record"})}),(0,r.jsx)(s.td,{children:"jsonb"}),(0,r.jsx)(s.td,{children:"Record value"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"cid"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Content identifier"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"indexed_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{children:"When HappyView indexed this record"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"lexicons",children:(0,r.jsx)(s.code,{children:"lexicons"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsx)(s.td,{children:"Lexicon NSID"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"revision"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{children:"Incremented on upsert"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"lexicon_json"})}),(0,r.jsx)(s.td,{children:"jsonb"}),(0,r.jsx)(s.td,{children:"Raw lexicon definition"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"lexicon_type"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"record, query, procedure, definitions"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"backfill"})}),(0,r.jsx)(s.td,{children:"boolean"}),(0,r.jsx)(s.td,{children:"Whether to backfill on upload"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"target_collection"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"For queries/procedures: which record collection"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"updated_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"users",children:(0,r.jsx)(s.code,{children:"users"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"uuid (PK)"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"did"})}),(0,r.jsx)(s.td,{children:"text (unique)"}),(0,r.jsx)(s.td,{children:"User's atproto DID"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"is_super"})}),(0,r.jsx)(s.td,{children:"boolean"}),(0,r.jsx)(s.td,{children:"Whether this is the super user (only one allowed)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"last_used_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{children:"Updated on each authenticated request"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"user_permissions",children:(0,r.jsx)(s.code,{children:"user_permissions"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"user_id"})}),(0,r.jsx)(s.td,{children:"uuid (FK)"}),(0,r.jsxs)(s.td,{children:["References ",(0,r.jsx)(s.code,{children:"users.id"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"permission"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsxs)(s.td,{children:["Permission string (e.g. ",(0,r.jsx)(s.code,{children:"lexicons:create"}),")"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"(PK)"}),(0,r.jsx)(s.td,{}),(0,r.jsxs)(s.td,{children:["Composite primary key: (",(0,r.jsx)(s.code,{children:"user_id"}),", ",(0,r.jsx)(s.code,{children:"permission"}),")"]})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"api_keys",children:(0,r.jsx)(s.code,{children:"api_keys"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"uuid (PK)"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"user_id"})}),(0,r.jsx)(s.td,{children:"uuid (FK)"}),(0,r.jsxs)(s.td,{children:["References ",(0,r.jsx)(s.code,{children:"users.id"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"name"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Descriptive label"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"key_hash"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"SHA-256 hash of the full key"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"key_prefix"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"First 11 characters for display"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"permissions"})}),(0,r.jsx)(s.td,{children:"text[]"}),(0,r.jsx)(s.td,{children:"Permissions granted to this key"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"last_used_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"revoked_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{children:"Set when revoked (soft delete)"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"oauth_sessions",children:(0,r.jsx)(s.code,{children:"oauth_sessions"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"did"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsx)(s.td,{children:"User's atproto DID"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"session_data"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Serialized OAuth session (managed by atrium)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"updated_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"oauth_state",children:(0,r.jsx)(s.code,{children:"oauth_state"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"state_key"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsx)(s.td,{children:"OAuth state parameter"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"state_data"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Serialized state (managed by atrium)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"instance_settings",children:(0,r.jsx)(s.code,{children:"instance_settings"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"key"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsxs)(s.td,{children:["Setting name (e.g. ",(0,r.jsx)(s.code,{children:"app_name"}),")"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"value"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Setting value"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"updated_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{children:"Last modified"})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"event_logs",children:(0,r.jsx)(s.code,{children:"event_logs"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"uuid (PK)"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"event_type"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsxs)(s.td,{children:["Category.action format (e.g. ",(0,r.jsx)(s.code,{children:"user.created"}),")"]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"severity"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsxs)(s.td,{children:[(0,r.jsx)(s.code,{children:"info"}),", ",(0,r.jsx)(s.code,{children:"warn"}),", or ",(0,r.jsx)(s.code,{children:"error"})]})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"actor_did"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"DID of the user who triggered the event"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"subject"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"What was affected (DID, NSID, URI, etc.)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"detail"})}),(0,r.jsx)(s.td,{children:"jsonb"}),(0,r.jsx)(s.td,{children:"Event-specific data"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"script_variables",children:(0,r.jsx)(s.code,{children:"script_variables"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"key"})}),(0,r.jsx)(s.td,{children:"text (PK)"}),(0,r.jsx)(s.td,{children:"Variable name"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"value"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Variable value (encrypted at rest)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"updated_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h3,{id:"backfill_jobs",children:(0,r.jsx)(s.code,{children:"backfill_jobs"})}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Column"}),(0,r.jsx)(s.th,{children:"Type"}),(0,r.jsx)(s.th,{children:"Description"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"id"})}),(0,r.jsx)(s.td,{children:"uuid (PK)"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"collection"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Target collection (null = all)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"did"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Target DID (null = all)"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"status"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"pending, running, completed, failed"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"total_repos"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"processed_repos"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"total_records"})}),(0,r.jsx)(s.td,{children:"integer"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"error"})}),(0,r.jsx)(s.td,{children:"text"}),(0,r.jsx)(s.td,{children:"Error message if failed"})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"started_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"completed_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"created_at"})}),(0,r.jsx)(s.td,{children:"timestamptz"}),(0,r.jsx)(s.td,{})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"testing",children:"Testing"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-sh",children:"# Unit tests (no database needed)\ncargo test --lib\n\n# All tests including end-to-end (SQLite by default)\ncargo test\n\n# Or run against Postgres\ndocker compose -f docker-compose.test.yml up -d\nTEST_DATABASE_URL=postgres://happyview:happyview@localhost:5433/happyview_test cargo test\ndocker compose -f docker-compose.test.yml down\n"})}),"\n",(0,r.jsxs)(s.p,{children:["End-to-end tests use ",(0,r.jsx)(s.code,{children:"wiremock"})," to mock external services (PLC directory, PDSes) and a real database for full integration coverage. By default tests use SQLite; set ",(0,r.jsx)(s.code,{children:"TEST_DATABASE_URL"})," to a Postgres connection string to test against Postgres."]})]})}function o(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},2560:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>c});var d=t(63);const r={},n=d.createContext(r);function i(e){const s=d.useContext(n);return d.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),d.createElement(n.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/33ec3d65.9c357e99.js b/assets/js/33ec3d65.9c357e99.js deleted file mode 100644 index baaaa3a..0000000 --- a/assets/js/33ec3d65.9c357e99.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6803],{6974(e,r,n){n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/architecture","title":"Architecture","description":"Guide for contributors working on HappyView itself. For a user-facing overview, see the Introduction.","source":"@site/docs/reference/architecture.md","sourceDirName":"reference","slug":"/reference/architecture","permalink":"/reference/architecture","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Glossary","permalink":"/reference/glossary"},"next":{"title":"Troubleshooting","permalink":"/reference/troubleshooting"}}');var t=n(4848),d=n(8453);const i={},c="Architecture",l={},o=[{value:"System overview",id:"system-overview",level:2},{value:"Module overview",id:"module-overview",level:2},{value:"Request flow",id:"request-flow",level:2},{value:"Reads (queries)",id:"reads-queries",level:3},{value:"Writes (procedures)",id:"writes-procedures",level:3},{value:"Admin endpoints",id:"admin-endpoints",level:3},{value:"Data flow",id:"data-flow",level:2},{value:"Real-time indexing",id:"real-time-indexing",level:3},{value:"Backfill",id:"backfill",level:3},{value:"Database schema",id:"database-schema",level:2},{value:"records",id:"records",level:3},{value:"lexicons",id:"lexicons",level:3},{value:"admins",id:"admins",level:3},{value:"backfill_jobs",id:"backfill_jobs",level:3},{value:"Testing",id:"testing",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",mermaid:"mermaid",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"architecture",children:"Architecture"})}),"\n",(0,t.jsxs)(r.p,{children:["Guide for contributors working on HappyView itself. For a user-facing overview, see the ",(0,t.jsx)(r.a,{href:"/",children:"Introduction"}),"."]}),"\n",(0,t.jsx)(r.h2,{id:"system-overview",children:"System overview"}),"\n",(0,t.jsx)(r.mermaid,{value:'graph LR\n Application\n\n Application --\x3e|"GET /xrpc/{method}"| Query\n Application --\x3e|"POST /xrpc/{method}"| Procedure\n\n subgraph HappyView\n Query["Query Handler
    Lua Script (Optional)"]\n Procedure["Procedure Handler
    Lua Script (Optional)"]\n end\n\n Procedure --\x3e DB\n Query --\x3e DB\n\n Procedure --\x3e|proxy write| PDS["User PDS"]\n\n DB[("PostgreSQL
    records \xb7 lexicons")]\n\n Tap["Tap
    WebSocket"] --\x3e|record events| DB\n Relay["Relay
    Firehose"] --\x3e Tap'}),"\n",(0,t.jsx)(r.p,{children:"Reads flow top-down through the query handler to Postgres. Writes flow through the procedure handler to the user's PDS, then HappyView indexes the record locally. All record data enters the system through Tap, which handles both real-time firehose events and historical backfill. HappyView syncs collection filters to Tap and discovers repos via the relay for backfill, but Tap performs all record fetching."}),"\n",(0,t.jsx)(r.h2,{id:"module-overview",children:"Module overview"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"src/\n main.rs Startup: config, DB, migrations, spawn Tap worker, start server\n lib.rs AppState struct, module declarations\n config.rs Environment variable loading\n error.rs AppError enum (Auth, BadRequest, Forbidden, Internal, NotFound, PdsError)\n server.rs Axum router: fixed routes + admin nest + XRPC catch-all + static files\n lexicon.rs ParsedLexicon, LexiconRegistry (Arc>)\n profile.rs DID document resolution, PDS discovery, profile fetching\n tap.rs Tap WebSocket listener, collection filter sync, backfill delegation\n aip.rs AIP reverse proxy\n resolve.rs NSID authority resolution (DNS TXT \u2192 DID \u2192 PDS)\n auth/\n mod.rs Re-exports\n middleware.rs Claims extractor (validates Bearer token via AIP /oauth/userinfo)\n jwks.rs JWKS key fetching\n admin/\n mod.rs Admin route definitions\n auth.rs AdminAuth extractor (Claims + DID lookup + auto-bootstrap)\n admins.rs Admin CRUD handlers\n lexicons.rs Lexicon CRUD handlers\n network_lexicons.rs Network lexicon tracking (add, list, remove)\n records.rs Record listing handler\n stats.rs Record count stats\n backfill.rs Backfill job creation (relay discovery + Tap delegation)\n types.rs Request/response structs for admin endpoints\n lua/\n mod.rs Re-exports\n context.rs Lua context globals (method, params, input, caller_did, collection)\n db_api.rs Lua database API (db.query, db.get, db.count)\n execute.rs Script execution and sandbox setup\n record.rs Lua Record API (constructor, save, delete, load)\n sandbox.rs Restricted Lua environment (removed modules, instruction limit)\n tid.rs TID generation for Lua scripts\n repo/\n mod.rs Re-exports\n dpop.rs DPoP JWT proof generation (ES256/P-256)\n pds.rs PDS proxy helpers (JSON POST, blob POST, response forwarding)\n session.rs ATP session fetching from AIP\n upload_blob.rs Blob upload handler\n xrpc/\n mod.rs Re-exports\n query.rs Dynamic GET handler (Lua script or default: single record + list)\n procedure.rs Dynamic POST handler (Lua script or default: create vs put)\n"})}),"\n",(0,t.jsx)(r.h2,{id:"request-flow",children:"Request flow"}),"\n",(0,t.jsx)(r.h3,{id:"reads-queries",children:"Reads (queries)"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"Client GET /xrpc/{method}?params\n -> xrpc::xrpc_get()\n -> LexiconRegistry lookup (must be Query type)\n -> If Lua script attached: execute script (has access to db API)\n -> Else: default SQL query on records table (collection from target_collection)\n -> JSON response\n"})}),"\n",(0,t.jsx)(r.h3,{id:"writes-procedures",children:"Writes (procedures)"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"Client POST /xrpc/{method} + Bearer token\n -> Claims extractor validates token via AIP /oauth/userinfo\n -> xrpc::xrpc_post()\n -> LexiconRegistry lookup (must be Procedure type)\n -> If Lua script attached: execute script (has access to Record API)\n -> Else: default create/update (auto-detect based on uri field)\n -> Fetch ATP session from AIP /api/atprotocol/session\n -> Generate DPoP proof (ES256)\n -> Proxy to user's PDS (createRecord or putRecord)\n -> Upsert record locally\n -> Forward PDS response\n"})}),"\n",(0,t.jsx)(r.h3,{id:"admin-endpoints",children:"Admin endpoints"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"Client request + Bearer token\n -> AdminAuth extractor:\n 1. Claims validation via AIP\n 2. DID lookup in admins table (auto-bootstrap if empty)\n 3. 403 if not admin\n -> Admin handler\n -> JSON response\n"})}),"\n",(0,t.jsx)(r.h2,{id:"data-flow",children:"Data flow"}),"\n",(0,t.jsx)(r.h3,{id:"real-time-indexing",children:"Real-time indexing"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"Tap WebSocket connection (tap::spawn)\n -> Collection filters synced to Tap on startup and lexicon changes\n -> Record events:\n create/update -> UPSERT into records table\n delete -> DELETE from records table\n -> Lexicon schema events (com.atproto.lexicon.schema):\n -> Update tracked network lexicons in DB and registry\n -> Reconnects automatically on errors or collection filter changes\n"})}),"\n",(0,t.jsx)(r.h3,{id:"backfill",children:"Backfill"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"POST /admin/backfill\n -> Create backfill_jobs record (status = running)\n -> Relay listReposByCollection -> list of DIDs\n -> Send DIDs to Tap in batches of 1000 (POST /repos/add)\n -> Mark job as completed\n -> Tap fetches records asynchronously and delivers via WebSocket\n"})}),"\n",(0,t.jsx)(r.h2,{id:"database-schema",children:"Database schema"}),"\n",(0,t.jsx)(r.h3,{id:"records",children:(0,t.jsx)(r.code,{children:"records"})}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Column"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"uri"})}),(0,t.jsx)(r.td,{children:"text (PK)"}),(0,t.jsxs)(r.td,{children:["AT URI (",(0,t.jsx)(r.code,{children:"at://did/collection/rkey"}),")"]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"did"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Author DID"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"collection"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Lexicon NSID"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"rkey"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Record key"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"record"})}),(0,t.jsx)(r.td,{children:"jsonb"}),(0,t.jsx)(r.td,{children:"Record value"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"cid"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Content identifier"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"indexed_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{children:"When HappyView indexed this record"})]})]})]}),"\n",(0,t.jsx)(r.h3,{id:"lexicons",children:(0,t.jsx)(r.code,{children:"lexicons"})}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Column"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"id"})}),(0,t.jsx)(r.td,{children:"text (PK)"}),(0,t.jsx)(r.td,{children:"Lexicon NSID"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"revision"})}),(0,t.jsx)(r.td,{children:"integer"}),(0,t.jsx)(r.td,{children:"Incremented on upsert"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"lexicon_json"})}),(0,t.jsx)(r.td,{children:"jsonb"}),(0,t.jsx)(r.td,{children:"Raw lexicon definition"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"lexicon_type"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"record, query, procedure, definitions"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"backfill"})}),(0,t.jsx)(r.td,{children:"boolean"}),(0,t.jsx)(r.td,{children:"Whether to backfill on upload"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"target_collection"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"For queries/procedures: which record collection"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"created_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"updated_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]})]})]}),"\n",(0,t.jsx)(r.h3,{id:"admins",children:(0,t.jsx)(r.code,{children:"admins"})}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Column"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"id"})}),(0,t.jsx)(r.td,{children:"uuid (PK)"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"did"})}),(0,t.jsx)(r.td,{children:"text (unique)"}),(0,t.jsx)(r.td,{children:"Admin's AT Protocol DID"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"created_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"last_used_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{children:"Updated on each authenticated request"})]})]})]}),"\n",(0,t.jsx)(r.h3,{id:"backfill_jobs",children:(0,t.jsx)(r.code,{children:"backfill_jobs"})}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Column"}),(0,t.jsx)(r.th,{children:"Type"}),(0,t.jsx)(r.th,{children:"Description"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"id"})}),(0,t.jsx)(r.td,{children:"uuid (PK)"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"collection"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Target collection (null = all)"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"did"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Target DID (null = all)"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"status"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"pending, running, completed, failed"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"total_repos"})}),(0,t.jsx)(r.td,{children:"integer"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"processed_repos"})}),(0,t.jsx)(r.td,{children:"integer"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"total_records"})}),(0,t.jsx)(r.td,{children:"integer"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"error"})}),(0,t.jsx)(r.td,{children:"text"}),(0,t.jsx)(r.td,{children:"Error message if failed"})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"started_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"completed_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:(0,t.jsx)(r.code,{children:"created_at"})}),(0,t.jsx)(r.td,{children:"timestamptz"}),(0,t.jsx)(r.td,{})]})]})]}),"\n",(0,t.jsx)(r.h2,{id:"testing",children:"Testing"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-sh",children:"# Unit tests (no database needed)\ncargo test --lib\n\n# All tests including end-to-end (requires Postgres)\ndocker compose -f docker-compose.test.yml up -d\nTEST_DATABASE_URL=postgres://happyview:happyview@localhost:5433/happyview_test cargo test\ndocker compose -f docker-compose.test.yml down\n"})}),"\n",(0,t.jsxs)(r.p,{children:["End-to-end tests use ",(0,t.jsx)(r.code,{children:"wiremock"})," to mock external services (AIP, PLC directory, PDSes) and a real Postgres database for full integration coverage."]})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>c});var s=n(6540);const t={},d=s.createContext(t);function i(e){const r=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/35de558a.441a7f8b.js b/assets/js/35de558a.441a7f8b.js new file mode 100644 index 0000000..96509be --- /dev/null +++ b/assets/js/35de558a.441a7f8b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9281],{320:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>o,frontMatter:()=>t,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"reference/admin/script-variables","title":"Admin API: Script Variables","description":"Script variables are encrypted key/value pairs available to Lua scripts via the vars global. Use them for secrets like API tokens.","source":"@site/docs/reference/admin/script-variables.md","sourceDirName":"reference/admin","slug":"/reference/admin/script-variables","permalink":"/reference/admin/script-variables","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Domains","permalink":"/reference/admin/domains"},"next":{"title":"API Clients","permalink":"/reference/admin/api-clients"}}');var a=s(199),n=s(2560);const t={},c="Admin API: Script Variables",l={},d=[{value:"List script variables",id:"list-script-variables",level:2},{value:"Upsert a script variable",id:"upsert-a-script-variable",level:2},{value:"Delete a script variable",id:"delete-a-script-variable",level:2}];function p(e){const r={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.header,{children:(0,a.jsx)(r.h1,{id:"admin-api-script-variables",children:"Admin API: Script Variables"})}),"\n",(0,a.jsxs)(r.p,{children:["Script variables are encrypted key/value pairs available to Lua scripts via the ",(0,a.jsx)(r.code,{children:"vars"})," global. Use them for secrets like API tokens."]}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,a.jsx)(r.h2,{id:"list-script-variables",children:"List script variables"}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{children:"GET /admin/script-variables\n"})}),"\n",(0,a.jsxs)(r.p,{children:["Requires ",(0,a.jsx)(r.code,{children:"script-variables:read"}),". Returns a list of variable keys (values are not returned)."]}),"\n",(0,a.jsx)(r.h2,{id:"upsert-a-script-variable",children:"Upsert a script variable"}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{children:"POST /admin/script-variables\n"})}),"\n",(0,a.jsxs)(r.p,{children:["Requires ",(0,a.jsx)(r.code,{children:"script-variables:create"}),"."]}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/script-variables \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "key": "ALGOLIA_API_KEY", "value": "..." }\'\n'})}),"\n",(0,a.jsxs)(r.p,{children:["The value is encrypted at rest using ",(0,a.jsx)(r.code,{children:"TOKEN_ENCRYPTION_KEY"}),"."]}),"\n",(0,a.jsx)(r.h2,{id:"delete-a-script-variable",children:"Delete a script variable"}),"\n",(0,a.jsx)(r.pre,{children:(0,a.jsx)(r.code,{children:"DELETE /admin/script-variables/{key}\n"})}),"\n",(0,a.jsxs)(r.p,{children:["Requires ",(0,a.jsx)(r.code,{children:"script-variables:delete"}),"."]})]})}function o(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,a.jsx)(r,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},2560:(e,r,s)=>{s.d(r,{R:()=>t,x:()=>c});var i=s(63);const a={},n=i.createContext(a);function t(e){const r=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),i.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3624.3861afa5.js b/assets/js/3624.3861afa5.js deleted file mode 100644 index 728f5e5..0000000 --- a/assets/js/3624.3861afa5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3624],{2062(t,n,r){r.d(n,{A:()=>a});var e=r(9471);const o=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};const c=function(t){return this.__data__.has(t)};function u(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e.A;++ne});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++re});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=0,c=[];++ro});var e=r(818);const o=function(t,n){return!!(null==t?0:t.length)&&(0,e.A)(t,n,0)>-1}},7809(t,n,r){r.d(n,{A:()=>e});const e=function(t,n,r){for(var e=-1,o=null==t?0:t.length;++ee});const e=function(t,n){for(var r=-1,e=null==t?0:t.length,o=Array(e);++re});const e=function(t,n){for(var r=-1,e=n.length,o=t.length;++re});const e=function(t,n){for(var r=-1,e=null==t?0:t.length;++rQ});var e=r(1754),o=r(2641),c=r(2851),u=r(2031),a=r(7422);const i=function(t,n){return t&&(0,u.A)(n,(0,a.A)(n),t)};var f=r(5615);const A=function(t,n){return t&&(0,u.A)(n,(0,f.A)(n),t)};var s=r(154),v=r(9759),l=r(4792);const b=function(t,n){return(0,u.A)(t,(0,l.A)(t),n)};var d=r(5892);const j=function(t,n){return(0,u.A)(t,(0,d.A)(t),n)};var p=r(9042),h=r(3973),y=r(9779),g=Object.prototype.hasOwnProperty;const w=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&g.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var _=r(565);const O=function(t,n){var r=n?(0,_.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)};var m=/\w*$/;const S=function(t){var n=new t.constructor(t.source,m.exec(t));return n.lastIndex=t.lastIndex,n};var k=r(241),E=k.A?k.A.prototype:void 0,x=E?E.valueOf:void 0;const I=function(t){return x?Object(x.call(t)):{}};var U=r(1801);const B=function(t,n,r){var e=t.constructor;switch(n){case"[object ArrayBuffer]":return(0,_.A)(t);case"[object Boolean]":case"[object Date]":return new e(+t);case"[object DataView]":return O(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return(0,U.A)(t,r);case"[object Map]":case"[object Set]":return new e;case"[object Number]":case"[object String]":return new e(t);case"[object RegExp]":return S(t);case"[object Symbol]":return I(t)}};var C=r(8598),D=r(2049),F=r(9912),M=r(3098);const z=function(t){return(0,M.A)(t)&&"[object Map]"==(0,y.A)(t)};var L=r(2789),P=r(4841),$=P.A&&P.A.isMap;const N=$?(0,L.A)($):z;var R=r(3149);const V=function(t){return(0,M.A)(t)&&"[object Set]"==(0,y.A)(t)};var G=P.A&&P.A.isSet;const W=G?(0,L.A)(G):V;var q="[object Arguments]",H="[object Function]",J="[object Object]",K={};K[q]=K["[object Array]"]=K["[object ArrayBuffer]"]=K["[object DataView]"]=K["[object Boolean]"]=K["[object Date]"]=K["[object Float32Array]"]=K["[object Float64Array]"]=K["[object Int8Array]"]=K["[object Int16Array]"]=K["[object Int32Array]"]=K["[object Map]"]=K["[object Number]"]=K[J]=K["[object RegExp]"]=K["[object Set]"]=K["[object String]"]=K["[object Symbol]"]=K["[object Uint8Array]"]=K["[object Uint8ClampedArray]"]=K["[object Uint16Array]"]=K["[object Uint32Array]"]=!0,K["[object Error]"]=K[H]=K["[object WeakMap]"]=!1;const Q=function t(n,r,u,l,d,g){var _,O=1&r,m=2&r,S=4&r;if(u&&(_=d?u(n,l,d,g):u(n)),void 0!==_)return _;if(!(0,R.A)(n))return n;var k=(0,D.A)(n);if(k){if(_=w(n),!O)return(0,v.A)(n,_)}else{var E=(0,y.A)(n),x=E==H||"[object GeneratorFunction]"==E;if((0,F.A)(n))return(0,s.A)(n,O);if(E==J||E==q||x&&!d){if(_=m||x?{}:(0,C.A)(n),!O)return m?j(n,A(_,n)):b(n,i(_,n))}else{if(!K[E])return d?n:{};_=B(n,E,O)}}g||(g=new e.A);var I=g.get(n);if(I)return I;g.set(n,_),W(n)?n.forEach(function(e){_.add(t(e,r,u,e,n,g))}):N(n)&&n.forEach(function(e,o){_.set(o,t(e,r,u,o,n,g))});var U=S?m?h.A:p.A:m?f.A:a.A,M=k?void 0:U(n);return(0,o.A)(M||n,function(e,o){M&&(e=n[o=e]),(0,c.A)(_,o,t(e,r,u,o,n,g))}),_}},6240(t,n,r){r.d(n,{A:()=>c});var e=r(9841),o=r(8446);const c=function(t,n){return function(r,e){if(null==r)return r;if(!(0,o.A)(r))return t(r,e);for(var c=r.length,u=n?c:-1,a=Object(r);(n?u--:++uo});var e=r(6240);const o=function(t,n){var r=[];return(0,e.A)(t,function(t,e,o){n(t,e,o)&&r.push(t)}),r}},5707(t,n,r){r.d(n,{A:()=>e});const e=function(t,n,r,e){for(var o=t.length,c=r+(e?1:-1);e?c--:++cf});var e=r(6912),o=r(241),c=r(2274),u=r(2049),a=o.A?o.A.isConcatSpreadable:void 0;const i=function(t){return(0,u.A)(t)||(0,c.A)(t)||!!(a&&t&&t[a])};const f=function t(n,r,o,c,u){var a=-1,f=n.length;for(o||(o=i),u||(u=[]);++a0&&o(A)?r>1?t(A,r-1,o,c,u):(0,e.A)(u,A):c||(u[u.length]=A)}return u}},9841(t,n,r){r.d(n,{A:()=>c});var e=r(4574),o=r(7422);const c=function(t,n){return t&&(0,e.A)(t,n,o.A)}},6318(t,n,r){r.d(n,{A:()=>c});var e=r(7819),o=r(901);const c=function(t,n){for(var r=0,c=(n=(0,e.A)(n,t)).length;null!=t&&rc});var e=r(6912),o=r(2049);const c=function(t,n,r){var c=n(t);return(0,o.A)(t)?c:(0,e.A)(c,r(t))}},818(t,n,r){r.d(n,{A:()=>u});var e=r(5707);const o=function(t){return t!=t};const c=function(t,n,r){for(var e=r-1,o=t.length;++eJ});var e=r(1754),o=r(2062),c=r(3736),u=r(4099);const a=function(t,n,r,e,a,i){var f=1&r,A=t.length,s=n.length;if(A!=s&&!(f&&s>A))return!1;var v=i.get(t),l=i.get(n);if(v&&l)return v==n&&l==t;var b=-1,d=!0,j=2&r?new o.A:void 0;for(i.set(t,n),i.set(n,t);++be});const e=function(t){return function(n){return null==n?void 0:n[t]}}},9902(t,n,r){r.d(n,{A:()=>s});var e=r(2062),o=r(5530),c=r(7809),u=r(4099),a=r(9857),i=r(2302),f=r(9959);const A=a.A&&1/(0,f.A)(new a.A([,-0]))[1]==1/0?function(t){return new a.A(t)}:i.A;const s=function(t,n,r){var a=-1,i=o.A,s=t.length,v=!0,l=[],b=l;if(r)v=!1,i=c.A;else if(s>=200){var d=n?null:A(t);if(d)return(0,f.A)(d);v=!1,i=u.A,b=new e.A}else b=n?[]:l;t:for(;++ae});const e=function(t,n){return t.has(n)}},9922(t,n,r){r.d(n,{A:()=>o});var e=r(9008);const o=function(t){return"function"==typeof t?t:e.A}},7819(t,n,r){r.d(n,{A:()=>A});var e=r(2049),o=r(6586),c=r(6632);var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g;const i=function(t){var n=(0,c.A)(t,function(t){return 500===r.size&&r.clear(),t}),r=n.cache;return n}(function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(u,function(t,r,e,o){n.push(e?o.replace(a,"$1"):r||t)}),n});var f=r(8894);const A=function(t,n){return(0,e.A)(t)?t:(0,o.A)(t,n)?[t]:i((0,f.A)(t))}},9042(t,n,r){r.d(n,{A:()=>u});var e=r(3831),o=r(4792),c=r(7422);const u=function(t){return(0,e.A)(t,c.A,o.A)}},3973(t,n,r){r.d(n,{A:()=>u});var e=r(3831),o=r(5892),c=r(5615);const u=function(t){return(0,e.A)(t,c.A,o.A)}},4792(t,n,r){r.d(n,{A:()=>a});var e=r(2634),o=r(3153),c=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols;const a=u?function(t){return null==t?[]:(t=Object(t),(0,e.A)(u(t),function(n){return c.call(t,n)}))}:o.A},5892(t,n,r){r.d(n,{A:()=>a});var e=r(6912),o=r(5647),c=r(4792),u=r(3153);const a=Object.getOwnPropertySymbols?function(t){for(var n=[];t;)(0,e.A)(n,(0,c.A)(t)),t=(0,o.A)(t);return n}:u.A},5054(t,n,r){r.d(n,{A:()=>f});var e=r(7819),o=r(2274),c=r(2049),u=r(5353),a=r(5254),i=r(901);const f=function(t,n,r){for(var f=-1,A=(n=(0,e.A)(n,t)).length,s=!1;++fa});var e=r(2049),o=r(1882),c=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,u=/^\w*$/;const a=function(t,n){if((0,e.A)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,o.A)(t))||(u.test(t)||!c.test(t)||null!=n&&t in Object(n))}},9959(t,n,r){r.d(n,{A:()=>e});const e=function(t){var n=-1,r=Array(t.size);return t.forEach(function(t){r[++n]=t}),r}},901(t,n,r){r.d(n,{A:()=>o});var e=r(1882);const o=function(t){if("string"==typeof t||(0,e.A)(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4092(t,n,r){r.d(n,{A:()=>a});var e=r(2634),o=r(1790),c=r(3958),u=r(2049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n,3))}},8058(t,n,r){r.d(n,{A:()=>a});var e=r(2641),o=r(6240),c=r(9922),u=r(2049);const a=function(t,n){return((0,u.A)(t)?e.A:o.A)(t,(0,c.A)(n))}},9188(t,n,r){r.d(n,{A:()=>c});const e=function(t,n){return null!=t&&n in Object(t)};var o=r(5054);const c=function(t,n){return null!=t&&(0,o.A)(t,n,e)}},1882(t,n,r){r.d(n,{A:()=>c});var e=r(8496),o=r(3098);const c=function(t){return"symbol"==typeof t||(0,o.A)(t)&&"[object Symbol]"==(0,e.A)(t)}},9592(t,n,r){r.d(n,{A:()=>e});const e=function(t){return void 0===t}},7422(t,n,r){r.d(n,{A:()=>u});var e=r(3607),o=r(1852),c=r(8446);const u=function(t){return(0,c.A)(t)?(0,e.A)(t):(0,o.A)(t)}},2302(t,n,r){r.d(n,{A:()=>e});const e=function(){}},9463(t,n,r){r.d(n,{A:()=>i});const e=function(t,n,r,e){var o=-1,c=null==t?0:t.length;for(e&&c&&(r=t[++o]);++oe});const e=function(){return[]}},8894(t,n,r){r.d(n,{A:()=>A});var e=r(241),o=r(5572),c=r(2049),u=r(1882),a=e.A?e.A.prototype:void 0,i=a?a.toString:void 0;const f=function t(n){if("string"==typeof n)return n;if((0,c.A)(n))return(0,o.A)(n,t)+"";if((0,u.A)(n))return i?i.call(n):"";var r=n+"";return"0"==r&&1/n==-1/0?"-0":r};const A=function(t){return null==t?"":f(t)}},8207(t,n,r){r.d(n,{A:()=>u});var e=r(5572);const o=function(t,n){return(0,e.A)(n,function(n){return t[n]})};var c=r(7422);const u=function(t){return null==t?[]:o(t,(0,c.A)(t))}}}]); \ No newline at end of file diff --git a/assets/js/3640.ab87713a.js b/assets/js/3640.ab87713a.js new file mode 100644 index 0000000..dc01756 --- /dev/null +++ b/assets/js/3640.ab87713a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3640],{3640:(t,e,i)=>{i.d(e,{diagram:()=>C});var n=i(6417),s=i(2101),a=i(5691),r=i(8894),h=i(1965),o=function(){var t=(0,r.K2)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,14],n=[1,12],s=[1,13],a=[6,7,8],h=[1,20],o=[1,18],l=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:(0,r.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:(0,r.K2)(function(t,e,i,n,s,a,r){var h=a.length-1;switch(s){case 6:case 7:return n;case 15:n.addNode(a[h-1].length,a[h].trim());break;case 16:n.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:s},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:15,13:n,14:s},{6:i,9:16,12:11,13:n,14:s},{6:h,7:o,10:17,11:l},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:o,10:22,11:l},{1:[2,7],6:i,12:15,13:n,14:s},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,r.K2)(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:(0,r.K2)(function(t){var e=this,i=[0],n=[],s=[null],a=[],h=this.table,o="",l=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);y.setInput(t,p.yy),p.yy.lexer=y,p.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;a.push(f);var k=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=n.pop()||y.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),(0,r.K2)(m,"lex");for(var w,x,_,b,v,S,K,$,I,E={};;){if(_=i[i.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null==w&&(w=m()),b=h[_]&&h[_][w]),void 0===b||!b.length||!b[0]){var A="";for(S in I=[],h[_])this.terminals_[S]&&S>2&&I.push("'"+this.terminals_[S]+"'");A=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[w]||w,line:y.yylineno,loc:f,expected:I})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+w);switch(b[0]){case 1:i.push(w),s.push(y.yytext),a.push(y.yylloc),i.push(b[1]),w=null,x?(w=x,x=null):(c=y.yyleng,o=y.yytext,l=y.yylineno,f=y.yylloc,u>0&&u--);break;case 2:if(K=this.productions_[b[1]][1],E.$=s[s.length-K],E._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},k&&(E._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[o,c,l,p.yy,b[1],s,a].concat(d))))return v;K&&(i=i.slice(0,-1*K*2),s=s.slice(0,-1*K),a=a.slice(0,-1*K)),i.push(this.productions_[b[1]][0]),s.push(E.$),a.push(E._$),$=h[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,r.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K2)(function(){return this._more=!0,this},"more"),reject:(0,r.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K2)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var a in s)this[a]=s[a];return!1}return!1},"test_match"),next:(0,r.K2)(function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),a=0;ae[0].length)){if(e=i,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K2)(function(t,e,i,n){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function k(){this.yy={}}return g.lexer=f,(0,r.K2)(k,"Parser"),k.prototype=g,g.Parser=k,new k}();o.parser=o;var l=o,c=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,r.K2)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){const i=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root)return this.root={text:i,children:[]},this.stack=[{level:0,node:this.root}],void(0,a.ke)(i);this.baseLevel??=t;let n=t-this.baseLevel+1;for(n<=0&&(n=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=n;)this.stack.pop();const s={text:i,children:[]};this.stack[this.stack.length-1].node.children.push(s),this.stack.push({level:n,node:s})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},u=250,d=82*Math.PI/180,y=Math.cos(d),p=Math.sin(d),g=(0,r.K2)((t,e,i)=>{const n=t.node().getBBox(),s=n.width+2*e,r=n.height+2*e;(0,a.a$)(t,r,s,i),t.attr("viewBox",`${n.x-e} ${n.y-e} ${s} ${r}`)},"applyPaddedViewBox"),f=(0,r.K2)((t,e,i,r)=>{const o=r.db.getRoot();if(!o)return;const l=(0,a.D7)(),{look:c,handDrawnSeed:d,themeVariables:y}=l,p=(0,s.I5)(l.fontSize)[0]??14,f="handDrawn"===c,w=o.children??[],x=l.ishikawa?.diagramPadding??20,_=l.ishikawa?.useMaxWidth??!1,v=(0,n.D)(e),S=v.append("g").attr("class","ishikawa"),K=f?h.A.svg(v.node()):void 0,$=K?{roughSvg:K,seed:d??0,lineColor:y?.lineColor??"#333",fillColor:y?.mainBkg??"#fff"}:void 0,E=`ishikawa-arrow-${e}`;f||S.append("defs").append("marker").attr("id",E).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let A=0,C=u;const L=f?void 0:I(S,A,C,A,C,"ishikawa-spine");if(m(S,A,C,o.text,p,$),!w.length)return f&&I(S,A,C,A,C,"ishikawa-spine",$),void g(v,x,_);A-=20;const M=w.filter((t,e)=>e%2==0),P=w.filter((t,e)=>e%2==1),T=k(M),B=k(P),D=T.total+B.total;let N=u,O=u;if(D>0){const t=500,e=75;N=Math.max(e,t*(T.total/D)),O=Math.max(e,t*(B.total/D))}const W=2*p;N=Math.max(N,T.max*W),O=Math.max(O,B.max*W),C=Math.max(N,u),L&&L.attr("y1",C).attr("y2",C),S.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);const j=Math.ceil(w.length/2);for(let n=0;nMath.min(t,e.getBBox().x),1/0)}if(f)I(S,A,C,0,C,"ishikawa-spine",$);else{L.attr("x1",A);const t=`url(#${E})`;S.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}g(v,x,_)},"draw"),k=(0,r.K2)(t=>{const e=(0,r.K2)(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return t.reduce((t,i)=>{const n=e(i);return t.total+=n,t.max=Math.max(t.max,n),t},{total:0,max:0})},"sideStats"),m=(0,r.K2)((t,e,i,n,s,a)=>{const r=Math.max(6,Math.floor(110/(.6*s))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),o=K(h,S(n,r),0,0,"ishikawa-head-label","start",s),l=o.node().getBBox(),c=Math.max(60,l.width+6),u=Math.max(40,2*l.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){const t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);o.attr("transform",`translate(${(c-l.width)/2-l.x+3},${-l.y-l.height/2})`)},"drawHead"),w=(0,r.K2)((t,e)=>{const i=[],n=[],s=(0,r.K2)((t,a,r)=>{const h=-1===e?[...t].reverse():t;for(const e of h){const t=i.length,h=e.children??[];i.push({depth:r,text:S(e.text,15),parentIndex:a,childCount:h.length}),r%2==0?(n.push(t),h.length&&s(h,t,r+1)):(h.length&&s(h,t,r+1),n.push(t))}},"walk");return s(t,-1,2),{entries:i,yOrder:n}},"flattenTree"),x=(0,r.K2)((t,e,i,n,s,a,r)=>{const h=t.append("g").attr("class","ishikawa-label-group"),o=K(h,e,i,n+11*s,"ishikawa-label cause","middle",a).node().getBBox();if(r){const t=r.roughSvg.rectangle(o.x-20,o.y-2,o.width+40,o.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",o.x-20).attr("y",o.y-2).attr("width",o.width+40).attr("height",o.height+4)},"drawCauseLabel"),_=(0,r.K2)((t,e,i,n,s,a)=>{const r=Math.sqrt(n*n+s*s);if(0===r)return;const h=n/r,o=s/r,l=6*-o,c=6*h,u=`M ${e} ${i} L ${e-6*h*2+l} ${i-6*o*2+c} L ${e-6*h*2-l} ${i-6*o*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),b=(0,r.K2)((t,e,i,n,s,a,r,h)=>{const o=e.children??[],l=a*(o.length?1:.2),c=p*l*s,u=i+-y*l,d=n+c;if(I(t,i,n,u,d,"ishikawa-branch",h),h&&_(t,i,n,i-u,n-d,h),x(t,e.text,u,d,s,r,h),!o.length)return;const{entries:g,yOrder:f}=w(o,s),k=g.length,m=new Array(k);for(const[y,p]of f.entries())m[p]=n+c*((y+1)/(k+1));const b=new Map;b.set(-1,{x0:i,y0:n,x1:u,y1:d,childCount:o.length,childrenDrawn:0});const v=-y,S=p*s,E=s<0?"ishikawa-label up":"ishikawa-label down";for(const[y,p]of g.entries()){const e=m[y],i=b.get(p.parentIndex),n=t.append("g").attr("class","ishikawa-sub-group");let s=0,a=0,o=0;if(p.depth%2==0){const t=i.y1-i.y0;s=$(i.x0,i.x1,t?(e-i.y0)/t:.5),a=e,o=s-(p.childCount>0?60+5*p.childCount:30),I(n,s,e,o,e,"ishikawa-sub-branch",h),h&&_(n,s,e,1,0,h),K(n,p.text,o,e,"ishikawa-label align","end",r)}else{const t=i.childrenDrawn++;s=$(i.x0,i.x1,(i.childCount-t)/(i.childCount+1)),a=i.y0,o=s+v*((e-a)/S),I(n,s,a,o,e,"ishikawa-sub-branch",h),h&&_(n,s,a,s-o,a-e,h),K(n,p.text,o,e,E,"end",r)}p.childCount>0&&b.set(y,{x0:s,y0:a,x1:o,y1:e,childCount:p.childCount,childrenDrawn:0})}},"drawBranch"),v=(0,r.K2)(t=>t.split(/|\n/),"splitLines"),S=(0,r.K2)((t,e)=>{if(t.length<=e)return t;const i=[];for(const n of t.split(/\s+/)){const t=i.length-1;t>=0&&i[t].length+1+n.length<=e?i[t]+=" "+n:i.push(n)}return i.join("\n")},"wrapText"),K=(0,r.K2)((t,e,i,n,s,a,r)=>{const h=v(e),o=1.05*r,l=t.append("text").attr("class",s).attr("text-anchor",a).attr("x",i).attr("y",n-(h.length-1)*o/2);for(const[c,u]of h.entries())l.append("tspan").attr("x",i).attr("dy",0===c?0:o).text(u);return l},"drawMultilineText"),$=(0,r.K2)((t,e,i)=>t+(e-t)*i,"lerp"),I=(0,r.K2)((t,e,i,n,s,a,r)=>{if(r){const h=r.roughSvg.line(e,i,n,s,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});return void t.append(()=>h).attr("class",a)}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",n).attr("y2",s)},"drawLine"),E={draw:f},A=(0,r.K2)(t=>`\n.ishikawa .ishikawa-spine,\n.ishikawa .ishikawa-branch,\n.ishikawa .ishikawa-sub-branch {\n stroke: ${t.lineColor};\n stroke-width: 2;\n fill: none;\n}\n\n.ishikawa .ishikawa-sub-branch {\n stroke-width: 1;\n}\n\n.ishikawa .ishikawa-arrow {\n fill: ${t.lineColor};\n}\n\n.ishikawa .ishikawa-head {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa .ishikawa-label-box {\n fill: ${t.mainBkg};\n stroke: ${t.lineColor};\n stroke-width: 2;\n}\n\n.ishikawa text {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n fill: ${t.textColor};\n}\n\n.ishikawa .ishikawa-head-label {\n font-weight: 600;\n text-anchor: middle;\n dominant-baseline: middle;\n font-size: 14px;\n}\n\n.ishikawa .ishikawa-label {\n text-anchor: end;\n}\n\n.ishikawa .ishikawa-label.cause {\n text-anchor: middle;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.align {\n text-anchor: end;\n dominant-baseline: middle;\n}\n\n.ishikawa .ishikawa-label.up {\n dominant-baseline: baseline;\n}\n\n.ishikawa .ishikawa-label.down {\n dominant-baseline: hanging;\n}\n`,"getStyles"),C={parser:l,get db(){return new c},renderer:E,styles:A}}}]); \ No newline at end of file diff --git a/assets/js/3674.68984e32.js b/assets/js/3674.68984e32.js new file mode 100644 index 0000000..b300be2 --- /dev/null +++ b/assets/js/3674.68984e32.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3674],{3674:(t,e,a)=>{a.d(e,{diagram:()=>R});var i,n=a(5105),r=(a(7330),a(3830),a(163),a(1562),a(2125),a(5707),a(3276),a(4061),a(7127),a(2101)),d=a(5691),s=a(8894),o=a(1485),g=a(9808),p=a(7446),h=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),c=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),l=(0,s.K2)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),x=(0,s.K2)((t,e)=>{const a=(0,s.K2)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(r,t,g),g=!1),o=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),D=(0,s.K2)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),u=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),f=(0,s.K2)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),y=(0,s.K2)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const p of o){const t=p.trim();if(t.length>0){const i=r.append("tspan");if(i.text(t),0===g){g+=i.node().getBBox().height}n+=g,i.attr("x",e+(0,d.D7)().state.noteMargin),i.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),w=(0,s.K2)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=y(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),m=(0,s.K2)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&h(n),"end"===e.type&&u(n),"fork"!==e.type&&"join"!==e.type||f(n,e),"note"===e.type&&w(e.note.text,n),"divider"===e.type&&c(n),"default"===e.type&&0===e.descriptions.length&&l(n,e),"default"===e.type&&e.descriptions.length>0&&x(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),b=0,B=(0,s.K2)(function(t,e,a){const i=(0,s.K2)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const g=e.points,p=(0,o.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.qrM),h=t.append("path").attr("d",p(g)).attr("id","edge"+b).attr("class","transition");let c="";if((0,d.D7)().state.arrowMarkerAbsolute&&(c=(0,d.ID)(!0)),h.attr("marker-end","url("+c+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.Rm.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.Rm.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.Rm.info(D)}b++},"drawEdge"),k={},S=(0,s.K2)(function(){},"setConf"),N=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),E=(0,s.K2)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let g;"sandbox"===r&&(g=(0,o.Ltv)("#i"+e));const p="sandbox"===r?(0,o.Ltv)(g.nodes()[0].contentDocument.body):(0,o.Ltv)("body"),h="sandbox"===r?g.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);N(c);const l=n.db.getRootDoc(),x=c.append("g").attr("id",e+"-root");M(l,x,void 0,!1,p,h,n);const D=i.padding,u=c.node().getBBox(),f=u.width+2*D,y=u.height+2*D,w=1.75*f;(0,d.a$)(c,y,w,i.useMaxWidth),c.attr("viewBox",`${u.x-i.padding} ${u.y-i.padding} `+f+" "+y)},"draw"),v=(0,s.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),M=(0,s.K2)((t,e,a,n,r,o,h)=>{const c=new p.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else s.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let S=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),B(e,c.edge(t),c.edge(t).relation))}),S=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=S.width+2*i.padding,N.height=S.height+2*i.padding,s.Rm.debug("Doc rendered",N,c),N},"renderDoc"),K={setConf:S,draw:E},R={parser:n.Zk,get db(){return new n.u4(1)},renderer:K,styles:n.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/3718.2a1cf4e7.js b/assets/js/3718.2a1cf4e7.js new file mode 100644 index 0000000..ce24f18 --- /dev/null +++ b/assets/js/3718.2a1cf4e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3718],{3718:(e,c,s)=>{s.d(c,{createArchitectureServices:()=>p.S});var p=s(8210);s(3580)}}]); \ No newline at end of file diff --git a/assets/js/3815.62684417.js b/assets/js/3815.62684417.js deleted file mode 100644 index b479c64..0000000 --- a/assets/js/3815.62684417.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3815],{3815(e,r,s){s.d(r,{diagram:()=>c});var a=s(1746),t=(s(2501),s(9625),s(1152),s(45),s(5164),s(8698),s(5894),s(3245),s(2387),s(92),s(3226),s(7633),s(797)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/3d80a749.4b7483e6.js b/assets/js/3d80a749.4b7483e6.js deleted file mode 100644 index 988be19..0000000 --- a/assets/js/3d80a749.4b7483e6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5219],{6755(e,n,r){r.r(n),r.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>i,toc:()=>t});const i=JSON.parse('{"id":"reference/changelog","title":"Changelog","description":"v1.9.0 \u2014 Event Logs","source":"@site/docs/reference/changelog.md","sourceDirName":"reference","slug":"/reference/changelog","permalink":"/reference/changelog","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{}}');var s=r(4848),l=r(8453);const c={},d="Changelog",o={},t=[{value:"v1.9.0 \u2014 Event Logs",id:"v190--event-logs",level:2},{value:"v1.8.0 \u2014 Advanced Queries",id:"v180--advanced-queries",level:2},{value:"v1.7.1 \u2014 Patch",id:"v171--patch",level:2},{value:"v1.7.0 \u2014 Lua DB API Improvements",id:"v170--lua-db-api-improvements",level:2},{value:"v1.6.2 \u2014 Patch",id:"v162--patch",level:2},{value:"v1.6.1 \u2014 Patch",id:"v161--patch",level:2},{value:"v1.6.0 \u2014 Record Management",id:"v160--record-management",level:2},{value:"v1.5.1 \u2014 Patch",id:"v151--patch",level:2},{value:"v1.5.0 \u2014 Lua Scripting & Dashboard Overhaul",id:"v150--lua-scripting--dashboard-overhaul",level:2}];function a(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"changelog",children:"Changelog"})}),"\n",(0,s.jsx)(n.h2,{id:"v190--event-logs",children:"v1.9.0 \u2014 Event Logs"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Event logging"})," \u2014 system-wide audit trail for lexicon changes, record operations, Lua script executions/errors, admin actions, backfill jobs, and Tap connectivity"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"GET /admin/events"})})," \u2014 query event logs with filtering by event type, category, severity, and subject, with cursor pagination"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lua error context"})," \u2014 script errors capture full debugging context: error message, script source, input payload, and caller DID"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Automatic retention cleanup"})," \u2014 configurable via ",(0,s.jsx)(n.code,{children:"EVENT_LOG_RETENTION_DAYS"})," (default 30 days)"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v180--advanced-queries",children:"v1.8.0 \u2014 Advanced Queries"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"db.backlinks()"})})," \u2014 find records that reference a given AT URI"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"db.raw()"})})," \u2014 run raw read-only SQL with parameterized queries and automatic column type mapping"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v171--patch",children:"v1.7.1 \u2014 Patch"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Fixed Docker Compose database URLs for local dev"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v170--lua-db-api-improvements",children:"v1.7.0 \u2014 Lua DB API Improvements"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"toarray()"})})," utility \u2014 force Lua tables to serialize as JSON arrays (fixes empty ",(0,s.jsx)(n.code,{children:"{}"})," vs ",(0,s.jsx)(n.code,{children:"[]"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"db.search()"})})," \u2014 text search on record fields with relevance ranking"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Array serialization fix"})," \u2014 ",(0,s.jsx)(n.code,{children:"db.query()"})," and ",(0,s.jsx)(n.code,{children:"db.search()"})," now always return proper arrays for ",(0,s.jsx)(n.code,{children:"records"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v162--patch",children:"v1.6.2 \u2014 Patch"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Fixed auth: use original auth scheme instead of hardcoded DPoP"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v161--patch",children:"v1.6.1 \u2014 Patch"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Fixed broken dynamic page routes"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v160--record-management",children:"v1.6.0 \u2014 Record Management"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Delete records"})," from the dashboard and API (individual and bulk collection deletion)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:'"View Records" buttons'})," on lexicon pages"]}),"\n",(0,s.jsx)(n.li,{children:"Bug fixes: backfill now loads previously deleted records, empty collections shown in dropdown"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v151--patch",children:"v1.5.1 \u2014 Patch"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Removed backfill toggle from query/procedure lexicons (only applies to record lexicons)"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"v150--lua-scripting--dashboard-overhaul",children:"v1.5.0 \u2014 Lua Scripting & Dashboard Overhaul"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lua scripting"})," \u2014 attach custom Lua scripts to query and procedure lexicons"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Docusaurus docs site"})," with GitHub Pages deploy"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Dark mode"})," for the dashboard"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Records table"})," reworked with dynamic columns, column visibility, and better scrolling"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Backfill stats tracking"})}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Network and local lexicons merged"})," into a unified view"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Shiki code highlighting"})," in the dashboard"]}),"\n",(0,s.jsx)(n.li,{children:"Bug fixes: rogue record storage, collection dropdown, dynamic page builds"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},8453(e,n,r){r.d(n,{R:()=>c,x:()=>d});var i=r(6540);const s={},l=i.createContext(s);function c(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3d80a749.b56095d6.js b/assets/js/3d80a749.b56095d6.js new file mode 100644 index 0000000..e9806ed --- /dev/null +++ b/assets/js/3d80a749.b56095d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5219],{5975:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"reference/changelog","title":"Changelog","description":"v2.1.0 \u2014 Native OAuth & Instance Settings","source":"@site/docs/reference/changelog.md","sourceDirName":"reference","slug":"/reference/changelog","permalink":"/reference/changelog","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{}}');var r=s(199),l=s(2560);const t={},d="Changelog",c={},a=[{value:"v2.1.0 \u2014 Native OAuth & Instance Settings",id:"v210--native-oauth--instance-settings",level:2},{value:"v2.0.0 \u2014 User Permissions & Settings Restructure",id:"v200--user-permissions--settings-restructure",level:2},{value:"v1.9.0 \u2014 Event Logs",id:"v190--event-logs",level:2},{value:"v1.8.0 \u2014 Advanced Queries",id:"v180--advanced-queries",level:2},{value:"v1.7.1 \u2014 Patch",id:"v171--patch",level:2},{value:"v1.7.0 \u2014 Lua DB API Improvements",id:"v170--lua-db-api-improvements",level:2},{value:"v1.6.2 \u2014 Patch",id:"v162--patch",level:2},{value:"v1.6.1 \u2014 Patch",id:"v161--patch",level:2},{value:"v1.6.0 \u2014 Record Management",id:"v160--record-management",level:2},{value:"v1.5.1 \u2014 Patch",id:"v151--patch",level:2},{value:"v1.5.0 \u2014 Lua Scripting & Dashboard Overhaul",id:"v150--lua-scripting--dashboard-overhaul",level:2}];function o(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"changelog",children:"Changelog"})}),"\n",(0,r.jsx)(n.h2,{id:"v210--native-oauth--instance-settings",children:"v2.1.0 \u2014 Native OAuth & Instance Settings"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Built-in OAuth"})," \u2014 replaced external AIP OAuth dependency with native ",(0,r.jsx)(n.code,{children:"atrium-oauth"})," integration; HappyView manages the full OAuth flow internally"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Instance settings"})," \u2014 new ",(0,r.jsx)(n.code,{children:"instance_settings"})," key/value table for configurable instance metadata (app name, logo, ToS, privacy policy) with env var fallback"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"OAuth branding"})," \u2014 authorization screens now show configurable app name, logo, terms of service, and privacy policy links via the ",(0,r.jsx)(n.code,{children:"/oauth-client-metadata.json"})," endpoint"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Logo upload"})," \u2014 upload a logo image via ",(0,r.jsx)(n.code,{children:"PUT /admin/settings/logo"})," (stored in DB, served at ",(0,r.jsx)(n.code,{children:"GET /settings/logo"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsxs)(n.strong,{children:[(0,r.jsx)(n.code,{children:"settings:manage"})," permission"]})," \u2014 new permission for managing instance settings, included in Manager and Full Access templates"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Redirect URI support"})," \u2014 ",(0,r.jsx)(n.code,{children:"/auth/login"})," accepts optional ",(0,r.jsx)(n.code,{children:"redirect_uri"})," parameter for post-login navigation"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"CORS improvements"})," \u2014 origin-mirroring CORS with credentials support for cross-origin auth flows"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v200--user-permissions--settings-restructure",children:"v2.0.0 \u2014 User Permissions & Settings Restructure"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"User permissions system"})," \u2014 replaced the ",(0,r.jsx)(n.code,{children:"admins"})," table with a ",(0,r.jsx)(n.code,{children:"users"})," table supporting 20 granular permissions, permission templates (Viewer, Operator, Manager, Full Access), and a super user concept with escalation and self-modification guards"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"API key permissions"})," \u2014 API keys now have explicit scoped permissions instead of inheriting full admin access; effective permissions are the intersection of the key's permissions and the user's permissions"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"User handles"})," \u2014 user handles are now displayed alongside DIDs throughout the dashboard"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Settings sub-pages"})," \u2014 Settings page restructured into Users, ENV Variables, and API Keys sub-pages with collapsible sidebar navigation"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Dashboard route prefix"})," \u2014 all dashboard pages now live under the ",(0,r.jsx)(n.code,{children:"/dashboard"})," route prefix"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"New endpoints"})," \u2014 ",(0,r.jsx)(n.code,{children:"GET /admin/users/{id}"}),", ",(0,r.jsx)(n.code,{children:"PATCH /admin/users/{id}/permissions"}),", ",(0,r.jsx)(n.code,{children:"POST /admin/users/transfer-super"}),", ",(0,r.jsx)(n.code,{children:"GET/POST/DELETE /admin/script-variables"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"New event types"})," \u2014 ",(0,r.jsx)(n.code,{children:"user.permissions_updated"}),", ",(0,r.jsx)(n.code,{children:"user.super_transferred"}),", ",(0,r.jsx)(n.code,{children:"auth.permission_denied"}),", ",(0,r.jsx)(n.code,{children:"api_key.created"}),", ",(0,r.jsx)(n.code,{children:"api_key.revoked"}),", ",(0,r.jsx)(n.code,{children:"script_variable.upserted"}),", ",(0,r.jsx)(n.code,{children:"script_variable.deleted"}),", ",(0,r.jsx)(n.code,{children:"hook.executed"}),", ",(0,r.jsx)(n.code,{children:"hook.dead_lettered"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v190--event-logs",children:"v1.9.0 \u2014 Event Logs"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Event logging"})," \u2014 system-wide audit trail for lexicon changes, record operations, Lua script executions/errors, admin actions, backfill jobs, and Jetstream connectivity"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"GET /admin/events"})})," \u2014 query event logs with filtering by event type, category, severity, and subject, with cursor pagination"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Lua error context"})," \u2014 script errors capture full debugging context: error message, script source, input payload, and caller DID"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Automatic retention cleanup"})," \u2014 configurable via ",(0,r.jsx)(n.code,{children:"EVENT_LOG_RETENTION_DAYS"})," (default 30 days)"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v180--advanced-queries",children:"v1.8.0 \u2014 Advanced Queries"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"db.backlinks()"})})," \u2014 find records that reference a given AT URI"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"db.raw()"})})," \u2014 run raw read-only SQL with parameterized queries and automatic column type mapping"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v171--patch",children:"v1.7.1 \u2014 Patch"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Fixed Docker Compose database URLs for local dev"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v170--lua-db-api-improvements",children:"v1.7.0 \u2014 Lua DB API Improvements"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"toarray()"})})," utility \u2014 force Lua tables to serialize as JSON arrays (fixes empty ",(0,r.jsx)(n.code,{children:"{}"})," vs ",(0,r.jsx)(n.code,{children:"[]"}),")"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"db.search()"})})," \u2014 text search on record fields with relevance ranking"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Array serialization fix"})," \u2014 ",(0,r.jsx)(n.code,{children:"db.query()"})," and ",(0,r.jsx)(n.code,{children:"db.search()"})," now always return proper arrays for ",(0,r.jsx)(n.code,{children:"records"})]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v162--patch",children:"v1.6.2 \u2014 Patch"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Fixed auth: use original auth scheme instead of hardcoded DPoP"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v161--patch",children:"v1.6.1 \u2014 Patch"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Fixed broken dynamic page routes"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v160--record-management",children:"v1.6.0 \u2014 Record Management"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Delete records"})," from the dashboard and API (individual and bulk collection deletion)"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:'"View Records" buttons'})," on lexicon pages"]}),"\n",(0,r.jsx)(n.li,{children:"Bug fixes: backfill now loads previously deleted records, empty collections shown in dropdown"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v151--patch",children:"v1.5.1 \u2014 Patch"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Removed backfill toggle from query/procedure lexicons (only applies to record lexicons)"}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"v150--lua-scripting--dashboard-overhaul",children:"v1.5.0 \u2014 Lua Scripting & Dashboard Overhaul"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Lua scripting"})," \u2014 attach custom Lua scripts to query and procedure lexicons"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Docusaurus docs site"})," with GitHub Pages deploy"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Dark mode"})," for the dashboard"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Records table"})," reworked with dynamic columns, column visibility, and better scrolling"]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"Backfill stats tracking"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Network and local lexicons merged"})," into a unified view"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Shiki code highlighting"})," in the dashboard"]}),"\n",(0,r.jsx)(n.li,{children:"Bug fixes: rogue record storage, collection dropdown, dynamic page builds"}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var i=s(63);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/401.f53c1ac3.js b/assets/js/401.f53c1ac3.js new file mode 100644 index 0000000..5f7628a --- /dev/null +++ b/assets/js/401.f53c1ac3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[401],{7214:(t,e,n)=>{n.d(e,{o:()=>i});var i=(0,n(8894).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},8854:(t,e,n)=>{n.d(e,{CP:()=>u,Ck:()=>d,HT:()=>p,PB:()=>y,aC:()=>h,lC:()=>l,m:()=>c,tk:()=>o});var i=n(5691),s=n(8894),r=n(9627),a=n(1485),o=(0,s.K2)((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return e.class&&n.attr("class",e.class),n},"drawRect"),l=(0,s.K2)((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,n).lower()},"drawBackgroundRect"),c=(0,s.K2)((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s},"drawText"),h=(0,s.K2)((t,e,n,i)=>{const s=t.append("image");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",a)},"drawImage"),u=(0,s.K2)((t,e,n,i)=>{const s=t.append("use");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),y=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),d=(0,s.K2)(()=>{let t=(0,a.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,a.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},401:(t,e,n)=>{n.d(e,{diagram:()=>X});var i=n(7214),s=n(8854),r=n(5691),a=n(8894),o=n(1485),l=function(){var t=(0,a.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],o=[1,13],l=[1,14],c={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,a.K2)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,l="",c=0,h=0,u=0,y=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;r.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,a.K2)(m,"lex");for(var k,b,_,w,v,K,$,T,M,S={};;){if(_=n[n.length-1],this.defaultActions[_]?w=this.defaultActions[_]:(null==k&&(k=m()),w=o[_]&&o[_][k]),void 0===w||!w.length||!w[0]){var C="";for(K in M=[],o[_])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");C=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+k);switch(w[0]){case 1:n.push(k),s.push(p.yytext),r.push(p.yylloc),n.push(w[1]),k=null,b?(k=b,b=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=s[s.length-$],S._$={first_line:r[r.length-($||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-($||1)].first_column,last_column:r[r.length-1].last_column},x&&(S._$.range=[r[r.length-($||1)].range[0],r[r.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[l,h,c,d.yy,w[1],s,r].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),s=s.slice(0,-1*$),r=r.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),s.push(S.$),r.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,a.K2)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],y=[],p=[],d=(0,a.K2)(function(){u.length=0,y.length=0,h="",p.length=0,(0,r.IU)()},"clear"),f=(0,a.K2)(function(t){h=t,u.push(t)},"addSection"),g=(0,a.K2)(function(){return u},"getSections"),x=(0,a.K2)(function(){let t=_();let e=0;for(;!t&&e<100;)t=_(),e++;return y.push(...p),y},"getTasks"),m=(0,a.K2)(function(){const t=[];y.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),k=(0,a.K2)(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:h,type:h,people:r,task:t,score:i};p.push(a)},"addTask"),b=(0,a.K2)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};y.push(e)},"addTaskOrg"),_=(0,a.K2)(function(){const t=(0,a.K2)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[n,i]of p.entries())t(n),e=e&&i.processed;return e},"compileTasks"),w=(0,a.K2)(function(){return m()},"getActors"),v={getConfig:(0,a.K2)(()=>(0,r.D7)().journey,"getConfig"),clear:d,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:g,getTasks:x,addTask:k,addTaskOrg:b,getActors:w},K=(0,a.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n ${(0,i.o)()}\n`,"getStyles"),$=(0,a.K2)(function(t,e){return(0,s.tk)(t,e)},"drawRect"),T=(0,a.K2)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const i=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,a.K2)(r,"smile"),(0,a.K2)(l,"sad"),(0,a.K2)(c,"ambivalent"),e.score>3?r(s):e.score<3?l(s):c(s),i},"drawFace"),M=(0,a.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),S=(0,a.K2)(function(t,e){return(0,s.m)(t,e)},"drawText"),C=(0,a.K2)(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,a.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S(t,e)},"drawLabel"),E=(0,a.K2)(function(t,e,n){const i=t.append("g"),r=(0,s.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,$(i,r),j(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),I=-1,P=(0,a.K2)(function(t,e,n,i){const r=e.x+n.width/2,a=t.append("g");I++;a.append("line").attr("id",i+"-task"+I).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),T(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const o=(0,s.PB)();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=n.width,o.height=n.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,$(a,o);let l=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};M(a,i),l+=10}),j(n)(e.task,a,o.x,o.y,o.width,o.height,{class:"task"},n,e.colour)},"drawTask"),A=(0,a.K2)(function(t,e){(0,s.lC)(t,e)},"drawBackgroundRect"),j=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,y=t.split(//gi);for(let p=0;p{const r=F[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:F[s].position};L.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=L.drawText(t,r).node().getBoundingClientRect().width;a>D&&a>e.leftMargin-a&&(D=a)}),i+=Math.max(20,20*c.length)})}(0,a.K2)(V,"drawActorLegend");var R=(0,r.D7)().journey,O=0,N=(0,a.K2)(function(t,e,n,i){const s=(0,r.D7)(),a=s.journey.titleColor,l=s.journey.titleFontSize,c=s.journey.titleFontFamily,h=s.securityLevel;let u;"sandbox"===h&&(u=(0,o.Ltv)("#i"+e));const y="sandbox"===h?(0,o.Ltv)(u.nodes()[0].contentDocument.body):(0,o.Ltv)("body");z.init();const p=y.select("#"+e);L.initGraphics(p,e);const d=i.db.getTasks(),f=i.db.getDiagramTitle(),g=i.db.getActors();for(const r in F)delete F[r];let x=0;g.forEach(t=>{F[t]={color:R.actorColours[x%R.actorColours.length],position:x},x++}),V(p),O=R.leftMargin+D,z.insert(0,0,O,50*Object.keys(F).length),q(p,d,0,e);const m=z.getBounds();f&&p.append("text").text(f).attr("x",O).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",c);const k=m.stopy-m.starty+2*R.diagramMarginY,b=O+m.stopx+2*R.diagramMarginX;(0,r.a$)(p,k,b,R.useMaxWidth),p.append("line").attr("x1",O).attr("y1",4*R.height).attr("x2",b-O-4).attr("y2",4*R.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const _=f?70:0;p.attr("viewBox",`${m.startx} -25 ${b} ${k+_}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",k+_+25)},"draw"),z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,a.K2)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,a.K2)(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:(0,a.K2)(function(t,e,n,i){const s=(0,r.D7)().journey,o=this;let l=0;function c(r){return(0,a.K2)(function(a){l++;const c=o.sequenceItems.length-l+1;o.updateVal(a,"starty",e-c*s.boxMargin,Math.min),o.updateVal(a,"stopy",i+c*s.boxMargin,Math.max),o.updateVal(z.data,"startx",t-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==r&&(o.updateVal(a,"startx",t-c*s.boxMargin,Math.min),o.updateVal(a,"stopx",n+c*s.boxMargin,Math.max),o.updateVal(z.data,"starty",e-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}(0,a.K2)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,a.K2)(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(z.data,"startx",s,Math.min),this.updateVal(z.data,"starty",a,Math.min),this.updateVal(z.data,"stopx",r,Math.max),this.updateVal(z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:(0,a.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,a.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,a.K2)(function(){return this.data},"getBounds")},W=R.sectionFills,Y=R.sectionColours,q=(0,a.K2)(function(t,e,n,i){const s=(0,r.D7)().journey;let a="";const o=n+(2*s.height+s.diagramMarginY);let l=0,c="#CCC",h="black",u=0;for(const[r,y]of e.entries()){if(a!==y.section){c=W[l%W.length],u=l%W.length,h=Y[l%Y.length];let n=0;const i=y.section;for(let t=r;t(F[e]&&(t[e]=F[e]),t),{});y.x=r*s.taskMargin+r*s.width+O,y.y=o,y.width=s.diagramMarginX,y.height=s.diagramMarginY,y.colour=h,y.fill=c,y.num=u,y.actors=n,L.drawTask(t,y,s,i),z.insert(y.x,y.y,y.x+y.width+s.taskMargin,450)}},"drawTasks"),J={setConf:B,draw:N},X={parser:c,db:v,renderer:J,styles:K,init:(0,a.K2)(t=>{J.setConf(t.journey),v.clear()},"init")}}}]); \ No newline at end of file diff --git a/assets/js/4266.90c963e9.js b/assets/js/4266.90c963e9.js new file mode 100644 index 0000000..1af0184 --- /dev/null +++ b/assets/js/4266.90c963e9.js @@ -0,0 +1 @@ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4266],{8692:(n,t,e)=>{n.exports=function(){function n(t,e,i){function r(a,o){if(!e[a]){if(!t[a]){if(c)return c(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var s=e[a]={exports:{}};t[a][0].call(s.exports,function(n){return r(t[a][1][n]||n)},s,s.exports,n,t,e,i)}return e[a].exports}for(var c=void 0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{},i=e.defaultLayoutOptions,c=void 0===i?{}:i,o=e.algorithms,u=void 0===o?["layered","stress","mrtree","radial","force","disco","sporeOverlap","sporeCompaction","rectpacking"]:o,s=e.workerFactory,h=e.workerUrl;if(r(this,n),this.defaultLayoutOptions=c,this.initialized=!1,void 0===h&&void 0===s)throw new Error("Cannot construct an ELK without both 'workerUrl' and 'workerFactory'.");var f=s;void 0!==h&&void 0===s&&(f=function(n){return new Worker(n)});var l=f(h);if("function"!=typeof l.postMessage)throw new TypeError("Created worker does not provide the required 'postMessage' function.");this.worker=new a(l),this.worker.postMessage({cmd:"register",algorithms:u}).then(function(n){return t.initialized=!0}).catch(console.err)}return i(n,[{key:"layout",value:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.layoutOptions,i=void 0===e?this.defaultLayoutOptions:e,r=t.logging,c=void 0!==r&&r,a=t.measureExecutionTime,o=void 0!==a&&a;return n?this.worker.postMessage({cmd:"layout",graph:n,layoutOptions:i,options:{logging:c,measureExecutionTime:o}}):Promise.reject(new Error("Missing mandatory parameter 'graph'."))}},{key:"knownLayoutAlgorithms",value:function(){return this.worker.postMessage({cmd:"algorithms"})}},{key:"knownLayoutOptions",value:function(){return this.worker.postMessage({cmd:"options"})}},{key:"knownLayoutCategories",value:function(){return this.worker.postMessage({cmd:"categories"})}},{key:"terminateWorker",value:function(){this.worker&&this.worker.terminate()}}]),n}();e.default=c;var a=function(){function n(t){var e=this;if(r(this,n),void 0===t)throw new Error("Missing mandatory parameter 'worker'.");this.resolvers={},this.worker=t,this.worker.onmessage=function(n){setTimeout(function(){e.receive(e,n)},0)}}return i(n,[{key:"postMessage",value:function(n){var t=this.id||0;this.id=t+1,n.id=t;var e=this;return new Promise(function(i,r){e.resolvers[t]=function(n,t){n?(e.convertGwtStyleError(n),r(n)):i(t)},e.worker.postMessage(n)})}},{key:"receive",value:function(n,t){var e=t.data,i=n.resolvers[e.id];i&&(delete n.resolvers[e.id],e.error?i(e.error):i(null,e.data))}},{key:"terminate",value:function(){this.worker&&this.worker.terminate()}},{key:"convertGwtStyleError",value:function(n){if(n){var t=n.__java$exception;t&&(t.cause&&t.cause.backingJsObject&&(n.cause=t.cause.backingJsObject,this.convertGwtStyleError(n.cause)),delete n.__java$exception)}}}]),n}()},{}],2:[function(n,t,i){(function(n){(function(){"use strict";var e;function r(){}function c(){}function a(){}function o(){}function u(){}function s(){}function h(){}function f(){}function l(){}function b(){}function w(){}function d(){}function g(){}function p(){}function m(){}function v(){}function k(){}function y(){}function M(){}function T(){}function j(){}function E(){}function S(){}function P(){}function C(){}function I(){}function O(){}function A(){}function L(){}function N(){}function $(){}function D(){}function x(){}function R(){}function K(){}function F(){}function _(){}function B(){}function H(){}function U(){}function G(){}function q(){}function X(){}function V(){}function z(){}function W(){}function Q(){}function J(){}function Y(){}function Z(){}function nn(){}function tn(){}function en(){}function rn(){}function cn(){}function an(){}function on(){}function un(){}function sn(){}function hn(){}function fn(){}function ln(){}function bn(){}function wn(){}function dn(){}function gn(){}function pn(){}function mn(){}function vn(){}function kn(){}function yn(){}function Mn(){}function Tn(){}function jn(){}function En(){}function Sn(){}function Pn(){}function Cn(){}function In(){}function On(){}function An(){}function Ln(){}function Nn(){}function $n(){}function Dn(){}function xn(){}function Rn(){}function Kn(){}function Fn(){}function _n(){}function Bn(){}function Hn(){}function Un(){}function Gn(){}function qn(){}function Xn(){}function Vn(){}function zn(){}function Wn(){}function Qn(){}function Jn(){}function Yn(){}function Zn(){}function nt(){}function tt(){}function et(){}function it(){}function rt(){}function ct(){}function at(){}function ot(){}function ut(){}function st(){}function ht(){}function ft(){}function lt(){}function bt(){}function wt(){}function dt(){}function gt(){}function pt(){}function mt(){}function vt(){}function kt(){}function yt(){}function Mt(){}function Tt(){}function jt(){}function Et(){}function St(){}function Pt(){}function Ct(){}function It(){}function Ot(){}function At(){}function Lt(){}function Nt(){}function $t(){}function Dt(){}function xt(){}function Rt(){}function Kt(){}function Ft(){}function _t(){}function Bt(){}function Ht(){}function Ut(){}function Gt(){}function qt(){}function Xt(){}function Vt(){}function zt(){}function Wt(){}function Qt(){}function Jt(){}function Yt(){}function Zt(){}function ne(){}function te(){}function ee(){}function ie(){}function re(){}function ce(){}function ae(){}function oe(){}function ue(){}function se(){}function he(){}function fe(){}function le(){}function be(){}function we(){}function de(){}function ge(){}function pe(){}function me(){}function ve(){}function ke(){}function ye(){}function Me(){}function Te(){}function je(){}function Ee(){}function Se(){}function Pe(){}function Ce(){}function Ie(){}function Oe(){}function Ae(){}function Le(){}function Ne(){}function $e(){}function De(){}function xe(){}function Re(){}function Ke(){}function Fe(){}function _e(){}function Be(){}function He(){}function Ue(){}function Ge(){}function qe(){}function Xe(){}function Ve(){}function ze(){}function We(){}function Qe(){}function Je(){}function Ye(){}function Ze(){}function ni(){}function ti(){}function ei(){}function ii(){}function ri(){}function ci(){}function ai(){}function oi(){}function ui(){}function si(){}function hi(){}function fi(){}function li(){}function bi(){}function wi(){}function di(){}function gi(){}function pi(){}function mi(){}function vi(){}function ki(){}function yi(){}function Mi(){}function Ti(){}function ji(){}function Ei(){}function Si(){}function Pi(){}function Ci(){}function Ii(){}function Oi(){}function Ai(){}function Li(){}function Ni(){}function $i(){}function Di(){}function xi(){}function Ri(){}function Ki(){}function Fi(){}function _i(){}function Bi(){}function Hi(){}function Ui(){}function Gi(){}function qi(){}function Xi(){}function Vi(){}function zi(){}function Wi(){}function Qi(){}function Ji(){}function Yi(){}function Zi(){}function nr(){}function tr(){}function er(){}function ir(){}function rr(){}function cr(){}function ar(){}function or(){}function ur(){}function sr(){}function hr(){}function fr(){}function lr(){}function br(){}function wr(){}function dr(){}function gr(){}function pr(){}function mr(){}function vr(){}function kr(){}function yr(){}function Mr(){}function Tr(){}function jr(){}function Er(){}function Sr(){}function Pr(){}function Cr(){}function Ir(){}function Or(){}function Ar(){}function Lr(){}function Nr(){}function $r(){}function Dr(){}function xr(){}function Rr(){}function Kr(){}function Fr(){}function _r(){}function Br(){}function Hr(){}function Ur(){}function Gr(){}function qr(){}function Xr(){}function Vr(){}function zr(){}function Wr(){}function Qr(){}function Jr(){}function Yr(){}function Zr(){}function nc(){}function tc(){}function ec(){}function ic(){}function rc(){}function cc(){}function ac(){}function oc(){}function uc(){}function sc(){}function hc(){}function fc(){}function lc(){}function bc(){}function wc(){}function dc(){}function gc(){}function pc(){}function mc(){}function vc(){}function kc(){}function yc(){}function Mc(){}function Tc(){}function jc(){}function Ec(){}function Sc(){}function Pc(){}function Cc(){}function Ic(){}function Oc(){}function Ac(){}function Lc(){}function Nc(){}function $c(){}function Dc(){}function xc(){}function Rc(){}function Kc(){}function Fc(){}function _c(){}function Bc(){}function Hc(){}function Uc(){}function Gc(){}function qc(){}function Xc(){}function Vc(){}function zc(){}function Wc(){}function Qc(){}function Jc(){}function Yc(){}function Zc(){}function na(){}function ta(){}function ea(){}function ia(){}function ra(){}function ca(){}function aa(){}function oa(){}function ua(){}function sa(){}function ha(){}function fa(){}function la(){}function ba(){}function wa(){}function da(){}function ga(){}function pa(){}function ma(){}function va(){}function ka(){}function ya(){}function Ma(){}function Ta(){}function ja(){}function Ea(){}function Sa(){}function Pa(){}function Ca(){}function Ia(){}function Oa(){}function Aa(){}function La(){}function Na(){}function $a(){}function Da(){}function xa(){}function Ra(){}function Ka(){}function Fa(){}function _a(){}function Ba(){}function Ha(){}function Ua(){}function Ga(){}function qa(){}function Xa(){}function Va(){}function za(){}function Wa(){}function Qa(){}function Ja(){}function Ya(){}function Za(){}function no(){}function to(){}function eo(){}function io(){}function ro(){}function co(){}function ao(){}function oo(){}function uo(){}function so(){}function ho(){}function fo(){}function lo(){}function bo(){}function wo(){}function go(){}function po(){}function mo(){}function vo(){}function ko(){}function yo(){}function Mo(){}function To(){}function jo(){}function Eo(){}function So(){}function Po(){}function Co(){}function Io(){}function Oo(){}function Ao(){}function Lo(){}function No(){}function $o(){}function Do(){}function xo(){}function Ro(){}function Ko(){}function Fo(){}function _o(){}function Bo(){}function Ho(){}function Uo(){}function Go(){}function qo(){}function Xo(){}function Vo(){}function zo(){}function Wo(){}function Qo(){}function Jo(){}function Yo(){}function Zo(){}function nu(){}function tu(){}function eu(){}function iu(){}function ru(){}function cu(){}function au(){}function ou(){}function uu(){}function su(){}function hu(){}function fu(){}function lu(){}function bu(){}function wu(){}function du(){}function gu(){}function pu(){}function mu(){}function vu(){}function ku(){}function yu(){}function Mu(){}function Tu(){}function ju(){}function Eu(){}function Su(){}function Pu(){}function Cu(){}function Iu(){}function Ou(){}function Au(){}function Lu(){}function Nu(){}function $u(){}function Du(){}function xu(){}function Ru(){}function Ku(){}function Fu(){}function _u(){}function Bu(){}function Hu(){}function Uu(){}function Gu(){}function qu(){}function Xu(){}function Vu(){}function zu(){}function Wu(){}function Qu(){}function Ju(){}function Yu(){}function Zu(){}function ns(){}function ts(){}function es(){}function is(){}function rs(){}function cs(){}function as(){}function os(){}function us(){}function ss(){}function hs(){}function fs(){}function ls(){}function bs(){}function ws(){}function ds(){}function gs(){}function ps(){}function ms(){}function vs(){}function ks(){}function ys(){}function Ms(){}function Ts(){}function js(){}function Es(){}function Ss(){}function Ps(){}function Cs(){}function Is(){}function Os(){}function As(){}function Ls(){}function Ns(){}function $s(){}function Ds(){}function xs(){}function Rs(){}function Ks(){}function Fs(){}function _s(){}function Bs(){}function Hs(){}function Us(){}function Gs(){}function qs(){}function Xs(){}function Vs(){}function zs(){}function Ws(){}function Qs(){}function Js(){}function Ys(){}function Zs(){}function nh(){}function th(){}function eh(){}function ih(){}function rh(){}function ch(){}function ah(){}function oh(){}function uh(){}function sh(){}function hh(){}function fh(){}function lh(){}function bh(){}function wh(){}function dh(){}function gh(){}function ph(){}function mh(){}function vh(){}function kh(){}function yh(){}function Mh(){}function Th(){}function jh(){}function Eh(){}function Sh(){}function Ph(){}function Ch(){}function Ih(){}function Oh(){}function Ah(){}function Lh(){}function Nh(){}function $h(){}function Dh(){}function xh(){}function Rh(){}function Kh(){}function Fh(){}function _h(){}function Bh(){}function Hh(){}function Uh(){}function Gh(){}function qh(){}function Xh(){}function Vh(){}function zh(){}function Wh(){}function Qh(){}function Jh(){}function Yh(){}function Zh(){}function nf(){}function tf(){}function ef(){}function rf(){}function cf(){}function af(){}function of(){}function uf(){}function sf(){}function hf(){}function ff(){}function lf(){}function bf(){}function wf(){}function df(){}function gf(){}function pf(){}function mf(){}function vf(){}function kf(){}function yf(){}function Mf(){}function Tf(){}function jf(){}function Ef(){}function Sf(){}function Pf(){}function Cf(){}function If(){}function Of(){}function Af(){}function Lf(){}function Nf(){}function $f(){}function Df(){}function xf(){}function Rf(n){}function Kf(n){}function Ff(){gy()}function _f(){zS()}function Bf(){MEn()}function Hf(){pbn()}function Uf(){ryn()}function Gf(){oOn()}function qf(){rGn()}function Xf(){yjn()}function Vf(){Bjn()}function zf(){WS()}function Wf(){HB()}function Qf(){QS()}function Jf(){Pun()}function Yf(){F7()}function Zf(){Ean()}function nl(){Y0()}function tl(){Pan()}function el(){Unn()}function il(){Q0()}function rl(){Cln()}function cl(){Ian()}function al(){Can()}function ol(){c6()}function ul(){Oan()}function sl(){jIn()}function hl(){YS()}function fl(){zYn()}function ll(){jYn()}function bl(){Aan()}function wl(){Iun()}function dl(){Z0()}function gl(){Pjn()}function pl(){t2()}function ml(){dUn()}function vl(){eDn()}function kl(){tcn()}function yl(){Kdn()}function Ml(){QGn()}function Tl(){e3()}function jl(){ncn()}function El(){EHn()}function Sl(){jOn()}function Pl(){IHn()}function Cl(){S_n()}function Il(){fIn()}function Ol(){uBn()}function Al(){jMn()}function Ll(){oB()}function Nl(){Stn()}function $l(){lIn()}function Dl(){XYn()}function xl(){Iln()}function Rl(){Wmn()}function Kl(){Oun()}function Fl(){tXn()}function _l(){vGn()}function Bl(n){tJ(n)}function Hl(n){this.a=n}function Ul(n){this.a=n}function Gl(n){this.a=n}function ql(n){this.a=n}function Xl(n){this.a=n}function Vl(n){this.a=n}function zl(n){this.a=n}function Wl(n){this.a=n}function Ql(n){this.a=n}function Jl(n){this.a=n}function Yl(n){this.a=n}function Zl(n){this.a=n}function nb(n){this.a=n}function tb(n){this.a=n}function eb(n){this.a=n}function ib(n){this.a=n}function rb(n){this.a=n}function cb(n){this.a=n}function ab(n){this.a=n}function ob(n){this.a=n}function ub(n){this.a=n}function sb(n){this.a=n}function hb(n){this.b=n}function fb(n){this.c=n}function lb(n){this.a=n}function bb(n){this.a=n}function wb(n){this.a=n}function db(n){this.a=n}function gb(n){this.a=n}function pb(n){this.a=n}function mb(n){this.a=n}function vb(n){this.a=n}function kb(n){this.a=n}function yb(n){this.a=n}function Mb(n){this.a=n}function Tb(n){this.a=n}function jb(n){this.a=n}function Eb(n){this.a=n}function Sb(n){this.a=n}function Pb(n){this.a=n}function Cb(n){this.a=n}function Ib(){this.a=[]}function Ob(n,t){n.a=t}function Ab(n,t){n.a=t}function Lb(n,t){n.b=t}function Nb(n,t){n.b=t}function $b(n,t){n.b=t}function Db(n,t){n.j=t}function xb(n,t){n.g=t}function Rb(n,t){n.i=t}function Kb(n,t){n.c=t}function Fb(n,t){n.c=t}function _b(n,t){n.d=t}function Bb(n,t){n.d=t}function Hb(n,t){n.k=t}function Ub(n,t){n.c=t}function Gb(n,t){n.c=t}function qb(n,t){n.a=t}function Xb(n,t){n.a=t}function Vb(n,t){n.f=t}function zb(n,t){n.a=t}function Wb(n,t){n.b=t}function Qb(n,t){n.d=t}function Jb(n,t){n.i=t}function Yb(n,t){n.o=t}function Zb(n,t){n.r=t}function nw(n,t){n.a=t}function tw(n,t){n.b=t}function ew(n,t){n.e=t}function iw(n,t){n.f=t}function rw(n,t){n.g=t}function cw(n,t){n.e=t}function aw(n,t){n.f=t}function ow(n,t){n.f=t}function uw(n,t){n.a=t}function sw(n,t){n.b=t}function hw(n,t){n.n=t}function fw(n,t){n.a=t}function lw(n,t){n.c=t}function bw(n,t){n.c=t}function ww(n,t){n.c=t}function dw(n,t){n.a=t}function gw(n,t){n.a=t}function pw(n,t){n.d=t}function mw(n,t){n.d=t}function vw(n,t){n.e=t}function kw(n,t){n.e=t}function yw(n,t){n.g=t}function Mw(n,t){n.f=t}function Tw(n,t){n.j=t}function jw(n,t){n.a=t}function Ew(n,t){n.a=t}function Sw(n,t){n.b=t}function Pw(n){n.b=n.a}function Cw(n){n.c=n.d.d}function Iw(n){this.a=n}function Ow(n){this.a=n}function Aw(n){this.a=n}function Lw(n){this.a=n}function Nw(n){this.a=n}function $w(n){this.a=n}function Dw(n){this.a=n}function xw(n){this.a=n}function Rw(n){this.a=n}function Kw(n){this.a=n}function Fw(n){this.a=n}function _w(n){this.a=n}function Bw(n){this.a=n}function Hw(n){this.a=n}function Uw(n){this.b=n}function Gw(n){this.b=n}function qw(n){this.b=n}function Xw(n){this.a=n}function Vw(n){this.a=n}function zw(n){this.c=n}function Ww(n){this.c=n}function Qw(n){this.c=n}function Jw(n){this.d=n}function Yw(n){this.a=n}function Zw(n){this.a=n}function nd(n){this.a=n}function td(n){this.a=n}function ed(n){this.a=n}function id(n){this.a=n}function rd(n){this.a=n}function cd(n){this.a=n}function ad(n){this.a=n}function od(n){this.a=n}function ud(n){this.a=n}function sd(n){this.a=n}function hd(n){this.a=n}function fd(n){this.a=n}function ld(n){this.a=n}function bd(n){this.a=n}function wd(n){this.a=n}function dd(n){this.a=n}function gd(n){this.a=n}function pd(n){this.a=n}function md(n){this.a=n}function vd(n){this.a=n}function kd(n){this.a=n}function yd(n){this.a=n}function Md(n){this.a=n}function Td(n){this.a=n}function jd(n){this.a=n}function Ed(n){this.a=n}function Sd(n){this.a=n}function Pd(n){this.a=n}function Cd(n){this.a=n}function Id(n){this.a=n}function Od(n){this.a=n}function Ad(n){this.a=n}function Ld(n){this.a=n}function Nd(n){this.a=n}function $d(n){this.a=n}function Dd(n){this.a=n}function xd(n){this.a=n}function Rd(n){this.a=n}function Kd(n){this.a=n}function Fd(n){this.a=n}function _d(n){this.a=n}function Bd(n){this.a=n}function Hd(n){this.a=n}function Ud(n){this.a=n}function Gd(n){this.a=n}function qd(n){this.a=n}function Xd(n){this.e=n}function Vd(n){this.a=n}function zd(n){this.a=n}function Wd(n){this.a=n}function Qd(n){this.a=n}function Jd(n){this.a=n}function Yd(n){this.a=n}function Zd(n){this.a=n}function ng(n){this.a=n}function tg(n){this.a=n}function eg(n){this.a=n}function ig(n){this.a=n}function rg(n){this.a=n}function cg(n){this.a=n}function ag(n){this.a=n}function og(n){this.a=n}function ug(n){this.a=n}function sg(n){this.a=n}function hg(n){this.a=n}function fg(n){this.a=n}function lg(n){this.a=n}function bg(n){this.a=n}function wg(n){this.a=n}function dg(n){this.a=n}function gg(n){this.a=n}function pg(n){this.a=n}function mg(n){this.a=n}function vg(n){this.a=n}function kg(n){this.a=n}function yg(n){this.a=n}function Mg(n){this.a=n}function Tg(n){this.a=n}function jg(n){this.a=n}function Eg(n){this.a=n}function Sg(n){this.a=n}function Pg(n){this.a=n}function Cg(n){this.a=n}function Ig(n){this.a=n}function Og(n){this.a=n}function Ag(n){this.a=n}function Lg(n){this.a=n}function Ng(n){this.a=n}function $g(n){this.a=n}function Dg(n){this.a=n}function xg(n){this.a=n}function Rg(n){this.a=n}function Kg(n){this.a=n}function Fg(n){this.a=n}function _g(n){this.a=n}function Bg(n){this.a=n}function Hg(n){this.a=n}function Ug(n){this.a=n}function Gg(n){this.a=n}function qg(n){this.a=n}function Xg(n){this.a=n}function Vg(n){this.c=n}function zg(n){this.b=n}function Wg(n){this.a=n}function Qg(n){this.a=n}function Jg(n){this.a=n}function Yg(n){this.a=n}function Zg(n){this.a=n}function np(n){this.a=n}function tp(n){this.a=n}function ep(n){this.a=n}function ip(n){this.a=n}function rp(n){this.a=n}function cp(n){this.a=n}function ap(n){this.a=n}function op(n){this.a=n}function up(n){this.a=n}function sp(n){this.a=n}function hp(n){this.a=n}function fp(n){this.a=n}function lp(n){this.a=n}function bp(n){this.a=n}function wp(n){this.a=n}function dp(n){this.a=n}function gp(n){this.a=n}function pp(n){this.a=n}function mp(n){this.a=n}function vp(n){this.a=n}function kp(n){this.a=n}function yp(n){this.a=n}function Mp(n){this.a=n}function Tp(n){this.a=n}function jp(n){this.a=n}function Ep(n){this.a=n}function Sp(n){this.a=n}function Pp(n){this.a=n}function Cp(n){this.a=n}function Ip(n){this.a=n}function Op(n){this.a=n}function Ap(n){this.a=n}function Lp(n){this.a=n}function Np(n){this.a=n}function $p(n){this.a=n}function Dp(n){this.a=n}function xp(n){this.a=n}function Rp(n){this.a=n}function Kp(n){this.a=n}function Fp(n){this.a=n}function _p(n){this.a=n}function Bp(n){this.a=n}function Hp(n){this.a=n}function Up(n){this.a=n}function Gp(n){this.a=n}function qp(n){this.a=n}function Xp(n){this.a=n}function Vp(n){this.a=n}function zp(n){this.a=n}function Wp(n){this.a=n}function Qp(n){this.a=n}function Jp(n){this.f=n}function Yp(n){this.a=n}function Zp(n){this.a=n}function nm(n){this.a=n}function tm(n){this.a=n}function em(n){this.a=n}function im(n){this.a=n}function rm(n){this.a=n}function cm(n){this.a=n}function am(n){this.a=n}function om(n){this.a=n}function um(n){this.a=n}function sm(n){this.a=n}function hm(n){this.a=n}function fm(n){this.a=n}function lm(n){this.a=n}function bm(n){this.a=n}function wm(n){this.a=n}function dm(n){this.a=n}function gm(n){this.a=n}function pm(n){this.a=n}function mm(n){this.a=n}function vm(n){this.a=n}function km(n){this.a=n}function ym(n){this.a=n}function Mm(n){this.a=n}function Tm(n){this.a=n}function jm(n){this.a=n}function Em(n){this.a=n}function Sm(n){this.a=n}function Pm(n){this.a=n}function Cm(n){this.b=n}function Im(n){this.a=n}function Om(n){this.a=n}function Am(n){this.a=n}function Lm(n){this.a=n}function Nm(n){this.a=n}function $m(n){this.a=n}function Dm(n){this.a=n}function xm(n){this.b=n}function Rm(n){this.a=n}function Km(n){this.a=n}function Fm(n){this.a=n}function _m(n){this.a=n}function Bm(n){this.c=n}function Hm(n){this.e=n}function Um(n){this.a=n}function Gm(n){this.a=n}function qm(n){this.a=n}function Xm(n){this.d=n}function Vm(n){this.a=n}function zm(n){this.a=n}function Wm(n){this.a=n}function Qm(n){this.e=n}function Jm(){this.a=0}function Ym(){$z(this)}function Zm(){IN(this)}function nv(){XQ(this)}function tv(){Rf(this)}function ev(){this.c=nBt}function iv(n,t){n.b+=t}function rv(n,t){t.Wb(n)}function cv(n){return n.a}function av(n){return n.a}function ov(n){return n.a}function uv(n){return n.a}function sv(n){return n.a}function hv(n){return n.e}function fv(){return null}function lv(){return null}function bv(){mj(),xJn()}function wv(n){n.b.Of(n.e)}function dv(n){n.b=new rT}function gv(n,t){n.b=t-n.b}function pv(n,t){n.a=t-n.a}function mv(n,t){n.push(t)}function vv(n,t){n.sort(t)}function kv(n,t){t.jd(n.a)}function yv(n,t){NLn(t,n)}function Mv(n,t,e){n.Yd(e,t)}function Tv(n,t){n.e=t,t.b=n}function jv(n){sB(),this.a=n}function Ev(n){sB(),this.a=n}function Sv(n){sB(),this.a=n}function Pv(n){ZW(),this.a=n}function Cv(n){EZ(),_at.le(n)}function Iv(){Iv=E,new Ym}function Ov(){vx.call(this)}function Av(){vx.call(this)}function Lv(){Ov.call(this)}function Nv(){Ov.call(this)}function $v(){Ov.call(this)}function Dv(){Ov.call(this)}function xv(){Ov.call(this)}function Rv(){Ov.call(this)}function Kv(){Ov.call(this)}function Fv(){Ov.call(this)}function _v(){Ov.call(this)}function Bv(){Ov.call(this)}function Hv(){Ov.call(this)}function Uv(){this.a=this}function Gv(){this.Bb|=256}function qv(){this.b=new hL}function Xv(n,t){n.length=t}function Vv(n,t){kD(n.a,t)}function zv(n,t){LOn(n.c,t)}function Wv(n,t){Fz(n.b,t)}function Qv(n,t){bMn(n.a,t)}function Jv(n,t){zdn(n.a,t)}function Yv(n,t){Msn(n.e,t)}function Zv(n){C$n(n.c,n.b)}function nk(n,t){n.kc().Nb(t)}function tk(n){this.a=Agn(n)}function ek(){this.a=new Ym}function ik(){this.a=new Ym}function rk(){this.a=new hS}function ck(){this.a=new Zm}function ak(){this.a=new Zm}function ok(){this.a=new Zm}function uk(){this.a=new kn}function sk(){this.a=new g7}function hk(){this.a=new lt}function fk(){this.a=new z0}function lk(){this.a=new NF}function bk(){this.a=new Zm}function wk(){this.a=new Zm}function dk(){this.a=new Zm}function gk(){this.a=new Zm}function pk(){this.d=new Zm}function mk(){this.a=new i4}function vk(){this.a=new ek}function kk(){this.a=new Ym}function yk(){this.b=new Ym}function Mk(){this.b=new Zm}function Tk(){this.e=new Zm}function jk(){this.a=new sl}function Ek(){this.d=new Zm}function Sk(){BZ.call(this)}function Pk(){BZ.call(this)}function Ck(){Zm.call(this)}function Ik(){Lv.call(this)}function Ok(){ck.call(this)}function Ak(){HF.call(this)}function Lk(){gk.call(this)}function Nk(){tv.call(this)}function $k(){Nk.call(this)}function Dk(){tv.call(this)}function xk(){Dk.call(this)}function Rk(){oy.call(this)}function Kk(){oy.call(this)}function Fk(){oy.call(this)}function _k(){hy.call(this)}function Bk(){ts.call(this)}function Hk(){ts.call(this)}function Uk(){lS.call(this)}function Gk(){wy.call(this)}function qk(){wy.call(this)}function Xk(){Ym.call(this)}function Vk(){Ym.call(this)}function zk(){Ym.call(this)}function Wk(){Kan.call(this)}function Qk(){ek.call(this)}function Jk(){Gv.call(this)}function Yk(){$D.call(this)}function Zk(){Ym.call(this)}function ny(){$D.call(this)}function ty(){Ym.call(this)}function ey(){Ym.call(this)}function iy(){ps.call(this)}function ry(){iy.call(this)}function cy(){ps.call(this)}function ay(){$f.call(this)}function oy(){this.a=new ek}function uy(){this.a=new Ym}function sy(){this.a=new Zm}function hy(){this.a=new Ym}function fy(){this.a=new lS}function ly(){this.j=new Zm}function by(){this.a=new Vj}function wy(){this.a=new gs}function dy(){this.a=new Do}function gy(){gy=E,wat=new c}function py(){py=E,Mat=new ky}function my(){my=E,Tat=new vy}function vy(){ib.call(this,"")}function ky(){ib.call(this,"")}function yy(n){Arn.call(this,n)}function My(n){Arn.call(this,n)}function Ty(n){Ql.call(this,n)}function jy(n){HE.call(this,n)}function Ey(n){HE.call(this,n)}function Sy(n){jy.call(this,n)}function Py(n){jy.call(this,n)}function Cy(n){jy.call(this,n)}function Iy(n){c8.call(this,n)}function Oy(n){c8.call(this,n)}function Ay(n){K_.call(this,n)}function Ly(n){XE.call(this,n)}function Ny(n){WE.call(this,n)}function $y(n){WE.call(this,n)}function Dy(n){WE.call(this,n)}function xy(n){cOn.call(this,n)}function Ry(n){xy.call(this,n)}function Ky(n){UV.call(this,n)}function Fy(n){Ky.call(this,n)}function _y(){Cb.call(this,{})}function By(){By=E,zat=new T}function Hy(){Hy=E,Iat=new X$}function Uy(){Uy=E,Dat=new r}function Gy(){Gy=E,Fat=new p}function qy(){qy=E,Hat=new k}function Xy(n){UD(),this.a=n}function Vy(n){Cun(),this.a=n}function zy(n){rV(),this.f=n}function Wy(n){rV(),this.f=n}function Qy(n){aB(),this.a=n}function Jy(n){n.b=null,n.c=0}function Yy(n,t){n.e=t,yFn(n,t)}function Zy(n,t){n.a=t,WAn(n)}function nM(n,t,e){n.a[t.g]=e}function tM(n,t,e){nSn(e,n,t)}function eM(n,t){F_(t.i,n.n)}function iM(n,t){yln(n).Cd(t)}function rM(n,t){n.a.ec().Mc(t)}function cM(n,t){return n.g-t.g}function aM(n,t){return n*n/t}function oM(n){return tJ(n),n}function uM(n){return tJ(n),n}function sM(n){return tJ(n),n}function hM(n){return new Pb(n)}function fM(n){return new QW(n)}function lM(n){return tJ(n),n}function bM(n){return tJ(n),n}function wM(n){Ky.call(this,n)}function dM(n){Ky.call(this,n)}function gM(n){Ky.call(this,n)}function pM(n){UV.call(this,n)}function mM(n){Ky.call(this,n)}function vM(n){Ky.call(this,n)}function kM(n){Ky.call(this,n)}function yM(n){Ky.call(this,n)}function MM(n){Ky.call(this,n)}function TM(n){Ky.call(this,n)}function jM(n){Ky.call(this,n)}function EM(n){Ky.call(this,n)}function SM(n){Ky.call(this,n)}function PM(n){Ky.call(this,n)}function CM(n){Ky.call(this,n)}function IM(n){tJ(n),this.a=n}function OM(n){return hln(n),n}function AM(n){Vz(n,n.length)}function LM(n){return n.b==n.c}function NM(n){return!!n&&n.b}function $M(n){return!!n&&n.k}function DM(n){return!!n&&n.j}function xM(n,t,e){n.c.Ef(t,e)}function RM(n,t){n.be(t),t.ae(n)}function KM(n){sB(),this.a=WW(n)}function FM(){this.a=mK(WW(TZn))}function _M(){throw hv(new Kv)}function BM(){throw hv(new Kv)}function HM(){throw hv(new Kv)}function UM(){throw hv(new Kv)}function GM(){throw hv(new Kv)}function qM(){throw hv(new Kv)}function XM(){XM=E,EZ()}function VM(){$w.call(this,"")}function zM(){$w.call(this,"")}function WM(){$w.call(this,"")}function QM(){$w.call(this,"")}function JM(n){dM.call(this,n)}function YM(n){dM.call(this,n)}function ZM(n){vM.call(this,n)}function nT(n){qw.call(this,n)}function tT(n){nT.call(this,n)}function eT(n){gx.call(this,n)}function iT(n){Qx.call(this,n,0)}function rT(){L2.call(this,12,3)}function cT(n,t){return B0(n,t)}function aT(n,t){return Ltn(n,t)}function oT(n,t){return n.a-t.a}function uT(n,t){return n.a-t.a}function sT(n,t){return n.a-t.a}function hT(n,t){return t in n.a}function fT(n){return n.a?n.b:0}function lT(n){return n.a?n.b:0}function bT(n,t,e){t.Cd(n.a[e])}function wT(n,t,e){t.Pe(n.a[e])}function dT(n,t){n.b=new eN(t)}function gT(n,t){return n.b=t,n}function pT(n,t){return n.c=t,n}function mT(n,t){return n.f=t,n}function vT(n,t){return n.g=t,n}function kT(n,t){return n.a=t,n}function yT(n,t){return n.f=t,n}function MT(n,t){return n.k=t,n}function TT(n,t){return n.a=t,n}function jT(n,t){return n.e=t,n}function ET(n,t){return n.e=t,n}function ST(n,t){return n.f=t,n}function PT(n,t){n.b=!0,n.d=t}function CT(n,t){return n.b-t.b}function IT(n,t){return n.g-t.g}function OT(n,t){return n?0:t-1}function AT(n,t){return n?0:t-1}function LT(n,t){return n?t-1:0}function NT(n,t){return n.s-t.s}function $T(n,t){return t.rg(n)}function DT(n,t){return n.b=t,n}function xT(n,t){return n.a=t,n}function RT(n,t){return n.c=t,n}function KT(n,t){return n.d=t,n}function FT(n,t){return n.e=t,n}function _T(n,t){return n.f=t,n}function BT(n,t){return n.a=t,n}function HT(n,t){return n.b=t,n}function UT(n,t){return n.c=t,n}function GT(n,t){return n.c=t,n}function qT(n,t){return n.b=t,n}function XT(n,t){return n.d=t,n}function VT(n,t){return n.e=t,n}function zT(n,t){return n.f=t,n}function WT(n,t){return n.g=t,n}function QT(n,t){return n.a=t,n}function JT(n,t){return n.i=t,n}function YT(n,t){return n.j=t,n}function ZT(n,t){jIn(),o2(t,n)}function nj(n,t,e){aV(n.a,t,e)}function tj(n){Y_.call(this,n)}function ej(n){dpn.call(this,n)}function ij(n){TY.call(this,n)}function rj(n){TY.call(this,n)}function cj(n){Drn.call(this,n)}function aj(n){HY.call(this,n)}function oj(n){HY.call(this,n)}function uj(){S$.call(this,"")}function sj(){this.a=0,this.b=0}function hj(){this.b=0,this.a=0}function fj(n,t){n.b=0,Ccn(n,t)}function lj(n,t){return n.k=t,n}function bj(n,t){return n.j=t,n}function wj(n,t){n.c=t,n.b=!0}function dj(){dj=E,rut=ePn()}function gj(){gj=E,xKt=AEn()}function pj(){pj=E,RKt=zPn()}function mj(){mj=E,NFt=aan()}function vj(){vj=E,y_t=LEn()}function kj(){kj=E,xBt=NEn()}function yj(){yj=E,RBt=qAn()}function Mj(n){return n.e&&n.e()}function Tj(n){return n.l|n.m<<22}function jj(n,t){return n.c._b(t)}function Ej(n,t){return Uwn(n.b,t)}function Sj(n){return n?n.d:null}function Pj(n){return n?n.g:null}function Cj(n){return n?n.i:null}function Ij(n){return vK(n),n.o}function Oj(n,t){return n.a+=t,n}function Aj(n,t){return n.a+=t,n}function Lj(n,t){return n.a+=t,n}function Nj(n,t){return n.a+=t,n}function $j(n,t){for(;n.Bd(t););}function Dj(n){this.a=new sS(n)}function xj(){throw hv(new Kv)}function Rj(){throw hv(new Kv)}function Kj(){throw hv(new Kv)}function Fj(){throw hv(new Kv)}function _j(){throw hv(new Kv)}function Bj(){throw hv(new Kv)}function Hj(n){this.a=new HV(n)}function Uj(){this.a=new mKn(iIt)}function Gj(){this.b=new mKn(ZSt)}function qj(){this.a=new mKn(dOt)}function Xj(){this.b=new mKn(zAt)}function Vj(){this.b=new mKn(zAt)}function zj(n){this.a=0,this.b=n}function Wj(n){CQn(),uYn(this,n)}function Qj(n){return GQ(n),n.a}function Jj(n){return n.b!=n.d.c}function Yj(n,t){return n.d[t.p]}function Zj(n,t){return vFn(n,t)}function nE(n,t,e){n.splice(t,e)}function tE(n,t){for(;n.Re(t););}function eE(n){n.c?P_n(n):C_n(n)}function iE(){throw hv(new Kv)}function rE(){throw hv(new Kv)}function cE(){throw hv(new Kv)}function aE(){throw hv(new Kv)}function oE(){throw hv(new Kv)}function uE(){throw hv(new Kv)}function sE(){throw hv(new Kv)}function hE(){throw hv(new Kv)}function fE(){throw hv(new Kv)}function lE(){throw hv(new Kv)}function bE(){throw hv(new Bv)}function wE(){throw hv(new Bv)}function dE(n){this.a=new gE(n)}function gE(n){Zan(this,n,fOn())}function pE(n){return!n||FQ(n)}function mE(n){return-1!=dHt[n]}function vE(){0!=Uat&&(Uat=0),qat=-1}function kE(){null==hZn&&(hZn=[])}function yE(n,t){RD.call(this,n,t)}function ME(n,t){yE.call(this,n,t)}function TE(n,t){this.a=n,this.b=t}function jE(n,t){this.a=n,this.b=t}function EE(n,t){this.a=n,this.b=t}function SE(n,t){this.a=n,this.b=t}function PE(n,t){this.a=n,this.b=t}function CE(n,t){this.a=n,this.b=t}function IE(n,t){this.a=n,this.b=t}function OE(n,t){this.e=n,this.d=t}function AE(n,t){this.b=n,this.c=t}function LE(n,t){this.b=n,this.a=t}function NE(n,t){this.b=n,this.a=t}function $E(n,t){this.b=n,this.a=t}function DE(n,t){this.b=n,this.a=t}function xE(n,t){this.a=n,this.b=t}function RE(n,t){this.a=n,this.b=t}function KE(n,t){this.a=n,this.f=t}function FE(n,t){this.g=n,this.i=t}function _E(n,t){this.f=n,this.g=t}function BE(n,t){this.b=n,this.c=t}function HE(n){FD(n.dc()),this.c=n}function UE(n,t){this.a=n,this.b=t}function GE(n,t){this.a=n,this.b=t}function qE(n){this.a=uG(WW(n),15)}function XE(n){this.a=uG(WW(n),15)}function VE(n){this.a=uG(WW(n),85)}function zE(n){this.b=uG(WW(n),85)}function WE(n){this.b=uG(WW(n),51)}function QE(){this.q=new e.Date}function JE(n,t){this.a=n,this.b=t}function YE(n,t){return Pz(n.b,t)}function ZE(n,t){return n.b.Hc(t)}function nS(n,t){return n.b.Ic(t)}function tS(n,t){return n.b.Qc(t)}function eS(n,t){return n.b.Hc(t)}function iS(n,t){return n.c.uc(t)}function rS(n,t){return udn(n.c,t)}function cS(n,t){return n.a._b(t)}function aS(n,t){return n>t&&t0}function $P(n,t){return dwn(n,t)<0}function DP(n,t){return RX(n.a,t)}function xP(n,t){U0.call(this,n,t)}function RP(n){nQ(),K_.call(this,n)}function KP(n,t){VX(n,n.length,t)}function FP(n,t){dW(n,n.length,t)}function _P(n,t){return n.a.get(t)}function BP(n,t){return Pz(n.e,t)}function HP(n){return tJ(n),!1}function UP(n){this.a=uG(WW(n),229)}function GP(n){h3.call(this,n,21)}function qP(n,t){_E.call(this,n,t)}function XP(n,t){_E.call(this,n,t)}function VP(n,t){this.b=n,this.a=t}function zP(n,t){this.d=n,this.e=t}function WP(n,t){this.a=n,this.b=t}function QP(n,t){this.a=n,this.b=t}function JP(n,t){this.a=n,this.b=t}function YP(n,t){this.a=n,this.b=t}function ZP(n,t){this.a=n,this.b=t}function nC(n,t){this.b=n,this.a=t}function tC(n,t){this.b=n,this.a=t}function eC(n,t){_E.call(this,n,t)}function iC(n,t){_E.call(this,n,t)}function rC(n,t){_E.call(this,n,t)}function cC(n,t){_E.call(this,n,t)}function aC(n,t){_E.call(this,n,t)}function oC(n,t){_E.call(this,n,t)}function uC(n,t){_E.call(this,n,t)}function sC(n,t){this.b=n,this.a=t}function hC(n,t){_E.call(this,n,t)}function fC(n,t){this.b=n,this.a=t}function lC(n,t){_E.call(this,n,t)}function bC(n,t){this.b=n,this.a=t}function wC(n,t){_E.call(this,n,t)}function dC(n,t){_E.call(this,n,t)}function gC(n,t){_E.call(this,n,t)}function pC(n,t,e){n.splice(t,0,e)}function mC(n,t,e){n.Mb(e)&&t.Cd(e)}function vC(n,t,e){t.Pe(n.a.Ye(e))}function kC(n,t,e){t.Dd(n.a.Ze(e))}function yC(n,t,e){t.Cd(n.a.Kb(e))}function MC(n,t){return $x(n.c,t)}function TC(n,t){return $x(n.e,t)}function jC(n,t){_E.call(this,n,t)}function EC(n,t){_E.call(this,n,t)}function SC(n,t){_E.call(this,n,t)}function PC(n,t){_E.call(this,n,t)}function CC(n,t){_E.call(this,n,t)}function IC(n,t){_E.call(this,n,t)}function OC(n,t){this.a=n,this.b=t}function AC(n,t){this.a=n,this.b=t}function LC(n,t){this.a=n,this.b=t}function NC(n,t){this.a=n,this.b=t}function $C(n,t){this.a=n,this.b=t}function DC(n,t){this.a=n,this.b=t}function xC(n,t){this.b=n,this.a=t}function RC(n,t){this.b=n,this.a=t}function KC(n,t){this.b=n,this.a=t}function FC(n,t){this.c=n,this.d=t}function _C(n,t){this.e=n,this.d=t}function BC(n,t){this.a=n,this.b=t}function HC(n,t){this.a=n,this.b=t}function UC(n,t){this.a=n,this.b=t}function GC(n,t){this.b=n,this.a=t}function qC(n,t){this.b=t,this.c=n}function XC(n,t){_E.call(this,n,t)}function VC(n,t){_E.call(this,n,t)}function zC(n,t){_E.call(this,n,t)}function WC(n,t){_E.call(this,n,t)}function QC(n,t){_E.call(this,n,t)}function JC(n,t){_E.call(this,n,t)}function YC(n,t){_E.call(this,n,t)}function ZC(n,t){_E.call(this,n,t)}function nI(n,t){_E.call(this,n,t)}function tI(n,t){_E.call(this,n,t)}function eI(n,t){_E.call(this,n,t)}function iI(n,t){_E.call(this,n,t)}function rI(n,t){_E.call(this,n,t)}function cI(n,t){_E.call(this,n,t)}function aI(n,t){_E.call(this,n,t)}function oI(n,t){_E.call(this,n,t)}function uI(n,t){_E.call(this,n,t)}function sI(n,t){_E.call(this,n,t)}function hI(n,t){_E.call(this,n,t)}function fI(n,t){_E.call(this,n,t)}function lI(n,t){_E.call(this,n,t)}function bI(n,t){_E.call(this,n,t)}function wI(n,t){_E.call(this,n,t)}function dI(n,t){_E.call(this,n,t)}function gI(n,t){_E.call(this,n,t)}function pI(n,t){_E.call(this,n,t)}function mI(n,t){_E.call(this,n,t)}function vI(n,t){_E.call(this,n,t)}function kI(n,t){_E.call(this,n,t)}function yI(n,t){_E.call(this,n,t)}function MI(n,t){_E.call(this,n,t)}function TI(n,t){_E.call(this,n,t)}function jI(n,t){_E.call(this,n,t)}function EI(n,t){this.b=n,this.a=t}function SI(n,t){_E.call(this,n,t)}function PI(n,t){this.a=n,this.b=t}function CI(n,t){this.a=n,this.b=t}function II(n,t){this.a=n,this.b=t}function OI(n,t){_E.call(this,n,t)}function AI(n,t){_E.call(this,n,t)}function LI(n,t){this.a=n,this.b=t}function NI(n,t){return PU(),t!=n}function $I(n){return MK(n.a),n.b}function DI(n){return K$n(n,n.c),n}function xI(){return dj(),new rut}function RI(){UB(),this.a=new xF}function KI(){oFn(),this.a=new ek}function FI(){e2(),this.b=new ek}function _I(n,t){this.b=n,this.d=t}function BI(n,t){this.a=n,this.b=t}function HI(n,t){this.a=n,this.b=t}function UI(n,t){this.a=n,this.b=t}function GI(n,t){this.b=n,this.a=t}function qI(n,t){_E.call(this,n,t)}function XI(n,t){_E.call(this,n,t)}function VI(n,t){_E.call(this,n,t)}function zI(n,t){_E.call(this,n,t)}function WI(n,t){_E.call(this,n,t)}function QI(n,t){_E.call(this,n,t)}function JI(n,t){_E.call(this,n,t)}function YI(n,t){_E.call(this,n,t)}function ZI(n,t){_E.call(this,n,t)}function nO(n,t){_E.call(this,n,t)}function tO(n,t){_E.call(this,n,t)}function eO(n,t){_E.call(this,n,t)}function iO(n,t){_E.call(this,n,t)}function rO(n,t){_E.call(this,n,t)}function cO(n,t){_E.call(this,n,t)}function aO(n,t){_E.call(this,n,t)}function oO(n,t){_E.call(this,n,t)}function uO(n,t){_E.call(this,n,t)}function sO(n,t){_E.call(this,n,t)}function hO(n,t){_E.call(this,n,t)}function fO(n,t){_E.call(this,n,t)}function lO(n,t){_E.call(this,n,t)}function bO(n,t){_E.call(this,n,t)}function wO(n,t){_E.call(this,n,t)}function dO(n,t){this.b=n,this.a=t}function gO(n,t){this.b=n,this.a=t}function pO(n,t){this.b=n,this.a=t}function mO(n,t){this.b=n,this.a=t}function vO(n,t){this.a=n,this.b=t}function kO(n,t){this.a=n,this.b=t}function yO(n,t){this.a=n,this.b=t}function MO(n,t){this.a=n,this.b=t}function TO(n,t){_E.call(this,n,t)}function jO(n,t){_E.call(this,n,t)}function EO(n,t){_E.call(this,n,t)}function SO(n,t){_E.call(this,n,t)}function PO(n,t){_E.call(this,n,t)}function CO(n,t){_E.call(this,n,t)}function IO(n,t){_E.call(this,n,t)}function OO(n,t){_E.call(this,n,t)}function AO(n,t){_E.call(this,n,t)}function LO(n,t){_E.call(this,n,t)}function NO(n,t){_E.call(this,n,t)}function $O(n,t){_E.call(this,n,t)}function DO(n,t){_E.call(this,n,t)}function xO(n,t){_E.call(this,n,t)}function RO(n,t){_E.call(this,n,t)}function KO(n,t){_E.call(this,n,t)}function FO(n,t){_E.call(this,n,t)}function _O(n,t){_E.call(this,n,t)}function BO(n,t){_E.call(this,n,t)}function HO(n,t){_E.call(this,n,t)}function UO(n,t){this.a=n,this.b=t}function GO(n,t){this.a=n,this.b=t}function qO(n,t){this.a=n,this.b=t}function XO(n,t){this.a=n,this.b=t}function VO(n,t){this.a=n,this.b=t}function zO(n,t){this.a=n,this.b=t}function WO(n,t){this.a=n,this.b=t}function QO(n,t){this.a=n,this.b=t}function JO(n,t){this.a=n,this.b=t}function YO(n,t){this.a=n,this.b=t}function ZO(n,t){this.a=n,this.b=t}function nA(n,t){this.a=n,this.b=t}function tA(n,t){this.a=n,this.b=t}function eA(n,t){this.b=n,this.a=t}function iA(n,t){this.b=n,this.a=t}function rA(n,t){this.b=n,this.a=t}function cA(n,t){this.b=n,this.a=t}function aA(n,t){this.a=n,this.b=t}function oA(n,t){this.a=n,this.b=t}function uA(n,t){_E.call(this,n,t)}function sA(n,t){this.a=n,this.b=t}function hA(n,t){this.a=n,this.b=t}function fA(n,t){_E.call(this,n,t)}function lA(n,t){this.f=n,this.c=t}function bA(n,t){return $x(n.g,t)}function wA(n,t){return $x(t.b,n)}function dA(n,t){return ymn(n.a,t)}function gA(n,t){return-n.b.af(t)}function pA(n,t){n&&vJ(AFt,n,t)}function mA(n,t){n.i=null,lon(n,t)}function vA(n,t,e){MSn(t,jAn(n,e))}function kA(n,t,e){MSn(t,jAn(n,e))}function yA(n,t){BRn(n.a,uG(t,58))}function MA(n,t){aen(n.a,uG(t,12))}function TA(n,t){this.a=n,this.b=t}function jA(n,t){this.a=n,this.b=t}function EA(n,t){this.a=n,this.b=t}function SA(n,t){this.a=n,this.b=t}function PA(n,t){this.a=n,this.b=t}function CA(n,t){this.d=n,this.b=t}function IA(n,t){this.e=n,this.a=t}function OA(n,t){this.b=n,this.c=t}function AA(n,t){this.i=n,this.g=t}function LA(n,t){this.d=n,this.e=t}function NA(n,t){Iin(new DD(n),t)}function $A(n){return kmn(n.c,n.b)}function DA(n){return n?n.md():null}function xA(n){return null==n?null:n}function RA(n){return typeof n===pZn}function KA(n){return typeof n===dZn}function FA(n){return typeof n===gZn}function _A(n,t){return 0==dwn(n,t)}function BA(n,t){return dwn(n,t)>=0}function HA(n,t){return 0!=dwn(n,t)}function UA(n,t){return Zun(n.Kc(),t)}function GA(n,t){return n.Rd().Xb(t)}function qA(n){return bpn(n),n.d.gc()}function XA(n){return Fq(null==n),n}function VA(n,t){return n.a+=""+t,n}function zA(n,t){return n.a+=""+t,n}function WA(n,t){return n.a+=""+t,n}function QA(n,t){return n.a+=""+t,n}function JA(n,t){return n.a+=""+t,n}function YA(n,t){return n.a+=""+t,n}function ZA(n){return""+(tJ(n),n)}function nL(n){$z(this),xun(this,n)}function tL(){J0(),eV.call(this)}function eL(n,t){BV.call(this,n,t)}function iL(n,t){BV.call(this,n,t)}function rL(n,t){BV.call(this,n,t)}function cL(n,t){s8(n,t,n.c.b,n.c)}function aL(n,t){s8(n,t,n.a,n.a.a)}function oL(n){return u3(n,0),null}function uL(){this.b=0,this.a=!1}function sL(){this.b=0,this.a=!1}function hL(){this.b=new sS(orn(12))}function fL(){fL=E,fht=Abn(Nkn())}function lL(){lL=E,_wt=Abn(bKn())}function bL(){bL=E,bPt=Abn(usn())}function wL(){wL=E,Iv(),Bat=new Ym}function dL(n){return n.a=0,n.b=0,n}function gL(n,t){return n.a=t.g+1,n}function pL(n,t){w_.call(this,n,t)}function mL(n,t){uF.call(this,n,t)}function vL(n,t){AA.call(this,n,t)}function kL(n,t){Vx.call(this,n,t)}function yL(n,t){Zsn.call(this,n,t)}function ML(n,t){TP(),vJ(_Ft,n,t)}function TL(n,t){n.q.setTime(W4(t))}function jL(n){e.clearTimeout(n)}function EL(n){return WW(n),new iN(n)}function SL(n,t){return xA(n)===xA(t)}function PL(n,t){return n.a.a.a.cc(t)}function CL(n,t){return r1(n.a,0,t)}function IL(n){return jW(uG(n,74))}function OL(n){return t0((tJ(n),n))}function AL(n){return t0((tJ(n),n))}function LL(n){return p$(n.l,n.m,n.h)}function NL(n,t){return d$(n.a,t.a)}function $L(n,t){return rW(n.a,t.a)}function DL(n,t){return ugn(n.a,t.a)}function xL(n,t){return n.indexOf(t)}function RL(n,t){return 2==n.j[t.p]}function KL(n,t){return n==t?0:n?1:-1}function FL(n){return n<10?"0"+n:""+n}function _L(n){return typeof n===gZn}function BL(n){return n==Flt||n==Hlt}function HL(n){return n==Flt||n==_lt}function UL(n,t){return d$(n.g,t.g)}function GL(n){return Ten(n.b.b,n,0)}function qL(){lX.call(this,0,0,0,0)}function XL(){td.call(this,new u8)}function VL(n,t){Ntn(n,0,n.length,t)}function zL(n,t){return kD(n.a,t),t}function WL(n,t){return GB(),t.a+=n}function QL(n,t){return GB(),t.a+=n}function JL(n,t){return GB(),t.c+=n}function YL(n,t){return kD(n.c,t),n}function ZL(n,t){return gsn(n.a,t),n}function nN(n){this.a=xI(),this.b=n}function tN(n){this.a=xI(),this.b=n}function eN(n){this.a=n.a,this.b=n.b}function iN(n){this.a=n,Ff.call(this)}function rN(n){this.a=n,Ff.call(this)}function cN(){gY.call(this,0,0,0,0)}function aN(n){return gsn(new wJ,n)}function oN(n){return xJ(uG(n,123))}function uN(n){return n.vh()&&n.wh()}function sN(n){return n!=uRt&&n!=sRt}function hN(n){return n==JDt||n==YDt}function fN(n){return n==nxt||n==QDt}function lN(n){return n==wjt||n==bjt}function bN(n,t){return d$(n.g,t.g)}function wN(n,t){return new Zsn(t,n)}function dN(n,t){return new Zsn(t,n)}function gN(n){return nG(n.b.Kc(),n.a)}function pN(n,t){sbn(n,t),Ocn(n,n.D)}function mN(n,t,e){Scn(n,t),pcn(n,e)}function vN(n,t,e){kcn(n,t),vcn(n,e)}function kN(n,t,e){ycn(n,t),Mcn(n,e)}function yN(n,t,e){mcn(n,t),jcn(n,e)}function MN(n,t,e){Tcn(n,t),Ecn(n,e)}function TN(n,t,e){AK.call(this,n,t,e)}function jN(n){lA.call(this,n,!0)}function EN(){qP.call(this,"Tail",3)}function SN(){qP.call(this,"Head",1)}function PN(n){cHn(),Bun.call(this,n)}function CN(n){lX.call(this,n,n,n,n)}function IN(n){n.c=Inn(dat,EZn,1,0,5,1)}function ON(n){return n.b&&sXn(n),n.a}function AN(n){return n.b&&sXn(n),n.c}function LN(n,t){Nut||(n.b=t)}function NN(n,t){return n[n.length]=t}function $N(n,t){return n[n.length]=t}function DN(n,t){return Ern(t,h0(n))}function xN(n,t){return Ern(t,h0(n))}function RN(n,t){return kan(UW(n.d),t)}function KN(n,t){return kan(UW(n.g),t)}function FN(n,t){return kan(UW(n.j),t)}function _N(n,t){uF.call(this,n.b,t)}function BN(n,t){ttn(V5(n.a),v2(t))}function HN(n,t){ttn(Aen(n.a),k2(t))}function UN(n,t,e){kN(e,e.i+n,e.j+t)}function GN(n,t,e){uQ(n.c[t.g],t.g,e)}function qN(n,t,e){uG(n.c,71).Gi(t,e)}function XN(n,t,e){return uQ(n,t,e),e}function VN(n){Prn(n.Sf(),new Od(n))}function zN(n){return null!=n?Hon(n):0}function WN(n){return null==n?0:Hon(n)}function QN(n){QYn(),Qm.call(this,n)}function JN(n){this.a=n,WU.call(this,n)}function YN(){YN=E,e.Math.log(2)}function ZN(){ZN=E,kP(),rBt=WKt}function n$(){n$=E,vSt=new rpn(kxt)}function t$(){t$=E,new e$,new Zm}function e$(){new Ym,new Ym,new Ym}function i$(){throw hv(new TM(hat))}function r$(){throw hv(new TM(hat))}function c$(){throw hv(new TM(fat))}function a$(){throw hv(new TM(fat))}function o$(n){this.a=n,zE.call(this,n)}function u$(n){this.a=n,zE.call(this,n)}function s$(n,t){ZW(),this.a=n,this.b=t}function h$(n,t){WW(t),uY(n).Jc(new b)}function f$(n,t){UX(n.c,n.c.length,t)}function l$(n){return n.at?1:0}function g$(n,t){return dwn(n,t)>0?n:t}function p$(n,t,e){return{l:n,m:t,h:e}}function m$(n,t){null!=n.a&&MA(t,n.a)}function v$(n){c2(n,null),u2(n,null)}function k$(n,t,e){return vJ(n.g,e,t)}function y$(n,t,e){return avn(t,e,n.c)}function M$(n,t,e){return vJ(n.k,e,t)}function T$(n,t,e){return gWn(n,t,e),e}function j$(n,t){return n2(),t.n.b+=n}function E$(n){HZ.call(this),this.b=n}function S$(n){LF.call(this),this.a=n}function P$(){qP.call(this,"Range",2)}function C$(n){this.b=n,this.a=new Zm}function I$(n){this.b=new tt,this.a=n}function O$(n){n.a=new R,n.c=new R}function A$(n){n.a=new Ym,n.d=new Ym}function L$(n){s2(n,null),h2(n,null)}function N$(n,t){return kWn(n.a,t,null)}function $$(n,t){return vJ(n.a,t.a,t)}function D$(n){return new MO(n.a,n.b)}function x$(n){return new MO(n.c,n.d)}function R$(n){return new MO(n.c,n.d)}function K$(n,t){return rzn(n.c,n.b,t)}function F$(n,t){return null!=n&&Eyn(n,t)}function _$(n,t){return-1!=Yhn(n.Kc(),t)}function B$(n){return n.Ob()?n.Pb():null}function H$(n){this.b=(hZ(),new zw(n))}function U$(n){this.a=n,Ym.call(this)}function G$(){Vx.call(this,null,null)}function q$(){zx.call(this,null,null)}function X$(){_E.call(this,"INSTANCE",0)}function V$(){FEn(),this.a=new mKn(Llt)}function z$(n){return mvn(n,0,n.length)}function W$(n,t){return new ex(n.Kc(),t)}function Q$(n,t){return null!=n.a.Bc(t)}function J$(n,t){CVn(n),n.Gc(uG(t,15))}function Y$(n,t,e){n.c.bd(t,uG(e,136))}function Z$(n,t,e){n.c.Ui(t,uG(e,136))}function nD(n,t){n.c&&(cq(t),B1(t))}function tD(n,t){n.q.setHours(t),Iqn(n,t)}function eD(n,t){KR(t,n.a.a.a,n.a.a.b)}function iD(n,t,e,i){uQ(n.a[t.g],e.g,i)}function rD(n,t,e){return n.a[t.g][e.g]}function cD(n,t){return n.e[t.c.p][t.p]}function aD(n,t){return n.c[t.c.p][t.p]}function oD(n,t){return n.a[t.c.p][t.p]}function uD(n,t){return n.j[t.p]=oRn(t)}function sD(n,t){return null!=n.a.Bc(t)}function hD(n,t){return uM(pK(t.a))<=n}function fD(n,t){return uM(pK(t.a))>=n}function lD(n,t){return r7(n.f,t.Pg())}function bD(n,t){return n.a*t.a+n.b*t.b}function wD(n,t){return n.a0?t/(n*n):100*t}function jR(n,t){return n>0?t*t/n:t*t*100}function ER(n,t){return uG(ain(n.a,t),34)}function SR(n,t){return jIn(),UNn(n,t.e,t)}function PR(n,t,e){return ZS(),e.Mg(n,t)}function CR(n){return tcn(),n.e.a+n.f.a/2}function IR(n,t,e){return tcn(),e.e.a-n*t}function OR(n){return tcn(),n.e.b+n.f.b/2}function AR(n,t,e){return tcn(),e.e.b-n*t}function LR(n){n.d=new bR(n),n.e=new Ym}function NR(){this.a=new K1,this.b=new K1}function $R(n){this.c=n,this.a=1,this.b=1}function DR(n){aYn(),dv(this),this.Ff(n)}function xR(n,t,e){Stn(),n.pf(t)&&e.Cd(n)}function RR(n,t,e){return kD(t,xpn(n,e))}function KR(n,t,e){return n.a+=t,n.b+=e,n}function FR(n,t,e){return n.a*=t,n.b*=e,n}function _R(n,t){return n.a=t.a,n.b=t.b,n}function BR(n){return n.a=-n.a,n.b=-n.b,n}function HR(n,t,e){return n.a-=t,n.b-=e,n}function UR(n){lS.call(this),dan(this,n)}function GR(){_E.call(this,"GROW_TREE",0)}function qR(){_E.call(this,"POLYOMINO",0)}function XR(n,t,e){ltn.call(this,n,t,e,2)}function VR(n,t,e){$dn(V5(n.a),t,v2(e))}function zR(n,t){jP(),Vx.call(this,n,t)}function WR(n,t){EP(),zx.call(this,n,t)}function QR(n,t){EP(),WR.call(this,n,t)}function JR(n,t){EP(),zx.call(this,n,t)}function YR(n,t){return n.c.Fc(uG(t,136))}function ZR(n,t,e){$dn(Aen(n.a),t,k2(e))}function nK(n){this.c=n,ycn(n,0),Mcn(n,0)}function tK(n,t){ZN(),OX.call(this,n,t)}function eK(n,t){ZN(),tK.call(this,n,t)}function iK(n,t){ZN(),tK.call(this,n,t)}function rK(n,t){ZN(),OX.call(this,n,t)}function cK(n,t){ZN(),iK.call(this,n,t)}function aK(n,t){ZN(),rK.call(this,n,t)}function oK(n,t){ZN(),OX.call(this,n,t)}function uK(n,t,e){return t.zl(n.e,n.c,e)}function sK(n,t,e){return t.Al(n.e,n.c,e)}function hK(n,t,e){return QXn(Len(n,t),e)}function fK(n,t){return mwn(n.e,uG(t,54))}function lK(n){return null==n?null:AQn(n)}function bK(n){return null==n?null:mOn(n)}function wK(n){return null==n?null:cpn(n)}function dK(n){return null==n?null:cpn(n)}function gK(n){return Fq(null==n||KA(n)),n}function pK(n){return Fq(null==n||FA(n)),n}function mK(n){return Fq(null==n||RA(n)),n}function vK(n){null==n.o&&axn(n)}function kK(n){if(!n)throw hv(new Dv)}function yK(n){if(!n)throw hv(new Nv)}function MK(n){if(!n)throw hv(new Bv)}function TK(n){if(!n)throw hv(new xv)}function jK(n){if(!n)throw hv(new Fv)}function EK(){EK=E,KFt=new Gk,new qk}function SK(){SK=E,VCt=new Cm("root")}function PK(){Kan.call(this),this.Bb|=P0n}function CK(n,t){this.d=n,Cw(this),this.b=t}function IK(n,t){Fnn.call(this,n),this.a=t}function OK(n,t){Fnn.call(this,n),this.a=t}function AK(n,t,e){A7.call(this,n,t,e,null)}function LK(n,t,e){A7.call(this,n,t,e,null)}function NK(n,t){this.c=n,OE.call(this,n,t)}function $K(n,t){this.a=n,NK.call(this,n,t)}function DK(n){this.q=new e.Date(W4(n))}function xK(n){return n>8?0:n+1}function RK(n,t){Nut||kD(n.a,t)}function KK(n,t){return WS(),jsn(t.d.i,n)}function FK(n,t){return Pun(),new oHn(t,n)}function _K(n,t,e){return n.Ne(t,e)<=0?e:t}function BK(n,t,e){return n.Ne(t,e)<=0?t:e}function HK(n,t){return uG(ain(n.b,t),143)}function UK(n,t){return uG(ain(n.c,t),233)}function GK(n){return uG(Vq(n.a,n.b),294)}function qK(n){return new MO(n.c,n.d+n.a)}function XK(n){return tJ(n),n?1231:1237}function VK(n){return n2(),lN(uG(n,203))}function zK(){zK=E,lht=ggn((Qmn(),JRt))}function WK(n,t){t.a?W$n(n,t):sD(n.a,t.b)}function QK(n,t,e){++n.j,n.tj(),Ann(n,t,e)}function JK(n,t,e){++n.j,n.qj(t,n.Zi(t,e))}function YK(n,t,e){n.fd(t).Rb(e)}function ZK(n,t,e){return e=$Un(n,t,6,e)}function nF(n,t,e){return e=$Un(n,t,3,e)}function tF(n,t,e){return e=$Un(n,t,9,e)}function eF(n,t){return ZZ(t,W2n),n.f=t,n}function iF(n,t){return(t&vZn)%n.d.length}function rF(n,t,e){return fXn(n.c,n.b,t,e)}function cF(n,t){this.c=n,Drn.call(this,t)}function aF(n,t){this.a=n,xm.call(this,t)}function oF(n,t){this.a=n,xm.call(this,t)}function uF(n,t){Cm.call(this,n),this.a=t}function sF(n,t){Bm.call(this,n),this.a=t}function hF(n,t){Bm.call(this,n),this.a=t}function fF(n){smn.call(this,0,0),this.f=n}function lF(n,t,e){return n.a+=mvn(t,0,e),n}function bF(n){return!n.a&&(n.a=new M),n.a}function wF(n,t){var e;return e=n.e,n.e=t,e}function dF(n,t){var e;return e=t,!!n.Fe(e)}function gF(n,t){return qx(),n==t?0:n?1:-1}function pF(n,t){n.a.bd(n.b,t),++n.b,n.c=-1}function mF(n){n.b?mF(n.b):n.f.c.zc(n.e,n.d)}function vF(n){$z(n.e),n.d.b=n.d,n.d.a=n.d}function kF(n,t,e){vS(),Ob(n,t.Ve(n.a,e))}function yF(n,t,e){return Uz(n,uG(t,22),e)}function MF(n,t){return aT(new Array(t),n)}function TF(n){return pV(DV(n,32))^pV(n)}function jF(n){return String.fromCharCode(n)}function EF(n){return null==n?null:n.message}function SF(n,t,e){return n.apply(t,e)}function PF(n,t){n[U0n].call(n,t)}function CF(n,t){n[U0n].call(n,t)}function IF(n,t){return WS(),!jsn(t.d.i,n)}function OF(n,t,e,i){lX.call(this,n,t,e,i)}function AF(){HF.call(this),this.a=new sj}function LF(){this.n=new sj,this.o=new sj}function NF(){this.b=new sj,this.c=new Zm}function $F(){this.a=new Zm,this.b=new Zm}function DF(){this.a=new lt,this.b=new qv}function xF(){this.b=new u8,this.a=new u8}function RF(){this.b=new ek,this.a=new ek}function KF(){this.b=new Ym,this.a=new Ym}function FF(){this.b=new Gj,this.a=new Ma}function _F(){this.a=new hl,this.b=new oc}function BF(){this.a=new Zm,this.d=new Zm}function HF(){this.n=new Dk,this.i=new cN}function UF(n){this.a=(man(n,g1n),new R7(n))}function GF(n){this.a=(man(n,g1n),new R7(n))}function qF(n){return n<100?null:new cj(n)}function XF(n,t){return n.n.a=(tJ(t),t+10)}function VF(n,t){return n.n.a=(tJ(t),t+10)}function zF(n,t){return t==n||sSn(mRn(t),n)}function WF(n,t){return null==vJ(n.a,t,"")}function QF(n,t){return t.qi(n.a)}function JF(n,t){return n.a+=t.a,n.b+=t.b,n}function YF(n,t){return n.a-=t.a,n.b-=t.b,n}function ZF(n){return Xv(n.j.c,0),n.a=-1,n}function n_(n,t,e){return e=$Un(n,t,11,e)}function t_(n,t,e){null!=e&&Xan(t,gTn(n,e))}function e_(n,t,e){null!=e&&Van(t,gTn(n,e))}function i_(n,t,e,i){fz.call(this,n,t,e,i)}function r_(n,t,e,i){fz.call(this,n,t,e,i)}function c_(n,t,e,i){r_.call(this,n,t,e,i)}function a_(n,t,e,i){wz.call(this,n,t,e,i)}function o_(n,t,e,i){wz.call(this,n,t,e,i)}function u_(n,t,e,i){wz.call(this,n,t,e,i)}function s_(n,t,e,i){o_.call(this,n,t,e,i)}function h_(n,t,e,i){o_.call(this,n,t,e,i)}function f_(n,t,e,i){u_.call(this,n,t,e,i)}function l_(n,t,e,i){h_.call(this,n,t,e,i)}function b_(n,t,e,i){kz.call(this,n,t,e,i)}function w_(n,t){dM.call(this,Hit+n+zet+t)}function d_(n,t){return n.jk().wi().ri(n,t)}function g_(n,t){return n.jk().wi().ti(n,t)}function p_(n,t){return tJ(n),xA(n)===xA(t)}function m_(n,t){return tJ(n),xA(n)===xA(t)}function v_(n,t){return n.b.Bd(new QP(n,t))}function k_(n,t){return n.b.Bd(new JP(n,t))}function y_(n,t){return n.b.Bd(new YP(n,t))}function M_(n,t){return n.e=uG(n.d.Kb(t),159)}function T_(n,t,e){return n.lastIndexOf(t,e)}function j_(n,t,e){return ugn(n[t.a],n[e.a])}function E_(n,t){return kfn(t,(jYn(),Oyt),n)}function S_(n,t){return d$(t.a.d.p,n.a.d.p)}function P_(n,t){return d$(n.a.d.p,t.a.d.p)}function C_(n,t){return ugn(n.c-n.s,t.c-t.s)}function I_(n,t){return ugn(n.b.e.a,t.b.e.a)}function O_(n,t){return ugn(n.c.e.a,t.c.e.a)}function A_(n){return n.c?Ten(n.c.a,n,0):-1}function L_(n){return n==rRt||n==aRt||n==cRt}function N_(n,t){this.c=n,Qz.call(this,n,t)}function $_(n,t,e){this.a=n,Qx.call(this,t,e)}function D_(n){this.c=n,rL.call(this,YZn,0)}function x_(n,t,e){this.c=t,this.b=e,this.a=n}function R_(n){PU(),this.d=n,this.a=new ND}function K_(n){sB(),this.a=(hZ(),new nT(n))}function F_(n,t){hN(n.f)?JDn(n,t):wCn(n,t)}function __(n,t){sG.call(this,n,n.length,t)}function B_(n,t){Nut||t&&(n.d=t)}function H_(n,t){return F$(t,15)&&G_n(n.c,t)}function U_(n,t,e){return uG(n.c,71).Wk(t,e)}function G_(n,t,e){return uG(n.c,71).Xk(t,e)}function q_(n,t,e){return uK(n,uG(t,343),e)}function X_(n,t,e){return sK(n,uG(t,343),e)}function V_(n,t,e){return yPn(n,uG(t,343),e)}function z_(n,t,e){return FCn(n,uG(t,343),e)}function W_(n,t){return null==t?null:Xwn(n.b,t)}function Q_(n){return FA(n)?(tJ(n),n):n.ue()}function J_(n){return!isNaN(n)&&!isFinite(n)}function Y_(n){O$(this),BY(this),Qon(this,n)}function Z_(n){IN(this),dG(this.c,0,n.Pc())}function nB(n,t,e){this.a=n,this.b=t,this.c=e}function tB(n,t,e){this.a=n,this.b=t,this.c=e}function eB(n,t,e){this.d=n,this.b=e,this.a=t}function iB(n){this.a=n,bS(),Bsn(Date.now())}function rB(n){LQ(n.a),Lnn(n.c,n.b),n.b=null}function cB(){cB=E,out=new K,uut=new F}function aB(){aB=E,DFt=Inn(dat,EZn,1,0,5,1)}function oB(){oB=E,X_t=Inn(dat,EZn,1,0,5,1)}function uB(){uB=E,V_t=Inn(dat,EZn,1,0,5,1)}function sB(){sB=E,new jv((hZ(),hZ(),Vot))}function hB(n){return Rtn(),Fcn((xtn(),Mut),n)}function fB(n){return ybn(),Fcn((bnn(),xut),n)}function lB(n){return _kn(),Fcn((k8(),Jut),n)}function bB(n){return Xin(),Fcn((y8(),tst),n)}function wB(n){return W_n(),Fcn((uhn(),kst),n)}function dB(n){return Yrn(),Fcn((fnn(),Cst),n)}function gB(n){return Ktn(),Fcn((hnn(),Dst),n)}function pB(n){return Yen(),Fcn((lnn(),Bst),n)}function mB(n){return JYn(),Fcn((fL(),fht),n)}function vB(n){return ehn(),Fcn((_tn(),vht),n)}function kB(n){return vyn(),Fcn((Htn(),Eht),n)}function yB(n){return myn(),Fcn((Btn(),Rht),n)}function MB(n){return BS(),Fcn((r6(),_ht),n)}function TB(n){return Vin(),Fcn((M8(),vft),n)}function jB(n){return Jen(),Fcn((wnn(),vlt),n)}function EB(n){return uIn(),Fcn(($in(),Ilt),n)}function SB(n){return Xhn(),Fcn((Gtn(),Glt),n)}function PB(n){return Uvn(),Fcn((Utn(),ibt),n)}function CB(n,t){if(!n)throw hv(new vM(t))}function IB(n){if(!n)throw hv(new kM(PZn))}function OB(n,t){if(n!=t)throw hv(new Fv)}function AB(n,t,e){this.a=n,this.b=t,this.c=e}function LB(n,t,e){this.a=n,this.b=t,this.c=e}function NB(n,t,e){this.a=n,this.b=t,this.c=e}function $B(n,t,e){this.b=n,this.a=t,this.c=e}function DB(n,t,e){this.b=n,this.c=t,this.a=e}function xB(n,t,e){this.a=n,this.b=t,this.c=e}function RB(n,t,e){this.e=t,this.b=n,this.d=e}function KB(n,t,e){this.b=n,this.a=t,this.c=e}function FB(n,t,e){return vS(),n.a.Yd(t,e),t}function _B(n){var t;return(t=new yn).e=n,t}function BB(n){var t;return(t=new pk).b=n,t}function HB(){HB=E,Nbt=new $e,$bt=new De}function UB(){UB=E,Jwt=new ui,Qwt=new si}function GB(){GB=E,rdt=new mr,cdt=new vr}function qB(n){return gon(),Fcn((q7(),Cdt),n)}function XB(n){return VYn(),Fcn((lL(),_wt),n)}function VB(n){return Ghn(),Fcn((Xtn(),Wwt),n)}function zB(n){return qhn(),Fcn((qtn(),ldt),n)}function WB(n){return gPn(),Fcn((Din(),vdt),n)}function QB(n){return h_n(),Fcn((osn(),Kdt),n)}function JB(n){return vAn(),Fcn((ecn(),Vdt),n)}function YB(n){return H7(),Fcn((I8(),Jdt),n)}function ZB(n){return jan(),Fcn((U7(),egt),n)}function nH(n){return ran(),Fcn((G7(),ogt),n)}function tH(n){return kvn(),Fcn((xin(),wgt),n)}function eH(n){return zin(),Fcn((E8(),mgt),n)}function iH(n){return RIn(),Fcn((ccn(),Jgt),n)}function rH(n){return r_n(),Fcn((Efn(),spt),n)}function cH(n){return ihn(),Fcn((V7(),wpt),n)}function aH(n){return Zen(),Fcn((z7(),vpt),n)}function oH(n){return Y6(),Fcn((j8(),Tpt),n)}function uH(n){return ESn(),Fcn((rcn(),Ugt),n)}function sH(n){return Pfn(),Fcn((X7(),Tgt),n)}function hH(n){return tOn(),Fcn((icn(),Agt),n)}function fH(n){return Wtn(),Fcn((S8(),Dgt),n)}function lH(n){return Gpn(),Fcn((Kin(),$mt),n)}function bH(n){return MKn(),Fcn((chn(),ojt),n)}function wH(n){return Cwn(),Fcn((W7(),ljt),n)}function dH(n){return Yyn(),Fcn((Vtn(),mjt),n)}function gH(n){return pyn(),Fcn((Rin(),Ejt),n)}function pH(n){return THn(),Fcn((Sfn(),Rjt),n)}function mH(n){return yvn(),Fcn((ztn(),Ujt),n)}function vH(n){return nin(),Fcn((P8(),Vjt),n)}function kH(n){return can(),Fcn((Y7(),Yjt),n)}function yH(n){return isn(),Fcn((Q7(),iEt),n)}function MH(n){return Sln(),Fcn((J7(),uEt),n)}function TH(n){return kbn(),Fcn((Z7(),bEt),n)}function jH(n){return ian(),Fcn((nnn(),mEt),n)}function EH(n){return Vhn(),Fcn((tnn(),TEt),n)}function SH(n){return ean(),Fcn((snn(),GEt),n)}function PH(n){return Z6(),Fcn((C8(),nSt),n)}function CH(n){return b0(),Fcn((L8(),bSt),n)}function IH(n){return w0(),Fcn((N8(),pSt),n)}function OH(n){return _7(),Fcn(($8(),RSt),n)}function AH(n){return l0(),Fcn((D8(),XSt),n)}function LH(n){return Cjn(),Fcn((sen(),YSt),n)}function NH(n){return OHn(),Fcn((bL(),bPt),n)}function $H(n){return Pln(),Fcn((enn(),mPt),n)}function DH(n){return mbn(),Fcn((uen(),KCt),n)}function xH(n){return i3(),Fcn((O8(),HCt),n)}function RH(n){return pon(),Fcn((A8(),JCt),n)}function KH(n){return VPn(),Fcn((Fin(),rIt),n)}function FH(n){return vbn(),Fcn((inn(),bIt),n)}function _H(n){return Ptn(),Fcn((x8(),uIt),n)}function BH(n){return dTn(),Fcn((oen(),tOt),n)}function HH(n){return esn(),Fcn((rnn(),aOt),n)}function UH(n){return Jmn(),Fcn((cnn(),fOt),n)}function GH(n){return Zyn(),Fcn((ann(),gOt),n)}function qH(n){return Bgn(),Fcn((onn(),LOt),n)}function XH(n){return a9(),Fcn((R8(),jAt),n)}function VH(n){return Aun(),Fcn((T8(),Lbt),n)}function zH(n){return VIn(),Fcn((acn(),mbt),n)}function WH(n){return den(),Fcn((unn(),IAt),n)}function QH(n){return rhn(),Fcn((K8(),NAt),n)}function JH(n){return _Rn(),Fcn((_in(),BAt),n)}function YH(n){return nP(),Fcn(($6(),WAt),n)}function ZH(n){return Rdn(),Fcn((gnn(),XAt),n)}function nU(n){return tP(),Fcn((D6(),YAt),n)}function tU(n){return B7(),Fcn((F8(),eLt),n)}function eU(n){return pOn(),Fcn((Bin(),sLt),n)}function iU(n){return eP(),Fcn((x6(),XLt),n)}function rU(n){return zhn(),Fcn((_8(),QLt),n)}function cU(n){return Rkn(),Fcn((Uin(),bNt),n)}function aU(n){return lAn(),Fcn((csn(),TNt),n)}function oU(n){return nMn(),Fcn((ocn(),DNt),n)}function uU(n){return ZSn(),Fcn((ucn(),t$t),n)}function sU(n){return xdn(),Fcn((Hin(),ext),n)}function hU(n){return Zrn(),Fcn((pnn(),oxt),n)}function fU(n){return _gn(),Fcn((hen(),bxt),n)}function lU(n){return RCn(),Fcn((scn(),yxt),n)}function bU(n){return Own(),Fcn((dnn(),Nxt),n)}function wU(n){return Ajn(),Fcn((fen(),Fxt),n)}function dU(n){return zDn(),Fcn((ohn(),Qxt),n)}function gU(n){return zkn(),Fcn((Gin(),iRt),n)}function pU(n){return $Pn(),Fcn((hcn(),fRt),n)}function mU(n){return eNn(),Fcn((fcn(),vRt),n)}function vU(n){return KQn(),Fcn((qin(),HRt),n)}function kU(n){return Qmn(),Fcn((len(),ZRt),n)}function yU(n){return aUn(),Fcn((ahn(),hKt),n)}function MU(n){return Iwn(),Fcn((mnn(),dKt),n)}function TU(n,t){return tJ(n),n+(tJ(t),t)}function jU(n){return CU(),Fcn((B8(),vKt),n)}function EU(n){return qpn(),Fcn((ben(),EKt),n)}function SU(n){return Eln(),Fcn((wen(),LKt),n)}function PU(){PU=E,KQn(),VEt=_Rt,zEt=kRt}function CU(){CU=E,gKt=new Pq,pKt=new gz}function IU(n){return!n.e&&(n.e=new Zm),n.e}function OU(n,t){this.c=n,this.a=t,this.b=t-n}function AU(n,t,e){this.a=n,this.b=t,this.c=e}function LU(n,t,e){this.a=n,this.b=t,this.c=e}function NU(n,t,e){this.a=n,this.b=t,this.c=e}function $U(n,t,e){this.a=n,this.b=t,this.c=e}function DU(n,t,e){this.a=n,this.b=t,this.c=e}function xU(n,t,e){this.a=n,this.b=t,this.c=e}function RU(n,t,e){this.e=n,this.a=t,this.c=e}function KU(n,t,e){ZN(),_1.call(this,n,t,e)}function FU(n,t,e){ZN(),CQ.call(this,n,t,e)}function _U(n,t,e){ZN(),CQ.call(this,n,t,e)}function BU(n,t,e){ZN(),CQ.call(this,n,t,e)}function HU(n,t,e){ZN(),FU.call(this,n,t,e)}function UU(n,t,e){ZN(),FU.call(this,n,t,e)}function GU(n,t,e){ZN(),UU.call(this,n,t,e)}function qU(n,t,e){ZN(),_U.call(this,n,t,e)}function XU(n,t,e){ZN(),BU.call(this,n,t,e)}function VU(n){lX.call(this,n.d,n.c,n.a,n.b)}function zU(n){lX.call(this,n.d,n.c,n.a,n.b)}function WU(n){this.d=n,Cw(this),this.b=EV(n.d)}function QU(n){return rDn(),Fcn((asn(),SFt),n)}function JU(n,t){return WW(n),WW(t),new jE(n,t)}function YU(n,t){return WW(n),WW(t),new WG(n,t)}function ZU(n,t){return WW(n),WW(t),new QG(n,t)}function nG(n,t){return WW(n),WW(t),new DE(n,t)}function tG(n){return MK(0!=n.b),Lrn(n,n.a.a)}function eG(n){return MK(0!=n.b),Lrn(n,n.c.b)}function iG(n){return!n.c&&(n.c=new Ks),n.c}function rG(n){var t;return cin(t=new Zm,n),t}function cG(n){var t;return cin(t=new ek,n),t}function aG(n){var t;return Fon(t=new rk,n),t}function oG(n){var t;return Fon(t=new lS,n),t}function uG(n,t){return Fq(null==n||Eyn(n,t)),n}function sG(n,t,e){_V.call(this,t,e),this.a=n}function hG(n,t){this.c=n,this.b=t,this.a=!1}function fG(){this.a=";,;",this.b="",this.c=""}function lG(n,t,e){this.b=n,eL.call(this,t,e)}function bG(n,t,e){this.c=n,zP.call(this,t,e)}function wG(n,t,e){FC.call(this,n,t),this.b=e}function dG(n,t,e){b$n(e,0,n,t,e.length,!1)}function gG(n,t,e,i,r){n.b=t,n.c=e,n.d=i,n.a=r}function pG(n,t,e,i,r){n.d=t,n.c=e,n.a=i,n.b=r}function mG(n,t){t&&(n.b=t,n.a=(GQ(t),t.a))}function vG(n,t){if(!n)throw hv(new vM(t))}function kG(n,t){if(!n)throw hv(new kM(t))}function yG(n,t){if(!n)throw hv(new gM(t))}function MG(n,t){return YS(),d$(n.d.p,t.d.p)}function TG(n,t){return tcn(),ugn(n.e.b,t.e.b)}function jG(n,t){return tcn(),ugn(n.e.a,t.e.a)}function EG(n,t){return d$(wq(n.d),wq(t.d))}function SG(n,t){return t&&$Q(n,t.d)?t:null}function PG(n,t){return t==(KQn(),_Rt)?n.c:n.d}function CG(n){return Esn(Lz(_L(n)?Gsn(n):n))}function IG(n){return new MO(n.c+n.b,n.d+n.a)}function OG(n){return null!=n&&!mpn(n,n_t,t_t)}function AG(n,t){return(ldn(n)<<4|ldn(t))&D1n}function LG(n,t,e,i,r){n.c=t,n.d=e,n.b=i,n.a=r}function NG(n){var t,e;t=n.b,e=n.c,n.b=e,n.c=t}function $G(n){var t,e;e=n.d,t=n.a,n.d=t,n.a=e}function DG(n,t){var e;return e=n.c,Jan(n,t),e}function xG(n,t){return n.g=t<0?-1:t,n}function RG(n,t){return Brn(n),n.a*=t,n.b*=t,n}function KG(n,t,e){Orn.call(this,t,e),this.d=n}function FG(n,t,e){LA.call(this,n,t),this.c=e}function _G(n,t,e){LA.call(this,n,t),this.c=e}function BG(n){uB(),ps.call(this),this.ci(n)}function HG(){N7(),OQ.call(this,(MP(),l_t))}function UG(n){return QYn(),new IX(0,n)}function GG(){GG=E,hZ(),CBt=new Xw(bct)}function qG(){qG=E,new Gyn((my(),Tat),(py(),Mat))}function XG(){XG=E,bot=Inn(dot,VZn,17,256,0,1)}function VG(){this.b=uM(pK(Jkn((rGn(),Bft))))}function zG(n){this.b=n,this.a=MV(this.b.a).Od()}function WG(n,t){this.b=n,this.a=t,Ff.call(this)}function QG(n,t){this.a=n,this.b=t,Ff.call(this)}function JG(n,t,e){this.a=n,vL.call(this,t,e)}function YG(n,t,e){this.a=n,vL.call(this,t,e)}function ZG(n,t,e){nrn(n,t,new QW(e))}function nq(n,t,e){var i;return i=n[t],n[t]=e,i}function tq(n){return Ltn(n.slice(),n)}function eq(n){var t;return t=n.n,n.a.b+t.d+t.a}function iq(n){var t;return t=n.n,n.e.b+t.d+t.a}function rq(n){var t;return t=n.n,n.e.a+t.b+t.c}function cq(n){n.a.b=n.b,n.b.a=n.a,n.a=n.b=null}function aq(n,t){return s8(n,t,n.c.b,n.c),!0}function oq(n){return n.a?n.a:sY(n)}function uq(n){return lZ(),bIn(n)==R0(gIn(n))}function sq(n){return lZ(),gIn(n)==R0(bIn(n))}function hq(n,t){return CEn(n,new FC(t.a,t.b))}function fq(n,t){return TJ(),IMn(n,t),new bJ(n,t)}function lq(n,t){return n.c=t)throw hv(new Ik)}function WV(n,t){return cdn(n,(tJ(t),new ud(t)))}function QV(n,t){return cdn(n,(tJ(t),new sd(t)))}function JV(n,t,e){return BYn(n,uG(t,12),uG(e,12))}function YV(n){return Lun(),0!=uG(n,12).g.c.length}function ZV(n){return Lun(),0!=uG(n,12).e.c.length}function nz(n,t){return Pun(),ugn(t.a.o.a,n.a.o.a)}function tz(n,t){0!=(t.Bb&Qtt)&&!n.a.o&&(n.a.o=t)}function ez(n,t){t.Ug("General 'Rotator",1),lQn(n)}function iz(n,t,e){t.qf(e,uM(pK(cQ(n.b,e)))*n.a)}function rz(n,t,e){return l_n(),qun(n,t)&&qun(n,e)}function cz(n){return eNn(),!n.Hc(wRt)&&!n.Hc(gRt)}function az(n){return n.e?T7(n.e):null}function oz(n){return _L(n)?""+n:K_n(n)}function uz(n){var t;for(t=n;t.f;)t=t.f;return t}function sz(n,t,e){return uQ(t,0,nX(t[0],e[0])),t}function hz(n,t,e,i){var r;(r=n.i).i=t,r.a=e,r.b=i}function fz(n,t,e,i){MD.call(this,n,t,e),this.b=i}function lz(n,t,e,i,r){btn.call(this,n,t,e,i,r,-1)}function bz(n,t,e,i,r){wtn.call(this,n,t,e,i,r,-1)}function wz(n,t,e,i){FG.call(this,n,t,e),this.b=i}function dz(n){lA.call(this,n,!1),this.a=!1}function gz(){BO.call(this,"LOOKAHEAD_LAYOUT",1)}function pz(n){this.b=n,Zx.call(this,n),qD(this)}function mz(n){this.b=n,tR.call(this,n),XD(this)}function vz(n,t,e){this.a=n,i_.call(this,t,e,5,6)}function kz(n,t,e,i){this.b=n,MD.call(this,t,e,i)}function yz(n,t){this.b=n,fb.call(this,n.b),this.a=t}function Mz(n){this.a=Fyn(n.a),this.b=new Z_(n.b)}function Tz(n,t){ZW(),UE.call(this,n,Dwn(new IM(t)))}function jz(n,t){return QYn(),new PQ(n,t,0)}function Ez(n,t){return QYn(),new PQ(6,n,t)}function Sz(n,t){for(tJ(t);n.Ob();)t.Cd(n.Pb())}function Pz(n,t){return RA(t)?AZ(n,t):!!FX(n.f,t)}function Cz(n,t){return t.Vh()?mwn(n.b,uG(t,54)):t}function Iz(n,t){return m_(n.substr(0,t.length),t)}function Oz(n){return new FV(new YD(n.a.length,n.a))}function Az(n){return new MO(n.c+n.b/2,n.d+n.a/2)}function Lz(n){return p$(~n.l&f0n,~n.m&f0n,~n.h&l0n)}function Nz(n){return typeof n===wZn||typeof n===mZn}function $z(n){n.f=new nN(n),n.i=new tN(n),++n.g}function Dz(n){if(!n)throw hv(new Bv);return n.d}function xz(n){var t;return MK(null!=(t=Rfn(n))),t}function Rz(n){var t;return MK(null!=(t=sgn(n))),t}function Kz(n,t){var e;return e7(t,e=n.a.gc()),e-t}function Fz(n,t){return null==n.a.zc(t,n)}function _z(n,t){return null==n.a.zc(t,(qx(),tot))}function Bz(n){return new fX(null,oW(n,n.length))}function Hz(n,t,e){return HXn(n,uG(t,42),uG(e,176))}function Uz(n,t,e){return Mon(n.a,t),nq(n.b,t.g,e)}function Gz(n,t,e){zV(e,n.a.c.length),Y8(n.a,e,t)}function qz(n,t,e,i){ubn(t,e,n.length),Xz(n,t,e,i)}function Xz(n,t,e,i){var r;for(r=t;r0?e.Math.log(n/t):-100}function rW(n,t){return dwn(n,t)<0?-1:dwn(n,t)>0?1:0}function cW(n,t){J$(n,F$(t,160)?t:uG(t,2036).Rl())}function aW(n,t){if(null==n)throw hv(new MM(t))}function oW(n,t){return $rn(t,n.length),new Sq(n,t)}function uW(n,t){return!!t&&Qon(n,t)}function sW(){return Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])}function hW(n){return 0==n.e?n:new zz(-n.e,n.d,n.a)}function fW(n,t){return ugn(n.c.c+n.c.b,t.c.c+t.c.b)}function lW(n,t){s8(n.d,t,n.b.b,n.b),++n.a,n.c=null}function bW(n,t){return n.c?bW(n.c,t):kD(n.b,t),n}function wW(n,t,e){var i;return i=uin(n,t),W5(n,t,e),i}function dW(n,t,e){var i;for(i=0;i=n.g}function uQ(n,t,e){return yK(null==e||cGn(n,e)),n[t]=e}function sQ(n,t){return s3(t,n.length+1),n.substr(t)}function hQ(n,t){for(tJ(t);n.c=n?new mS:ton(n-1)}function HQ(n){return!n.a&&n.c?n.c.b:n.a}function UQ(n){return F$(n,616)?n:new e0(n)}function GQ(n){n.c?GQ(n.c):(vgn(n),n.d=!0)}function qQ(n){n.c?n.c.$e():(n.d=!0,uKn(n))}function XQ(n){n.b=!1,n.c=!1,n.d=!1,n.a=!1}function VQ(n){return n.c.i.c==n.d.i.c}function zQ(n,t){var e;(e=n.Ih(t))>=0?n.ki(e):VLn(n,t)}function WQ(n,t){n.c<0||n.b.b0;)n=n<<1|(n<0?1:0);return n}function CJ(n,t){var e;return e=new bQ(n),mv(t.c,e),e}function IJ(n,t){n.u.Hc((eNn(),wRt))&&vNn(n,t),knn(n,t)}function OJ(n,t){return xA(n)===xA(t)||null!=n&&udn(n,t)}function AJ(n,t){return RX(n.a,t)?n.b[uG(t,22).g]:null}function LJ(){return BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])}function NJ(){return nP(),Uhn(cT(JAt,1),p1n,490,0,[VAt])}function $J(){return tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])}function DJ(){return eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])}function xJ(n){return!n.n&&(n.n=new fz(lFt,n,1,7)),n.n}function RJ(n){return!n.c&&(n.c=new fz(wFt,n,9,9)),n.c}function KJ(n){return!n.c&&(n.c=new f_(cFt,n,5,8)),n.c}function FJ(n){return!n.b&&(n.b=new f_(cFt,n,4,7)),n.b}function _J(n){return n.j.c.length=0,oY(n.c),ZF(n.a),n}function BJ(n){return n.e==wct&&kw(n,akn(n.g,n.b)),n.e}function HJ(n){return n.f==wct&&Mw(n,tEn(n.g,n.b)),n.f}function UJ(n,t,e,i){return Dsn(n,t,e,!1),pdn(n,i),n}function GJ(n,t){this.b=n,Qz.call(this,n,t),qD(this)}function qJ(n,t){this.b=n,N_.call(this,n,t),XD(this)}function XJ(n){this.d=n,this.a=this.d.b,this.b=this.d.c}function VJ(n,t){this.b=n,this.c=t,this.a=new fS(this.b)}function zJ(n,t){return s3(t,n.length),n.charCodeAt(t)}function WJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function QJ(n,t){jgn(n,uM($cn(t,"x")),uM($cn(t,"y")))}function JJ(n,t){return vgn(n),new fX(n,new ien(t,n.a))}function YJ(n,t){return vgn(n),new fX(n,new f7(t,n.a))}function ZJ(n,t){return vgn(n),new IK(n,new s7(t,n.a))}function nY(n,t){return vgn(n),new OK(n,new h7(t,n.a))}function tY(n,t){return new MZ(uG(WW(n),50),uG(WW(t),50))}function eY(n,t){return ugn(n.d.c+n.d.b/2,t.d.c+t.d.b/2)}function iY(n,t,e){e.a?Mcn(n,t.b-n.f/2):ycn(n,t.a-n.g/2)}function rY(n,t){return ugn(n.g.c+n.g.b/2,t.g.c+t.g.b/2)}function cY(n,t){return qS(),ugn((tJ(n),n),(tJ(t),t))}function aY(n){return null!=n&&ZE(UFt,n.toLowerCase())}function oY(n){var t;for(t=n.Kc();t.Ob();)t.Pb(),t.Qb()}function uY(n){var t;return!(t=n.b)&&(n.b=t=new Yl(n)),t}function sY(n){return con(n)||null}function hY(n,t){var e,i;return(e=n/t)>(i=t0(e))&&++i,i}function fY(n,t,e){var i;(i=uG(n.d.Kb(e),159))&&i.Nb(t)}function lY(n,t,e){KXn(n.a,e),jhn(e),EDn(n.b,e),MVn(t,e)}function bY(n,t,e,i){this.a=n,this.c=t,this.b=e,this.d=i}function wY(n,t,e,i){this.c=n,this.b=t,this.a=e,this.d=i}function dY(n,t,e,i){this.c=n,this.b=t,this.d=e,this.a=i}function gY(n,t,e,i){this.c=n,this.d=t,this.b=e,this.a=i}function pY(n,t,e,i){this.a=n,this.d=t,this.c=e,this.b=i}function mY(n,t,e,i){this.a=n,this.e=t,this.d=e,this.c=i}function vY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function kY(n,t,e){this.a=L1n,this.d=n,this.b=t,this.c=e}function yY(n,t,e,i){_E.call(this,n,t),this.a=e,this.b=i}function MY(n,t){this.d=(tJ(n),n),this.a=16449,this.c=t}function TY(n){this.a=new Zm,this.e=Inn(YHt,VZn,53,n,0,2)}function jY(n){n.Ug("No crossing minimization",1),n.Vg()}function EY(){Ky.call(this,"There is no more element.")}function SY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function PY(n,t,e,i){this.a=n,this.b=t,this.c=e,this.d=i}function CY(n,t,e,i){this.e=n,this.a=t,this.c=e,this.d=i}function IY(n,t,e,i){this.a=n,this.c=t,this.d=e,this.b=i}function OY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function AY(n,t,e,i){ZN(),l7.call(this,t,e,i),this.a=n}function LY(n,t,e){var i;return i=eJn(n),t.ti(e,i)}function NY(n){var t;return Urn(t=new ev,n),t}function $Y(n){var t;return MIn(t=new ev,n),t}function DY(n,t){return Qun(t,cQ(n.f,t)),null}function xY(n){return!n.b&&(n.b=new fz(aFt,n,12,3)),n.b}function RY(n){return Fq(null==n||Nz(n)&&!(n.Tm===j)),n}function KY(n){return n.n&&(n.e!==E1n&&n.je(),n.j=null),n}function FY(n){if(bpn(n.d),n.d.d!=n.c)throw hv(new Fv)}function _Y(n){return MK(n.b0&&XEn(this)}function UY(n,t){this.a=n,CK.call(this,n,uG(n.d,15).fd(t))}function GY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function qY(n,t){return ugn(EX(n)*jX(n),EX(t)*jX(t))}function XY(n){return BNn(n)&&oM(gK(VDn(n,(jYn(),hMt))))}function VY(n,t){return UNn(n,uG(oIn(t,(jYn(),UMt)),17),t)}function zY(n,t){return uG(oIn(n,(GYn(),zpt)),15).Fc(t),t}function WY(n,t){return n.b=t.b,n.c=t.c,n.d=t.d,n.a=t.a,n}function QY(n,t,e,i){this.b=n,this.c=i,rL.call(this,t,e)}function JY(n,t,e){n.i=0,n.e=0,t!=e&&tln(n,t,e)}function YY(n,t,e){n.i=0,n.e=0,t!=e&&eln(n,t,e)}function ZY(n,t,e){return JS(),opn(uG(cQ(n.e,t),529),e)}function nZ(n){return n.f||(n.f=new OE(n,n.c))}function tZ(n,t){return Hwn(n.j,t.s,t.c)+Hwn(t.e,n.s,n.c)}function eZ(n,t){n.e&&!n.e.a&&(iv(n.e,t),eZ(n.e,t))}function iZ(n,t){n.d&&!n.d.a&&(iv(n.d,t),iZ(n.d,t))}function rZ(n,t){return-ugn(EX(n)*jX(n),EX(t)*jX(t))}function cZ(n){return uG(n.ld(),149).Pg()+":"+cpn(n.md())}function aZ(){HIn(this,new Fl),this.wb=(tQ(),M_t),vj()}function oZ(n){this.b=new Zm,Ohn(this.b,this.b),this.a=n}function uZ(n,t){new lS,this.a=new Uk,this.b=n,this.c=t}function sZ(){sZ=E,Jot=new N,Yot=new N,Zot=new $}function hZ(){hZ=E,Vot=new C,zot=new O,Wot=new A}function fZ(){fZ=E,Gut=new dn,Xut=new tV,qut=new gn}function lZ(){lZ=E,aft=new Zm,cft=new Ym,rft=new Zm}function bZ(n,t){if(null==n)throw hv(new MM(t));return n}function wZ(n){return!n.a&&(n.a=new fz(bFt,n,10,11)),n.a}function dZ(n){return!n.q&&(n.q=new fz(p_t,n,11,10)),n.q}function gZ(n){return!n.s&&(n.s=new fz(o_t,n,21,17)),n.s}function pZ(n){return WW(n),KMn(new FV(ix(n.a.Kc(),new h)))}function mZ(n,t){return Tbn(n),Tbn(t),cM(uG(n,22),uG(t,22))}function vZ(n,t,e){nrn(n,t,new Pb(Q_(e)))}function kZ(n,t,e,i,r,c){wtn.call(this,n,t,e,i,r,c?-2:-1)}function yZ(n,t,e,i){LA.call(this,t,e),this.b=n,this.a=i}function MZ(n,t){Sy.call(this,new HV(n)),this.a=n,this.b=t}function TZ(n){this.b=n,this.c=n,n.e=null,n.c=null,this.a=1}function jZ(n){var t;GB(),(t=uG(n.g,10)).n.a=n.d.c+t.d.b}function EZ(){var n,t;EZ=E,t=!ovn(),n=new v,_at=t?new m:n}function SZ(n){return hZ(),F$(n,59)?new eT(n):new gx(n)}function PZ(n){return F$(n,16)?new oX(uG(n,16)):cG(n.Kc())}function CZ(n){return new WD(n,n.e.Rd().gc()*n.c.Rd().gc())}function IZ(n){return new QD(n,n.e.Rd().gc()*n.c.Rd().gc())}function OZ(n){return n&&n.hashCode?n.hashCode():xx(n)}function AZ(n,t){return null==t?!!FX(n.f,null):_X(n.i,t)}function LZ(n,t){var e;return(e=Q$(n.a,t))&&(t.d=null),e}function NZ(n,t,e){return!!n.f&&n.f.ef(t,e)}function $Z(n,t,e,i){uQ(n.c[t.g],e.g,i),uQ(n.c[e.g],t.g,i)}function DZ(n,t,e,i){uQ(n.c[t.g],t.g,e),uQ(n.b[t.g],t.g,i)}function xZ(n,t,e){return uM(pK(e.a))<=n&&uM(pK(e.b))>=t}function RZ(n,t){this.g=n,this.d=Uhn(cT(pbt,1),e6n,10,0,[t])}function KZ(n){this.c=n,this.b=new Hj(uG(WW(new pn),50))}function FZ(n){this.c=n,this.b=new Hj(uG(WW(new jt),50))}function _Z(n){this.b=n,this.a=new Hj(uG(WW(new nt),50))}function BZ(){this.b=new ek,this.d=new lS,this.e=new Ok}function HZ(){this.c=new sj,this.d=new sj,this.e=new sj}function UZ(){this.a=new Uk,this.b=(man(3,g1n),new R7(3))}function GZ(n,t){this.e=n,this.a=dat,this.b=$Bn(t),this.c=t}function qZ(n){this.c=n.c,this.d=n.d,this.b=n.b,this.a=n.a}function XZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function VZ(n,t,e,i,r,c){this.a=n,Ran.call(this,t,e,i,r,c)}function zZ(n,t,e,i,r,c,a){return new i8(n.e,t,e,i,r,c,a)}function WZ(n,t,e){return e>=0&&m_(n.substr(e,t.length),t)}function QZ(n,t){return F$(t,149)&&m_(n.b,uG(t,149).Pg())}function JZ(n,t){return n.a?t.Gh().Kc():uG(t.Gh(),71).Ii()}function YZ(n,t){var e;return w8(e=n.b.Qc(t),n.b.gc()),e}function ZZ(n,t){if(null==n)throw hv(new MM(t));return n}function n1(n){return n.u||(y9(n),n.u=new aF(n,n)),n.u}function t1(n){this.a=(hZ(),F$(n,59)?new eT(n):new gx(n))}function e1(n){return uG(Lsn(n,16),29)||n.ii()}function i1(n,t){var e;return e=Ij(n.Rm),null==t?e:e+": "+t}function r1(n,t,e){return Knn(t,e,n.length),n.substr(t,e-t)}function c1(n,t){HF.call(this),Qrn(this),this.a=n,this.c=t}function a1(n){n&&i1(n,n.ie()),String.fromCharCode(10)}function o1(n){XM(),e.setTimeout(function(){throw n},0)}function u1(){return _kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,zut])}function s1(){return Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])}function h1(){return Vin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])}function f1(){return Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])}function l1(){return Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])}function b1(){return zin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])}function w1(){return H7(),Uhn(cT(tgt,1),p1n,431,0,[zdt,Wdt])}function d1(){return nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])}function g1(){return Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])}function p1(){return pon(),Uhn(cT(iIt,1),p1n,501,0,[zCt,WCt])}function m1(){return b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])}function v1(){return w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])}function k1(){return _7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])}function y1(){return Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])}function M1(){return a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])}function T1(){return rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])}function j1(){return i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])}function E1(){return Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])}function S1(){return l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])}function P1(){return B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])}function C1(){return zhn(),Uhn(cT(JLt,1),p1n,437,0,[zLt,VLt])}function I1(){return CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])}function O1(n,t,e,i){return e>=0?n.Uh(t,e,i):n.Ch(null,e,i)}function A1(n){return 0==n.b.b?n.a.sf():tG(n.b)}function L1(n){if(5!=n.p)throw hv(new xv);return pV(n.f)}function N1(n){if(5!=n.p)throw hv(new xv);return pV(n.k)}function $1(n){return xA(n.a)===xA((Oun(),Q_t))&&ezn(n),n.a}function D1(n,t){n.b=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function x1(n,t){n.c=t,n.c>0&&n.b>0&&(n.g=mX(n.c,n.b,n.a))}function R1(n,t){nw(this,new MO(n.a,n.b)),tw(this,oG(t))}function K1(){Py.call(this,new sS(orn(12))),FD(!0),this.a=2}function F1(n,t,e){QYn(),Qm.call(this,n),this.b=t,this.a=e}function _1(n,t,e){ZN(),Hm.call(this,t),this.a=n,this.b=e}function B1(n){var t;t=n.c.d.b,n.b=t,n.a=n.c.d,t.a=n.c.d.b=n}function H1(n){return 0==n.b?null:(MK(0!=n.b),Lrn(n,n.a.a))}function U1(n,t){return null==t?DA(FX(n.f,null)):_P(n.i,t)}function G1(n,t,e,i,r){return new AOn(n,(Rtn(),vut),t,e,i,r)}function q1(n,t){return z5(t),Jcn(n,Inn(YHt,W1n,28,t,15,1),t)}function X1(n,t){return bZ(n,"set1"),bZ(t,"set2"),new GE(n,t)}function V1(n,t){var e=Rat[n.charCodeAt(0)];return null==e?n:e}function z1(n,t){var e;return pWn(n,t,e=new B),e.d}function W1(n,t,e,i){var r;r=new AF,t.a[e.g]=r,Uz(n.b,i,r)}function Q1(n,t){return JF(BR(Lcn(n.f,t)),n.f.d)}function J1(n){Lan(n.a),VN(n.a),Apn(new Ad(n.a))}function Y1(n,t){iBn(n,!0),Prn(n.e.Rf(),new DB(n,!0,t))}function Z1(n,t){return lZ(),n==R0(bIn(t))||n==R0(gIn(t))}function n0(n,t){return tcn(),uG(oIn(t,(QGn(),ACt)),17).a==n}function t0(n){return 0|Math.max(Math.min(n,vZn),-2147483648)}function e0(n){this.a=uG(WW(n),277),this.b=(hZ(),new mx(n))}function i0(n,t,e){this.i=new Zm,this.b=n,this.g=t,this.a=e}function r0(n,t,e){this.a=new Zm,this.e=n,this.f=t,this.c=e}function c0(n,t,e){this.c=new Zm,this.e=n,this.f=t,this.b=e}function a0(n){HF.call(this),Qrn(this),this.a=n,this.c=!0}function o0(n){function t(){}return t.prototype=n||{},new t}function u0(n){if(n.Ae())return null;var t=n.n;return sZn[t]}function s0(n){return n.Db>>16!=3?null:uG(n.Cb,27)}function h0(n){return n.Db>>16!=9?null:uG(n.Cb,27)}function f0(n){return n.Db>>16!=6?null:uG(n.Cb,74)}function l0(){l0=E,USt=new XI(V2n,0),GSt=new XI(z2n,1)}function b0(){b0=E,fSt=new OI(z2n,0),hSt=new OI(V2n,1)}function w0(){w0=E,wSt=new AI(c3n,0),dSt=new AI("UP",1)}function d0(){d0=E,Aat=Abn((Hy(),Uhn(cT(Lat,1),p1n,549,0,[Iat])))}function g0(n){var t;return Dfn(t=new Dj(orn(n.length)),n),t}function p0(n,t){return n.b+=t.b,n.c+=t.c,n.d+=t.d,n.a+=t.a,n}function m0(n,t){return!!Chn(n,t)&&(lan(n),!0)}function v0(n,t){if(null==t)throw hv(new Rv);return Tvn(n,t)}function k0(n,t){var e;e=n.q.getHours(),n.q.setDate(t),Iqn(n,e)}function y0(n,t,e){var i;(i=n.Ih(t))>=0?n.bi(i,e):lRn(n,t,e)}function M0(n,t){var e;return(e=n.Ih(t))>=0?n.Wh(e):$Nn(n,t)}function T0(n,t){var e;for(WW(t),e=n.a;e;e=e.c)t.Yd(e.g,e.i)}function j0(n,t,e){var i;i=Ufn(n,t,e),n.b=new Don(i.c.length)}function E0(n,t,e){W0(),n&&vJ(LFt,n,t),n&&vJ(AFt,n,e)}function S0(n,t){return UB(),qx(),uG(t.a,17).a0}function O0(n){var t;return t=n.d,t=n.bj(n.f),ttn(n,t),t.Ob()}function A0(n,t){var e;return VCn(e=new aX(t),n),new Z_(e)}function L0(n){if(0!=n.p)throw hv(new xv);return HA(n.f,0)}function N0(n){if(0!=n.p)throw hv(new xv);return HA(n.k,0)}function $0(n){return n.Db>>16!=7?null:uG(n.Cb,241)}function D0(n){return n.Db>>16!=6?null:uG(n.Cb,241)}function x0(n){return n.Db>>16!=7?null:uG(n.Cb,167)}function R0(n){return n.Db>>16!=11?null:uG(n.Cb,27)}function K0(n){return n.Db>>16!=17?null:uG(n.Cb,29)}function F0(n){return n.Db>>16!=3?null:uG(n.Cb,155)}function _0(n){return vgn(n),JJ(n,new Md(new ek))}function B0(n,t){var e=n.a=n.a||[];return e[t]||(e[t]=n.ve(t))}function H0(n,t){var e;e=n.q.getHours(),n.q.setMonth(t),Iqn(n,e)}function U0(n,t){LD(this),this.f=t,this.g=n,KY(this),this.je()}function G0(n,t){this.a=n,this.c=D$(this.a),this.b=new qZ(t)}function q0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function X0(n,t,e){this.a=t,this.c=n,this.b=(WW(e),new Z_(e))}function V0(n){this.a=n,this.b=Inn(WEt,VZn,2043,n.e.length,0,2)}function z0(){this.a=new XL,this.e=new ek,this.g=0,this.i=0}function W0(){W0=E,LFt=new Ym,AFt=new Ym,pA(iut,new fs)}function Q0(){Q0=E,jEt=wV(new wJ,(uIn(),Plt),(VYn(),Owt))}function J0(){J0=E,EEt=wV(new wJ,(uIn(),Plt),(VYn(),Owt))}function Y0(){Y0=E,PEt=wV(new wJ,(uIn(),Plt),(VYn(),Owt))}function Z0(){Z0=E,tSt=Aq(new wJ,(uIn(),Plt),(VYn(),ewt))}function n2(){n2=E,aSt=Aq(new wJ,(uIn(),Plt),(VYn(),ewt))}function t2(){t2=E,sSt=Aq(new wJ,(uIn(),Plt),(VYn(),ewt))}function e2(){e2=E,mSt=Aq(new wJ,(uIn(),Plt),(VYn(),ewt))}function i2(n,t,e,i,r,c){return new Ken(n.e,t,n.Lj(),e,i,r,c)}function r2(n,t,e){return null==t?zAn(n.f,null,e):kgn(n.i,t,e)}function c2(n,t){n.c&&men(n.c.g,n),n.c=t,n.c&&kD(n.c.g,n)}function a2(n,t){n.c&&men(n.c.a,n),n.c=t,n.c&&kD(n.c.a,n)}function o2(n,t){n.i&&men(n.i.j,n),n.i=t,n.i&&kD(n.i.j,n)}function u2(n,t){n.d&&men(n.d.e,n),n.d=t,n.d&&kD(n.d.e,n)}function s2(n,t){n.a&&men(n.a.k,n),n.a=t,n.a&&kD(n.a.k,n)}function h2(n,t){n.b&&men(n.b.f,n),n.b=t,n.b&&kD(n.b.f,n)}function f2(n,t){dQ(n,n.b,n.c),uG(n.b.b,68),t&&uG(t.b,68).b}function l2(n,t){return ugn(uG(n.c,65).c.e.b,uG(t.c,65).c.e.b)}function b2(n,t){return ugn(uG(n.c,65).c.e.a,uG(t.c,65).c.e.a)}function w2(n){return Mbn(),qx(),0!=uG(n.a,86).d.e}function d2(n,t){F$(n.Cb,184)&&(uG(n.Cb,184).tb=null),qon(n,t)}function g2(n,t){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,t)}function p2(n,t){Pgn(n,t),F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),2)}function m2(n,t){null!=t.c&&pQ(n,new QW(t.c))}function v2(n){var t;return vj(),Urn(t=new ev,n),t}function k2(n){var t;return vj(),Urn(t=new ev,n),t}function y2(n){for(var t;;)if(t=n.Pb(),!n.Ob())return t}function M2(n,t,e){return kD(n.a,(TJ(),IMn(t,e),new FE(t,e))),n}function T2(n,t){return PP(),ein(t)?new Cq(t,n):new OA(t,n)}function j2(n){return cHn(),dwn(n,0)>=0?Rmn(n):hW(Rmn(Men(n)))}function E2(n){var t;return t=uG(tq(n.b),9),new nB(n.a,t,n.c)}function S2(n,t){var e;return(e=uG(Xwn(nZ(n.a),t),16))?e.gc():0}function P2(n,t,e){var i;hdn(t,e,n.c.length),i=e-t,nE(n.c,t,i)}function C2(n,t,e){hdn(t,e,n.gc()),this.c=n,this.a=t,this.b=e-t}function I2(n){this.c=new lS,this.b=n.b,this.d=n.c,this.a=n.a}function O2(n){this.a=e.Math.cos(n),this.b=e.Math.sin(n)}function A2(n,t,e,i){this.c=n,this.d=i,s2(this,t),h2(this,e)}function L2(n,t){Ey.call(this,new sS(orn(n))),man(t,XZn),this.a=t}function N2(n,t,e){return new AOn(n,(Rtn(),mut),null,!1,t,e)}function $2(n,t,e){return new AOn(n,(Rtn(),kut),t,e,null,!1)}function D2(){return ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])}function x2(){return Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])}function R2(){return Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])}function K2(){return Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])}function F2(){return Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])}function _2(){return gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])}function B2(){return jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])}function H2(){return ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])}function U2(){return Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])}function G2(){return ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])}function q2(){return Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])}function X2(){return Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])}function V2(){return can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,zjt,Wjt])}function z2(){return isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])}function W2(){return Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])}function Q2(){return kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])}function J2(){return ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])}function Y2(){return Vhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])}function Z2(){return ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])}function n3(n){return Gfn(Uhn(cT(PNt,1),VZn,8,0,[n.i.n,n.n,n.a]))}function t3(){return Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])}function e3(){e3=E,UCt=wV(new wJ,(Cjn(),WSt),(OHn(),ePt))}function i3(){i3=E,_Ct=new JI("DFS",0),FCt=new JI("BFS",1)}function r3(n,t,e){var i;(i=new ia).b=t,i.a=e,++t.b,kD(n.d,i)}function c3(n,t,e){var i;JF(i=new eN(e.d),n),jgn(t,i.a,i.b)}function a3(n,t){pD(n,pV(E3($V(t,24),W0n)),pV(E3(t,W0n)))}function o3(n,t){if(n<0||n>t)throw hv(new dM(h2n+n+f2n+t))}function u3(n,t){if(n<0||n>=t)throw hv(new dM(h2n+n+f2n+t))}function s3(n,t){if(n<0||n>=t)throw hv(new JM(h2n+n+f2n+t))}function h3(n,t){this.b=(tJ(n),n),this.a=0==(t&j0n)?64|t|zZn:t}function f3(n){return vgn(n),sZ(),sZ(),krn(n,Yot)}function l3(n,t,e){var i;return(i=uXn(n,t,!1)).b<=t&&i.a<=e}function b3(){return den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])}function w3(){return Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])}function d3(){return Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])}function g3(){return Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])}function p3(){return vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])}function m3(){return esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])}function v3(){return Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])}function k3(){return Rdn(),Uhn(cT(zAt,1),p1n,444,0,[HAt,UAt,GAt])}function y3(){return Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])}function M3(){return Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])}function T3(n){return WW(n),F$(n,16)?new Z_(uG(n,16)):rG(n.Kc())}function j3(n,t){return n&&n.equals?n.equals(t):xA(n)===xA(t)}function E3(n,t){return Esn(OV(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function S3(n,t){return Esn(AV(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function P3(n,t){return Esn(LV(_L(n)?Gsn(n):n,_L(t)?Gsn(t):t))}function C3(n,t){var e;return kK(!!(e=(tJ(n),n).g)),tJ(t),e(t)}function I3(n,t){var e,i;return i=Kz(n,t),e=n.a.fd(i),new BE(n,e)}function O3(n){return n.Db>>16!=6?null:uG(J$n(n),241)}function A3(n){if(2!=n.p)throw hv(new xv);return pV(n.f)&D1n}function L3(n){if(2!=n.p)throw hv(new xv);return pV(n.k)&D1n}function N3(n){return MK(n.ai?1:0}function Y3(n,t){var e;return e=jen(t),uG(cQ(n.c,e),17).a}function Z3(n,t,e){var i;i=n.d[t.p],n.d[t.p]=n.d[e.p],n.d[e.p]=i}function n4(n,t,e){var i;n.n&&t&&e&&(i=new Yu,kD(n.e,i))}function t4(n,t){if(Fz(n.a,t),t.d)throw hv(new Ky(p2n));t.d=n}function e4(n,t){this.a=new Zm,this.d=new Zm,this.f=n,this.c=t}function i4(){this.c=new V$,this.a=new p7,this.b=new yk,XS()}function r4(){Whn(),this.b=new Ym,this.a=new Ym,this.c=new Zm}function c4(n,t,e){this.d=n,this.j=t,this.e=e,this.o=-1,this.p=3}function a4(n,t,e){this.d=n,this.k=t,this.f=e,this.o=-1,this.p=5}function o4(n,t,e,i,r,c){Bcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function u4(n,t,e,i,r,c){Hcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function s4(n,t,e,i,r,c){E9.call(this,n,t,e,i,r),c&&(this.o=-2)}function h4(n,t,e,i,r,c){qcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function f4(n,t,e,i,r,c){S9.call(this,n,t,e,i,r),c&&(this.o=-2)}function l4(n,t,e,i,r,c){Ucn.call(this,n,t,e,i,r),c&&(this.o=-2)}function b4(n,t,e,i,r,c){Gcn.call(this,n,t,e,i,r),c&&(this.o=-2)}function w4(n,t,e,i,r,c){P9.call(this,n,t,e,i,r),c&&(this.o=-2)}function d4(n,t,e,i){Hm.call(this,e),this.b=n,this.c=t,this.d=i}function g4(n,t){this.f=n,this.a=(N7(),MBt),this.c=MBt,this.b=t}function p4(n,t){this.g=n,this.d=(N7(),TBt),this.a=TBt,this.b=t}function m4(n,t){!n.c&&(n.c=new wsn(n,0)),BXn(n.c,(uzn(),nHt),t)}function v4(n,t){return lxn(n,t,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function k4(n,t){return rW(Bsn(n.q.getTime()),Bsn(t.q.getTime()))}function y4(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),16,new Vl(n))}function M4(n){return!(!n.u||0==V5(n.u.a).i||n.n&&yMn(n.n))}function T4(n){return!(!n.a||0==Aen(n.a.a).i||n.b&&MMn(n.b))}function j4(n,t){return 0==t?!!n.o&&0!=n.o.f:Wkn(n,t)}function E4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Hc(e)}function S4(n,t,e){var i;return!!(i=uG(n.Zb().xc(t),16))&&i.Mc(e)}function P4(n,t){var e;return e=1-t,n.a[e]=Ton(n.a[e],e),Ton(n,t)}function C4(n,t){var e;return e=E3(n,L0n),S3(NV(t,32),e)}function I4(n,t,e){WW(n),mjn(new q0(new Z_(n),t,e))}function O4(n,t,e){WW(n),vjn(new X0(new Z_(n),t,e))}function A4(n,t,e,i,r,c){return Dsn(n,t,e,c),gdn(n,i),vdn(n,r),n}function L4(n,t,e,i){return n.a+=""+r1(null==t?IZn:cpn(t),e,i),n}function N4(n,t){this.a=n,Jw.call(this,n),o3(t,n.gc()),this.b=t}function $4(n){this.a=Inn(dat,EZn,1,pfn(e.Math.max(8,n))<<1,5,1)}function D4(n){return uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199)}function x4(n){return uG(Ekn(n,Inn(obt,t6n,18,n.c.length,0,1)),483)}function R4(n){return n.a?0==n.e.length?n.a.a:n.a.a+""+n.e:n.c}function K4(n){for(;n.d>0&&0==n.a[--n.d];);0==n.a[n.d++]&&(n.e=0)}function F4(n){return MK(n.b.b!=n.d.a),n.c=n.b=n.b.b,--n.a,n.c.c}function _4(n,t,e){n.a=t,n.c=e,n.b.a.$b(),BY(n.d),Xv(n.e.a.c,0)}function B4(n,t){var e;n.e=new dy,f$(e=GFn(t),n.c),T_n(n,e,0)}function H4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.a,r)}function U4(n,t,e,i){var r;(r=new gu).a=t,r.b=e,r.c=i,aq(n.b,r)}function G4(n,t,e){if(n<0||te)throw hv(new dM(QOn(n,t,e)))}function q4(n,t){if(n<0||n>=t)throw hv(new dM(TLn(n,t)));return n}function X4(n){if(!("stack"in n))try{throw n}catch(t){}return n}function V4(n){return JS(),F$(n.g,10)?uG(n.g,10):null}function z4(n){return!uY(n).dc()&&(h$(n,new w),!0)}function W4(n){var t;return _L(n)?-0==(t=n)?0:t:Gen(n)}function Q4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function J4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Y4(n,t){return!!F$(t,44)&&sTn(n.a,uG(t,44))}function Z4(n){var t;return GQ(n),t=new D,tE(n.a,new vd(t)),t}function n6(){var n,t;return n=new ev,kD(gBt,t=n),t}function t6(n){var t;return GQ(n),t=new x,tE(n.a,new kd(t)),t}function e6(n,t){return n.a<=n.b&&(t.Dd(n.a++),!0)}function i6(n){dun.call(this,n,(Rtn(),put),null,!1,null,!1)}function r6(){r6=E,_ht=Abn((BS(),Uhn(cT(oft,1),p1n,489,0,[Kht])))}function c6(){c6=E,$Et=MJ(xwn(1),xwn(4)),NEt=MJ(xwn(1),xwn(2))}function a6(n,t){return new LU(t,HR(D$(t.e),n,n),(qx(),!0))}function o6(n){return new R7((man(n,v1n),arn(Lgn(Lgn(5,n),n/10|0))))}function u6(n){return Dq(n.e.Rd().gc()*n.c.Rd().gc(),273,new Xl(n))}function s6(n){return uG(Ekn(n,Inn(Abt,i6n,12,n.c.length,0,1)),2042)}function h6(n){return n2(),!(v9(n)||!v9(n)&&n.c.i.c==n.d.i.c)}function f6(n,t){return ncn(),uG(oIn(t,(QGn(),kCt)),17).a>=n.gc()}function l6(n,t){_Jn(t,n),NG(n.d),NG(uG(oIn(n,(jYn(),SMt)),214))}function b6(n,t){BJn(t,n),$G(n.d),$G(uG(oIn(n,(jYn(),SMt)),214))}function w6(n,t,e){n.d&&men(n.d.e,n),n.d=t,n.d&&GX(n.d.e,e,n)}function d6(n,t,e){return e.f.c.length>0?Hz(n.a,t,e):Hz(n.b,t,e)}function g6(n,t,e){var i;i=bkn();try{return SF(n,t,e)}finally{m8(i)}}function p6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.pe()),i}function m6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=e.se()),i}function v6(n,t){var e,i;return i=null,(e=uin(n,t))&&(i=e.se()),i}function k6(n,t){var e,i;return i=null,(e=v0(n,t))&&(i=uAn(e)),i}function y6(n,t,e){var i;return i=jvn(e),yHn(n.g,i,t),yHn(n.i,t,e),t}function M6(n,t,e){this.d=new qg(this),this.e=n,this.i=t,this.f=e}function T6(n,t,e,i){this.e=null,this.c=n,this.d=t,this.a=e,this.b=i}function j6(n,t,e,i){A$(this),this.c=n,this.e=t,this.f=e,this.b=i}function E6(n,t,e,i){this.d=n,this.n=t,this.g=e,this.o=i,this.p=-1}function S6(n,t,e,i){return F$(e,59)?new Yx(n,t,e,i):new qV(n,t,e,i)}function P6(n){return F$(n,16)?uG(n,16).dc():!n.Kc().Ob()}function C6(n){if(n.e.g!=n.b)throw hv(new Fv);return!!n.c&&n.d>0}function I6(n){return MK(n.b!=n.d.c),n.c=n.b,n.b=n.b.a,++n.a,n.c.c}function O6(n,t){tJ(t),uQ(n.a,n.c,t),n.c=n.c+1&n.a.length-1,JTn(n)}function A6(n,t){tJ(t),n.b=n.b-1&n.a.length-1,uQ(n.a,n.b,t),JTn(n)}function L6(n){var t;t=n.Gh(),this.a=F$(t,71)?uG(t,71).Ii():t.Kc()}function N6(n){return new h3(zrn(uG(n.a.md(),16).gc(),n.a.ld()),16)}function $6(){$6=E,WAt=Abn((nP(),Uhn(cT(JAt,1),p1n,490,0,[VAt])))}function D6(){D6=E,YAt=Abn((tP(),Uhn(cT(tLt,1),p1n,558,0,[QAt])))}function x6(){x6=E,XLt=Abn((eP(),Uhn(cT(WLt,1),p1n,539,0,[GLt])))}function R6(){return Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])}function K6(){return Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])}function F6(){return vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])}function _6(){return myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])}function B6(){return ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])}function H6(){return Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])}function U6(){return qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])}function G6(){return Ghn(),Uhn(cT(adt,1),p1n,371,0,[Vwt,qwt,Xwt,Gwt])}function q6(){return Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])}function X6(){return yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])}function V6(n){return n.j==(KQn(),KRt)&&$x(_$n(n),kRt)}function z6(n,t){var e;c2(e=t.a,t.c.d),u2(e,t.d.d),Xun(e.a,n.n)}function W6(n,t){var e;return!(e=uG(ain(n.b,t),67))&&(e=new lS),e}function Q6(n){return JS(),F$(n.g,154)?uG(n.g,154):null}function J6(n){n.a=null,n.e=null,Xv(n.b.c,0),Xv(n.f.c,0),n.c=null}function Y6(){Y6=E,kpt=new sI(G2n,0),ypt=new sI("TOP_LEFT",1)}function Z6(){Z6=E,YEt=new SI("UPPER",0),JEt=new SI("LOWER",1)}function n5(n,t){return bD(new MO(t.e.a+t.f.a/2,t.e.b+t.f.b/2),n)}function t5(n,t){return uG(yx(WV(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function e5(n,t){return uG(yx(QV(uG(Y9(n.k,t),15).Oc(),Fdt)),113)}function i5(){return Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[VSt,zSt,WSt,QSt])}function r5(){return mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])}function c5(){return dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])}function a5(){return Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,zRt])}function o5(){return Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])}function u5(){return _gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])}function s5(){return qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])}function h5(){return Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])}function f5(n){return W0(),Pz(LFt,n)?uG(cQ(LFt,n),341).Qg():null}function l5(n,t,e){return t<0?$Nn(n,e):uG(e,69).wk().Bk(n,n.hi(),t)}function b5(n,t,e){var i;return i=jvn(e),yHn(n.j,i,t),vJ(n.k,t,e),t}function w5(n,t,e){var i;return i=jvn(e),yHn(n.d,i,t),vJ(n.e,t,e),t}function d5(n){var t;return gj(),t=new es,n&&ARn(t,n),t}function g5(n){var t;return t=n.aj(n.i),n.i>0&&qGn(n.g,0,t,0,n.i),t}function p5(n,t){var e;for(e=n.j.c.length;e>24}function y5(n){if(1!=n.p)throw hv(new xv);return pV(n.k)<<24>>24}function M5(n){if(7!=n.p)throw hv(new xv);return pV(n.k)<<16>>16}function T5(n){if(7!=n.p)throw hv(new xv);return pV(n.f)<<16>>16}function j5(n,t){return 0==t.e||0==n.e?_ot:(b_n(),yKn(n,t))}function E5(n,t){return xA(t)===xA(n)?"(this Map)":null==t?IZn:cpn(t)}function S5(n,t,e){return RV(pK(DA(FX(n.f,t))),pK(DA(FX(n.f,e))))}function P5(n,t,e){var i;i=uG(cQ(n.g,e),60),kD(n.a.c,new WO(t,i))}function C5(n,t,e){n.i=0,n.e=0,t!=e&&(eln(n,t,e),tln(n,t,e))}function I5(n,t,e,i,r){kD(t,uLn(r,Bxn(r,e,i))),LIn(n,r,t)}function O5(n,t,e,i,r){this.i=n,this.a=t,this.e=e,this.j=i,this.f=r}function A5(n,t){HZ.call(this),this.a=n,this.b=t,kD(this.a.b,this)}function L5(n){this.b=new Ym,this.c=new Ym,this.d=new Ym,this.a=n}function N5(n,t){var e;return e=new QM,n.Gd(e),e.a+="..",t.Hd(e),e.a}function $5(n,t){var e;for(e=t;e;)KR(n,e.i,e.j),e=R0(e);return n}function D5(n,t,e){var i;return i=jvn(e),vJ(n.b,i,t),vJ(n.c,t,e),t}function x5(n){var t;for(t=0;n.Ob();)n.Pb(),t=Lgn(t,1);return arn(t)}function R5(n,t){var e;return PP(),uOn(e=uG(n,69).vk(),t),e.xl(t)}function K5(n,t,e){if(e){var i=e.oe();n.a[t]=i(e)}else delete n.a[t]}function F5(n,t){var e;e=n.q.getHours(),n.q.setFullYear(t+z1n),Iqn(n,e)}function _5(n,t){return uG(null==t?DA(FX(n.f,null)):_P(n.i,t),288)}function B5(n,t){return n==(VIn(),dbt)&&t==dbt?4:n==dbt||t==dbt?8:32}function H5(n,t,e){return aqn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function U5(n,t,e){return Dqn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function G5(n,t,e){return Cxn(n,t,e,F$(t,102)&&0!=(uG(t,19).Bb&P0n))}function q5(n){n.b!=n.c&&(n.a=Inn(dat,EZn,1,8,5,1),n.b=0,n.c=0)}function X5(n){return MK(n.a=0&&n.a[e]===t[e];e--);return e<0}function g8(n){var t;return n?new aX(n):(Fon(t=new XL,n),t)}function p8(n,t){var e,i;i=!1;do{i|=e=Tfn(n,t)}while(e);return i}function m8(n){n&&Cin((Gy(),Fat)),--Uat,n&&-1!=qat&&(jL(qat),qat=-1)}function v8(n){aCn(),pD(this,pV(E3($V(n,24),W0n)),pV(E3(n,W0n)))}function k8(){k8=E,Jut=Abn((_kn(),Uhn(cT(nst,1),p1n,436,0,[Wut,zut])))}function y8(){y8=E,tst=Abn((Xin(),Uhn(cT(mst,1),p1n,435,0,[Yut,Zut])))}function M8(){M8=E,vft=Abn((Vin(),Uhn(cT(mlt,1),p1n,432,0,[gft,pft])))}function T8(){T8=E,Lbt=Abn((Aun(),Uhn(cT(Dbt,1),p1n,517,0,[Obt,Ibt])))}function j8(){j8=E,Tpt=Abn((Y6(),Uhn(cT(Nmt,1),p1n,429,0,[kpt,ypt])))}function E8(){E8=E,mgt=Abn((zin(),Uhn(cT(Mgt,1),p1n,428,0,[dgt,ggt])))}function S8(){S8=E,Dgt=Abn((Wtn(),Uhn(cT(Hgt,1),p1n,488,0,[Ngt,Lgt])))}function P8(){P8=E,Vjt=Abn((nin(),Uhn(cT(Jjt,1),p1n,430,0,[Gjt,qjt])))}function C8(){C8=E,nSt=Abn((Z6(),Uhn(cT(cSt,1),p1n,531,0,[YEt,JEt])))}function I8(){I8=E,Jdt=Abn((H7(),Uhn(cT(tgt,1),p1n,431,0,[zdt,Wdt])))}function O8(){O8=E,HCt=Abn((i3(),Uhn(cT(QCt,1),p1n,433,0,[_Ct,FCt])))}function A8(){A8=E,JCt=Abn((pon(),Uhn(cT(iIt,1),p1n,501,0,[zCt,WCt])))}function L8(){L8=E,bSt=Abn((b0(),Uhn(cT(gSt,1),p1n,523,0,[fSt,hSt])))}function N8(){N8=E,pSt=Abn((w0(),Uhn(cT(xSt,1),p1n,522,0,[wSt,dSt])))}function $8(){$8=E,RSt=Abn((_7(),Uhn(cT(qSt,1),p1n,528,0,[DSt,$St])))}function D8(){D8=E,XSt=Abn((l0(),Uhn(cT(JSt,1),p1n,465,0,[USt,GSt])))}function x8(){x8=E,uIt=Abn((Ptn(),Uhn(cT(lIt,1),p1n,434,0,[cIt,aIt])))}function R8(){R8=E,jAt=Abn((a9(),Uhn(cT(CAt,1),p1n,491,0,[yAt,MAt])))}function K8(){K8=E,NAt=Abn((rhn(),Uhn(cT($At,1),p1n,492,0,[OAt,AAt])))}function F8(){F8=E,eLt=Abn((B7(),Uhn(cT(uLt,1),p1n,438,0,[nLt,ZAt])))}function _8(){_8=E,QLt=Abn((zhn(),Uhn(cT(JLt,1),p1n,437,0,[zLt,VLt])))}function B8(){B8=E,vKt=Abn((CU(),Uhn(cT(jKt,1),p1n,347,0,[gKt,pKt])))}function H8(){return xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])}function U8(){return KQn(),Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt])}function G8(n,t,e){return uG(null==t?zAn(n.f,null,e):kgn(n.i,t,e),288)}function q8(n){return(n.k==(VIn(),dbt)||n.k==lbt)&&vR(n,(GYn(),$pt))}function X8(n){return n.c&&n.d?V3(n.c)+"->"+V3(n.d):"e_"+xx(n)}function V8(n,t){var e,i;for(tJ(t),i=n.Kc();i.Ob();)e=i.Pb(),t.Cd(e)}function z8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function W8(n,t){var e;vZ(e=new _y,"x",t.a),vZ(e,"y",t.b),pQ(n,e)}function Q8(n,t){var e;for(e=t;e;)KR(n,-e.i,-e.j),e=R0(e);return n}function J8(n,t){var e,i;for(e=t,i=0;e>0;)i+=n.a[e],e-=e&-e;return i}function Y8(n,t,e){var i;return u3(t,n.c.length),i=n.c[t],n.c[t]=e,i}function Z8(n,t,e){n.a.c.length=0,szn(n,t,e),0==n.a.c.length||pUn(n,t)}function n9(n){n.i=0,FP(n.b,null),FP(n.c,null),n.a=null,n.e=null,++n.g}function t9(){t9=E,Nut=!0,Aut=!1,Lut=!1,Dut=!1,$ut=!1}function e9(n){t9(),Nut||(this.c=n,this.e=!0,this.a=new Zm)}function i9(n,t){this.c=0,this.b=t,iL.call(this,n,17493),this.a=this.c}function r9(n){NYn(),dv(this),this.a=new lS,Lln(this,n),aq(this.a,n)}function c9(){IN(this),this.b=new MO(M0n,M0n),this.a=new MO(T0n,T0n)}function a9(){a9=E,yAt=new oO(x6n,0),MAt=new oO("TARGET_WIDTH",1)}function o9(n,t){return(vgn(n),Qj(new fX(n,new ien(t,n.a)))).Bd(Kut)}function u9(){return uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])}function s9(){return gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])}function h9(){return kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])}function f9(){return pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])}function l9(){return Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])}function b9(){return VPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])}function w9(){return _Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])}function d9(){return pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])}function g9(){return Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])}function p9(){return zkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])}function m9(n){return XM(),function(){return g6(n,this,arguments)}}function v9(n){return!(!n.c||!n.d||!n.c.i||n.c.i!=n.d.i)}function k9(n,t){return!!F$(t,143)&&m_(n.c,uG(t,143).c)}function y9(n){return n.t||(n.t=new $m(n),$dn(new Qy(n),0,n.t)),n.t}function M9(n){this.b=n,DD.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function T9(n){this.b=n,nR.call(this,n),this.a=uG(Lsn(this.b.a,4),129)}function j9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.b=e}function E9(n,t,e,i,r){c4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function S9(n,t,e,i,r){a4.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function P9(n,t,e,i,r){b7.call(this,t,i,r),Kf(this),this.c=n,this.a=e}function C9(n,t){return uG(ain(n.d,t),23)||uG(ain(n.e,t),23)}function I9(n,t){var e,i;return e=t.ld(),!!(i=n.Fe(e))&&OJ(i.e,t.md())}function O9(n,t){var e;return new FE(e=t.ld(),n.e.pc(e,uG(t.md(),16)))}function A9(n,t){var e;return null==(e=n.a.get(t))?Inn(dat,EZn,1,0,5,1):e}function L9(n){var t;return t=n.length,m_(S0n.substr(S0n.length-t,t),n)}function N9(n){if(hDn(n))return n.c=n.a,n.a.Pb();throw hv(new Bv)}function $9(n,t){return 0==t||0==n.e?n:t>0?MFn(n,t):rvn(n,-t)}function D9(n,t){return 0==t||0==n.e?n:t>0?rvn(n,t):MFn(n,-t)}function x9(n){xP.call(this,null==n?IZn:cpn(n),F$(n,82)?uG(n,82):null)}function R9(n){var t;return n.c||F$(t=n.r,90)&&(n.c=uG(t,29)),n.c}function K9(n){var t;return Vsn(t=new UZ,n),kfn(t,(jYn(),bMt),null),t}function F9(n){var t,e;return t=n.c.i,e=n.d.i,t.k==(VIn(),lbt)&&e.k==lbt}function _9(n){return p$(n&f0n,n>>22&f0n,n<0?l0n:0)}function B9(n){var t,e,i;for(e=0,i=(t=n).length;e=0?n.Lh(i,e,!0):YNn(n,t,e)}function G9(n,t,e){return ugn(bD($kn(n),D$(t.b)),bD($kn(n),D$(e.b)))}function q9(n,t,e){return ugn(bD($kn(n),D$(t.e)),bD($kn(n),D$(e.e)))}function X9(n,t){return e.Math.min(atn(t.a,n.d.d.c),atn(t.b,n.d.d.c))}function V9(n,t){n._i(n.i+1),yD(n,n.i,n.Zi(n.i,t)),n.Mi(n.i++,t),n.Ni()}function z9(n){var t,e;++n.j,t=n.g,e=n.i,n.g=null,n.i=0,n.Oi(e,t),n.Ni()}function W9(n,t,e){var i;xun(i=new U$(n.a),n.a.a),zAn(i.f,t,e),n.a.a=i}function Q9(n,t,e,i){var r;for(r=0;r<$st;r++)qX(n.a[r][t.g],e,i[t.g])}function J9(n,t,e,i){var r;for(r=0;rt)throw hv(new dM(iLn(n,t,"index")));return n}function i7(n,t){var e;return u3(t,n.c.length),e=n.c[t],nE(n.c,t,1),e}function r7(n,t){var e,i;return tJ(n),e=n,tJ(t),e==(i=t)?0:et.p?-1:0}function E7(n){var t;return n.a||F$(t=n.r,156)&&(n.a=uG(t,156)),n.a}function S7(n,t,e){return++n.e,--n.f,uG(n.d[t].gd(e),136).md()}function P7(n){var t;return t=n.ld(),JU(uG(n.md(),16).Nc(),new Wl(t))}function C7(n,t){return!!Pz(n.a,t)&&(u7(n.a,t),!0)}function I7(n,t,e){return q4(t,n.e.Rd().gc()),q4(e,n.c.Rd().gc()),n.a[t][e]}function O7(n,t,e){this.a=n,this.b=t,this.c=e,kD(n.t,this),kD(t.i,this)}function A7(n,t,e,i){this.f=n,this.e=t,this.d=e,this.b=i,this.c=i?i.d:null}function L7(){this.b=new lS,this.a=new lS,this.b=new lS,this.a=new lS}function N7(){var n,t;N7=E,vj(),t=new Gv,MBt=t,n=new Wk,TBt=n}function $7(n){return vgn(n),new IK(n,new lG(n,n.a.e,4|n.a.d))}function D7(n){var t;for(GQ(n),t=0;n.a.Bd(new hn);)t=Lgn(t,1);return t}function x7(n,t){return tJ(t),n.c=0,"Initial capacity must not be negative")}function K7(){K7=E,jNt=new Cm("org.eclipse.elk.labels.labelManager")}function F7(){F7=E,Uwt=new uF("separateLayerConnections",(Ghn(),Vwt))}function _7(){_7=E,DSt=new qI("REGULAR",0),$St=new qI("CRITICAL",1)}function B7(){B7=E,nLt=new lO("FIXED",0),ZAt=new lO("CENTER_NODE",1)}function H7(){H7=E,zdt=new WC("QUADRATIC",0),Wdt=new WC("SCANLINE",1)}function U7(){U7=E,egt=Abn((jan(),Uhn(cT(agt,1),p1n,322,0,[Zdt,Ydt,ngt])))}function G7(){G7=E,ogt=Abn((ran(),Uhn(cT(bgt,1),p1n,351,0,[igt,cgt,rgt])))}function q7(){q7=E,Cdt=Abn((gon(),Uhn(cT(Rdt,1),p1n,372,0,[Sdt,Edt,jdt])))}function X7(){X7=E,Tgt=Abn((Pfn(),Uhn(cT(Ogt,1),p1n,460,0,[kgt,vgt,ygt])))}function V7(){V7=E,wpt=Abn((ihn(),Uhn(cT(mpt,1),p1n,299,0,[fpt,lpt,hpt])))}function z7(){z7=E,vpt=Abn((Zen(),Uhn(cT(Mpt,1),p1n,311,0,[gpt,ppt,dpt])))}function W7(){W7=E,ljt=Abn((Cwn(),Uhn(cT(pjt,1),p1n,390,0,[ujt,sjt,hjt])))}function Q7(){Q7=E,iEt=Abn((isn(),Uhn(cT(oEt,1),p1n,387,0,[Zjt,nEt,tEt])))}function J7(){J7=E,uEt=Abn((Sln(),Uhn(cT(lEt,1),p1n,349,0,[aEt,rEt,cEt])))}function Y7(){Y7=E,Yjt=Abn((can(),Uhn(cT(eEt,1),p1n,463,0,[Qjt,zjt,Wjt])))}function Z7(){Z7=E,bEt=Abn((kbn(),Uhn(cT(pEt,1),p1n,350,0,[sEt,hEt,fEt])))}function nnn(){nnn=E,mEt=Abn((ian(),Uhn(cT(MEt,1),p1n,352,0,[gEt,wEt,dEt])))}function tnn(){tnn=E,TEt=Abn((Vhn(),Uhn(cT(xEt,1),p1n,388,0,[kEt,yEt,vEt])))}function enn(){enn=E,mPt=Abn((Pln(),Uhn(cT(RCt,1),p1n,392,0,[gPt,dPt,wPt])))}function inn(){inn=E,bIt=Abn((vbn(),Uhn(cT(nOt,1),p1n,393,0,[sIt,hIt,fIt])))}function rnn(){rnn=E,aOt=Abn((esn(),Uhn(cT(hOt,1),p1n,300,0,[iOt,rOt,eOt])))}function cnn(){cnn=E,fOt=Abn((Jmn(),Uhn(cT(dOt,1),p1n,445,0,[oOt,uOt,sOt])))}function ann(){ann=E,gOt=Abn((Zyn(),Uhn(cT(AOt,1),p1n,456,0,[lOt,wOt,bOt])))}function onn(){onn=E,LOt=Abn((Bgn(),Uhn(cT(kAt,1),p1n,394,0,[IOt,OOt,COt])))}function unn(){unn=E,IAt=Abn((den(),Uhn(cT(LAt,1),p1n,439,0,[EAt,PAt,SAt])))}function snn(){snn=E,GEt=Abn((ean(),Uhn(cT(qEt,1),p1n,464,0,[_Et,BEt,HEt])))}function hnn(){hnn=E,Dst=Abn((Ktn(),Uhn(cT(xst,1),p1n,471,0,[Ast,Ost,Lst])))}function fnn(){fnn=E,Cst=Abn((Yrn(),Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])))}function lnn(){lnn=E,Bst=Abn((Yen(),Uhn(cT(hht,1),p1n,472,0,[Fst,Kst,Rst])))}function bnn(){bnn=E,xut=Abn((ybn(),Uhn(cT(Rut,1),p1n,108,0,[Cut,Iut,Out])))}function wnn(){wnn=E,vlt=Abn((Jen(),Uhn(cT(Clt,1),p1n,391,0,[glt,dlt,plt])))}function dnn(){dnn=E,Nxt=Abn((Own(),Uhn(cT(Kxt,1),p1n,346,0,[Oxt,Ixt,Axt])))}function gnn(){gnn=E,XAt=Abn((Rdn(),Uhn(cT(zAt,1),p1n,444,0,[HAt,UAt,GAt])))}function pnn(){pnn=E,oxt=Abn((Zrn(),Uhn(cT(lxt,1),p1n,278,0,[ixt,rxt,cxt])))}function mnn(){mnn=E,dKt=Abn((Iwn(),Uhn(cT(mKt,1),p1n,280,0,[lKt,fKt,bKt])))}function vnn(n,t){return!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),ymn(n.o,t)}function knn(n,t){var e;n.C&&((e=uG(AJ(n.b,t),127).n).d=n.C.d,e.a=n.C.a)}function ynn(n){var t,e,i,r;r=n.d,t=n.a,e=n.b,i=n.c,n.d=e,n.a=i,n.b=r,n.c=t}function Mnn(n){return!n.g&&(n.g=new ds),!n.g.b&&(n.g.b=new Om(n)),n.g.b}function Tnn(n){return!n.g&&(n.g=new ds),!n.g.c&&(n.g.c=new Nm(n)),n.g.c}function jnn(n){return!n.g&&(n.g=new ds),!n.g.d&&(n.g.d=new Am(n)),n.g.d}function Enn(n){return!n.g&&(n.g=new ds),!n.g.a&&(n.g.a=new Lm(n)),n.g.a}function Snn(n,t,e,i){return e&&(i=e.Rh(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Pnn(n,t,e,i){return e&&(i=e.Th(t,emn(e.Dh(),n.c.uk()),null,i)),i}function Cnn(n,t,e,i){var r;return KGn(r=Inn(YHt,W1n,28,t+1,15,1),n,t,e,i),r}function Inn(n,t,e,i,r,c){var a;return a=PTn(r,i),10!=r&&Uhn(cT(n,c),t,e,r,a),a}function Onn(n,t,e){var i,r;for(r=new Zsn(t,n),i=0;ie||t=0?n.Lh(e,!0,!0):YNn(n,t,!0)}function ktn(n,t,e){var i;return i=Ufn(n,t,e),n.b=new Don(i.c.length),ZFn(n,i)}function ytn(n){if(n.b<=0)throw hv(new Bv);return--n.b,n.a-=n.c.c,xwn(n.a)}function Mtn(n){var t;if(!n.a)throw hv(new EY);return t=n.a,n.a=R0(n.a),t}function Ttn(n){for(;!n.a;)if(!y_(n.c,new yd(n)))return!1;return!0}function jtn(n){return WW(n),F$(n,204)?uG(n,204):new sb(n)}function Etn(n){Stn(),uG(n.of((XYn(),bDt)),181).Fc((eNn(),dRt)),n.qf(lDt,null)}function Stn(){Stn=E,tNt=new hu,iNt=new fu,eNt=Rln((XYn(),lDt),tNt,q$t,iNt)}function Ptn(){Ptn=E,cIt=new nO("LEAF_NUMBER",0),aIt=new nO("NODE_SIZE",1)}function Ctn(n){n.a=Inn(YHt,W1n,28,n.b+1,15,1),n.c=Inn(YHt,W1n,28,n.b,15,1),n.d=0}function Itn(n,t){n.a.Ne(t.d,n.b)>0&&(kD(n.c,new wG(t.c,t.d,n.d)),n.b=t.d)}function Otn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.g[t]}function Atn(n,t,e){if(gln(n,e),null!=e&&!n.fk(e))throw hv(new Nv);return e}function Ltn(n,t){return 10!=Min(t)&&Uhn(Tbn(t),t.Sm,t.__elementTypeId$,Min(t),n),n}function Ntn(n,t,e,i){sZ(),i=i||Jot,rLn(n.slice(t,e),n,t,e,-t,i)}function $tn(n,t,e,i,r){return t<0?YNn(n,e,i):uG(e,69).wk().yk(n,n.hi(),t,i,r)}function Dtn(n,t){return ugn(uM(pK(oIn(n,(GYn(),bmt)))),uM(pK(oIn(t,bmt))))}function xtn(){xtn=E,Mut=Abn((Rtn(),Uhn(cT(Tut,1),p1n,304,0,[put,mut,vut,kut])))}function Rtn(){Rtn=E,put=new qP("All",0),mut=new SN,vut=new P$,kut=new EN}function Ktn(){Ktn=E,Ast=new aC(V2n,0),Ost=new aC(G2n,1),Lst=new aC(z2n,2)}function Ftn(){Ftn=E,tXn(),sHt=M0n,uHt=T0n,fHt=new Rw(M0n),hHt=new Rw(T0n)}function _tn(){_tn=E,vht=Abn((ehn(),Uhn(cT(jht,1),p1n,417,0,[pht,wht,dht,ght])))}function Btn(){Btn=E,Rht=Abn((myn(),Uhn(cT(Fht,1),p1n,406,0,[Nht,Lht,$ht,Dht])))}function Htn(){Htn=E,Eht=Abn((vyn(),Uhn(cT(Sht,1),p1n,332,0,[yht,kht,Mht,Tht])))}function Utn(){Utn=E,ibt=Abn((Uvn(),Uhn(cT(abt,1),p1n,389,0,[tbt,Zlt,Ylt,nbt])))}function Gtn(){Gtn=E,Glt=Abn((Xhn(),Uhn(cT(ebt,1),p1n,416,0,[Flt,Hlt,_lt,Blt])))}function qtn(){qtn=E,ldt=Abn((qhn(),Uhn(cT(mdt,1),p1n,421,0,[odt,udt,sdt,hdt])))}function Xtn(){Xtn=E,Wwt=Abn((Ghn(),Uhn(cT(adt,1),p1n,371,0,[Vwt,qwt,Xwt,Gwt])))}function Vtn(){Vtn=E,mjt=Abn((Yyn(),Uhn(cT(jjt,1),p1n,203,0,[djt,gjt,wjt,bjt])))}function ztn(){ztn=E,Ujt=Abn((yvn(),Uhn(cT(Xjt,1),p1n,284,0,[Fjt,Kjt,_jt,Bjt])))}function Wtn(){Wtn=E,Ngt=new iI(q4n,0),Lgt=new iI("IMPROVE_STRAIGHTNESS",1)}function Qtn(n,t){var e,i;return i=t/n.c.Rd().gc()|0,e=t%n.c.Rd().gc(),I7(n,i,e)}function Jtn(n){var t;if(n.nl())for(t=n.i-1;t>=0;--t)Vrn(n,t);return g5(n)}function Ytn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[0];)e=t;return e}function Ztn(n){var t,e;if(!n.b)return null;for(e=n.b;t=e.a[1];)e=t;return e}function nen(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function ten(n){return F$(n,180)?""+uG(n,180).a:null==n?null:cpn(n)}function een(n,t){if(t.a)throw hv(new Ky(p2n));Fz(n.a,t),t.a=n,!n.j&&(n.j=t)}function ien(n,t){rL.call(this,t.zd(),-16449&t.yd()),tJ(n),this.a=n,this.c=t}function ren(n,t){return new LU(t,KR(D$(t.e),t.f.a+n,t.f.b+n),(qx(),!1))}function cen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function aen(n,t){return PU(),kD(n,new WO(t,xwn(t.e.c.length+t.g.c.length)))}function oen(){oen=E,tOt=Abn((dTn(),Uhn(cT(cOt,1),p1n,354,0,[ZIt,JIt,YIt,QIt])))}function uen(){uen=E,KCt=Abn((mbn(),Uhn(cT(BCt,1),p1n,353,0,[xCt,$Ct,DCt,NCt])))}function sen(){sen=E,YSt=Abn((Cjn(),Uhn(cT(ZSt,1),p1n,405,0,[VSt,zSt,WSt,QSt])))}function hen(){hen=E,bxt=Abn((_gn(),Uhn(cT(kxt,1),p1n,223,0,[fxt,sxt,uxt,hxt])))}function fen(){fen=E,Fxt=Abn((Ajn(),Uhn(cT(Wxt,1),p1n,291,0,[Rxt,$xt,Dxt,xxt])))}function len(){len=E,ZRt=Abn((Qmn(),Uhn(cT(sKt,1),p1n,386,0,[QRt,JRt,WRt,zRt])))}function ben(){ben=E,EKt=Abn((qpn(),Uhn(cT(SKt,1),p1n,320,0,[TKt,kKt,MKt,yKt])))}function wen(){wen=E,LKt=Abn((Eln(),Uhn(cT(DKt,1),p1n,415,0,[CKt,IKt,PKt,OKt])))}function den(){den=E,EAt=new uO(g7n,0),PAt=new uO(k9n,1),SAt=new uO(q4n,2)}function gen(n,t,e,i,r){return tJ(n),tJ(t),tJ(e),tJ(i),tJ(r),new Wz(n,t,i)}function pen(n,t){var e;return(e=uG(u7(n.e,t),400))?(cq(e),e.e):null}function men(n,t){var e;return-1!=(e=Ten(n,t,0))&&(i7(n,e),!0)}function ven(n,t,e){var i;return GQ(n),(i=new un).a=t,n.a.Nb(new nC(i,e)),i.a}function ken(n){var t;return GQ(n),t=Inn(eUt,I0n,28,0,15,1),tE(n.a,new md(t)),t}function yen(n){var t;if(!oon(n))throw hv(new Bv);return n.e=1,t=n.d,n.d=null,t}function Men(n){var t;return _L(n)&&(t=0-n,!isNaN(t))?t:Esn(gfn(n))}function Ten(n,t,e){for(;e=0?Dyn(n,e,!0,!0):YNn(n,t,!0)}function zen(n){var t;return null==(t=Kcn(Lsn(n,32)))&&($vn(n),t=Kcn(Lsn(n,32))),t}function Wen(n){var t;return n.Oh()||(t=iQ(n.Dh())-n.ji(),n.$h().Mk(t)),n.zh()}function Qen(n,t){Iht=new et,xht=t,uG((Cht=n).b,68),Rnn(Cht,Iht,null),SVn(Cht)}function Jen(){Jen=E,glt=new dC("XY",0),dlt=new dC("X",1),plt=new dC("Y",2)}function Yen(){Yen=E,Fst=new oC("TOP",0),Kst=new oC(G2n,1),Rst=new oC(Q2n,2)}function Zen(){Zen=E,gpt=new uI(q4n,0),ppt=new uI("TOP",1),dpt=new uI(Q2n,2)}function nin(){nin=E,Gjt=new pI("INPUT_ORDER",0),qjt=new pI("PORT_DEGREE",1)}function tin(){tin=E,Jat=p$(f0n,f0n,524287),Yat=p$(0,0,b0n),Zat=_9(1),_9(2),not=_9(0)}function ein(n){var t;return n.d!=n.r&&(t=bEn(n),n.e=!!t&&t.lk()==srt,n.d=t),n.e}function iin(n,t,e){var i;return i=n.g[t],yD(n,t,n.Zi(t,e)),n.Ri(t,e,i),n.Ni(),i}function rin(n,t){var e;return(e=n.dd(t))>=0&&(n.gd(e),!0)}function cin(n,t){var e;for(WW(n),WW(t),e=!1;t.Ob();)e|=n.Fc(t.Pb());return e}function ain(n,t){var e;return(e=uG(cQ(n.e,t),400))?(nD(n,e),e.e):null}function oin(n){var t,e;return t=n/60|0,0==(e=n%60)?""+t:t+":"+e}function uin(n,t){var e=n.a[t],i=(Cfn(),Wat)[typeof e];return i?i(e):zbn(typeof e)}function sin(n,t){return vgn(n),new fX(n,new D_(new f7(t,n.a)))}function hin(n){var t;return null!=(t=0==n.b.c.length?null:Vq(n.b,0))&&Con(n,0),t}function fin(n,t){var e,i,r;r=t.c.i,i=(e=uG(cQ(n.f,r),60)).d.c-e.e.c,fun(t.a,i,0)}function lin(n,t){var e;for(++n.d,++n.c[t],e=t+1;e=0;)++t[0]}function din(n,t){ycn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function gin(n,t){Mcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function pin(n,t){kcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function min(n,t){vcn(n,null==t||J_((tJ(t),t))||isNaN((tJ(t),t))?0:(tJ(t),t))}function vin(n,t,e){return bD(new MO(e.e.a+e.f.a/2,e.e.b+e.f.b/2),n)==(tJ(t),t)}function kin(n,t){return F$(t,102)&&0!=(uG(t,19).Bb&P0n)?new yL(t,n):new Zsn(t,n)}function yin(n,t){return F$(t,102)&&0!=(uG(t,19).Bb&P0n)?new yL(t,n):new Zsn(t,n)}function Min(n){return null==n.__elementTypeCategory$?10:n.__elementTypeCategory$}function Tin(n,t){return t==(cB(),cB(),uut)?n.toLocaleLowerCase():n.toLowerCase()}function jin(n){if(!n.e)throw hv(new Bv);return n.c=n.a=n.e,n.e=n.e.e,--n.d,n.a.f}function Ein(n){if(!n.c)throw hv(new Bv);return n.e=n.a=n.c,n.c=n.c.c,++n.d,n.a.f}function Sin(n){var t;for(++n.a,t=n.c.a.length;n.an.a[i]&&(i=e);return i}function Lin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.a==n}function Nin(n){var t;return!!(t=uG(oIn(n,(GYn(),Spt)),313))&&t.i==n}function $in(){$in=E,Ilt=Abn((uIn(),Uhn(cT(Llt,1),p1n,367,0,[Tlt,jlt,Elt,Slt,Plt])))}function Din(){Din=E,vdt=Abn((gPn(),Uhn(cT(Pdt,1),p1n,375,0,[wdt,gdt,pdt,ddt,bdt])))}function xin(){xin=E,wgt=Abn((kvn(),Uhn(cT(pgt,1),p1n,348,0,[sgt,ugt,fgt,lgt,hgt])))}function Rin(){Rin=E,Ejt=Abn((pyn(),Uhn(cT(xjt,1),p1n,323,0,[Tjt,kjt,yjt,vjt,Mjt])))}function Kin(){Kin=E,$mt=Abn((Gpn(),Uhn(cT(ajt,1),p1n,171,0,[Lmt,Cmt,Imt,Omt,Amt])))}function Fin(){Fin=E,rIt=Abn((VPn(),Uhn(cT(oIt,1),p1n,368,0,[tIt,YCt,eIt,ZCt,nIt])))}function _in(){_in=E,BAt=Abn((_Rn(),Uhn(cT(qAt,1),p1n,373,0,[xAt,DAt,KAt,RAt,FAt])))}function Bin(){Bin=E,sLt=Abn((pOn(),Uhn(cT(qLt,1),p1n,324,0,[iLt,rLt,oLt,cLt,aLt])))}function Hin(){Hin=E,ext=Abn((xdn(),Uhn(cT(axt,1),p1n,88,0,[ZDt,YDt,JDt,QDt,nxt])))}function Uin(){Uin=E,bNt=Abn((Rkn(),Uhn(cT(MNt,1),p1n,170,0,[hNt,sNt,oNt,fNt,uNt])))}function Gin(){Gin=E,iRt=Abn((zkn(),Uhn(cT(hRt,1),p1n,256,0,[Zxt,tRt,Jxt,Yxt,nRt])))}function qin(){qin=E,HRt=Abn((KQn(),Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt])))}function Xin(){Xin=E,Yut=new iC("BY_SIZE",0),Zut=new iC("BY_SIZE_AND_SHAPE",1)}function Vin(){Vin=E,gft=new wC("EADES",0),pft=new wC("FRUCHTERMAN_REINGOLD",1)}function zin(){zin=E,dgt=new nI("READING_DIRECTION",0),ggt=new nI("ROTATION",1)}function Win(){Win=E,Vlt=new Pt,zlt=new At,qlt=new Lt,Xlt=new Ot,Wlt=new Nt}function Qin(n){this.b=new Zm,this.a=new Zm,this.c=new Zm,this.d=new Zm,this.e=n}function Jin(n){this.g=n,this.f=new Zm,this.a=e.Math.min(this.g.c.c,this.g.d.c)}function Yin(n,t,e){HF.call(this),Qrn(this),this.a=n,this.c=e,this.b=t.d,this.f=t.e}function Zin(n,t,e){var i;for(i=new Ww(e);i.a=0&&t0?t-1:t,lj(bj(xcn(xG(new fy,e),n.n),n.j),n.k)}function rrn(n){var t;t=new Yk,ttn((!n.q&&(n.q=new fz(p_t,n,11,10)),n.q),t)}function crn(n){return(2&n.i?"interface ":1&n.i?"":"class ")+(vK(n),n.o)}function arn(n){return dwn(n,vZn)>0?vZn:dwn(n,j1n)<0?j1n:pV(n)}function orn(n){return n<3?(man(n,b1n),n+1):n=-.01&&n.a<=Z2n&&(n.a=0),n.b>=-.01&&n.b<=Z2n&&(n.b=0),n}function Trn(n){var t,e;for(l_n(),e=G9n,t=0;te&&(e=n[t]);return e}function jrn(n,t){var e;if(!(e=EKn(n.Dh(),t)))throw hv(new vM(Gtt+t+Vtt));return e}function Ern(n,t){var e;for(e=n;R0(e);)if((e=R0(e))==t)return!0;return!1}function Srn(n,t){var e,i,r;for(i=t.a.ld(),e=uG(t.a.md(),16).gc(),r=0;rn||n>t)throw hv(new YM("fromIndex: 0, toIndex: "+n+Q0n+t))}function Drn(n){if(n<0)throw hv(new vM("Illegal Capacity: "+n));this.g=this.aj(n)}function xrn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)}function Rrn(n,t){var e,i,r,c;for(r=0,c=(i=n.d).length;r0&&(n.a/=t,n.b/=t),n}function Hrn(n){var t;return n.w?n.w:((t=O3(n))&&!t.Vh()&&(n.w=t),t)}function Urn(n,t){var e,i;i=n.a,e=kdn(n,t,null),i!=t&&!n.e&&(e=PWn(n,t,e)),e&&e.oj()}function Grn(n,t,e){var i,r;i=t;do{r=uM(n.p[i.p])+e,n.p[i.p]=r,i=n.a[i.p]}while(i!=t)}function qrn(n,t,e){var i=function(){return n.apply(i,arguments)};return t.apply(i,e),i}function Xrn(n){var t;return null==n?null:NCn(t=uG(n,195),t.length)}function Vrn(n,t){if(null==n.g||t>=n.i)throw hv(new pL(t,n.i));return n.Wi(t,n.g[t])}function zrn(n,t){var e,i;for(hZ(),i=new Zm,e=0;e=14&&t<=16)),n}function Fcn(n,t){var e;return tJ(t),vG(!!(e=n[":"+t]),"Enum constant undefined: "+t),e}function _cn(n,t,e,i,r,c){var a;return Rcn(e,a=zW(n,t)),a.i=r?8:0,a.f=i,a.e=r,a.g=c,a}function Bcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=1,this.c=n,this.a=e}function Hcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=2,this.c=n,this.a=e}function Ucn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=6,this.c=n,this.a=e}function Gcn(n,t,e,i,r){this.d=t,this.k=i,this.f=r,this.o=-1,this.p=7,this.c=n,this.a=e}function qcn(n,t,e,i,r){this.d=t,this.j=i,this.e=r,this.o=-1,this.p=4,this.c=n,this.a=e}function Xcn(n,t){var e,i,r,c;for(r=0,c=(i=t).length;r=0))throw hv(new vM("tolerance ("+n+") must be >= 0"));return n}function uan(n,t){var e;return F$(t,44)?n.c.Mc(t):(e=ymn(n,t),Svn(n,t),e)}function san(n,t,e){return Kbn(n,t),qon(n,e),Pcn(n,0),Ccn(n,1),mdn(n,!0),ddn(n,!0),n}function han(n,t){var e;if(e=n.gc(),t<0||t>e)throw hv(new w_(t,e));return new N_(n,t)}function fan(n,t){n.b=e.Math.max(n.b,t.d),n.e+=t.r+(0==n.a.c.length?0:n.c),kD(n.a,t)}function lan(n){TK(n.c>=0),Rvn(n.d,n.c)<0&&(n.a=n.a-1&n.d.a.length-1,n.b=n.d.c),n.c=-1}function ban(n){var t;for(t=n.c.Cc().Kc();t.Ob();)uG(t.Pb(),16).$b();n.c.$b(),n.d=0}function wan(n){var t,e,i,r;for(i=0,r=(e=n.a).length;i=0}function Ban(n,t){n.r>0&&n.c0&&0!=n.g&&Ban(n.i,t/n.r*n.i.d))}function Han(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,1,e,n.c))}function Uan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,4,e,n.c))}function Gan(n,t){var e;e=n.k,n.k=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,2,e,n.k))}function qan(n,t){var e;e=n.D,n.D=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,2,e,n.D))}function Xan(n,t){var e;e=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,8,e,n.f))}function Van(n,t){var e;e=n.i,n.i=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,7,e,n.i))}function zan(n,t){var e;e=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,8,e,n.a))}function Wan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,0,e,n.b))}function Qan(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,0,e,n.b))}function Jan(n,t){var e;e=n.c,n.c=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,1,e,n.c))}function Yan(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,1,e,n.d))}function Zan(n,t,e){var i;n.b=t,n.a=e,i=512&~n.a?new $f:new ay,n.c=qFn(i,n.b,n.a)}function non(n,t){return EFn(n.e,t)?(PP(),ein(t)?new Cq(t,n):new OA(t,n)):new PA(t,n)}function ton(n){return 0>n?new mS:new OK(null,new i9(n+1,n))}function eon(n,t){var e;return hZ(),e=new sS(1),RA(n)?r2(e,n,t):zAn(e.f,n,t),new zw(e)}function ion(n,t){var e,i;return e=n.c,(i=t.e[n.p])>0?uG(Vq(e.a,i-1),10):null}function ron(n,t){var e,i;return(e=n.o+n.p)<(i=t.o+t.p)?-1:e==i?0:1}function con(n){var t;return F$(t=oIn(n,(GYn(),rmt)),167)?Qpn(uG(t,167)):null}function aon(n){var t;return(n=e.Math.max(n,2))>(t=pfn(n))?(t<<=1)>0?t:d1n:t}function oon(n){switch(_D(3!=n.e),n.e){case 2:return!1;case 0:return!0}return a7(n)}function uon(n,t){var e;return!!F$(t,8)&&(e=uG(t,8),n.a==e.a&&n.b==e.b)}function son(n,t){var e;e=new et,uG(t.b,68),uG(t.b,68),uG(t.b,68),Prn(t.a,new $U(n,e,t))}function hon(n,t){var e,i;for(i=t.vc().Kc();i.Ob();)rSn(n,(e=uG(i.Pb(),44)).ld(),e.md())}function fon(n,t){var e;e=n.d,n.d=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,11,e,n.d))}function lon(n,t){var e;e=n.j,n.j=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,13,e,n.j))}function bon(n,t){var e;e=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,21,e,n.b))}function won(n,t){0==(t9(),Nut?null:t.c).length&&RK(t,new G),r2(n.a,Nut?null:t.c,t)}function don(n,t){t.Ug("Hierarchical port constraint processing",1),ayn(n),yYn(n),t.Vg()}function gon(){gon=E,Sdt=new zC("START",0),Edt=new zC("MIDDLE",1),jdt=new zC("END",2)}function pon(){pon=E,zCt=new YI("P1_NODE_PLACEMENT",0),WCt=new YI("P2_EDGE_ROUTING",1)}function mon(){mon=E,Wft=new Cm(E4n),Qft=new Cm(S4n),zft=new Cm(P4n),Vft=new Cm(C4n)}function von(n){var t;return OB(n.f.g,n.d),MK(n.b),n.c=n.a,t=uG(n.a.Pb(),44),n.b=Phn(n),t}function kon(n){return null==n.b?(EP(),EP(),eBt):n.ul()?n.tl():n.sl()}function yon(n,t){var e;return!((e=null==t?-1:Ten(n.b,t,0))<0||(Con(n,e),0))}function Mon(n,t){var e;return tJ(t),e=t.g,!n.b[e]&&(uQ(n.b,e,t),++n.c,!0)}function Ton(n,t){var e,i;return e=1-t,i=n.a[e],n.a[e]=i.a[t],i.a[t]=n,n.b=!0,i.b=!1,i}function jon(n,t){var e,i;for(i=t.Kc();i.Ob();)e=uG(i.Pb(),272),n.b=!0,Fz(n.e,e),e.b=n}function Eon(n,t){var e,i;return e=uG(oIn(n,(jYn(),rTt)),8),i=uG(oIn(t,rTt),8),ugn(e.b,i.b)}function Son(n,t,e){var i,r;return r=t>>5,i=31&t,E3(DV(n.n[e][r],pV(NV(i,1))),3)}function Pon(n,t,e){var i,r,c;for(c=n.a.length-1,r=n.b,i=0;i0?1:0:(!n.c&&(n.c=j2(Bsn(n.f))),n.c).e}function tun(n,t){t?null==n.B&&(n.B=n.D,n.D=null):null!=n.B&&(n.D=n.B,n.B=null)}function eun(n,t){return Xhn(),n==Flt&&t==Hlt||n==Hlt&&t==Flt||n==Blt&&t==_lt||n==_lt&&t==Blt}function iun(n,t){return Xhn(),n==Flt&&t==_lt||n==Flt&&t==Blt||n==Hlt&&t==Blt||n==Hlt&&t==_lt}function run(n,t){return YN(),oan(Z2n),e.Math.abs(0-t)<=Z2n||0==t||isNaN(0)&&isNaN(t)?0:n/t}function cun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new _g(n)),t))))}function aun(n,t){return uM(pK(yx(cdn(YJ(new fX(null,new h3(n.c.b,16)),new Fg(n)),t))))}function oun(){return r_n(),Uhn(cT(bpt,1),p1n,259,0,[Zgt,tpt,ept,ipt,rpt,cpt,opt,Ygt,npt,apt])}function uun(){return THn(),Uhn(cT(Hjt,1),p1n,243,0,[$jt,Ijt,Ljt,Ojt,Ajt,Sjt,Njt,Djt,Pjt,Cjt])}function sun(n,t){t.Ug("General Compactor",1),Bpn(uG(VDn(n,(jOn(),LIt)),393)).Cg(n)}function hun(n,t){var e,i;return e=uG(VDn(n,(jOn(),FIt)),17),i=uG(VDn(t,FIt),17),d$(e.a,i.a)}function fun(n,t,e){var i,r;for(r=Fkn(n,0);r.b!=r.d.c;)(i=uG(I6(r),8)).a+=t,i.b+=e;return n}function lun(n,t,e){var i;for(i=n.b[e&n.f];i;i=i.b)if(e==i.a&&xQ(t,i.g))return i;return null}function bun(n,t,e){var i;for(i=n.c[e&n.f];i;i=i.d)if(e==i.f&&xQ(t,i.i))return i;return null}function wun(n,t,e){var i,r,c;for(i=0,r=0;r>>31;0!=i&&(n[e]=i)}function dun(n,t,e,i,r,c){var a;this.c=n,tTn(n,a=new Zm,t,n.b,e,i,r,c),this.a=new N4(a,0)}function gun(){this.c=new zj(0),this.b=new zj(F9n),this.d=new zj(K9n),this.a=new zj(_3n)}function pun(n,t,e,i,r,c,a){_E.call(this,n,t),this.d=e,this.e=i,this.c=r,this.b=c,this.a=n7(a)}function mun(n,t,e,i,r,c,a,o,u,s,h,f,l){return eLn(n,t,e,i,r,c,a,o,u,s,h,f,l),Sgn(n,!1),n}function vun(n){return n.b.c.i.k==(VIn(),lbt)?uG(oIn(n.b.c.i,(GYn(),rmt)),12):n.b.c}function kun(n){return n.b.d.i.k==(VIn(),lbt)?uG(oIn(n.b.d.i,(GYn(),rmt)),12):n.b.d}function yun(n){var t;return _A((t=t6(n)).a,0)?(gS(),gS(),fut):(gS(),new dR(t.b))}function Mun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.b))}function Tun(n){var t;return _A((t=Z4(n)).a,0)?(dS(),dS(),hut):(dS(),new wR(t.c))}function jun(n){switch(n.g){case 2:return KQn(),_Rt;case 4:return KQn(),kRt;default:return n}}function Eun(n){switch(n.g){case 1:return KQn(),KRt;case 3:return KQn(),yRt;default:return n}}function Sun(n){switch(n.g){case 0:return new Wo;case 1:return new Qo;default:return null}}function Pun(){Pun=E,Hwt=new uF("edgelabelcenterednessanalysis.includelabel",(qx(),tot))}function Cun(){Cun=E,FEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(VYn(),kwt)),Slt,hwt),Plt),vwt)}function Iun(){Iun=E,XEt=Lvn(gL(Aq(Aq(new wJ,(uIn(),Elt),(VYn(),kwt)),Slt,hwt),Plt),vwt)}function Oun(){Oun=E,z_t=new Qk,Q_t=Uhn(cT(o_t,1),krt,179,0,[]),W_t=Uhn(cT(p_t,1),yrt,62,0,[])}function Aun(){Aun=E,Obt=new PC("TO_INTERNAL_LTR",0),Ibt=new PC("TO_INPUT_DIRECTION",1)}function Lun(){Lun=E,Tbt=new Bt,ybt=new Ht,Mbt=new Ut,kbt=new Gt,jbt=new qt,Ebt=new Xt}function Nun(n,t){t.Ug(g6n,1),Apn(FS(new Ad((VS(),new mY(n,!1,!1,new Ft))))),t.Vg()}function $un(n,t,e){e.Ug("DFS Treeifying phase",1),qmn(n,t),qKn(n,t),n.a=null,n.b=null,e.Vg()}function Dun(n,t){return qx(),RA(n)?r7(n,mK(t)):FA(n)?RV(n,pK(t)):KA(n)?xV(n,gK(t)):n.Fd(t)}function xun(n,t){var e,i;for(tJ(t),i=t.vc().Kc();i.Ob();)e=uG(i.Pb(),44),n.zc(e.ld(),e.md())}function Run(n,t,e){var i;for(i=e.Kc();i.Ob();)if(!H5(n,t,i.Pb()))return!1;return!0}function Kun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Rh(t,-1-(-1==c?i:c),null,r)),r}function Fun(n,t,e,i,r){var c;return e&&(c=emn(t.Dh(),n.c),r=e.Th(t,-1-(-1==c?i:c),null,r)),r}function _un(n){var t;if(-2==n.b){if(0==n.e)t=-1;else for(t=0;0==n.a[t];t++);n.b=t}return n.b}function Bun(n){if(tJ(n),0==n.length)throw hv(new ZM("Zero length BigInteger"));qHn(this,n)}function Hun(n){this.i=n.gc(),this.i>0&&(this.g=this.aj(this.i+(this.i/8|0)+1),n.Qc(this.g))}function Uun(n,t,e){this.g=n,this.d=t,this.e=e,this.a=new Zm,RLn(this),hZ(),f$(this.a,null)}function Gun(n,t){t.q=n,n.d=e.Math.max(n.d,t.r),n.b+=t.d+(0==n.a.c.length?0:n.c),kD(n.a,t)}function qun(n,t){var e,i,r,c;return r=n.c,e=n.c+n.b,c=n.d,i=n.d+n.a,t.a>r&&t.ac&&t.b(r=n.a.length)?e=r:s3(t,e+1),n.a=r1(n.a,0,t)+""+i+sQ(n.a,e)}function msn(n,t){n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d=Lgn(n.d,t)}function vsn(n,t){return t1||n.Ob())return++n.a,n.g=0,t=n.i,n.Ob(),t;throw hv(new Bv)}function Fsn(n){switch(n.a.g){case 1:return new KI;case 3:return new VTn;default:return new ml}}function _sn(n,t){switch(t){case 1:return!!n.n&&0!=n.n.i;case 2:return null!=n.k}return j4(n,t)}function Bsn(n){return p0n>22),r=n.h+t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function Thn(n,t){var e,i,r;return e=n.l-t.l,i=n.m-t.m+(e>>22),r=n.h-t.h+(i>>22),p$(e&f0n,i&f0n,r&l0n)}function jhn(n){var t,e;for(BQn(n),e=new Ww(n.d);e.a(i=n.gc()))throw hv(new w_(t,i));return n.Si()&&(e=A0(n,e)),n.Ei(t,e)}function wfn(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)eTn(n,c,a)||HBn(n,c,a,!0,!1)}function dfn(n){var t,e,i;for(l_n(),e=Inn(PNt,VZn,8,2,0,1),i=0,t=0;t<2;t++)i+=.5,e[t]=WMn(i,n);return e}function gfn(n){var t,e;return p$(t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,~n.h+(0==t&&0==e?1:0)&l0n)}function pfn(n){var t;if(n<0)return j1n;if(0==n)return 0;for(t=d1n;0==(t&n);t>>=1);return t}function mfn(n,t,e){return!(n>=128)&&HA(n<64?E3(NV(1,n),e):E3(NV(1,n-64),t),0)}function vfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function kfn(n,t,e){return null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e)),n}function yfn(n){var t,e;return Vsn(e=new d7,n),kfn(e,(mon(),Wft),n),kqn(n,e,t=new Ym),VWn(n,e,t),e}function Mfn(n){var t,e;return t=n.t-n.k[n.o.p]*n.d+n.j[n.o.p]>n.f,e=n.u+n.e[n.o.p]*n.d>n.f*n.s*n.d,t||e}function Tfn(n,t){var e,i,r;for(e=!1,i=n.a[t].length,r=0;r=0,"Negative initial capacity"),vG(t>=0,"Non-positive load factor"),$z(this)}function $fn(n,t,e,i,r){var c,a;if(a=n.length,c=e.length,t<0||i<0||r<0||t+r>a||i+r>c)throw hv(new Lv)}function Dfn(n,t){var e,i,r,c,a;for(hZ(),a=!1,r=0,c=(i=t).length;r1||t>=0&&n.b<3)}function Yfn(n){var t,e,i;t=1+~n.l&f0n,e=~n.m+(0==t?1:0)&f0n,i=~n.h+(0==t&&0==e?1:0)&l0n,n.l=t,n.m=e,n.h=i}function Zfn(n){var t,e,i;for(hZ(),i=1,e=n.Kc();e.Ob();)i=31*i+(null!=(t=e.Pb())?Hon(t):0),i|=0;return i}function nln(n,t,e,i,r){var c;return c=gDn(n,t),e&&Yfn(c),r&&(n=hTn(n,t),Qat=i?gfn(n):p$(n.l,n.m,n.h)),c}function tln(n,t,e){n.g=mAn(n,t,(KQn(),kRt),n.b),n.d=mAn(n,e,kRt,n.b),0!=n.g.c&&0!=n.d.c&&AIn(n)}function eln(n,t,e){n.g=mAn(n,t,(KQn(),_Rt),n.j),n.d=mAn(n,e,_Rt,n.j),0!=n.g.c&&0!=n.d.c&&AIn(n)}function iln(n,t){switch(t){case 7:return!!n.e&&0!=n.e.i;case 8:return!!n.d&&0!=n.d.i}return Kpn(n,t)}function rln(n,t){switch(t.g){case 0:F$(n.b,641)||(n.b=new lsn);break;case 1:F$(n.b,642)||(n.b=new VG)}}function cln(n){if(0===n.g)return new eu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function aln(n){if(0===n.g)return new nu;throw hv(new vM(lnt+(null!=n.f?n.f:""+n.g)))}function oln(n,t,e){return!Qj(JJ(new fX(null,new h3(n.c,16)),new hd(new GO(t,e)))).Bd((vS(),Kut))}function uln(n,t){return bD($kn(uG(oIn(t,(QGn(),cCt)),88)),new MO(n.c.e.a-n.b.e.a,n.c.e.b-n.b.e.b))<=0}function sln(n,t){for(;null!=n.g||n.c?null==n.g||0!=n.i&&uG(n.g[n.i-1],51).Ob():O0(n);)yA(t,Wxn(n))}function hln(n){var t;for(t=new Ww(n.a.b);t.ai?1:0}function yln(n){return kD(n.c,(Whn(),ZLt)),xrn(n.a,uM(pK(Jkn((lmn(),WTt)))))?new Vu:new Vp(n)}function Mln(n){for(;!n.d||!n.d.Ob();){if(!n.b||LM(n.b))return null;n.d=uG(xz(n.b),51)}return n.d}function Tln(n){switch(n.g){case 1:return K9n;default:case 2:return 0;case 3:return _3n;case 4:return F9n}}function jln(){var n;return QYn(),zHt||(n=eR(kJn("M",!0)),n=CX(kJn("M",!1),n),zHt=n)}function Eln(){Eln=E,CKt=new uA("ELK",0),IKt=new uA("JSON",1),PKt=new uA("DOT",2),OKt=new uA("SVG",3)}function Sln(){Sln=E,aEt=new kI("STACKED",0),rEt=new kI("REVERSE_STACKED",1),cEt=new kI("SEQUENCED",2)}function Pln(){Pln=E,gPt=new WI(q4n,0),dPt=new WI("MIDDLE_TO_MIDDLE",1),wPt=new WI("AVOID_OVERLAP",2)}function Cln(){Cln=E,tdt=new ji,edt=new Ei,ndt=new Mi,Zwt=new Si,tJ(new Ti),Ywt=new L}function Iln(){Iln=E,Pxt=new CN(15),Sxt=new _N((XYn(),W$t),Pxt),Cxt=mDt,Mxt=a$t,Txt=_$t,Ext=U$t,jxt=H$t}function Oln(n,t){var e,i,r,c,a;for(r=0,c=(i=t).length;r=n.b.c.length||(_ln(n,2*t+1),(e=2*t+2)0&&(t.Cd(e),e.i&&Zdn(e))}function Hln(n,t,e){var i;for(i=e-1;i>=0&&n[i]===t[i];i--);return i<0?0:$P(E3(n[i],L0n),E3(t[i],L0n))?-1:1}function Uln(n,t,e){var i,r;this.g=n,this.c=t,this.a=this,this.d=this,r=aon(e),i=Inn($at,l1n,227,r,0,1),this.b=i}function Gln(n,t,e,i,r){var c,a;for(a=e;a<=r;a++)for(c=t;c<=i;c++)if(eTn(n,c,a))return!0;return!1}function qln(n,t){var e;for(e=n.Zb().Cc().Kc();e.Ob();)if(uG(e.Pb(),16).Hc(t))return!0;return!1}function Xln(n,t,e){var i,r,c,a;for(tJ(e),a=!1,c=n.fd(t),r=e.Kc();r.Ob();)i=r.Pb(),c.Rb(i),a=!0;return a}function Vln(n,t){var e,i;return i=uG(Lsn(n.a,4),129),e=Inn(xFt,Uit,424,t,0,1),null!=i&&qGn(i,0,e,0,i.length),e}function zln(n,t){var e;return e=new Z_n(!!(256&n.f),n.i,n.a,n.d,!!(16&n.f),n.j,n.g,t),null!=n.e||(e.c=n),e}function Wln(n,t){var e;return n===t||!!F$(t,85)&&(e=uG(t,85),OOn(MV(n),e.vc()))}function Qln(n,t,e){var i,r;for(r=e.Kc();r.Ob();)if(i=uG(r.Pb(),44),n.Be(t,i.md()))return!0;return!1}function Jln(n,t,e){return n.d[t.p][e.p]||(Kyn(n,t,e),n.d[t.p][e.p]=!0,n.d[e.p][t.p]=!0),n.a[t.p][e.p]}function Yln(n,t){return!(!n||n==t||!vR(t,(GYn(),Vpt)))&&uG(oIn(t,(GYn(),Vpt)),10)!=n}function Zln(n){switch(n.i){case 2:return!0;case 1:return!1;case-1:++n.c;default:return n.$l()}}function nbn(n){switch(n.i){case-2:return!0;case-1:return!1;case 1:--n.c;default:return n._l()}}function tbn(n){U0.call(this,"The given string does not match the expected format for individual spacings.",n)}function ebn(n,t){var e;t.Ug("Min Size Preprocessing",1),e=xAn(n),Myn(n,(lBn(),EOt),e.a),Myn(n,MOt,e.b),t.Vg()}function ibn(n){var t,e,i;for(t=0,i=Inn(PNt,VZn,8,n.b,0,1),e=Fkn(n,0);e.b!=e.d.c;)i[t++]=uG(I6(e),8);return i}function rbn(n,t,e){var i,r;for(i=new lS,r=Fkn(e,0);r.b!=r.d.c;)aq(i,new eN(uG(I6(r),8)));Xln(n,t,i)}function cbn(n,t){var e;return e=Lgn(n,t),$P(P3(n,t),0)|BA(P3(n,e),0)?e:Lgn(YZn,P3(DV(e,63),1))}function abn(n,t){var e,i;return(e=uG(n.d.Bc(t),16))?((i=n.e.hc()).Gc(e),n.e.d-=e.gc(),e.$b(),i):null}function obn(n){var t;if((t=n.a.c.length)>0)return zV(t-1,n.a.c.length),i7(n.a,t-1);throw hv(new _v)}function ubn(n,t,e){if(n>t)throw hv(new vM(o2n+n+u2n+t));if(n<0||t>e)throw hv(new YM(o2n+n+s2n+t+Q0n+e))}function sbn(n,t){null==n.D&&null!=n.B&&(n.D=n.B,n.B=null),qan(n,null==t?null:(tJ(t),t)),n.C&&n.hl(null)}function hbn(n,t){var e;e=null!=Jkn((lmn(),WTt))&&null!=t.Sg()?uM(pK(t.Sg()))/uM(pK(Jkn(WTt))):1,vJ(n.b,t,e)}function fbn(n,t){var e,i;if(0!=(i=n.c[t]))for(n.c[t]=0,n.d-=i,e=t+1;eR9n?n-i>R9n:i-n>R9n)}function Qbn(n,t){var e;for(e=0;er&&(USn(t.q,r),i=e!=t.q.d)),i}function Zbn(n,t){var i,r,c,a,o;return a=t.i,o=t.j,r=a-(i=n.f).i,c=o-i.j,e.Math.sqrt(r*r+c*c)}function nwn(n,t){var e;return(e=Kvn(n))||(!ZKt&&(ZKt=new Ps),YXn(),ttn((e=new Xm(sxn(t))).El(),n)),e}function twn(n,t){var e,i;return(e=uG(n.c.Bc(t),16))?((i=n.hc()).Gc(e),n.d-=e.gc(),e.$b(),n.mc(i)):n.jc()}function ewn(n,t){var e,i;for(i=0!=uRn(n.d,1),e=!0;e;)e=!1,e=t.c.mg(t.e,i),e|=PKn(n,t,i,!1),i=!i;Gon(n)}function iwn(n,t,e,i){var r,c;n.a=t,c=i?0:1,n.f=(r=new _On(n.c,n.a,e,c),new eBn(e,n.a,r,n.e,n.b,n.c==(ean(),BEt)))}function rwn(n){var t;return MK(n.a!=n.b),t=n.d.a[n.a],jK(n.b==n.d.c&&null!=t),n.c=n.a,n.a=n.a+1&n.d.a.length-1,t}function cwn(n){var t;if(0!=n.c)return n.c;for(t=0;t=n.c.b:n.a<=n.c.b))throw hv(new Bv);return t=n.a,n.a+=n.c.c,++n.b,xwn(t)}function own(n){var t;return Vsn(t=new S$(n.a),n),kfn(t,(GYn(),rmt),n),t.o.a=n.g,t.o.b=n.f,t.n.a=n.i,t.n.b=n.j,t}function uwn(n){return(KQn(),LRt).Hc(n.j)?uM(pK(oIn(n,(GYn(),Mmt)))):Gfn(Uhn(cT(PNt,1),VZn,8,0,[n.i.n,n.n,n.a])).b}function swn(n){var t;return t=aN(KEt),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),rpt))&&Aq(t,(uIn(),Elt),(VYn(),Cwt)),t}function hwn(n){var t,e;for(e=new ek,t=new Ww(n);t.a=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function pwn(n,t){var e,i,r;for(r=1,e=n,i=t>=0?t:-t;i>0;)i%2==0?(e*=e,i=i/2|0):(r*=e,i-=1);return t<0?1/r:r}function mwn(n,t){var e,i,r,c;return(c=fLn((i=t,(r=n?Kvn(n):null)&&r.Gl(),i)))==t&&(e=Kvn(n))&&e.Gl(),c}function vwn(n,t,e){var i,r;return r=n.f,n.f=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,0,r,t),e?e.nj(i):e=i),e}function kwn(n,t,e){var i,r;return r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,3,r,t),e?e.nj(i):e=i),e}function ywn(n,t,e){var i,r;return r=n.a,n.a=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,1,r,t),e?e.nj(i):e=i),e}function Mwn(n){var t,e,i,r;if(null!=n)for(e=0;e=i||t-129&&n<128?(XG(),!(e=bot[t=n+128])&&(e=bot[t]=new Iw(n)),e):new Iw(n)}function Rwn(n){var t,e;return n>-129&&n<128?(eX(),!(e=Mot[t=n+128])&&(e=Mot[t]=new Aw(n)),e):new Aw(n)}function Kwn(n,t){n.a.c.length>0&&Lln(uG(Vq(n.a,n.a.c.length-1),579),t)||kD(n.a,new r9(t))}function Fwn(n){var t,e;GB(),t=n.d.c-n.e.c,Prn((e=uG(n.g,154)).b,new Pg(t)),Prn(e.c,new Cg(t)),V8(e.i,new Ig(t))}function _wn(n){var t;return(t=new WM).a+="VerticalSegment ",QA(t,n.e),t.a+=" ",JA(t,KD(new FM,new Ww(n.k))),t.a}function Bwn(n,t){var e,i;for(e=0,i=Dgn(n,t).Kc();i.Ob();)e+=null!=oIn(uG(i.Pb(),12),(GYn(),lmt))?1:0;return e}function Hwn(n,t,e){var i,r,c;for(i=0,c=Fkn(n,0);c.b!=c.d.c&&!((r=uM(pK(I6(c))))>e);)r>=t&&++i;return i}function Uwn(n,t){WW(n);try{return n._b(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Gwn(n,t){WW(n);try{return n.Hc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function qwn(n,t){WW(n);try{return n.Mc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return!1;throw hv(e)}}function Xwn(n,t){WW(n);try{return n.xc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function Vwn(n,t){WW(n);try{return n.Bc(t)}catch(e){if(F$(e=Ehn(e),212)||F$(e,169))return null;throw hv(e)}}function zwn(n,t){switch(t.g){case 2:case 1:return Dgn(n,t);case 3:case 4:return Spn(Dgn(n,t))}return hZ(),hZ(),Vot}function Wwn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (name: ",zA(t,n.zb),t.a+=")",t.a)}function Qwn(n){var t;return(t=uG(ain(n.c.c,""),233))||(t=new I2(UT(HT(new du,""),"Other")),Akn(n.c.c,"",t)),t}function Jwn(n,t,e){var i,r;return r=n.sb,n.sb=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,4,r,t),e?e.nj(i):e=i),e}function Ywn(n,t,e){var i,r;return r=n.r,n.r=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,8,r,n.r),e?e.nj(i):e=i),e}function Zwn(n,t,e){var i;return i=new Ken(n.e,4,13,t.c||(YYn(),N_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function ndn(n,t,e){var i;return i=new Ken(n.e,3,13,null,t.c||(YYn(),N_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function tdn(n,t){var e,i;return!(i=(e=uG(t,691)).el())&&e.fl(i=F$(t,90)?new CA(n,uG(t,29)):new g4(n,uG(t,156))),i}function edn(n,t,e){var i;n._i(n.i+1),i=n.Zi(t,e),t!=n.i&&qGn(n.g,t,n.g,t+1,n.i-t),uQ(n.g,t,i),++n.i,n.Mi(t,e),n.Ni()}function idn(n,t){var e;return t.a&&(e=t.a.a.length,n.a?JA(n.a,n.b):n.a=new lx(n.d),L4(n.a,t.a,t.d.length,e)),n}function rdn(n,t){var e;n.c=t,n.a=Jpn(t),n.a<54&&(n.f=(e=t.d>1?C4(t.a[0],t.a[1]):C4(t.a[0],0),W4(t.e>0?e:Men(e))))}function cdn(n,t){var e;return e=new un,n.a.Bd(e)?(UD(),new Xy(tJ(ven(n,e.a,t)))):(GQ(n),UD(),UD(),sut)}function adn(n,t){var e;0!=n.c.length&&(VL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Oe),WNn(e,t))}function odn(n,t){var e;0!=n.c.length&&(VL(e=uG(Ekn(n,Inn(pbt,e6n,10,n.c.length,0,1)),199),new Ae),WNn(e,t))}function udn(n,t){return RA(n)?m_(n,t):FA(n)?p_(n,t):KA(n)?(tJ(n),xA(n)===xA(t)):CV(n)?n.Fb(t):xX(n)?SL(n,t):j3(n,t)}function sdn(n,t,e){if(t<0)VLn(n,e);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ek(n,n.hi(),t)}}function hdn(n,t,e){if(n<0||t>e)throw hv(new dM(o2n+n+s2n+t+", size: "+e));if(n>t)throw hv(new vM(o2n+n+u2n+t))}function fdn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (source: ",zA(t,n.d),t.a+=")",t.a)}function ldn(n){return n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:n>=48&&n<=57?n-48:0}function bdn(n){var t,e,i,r;for(JYn(),i=0,r=(e=Nkn()).length;i=0?Rmn(n):hW(Rmn(Men(n))))}function Sdn(n,t,e,i,r,c){this.e=new Zm,this.f=(can(),Qjt),kD(this.e,n),this.d=t,this.a=e,this.b=i,this.f=r,this.c=c}function Pdn(n,t,i){n.n=Jq(nUt,[VZn,E0n],[376,28],14,[i,t0(e.Math.ceil(t/32))],2),n.o=t,n.p=i,n.j=t-1>>1,n.k=i-1>>1}function Cdn(n){return n=((n=((n-=n>>1&1431655765)>>2&858993459)+(858993459&n))>>4)+n&252645135,n+=n>>8,63&(n+=n>>16)}function Idn(n,t){var e,i;for(i=new DD(n);i.e!=i.i.gc();)if(e=uG(Zkn(i),142),xA(t)===xA(e))return!0;return!1}function Odn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(QXn(Len(n,r),""),29))?hxn(n,i,t,e):null}function Adn(n,t,e){var i,r;return(r=jxn(n.b,t))&&(i=uG(QXn(Len(n,r),""),29))?fxn(n,i,t,e):null}function Ldn(n,t){var e;if(null==(e=dcn(n.i,t)))throw hv(new SM("Node did not exist in input."));return Qun(t,e),null}function Ndn(n,t){var e;if(F$(e=EKn(n,t),331))return uG(e,35);throw hv(new vM(Gtt+t+"' is not a valid attribute"))}function $dn(n,t,e){var i;if(t>(i=n.gc()))throw hv(new w_(t,i));if(n.Si()&&n.Hc(e))throw hv(new vM(Xet));n.Gi(t,e)}function Ddn(n,t){t.Ug("Sort end labels",1),kS(JJ(sin(new fX(null,new h3(n.b,16)),new we),new de),new ge),t.Vg()}function xdn(){xdn=E,ZDt=new PO(Y2n,0),YDt=new PO(z2n,1),JDt=new PO(V2n,2),QDt=new PO(c3n,3),nxt=new PO("UP",4)}function Rdn(){Rdn=E,HAt=new fO("P1_STRUCTURE",0),UAt=new fO("P2_PROCESSING_ORDER",1),GAt=new fO("P3_EXECUTION",2)}function Kdn(){Kdn=E,qCt=Lvn(Lvn(gP(Lvn(Lvn(gP(Aq(new wJ,(Cjn(),zSt),(OHn(),fPt)),WSt),oPt),sPt),QSt),iPt),hPt)}function Fdn(n){switch(uG(oIn(n,(GYn(),Xpt)),311).g){case 1:kfn(n,Xpt,(Zen(),dpt));break;case 2:kfn(n,Xpt,(Zen(),ppt))}}function _dn(n){switch(n){case 0:return new Fk;case 1:return new Rk;case 2:return new Kk;default:throw hv(new Dv)}}function Bdn(n){switch(n.g){case 2:return YDt;case 1:return JDt;case 4:return QDt;case 3:return nxt;default:return ZDt}}function Hdn(n,t){switch(n.b.g){case 0:case 1:return t;case 2:case 3:return new gY(t.d,0,t.a,t.b);default:return null}}function Udn(n){switch(n.g){case 1:return _Rt;case 2:return yRt;case 3:return kRt;case 4:return KRt;default:return FRt}}function Gdn(n){switch(n.g){case 1:return KRt;case 2:return _Rt;case 3:return yRt;case 4:return kRt;default:return FRt}}function qdn(n){switch(n.g){case 1:return kRt;case 2:return KRt;case 3:return _Rt;case 4:return yRt;default:return FRt}}function Xdn(n,t,e,i){switch(t){case 1:return!n.n&&(n.n=new fz(lFt,n,1,7)),n.n;case 2:return n.k}return ajn(n,t,e,i)}function Vdn(n,t,e){var i,r;return n.Pj()?(r=n.Qj(),i=HNn(n,t,e),n.Jj(n.Ij(7,xwn(e),i,t,r)),i):HNn(n,t,e)}function zdn(n,t){var e,i,r;null==n.d?(++n.e,--n.f):(r=t.ld(),S7(n,i=((e=t.Bi())&vZn)%n.d.length,Txn(n,i,e,r)))}function Wdn(n,t){var e;e=0!=(n.Bb&w1n),t?n.Bb|=w1n:n.Bb&=-1025,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,10,e,t))}function Qdn(n,t){var e;e=0!=(n.Bb&j0n),t?n.Bb|=j0n:n.Bb&=-4097,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,12,e,t))}function Jdn(n,t){var e;e=0!=(n.Bb&hrt),t?n.Bb|=hrt:n.Bb&=-8193,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,15,e,t))}function Ydn(n,t){var e;e=0!=(n.Bb&frt),t?n.Bb|=frt:n.Bb&=-2049,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,11,e,t))}function Zdn(n){var t;n.g&&(CFn((t=n.c.kg()?n.f:n.a).a,n.o,!0),CFn(t.a,n.o,!1),kfn(n.o,(jYn(),JMt),($Pn(),rRt)))}function ngn(n){var t;if(!n.a)throw hv(new kM("Cannot offset an unassigned cut."));t=n.c-n.b,n.b+=t,iZ(n,t),eZ(n,t)}function tgn(n,t){var e;if(null==(e=cQ(n.k,t)))throw hv(new SM("Port did not exist in input."));return Qun(t,e),null}function egn(n){var t,e;for(e=bxn(Hrn(n)).Kc();e.Ob();)if(GUn(n,t=mK(e.Pb())))return h8((yP(),r_t),t);return null}function ign(n){var t,e;for(e=n.p.a.ec().Kc();e.Ob();)if((t=uG(e.Pb(),218)).f&&n.b[t.c]<-1e-10)return t;return null}function rgn(n){var t,e;for(e=jQ(new WM,91),t=!0;n.Ob();)t||(e.a+=TZn),t=!1,QA(e,n.Pb());return(e.a+="]",e).a}function cgn(n){var t,e,i;for(t=new Zm,i=new Ww(n.b);i.at?1:n==t?0==n?ugn(1/n,1/t):0:isNaN(n)?isNaN(t)?0:1:-1}function sgn(n){var t;return null==(t=n.a[n.c-1&n.a.length-1])?null:(n.c=n.c-1&n.a.length-1,uQ(n.a,n.c,null),t)}function hgn(n){var t,e,i;for(i=0,e=n.length,t=0;t=1?YDt:QDt:t}function mgn(n){switch(uG(oIn(n,(jYn(),zyt)),223).g){case 1:return new ic;case 3:return new uc;default:return new ec}}function vgn(n){if(n.c)vgn(n.c);else if(n.d)throw hv(new kM("Stream already terminated, can't be modified or used"))}function kgn(n,t,e){var i;return i=n.a.get(t),n.a.set(t,void 0===e?null:e),void 0===i?(++n.c,++n.b.g):++n.d,i}function ygn(n,t,e){var i,r;for(r=n.a.ec().Kc();r.Ob();)if(i=uG(r.Pb(),10),yhn(e,uG(Vq(t,i.p),16)))return i;return null}function Mgn(n,t,e){var i;return i=0,t&&(fN(n.a)?i+=t.f.a/2:i+=t.f.b/2),e&&(fN(n.a)?i+=e.f.a/2:i+=e.f.b/2),i}function Tgn(n,t,e){var i;!(i=e)&&(i=xG(new fy,0)),i.Ug(K4n,2),Vyn(n.b,t,i.eh(1)),XVn(n,t,i.eh(1)),hJn(t,i.eh(1)),i.Vg()}function jgn(n,t,e){var i;return gj(),Scn(i=new ns,t),pcn(i,e),n&&ttn((!n.a&&(n.a=new MD(eFt,n,5)),n.a),i),i}function Egn(n){var t;return 64&n.Db?vxn(n):((t=new fx(vxn(n))).a+=" (identifier: ",zA(t,n.k),t.a+=")",t.a)}function Sgn(n,t){var e;e=0!=(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Pgn(n,t){var e;e=0!=(n.Bb&Qtt),t?n.Bb|=Qtt:n.Bb&=-32769,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,18,e,t))}function Cgn(n,t){var e;e=0!=(n.Bb&zZn),t?n.Bb|=zZn:n.Bb&=-16385,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,16,e,t))}function Ign(n,t){var e;e=0!=(n.Bb&P0n),t?n.Bb|=P0n:n.Bb&=-65537,4&n.Db&&!(1&n.Db)&&Msn(n,new j9(n,1,20,e,t))}function Ogn(n){var t;return t=Inn(JHt,N1n,28,2,15,1),n-=P0n,t[0]=(n>>10)+C0n&D1n,t[1]=56320+(1023&n)&D1n,mvn(t,0,t.length)}function Agn(n){var t;return(t=YIn(n))>34028234663852886e22?M0n:t<-34028234663852886e22?T0n:t}function Lgn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n+t)&&e"+z3(t.c):"e_"+Hon(t),n.b&&n.c?z3(n.b)+"->"+z3(n.c):"e_"+Hon(n))}function Kgn(n,t){return m_(t.b&&t.c?z3(t.b)+"->"+z3(t.c):"e_"+Hon(t),n.b&&n.c?z3(n.b)+"->"+z3(n.c):"e_"+Hon(n))}function Fgn(n,t){return YN(),oan(T1n),e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t))}function _gn(){_gn=E,fxt=new IO(Y2n,0),sxt=new IO("POLYLINE",1),uxt=new IO("ORTHOGONAL",2),hxt=new IO("SPLINES",3)}function Bgn(){Bgn=E,IOt=new aO("ASPECT_RATIO_DRIVEN",0),OOt=new aO("MAX_SCALE_DRIVEN",1),COt=new aO("AREA_DRIVEN",2)}function Hgn(n,t,e){try{zfn(n,t,e)}catch(i){throw F$(i=Ehn(i),606)?hv(new x9(i)):hv(i)}return t}function Ugn(n){var t,e;for(t=0,e=n.length;tt&&i.Ne(n[c-1],n[c])>0;--c)a=n[c],uQ(n,c,n[c-1]),uQ(n,c-1,a)}function Zgn(n,t){var e,i,r,c,a;if(e=t.f,Akn(n.c.d,e,t),null!=t.g)for(c=0,a=(r=t.g).length;ct){F4(e);break}}lW(e,t)}function tpn(n,t){var i,r;r=uM(pK(Omn(V4(t),(jYn(),dTt)))),TEn(t,i=e.Math.max(0,r/2-.5),1),kD(n,new xC(t,i))}function epn(n,t,e){e.Ug("Straight Line Edge Routing",1),e.dh(t,l7n),DXn(n,uG(VDn(t,(SK(),VCt)),27)),e.dh(t,w7n)}function ipn(n,t){0==n.n.c.length&&kD(n.n,new c0(n.s,n.t,n.i)),kD(n.b,t),VMn(uG(Vq(n.n,n.n.c.length-1),209),t),nqn(n,t)}function rpn(n){var t;this.a=new nB(t=uG(n.e&&n.e(),9),uG(MF(t,t.length),9),0),this.b=Inn(dat,EZn,1,this.a.a.length,5,1)}function cpn(n){return Array.isArray(n)&&n.Tm===j?Ij(Tbn(n))+"@"+(Hon(n)>>>0).toString(16):n.toString()}function apn(n,t){return n.h==b0n&&0==n.m&&0==n.l?(t&&(Qat=p$(0,0,0)),LL((tin(),Zat))):(t&&(Qat=p$(n.l,n.m,n.h)),p$(0,0,0))}function opn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function upn(n,t){switch(t.g){case 2:return n.b;case 1:return n.c;case 4:return n.d;case 3:return n.a;default:return!1}}function spn(n,t,e,i){switch(t){case 3:return n.f;case 4:return n.g;case 5:return n.i;case 6:return n.j}return Xdn(n,t,e,i)}function hpn(n,t){if(t==n.d)return n.e;if(t==n.e)return n.d;throw hv(new vM("Node "+t+" not part of edge "+n))}function fpn(n,t){var e;if(F$(e=EKn(n.Dh(),t),102))return uG(e,19);throw hv(new vM(Gtt+t+"' is not a valid reference"))}function lpn(n,t,e,i){if(t<0)lRn(n,e,i);else{if(!e.rk())throw hv(new vM(Gtt+e.xe()+qtt));uG(e,69).wk().Ck(n,n.hi(),t,i)}}function bpn(n){var t;if(n.b){if(bpn(n.b),n.b.d!=n.c)throw hv(new Fv)}else n.d.dc()&&(t=uG(n.f.c.xc(n.e),16))&&(n.d=t)}function wpn(n){var t,e;for(zK(),t=n.o.b,e=uG(uG(Y9(n.r,(KQn(),KRt)),21),87).Kc();e.Ob();)uG(e.Pb(),117).e.b+=t}function dpn(n){var t,e,i;for(this.a=new XL,i=new Ww(n);i.a=r)return t.c+e;return t.c+t.b.gc()}function ppn(n,t){var e,i,r,c;for(EK(),r=t,Ntn(i=Jtn(n),0,i.length,r),e=0;e0&&(i+=r,++e);return e>1&&(i+=n.d*(e-1)),i}function Mpn(n){var t,e,i;return i=gCn(n),!pE(n.c)&&(nrn(i,"knownLayouters",e=new Ib),t=new jm(e),V8(n.c,t)),i}function Tpn(n){var t,e,i;for((i=new VM).a+="[",t=0,e=n.gc();t0&&(s3(t-1,n.length),58==n.charCodeAt(t-1))&&!mpn(n,n_t,t_t)}function Cpn(n,t){var e;return xA(n)===xA(t)||!!F$(t,92)&&(e=uG(t,92),n.e==e.e&&n.d==e.d&&d8(n,e.a))}function Ipn(n){switch(KQn(),n.g){case 4:return yRt;case 1:return kRt;case 3:return KRt;case 2:return _Rt;default:return FRt}}function Opn(n){var t,e;if(n.b)return n.b;for(e=Nut?null:n.d;e;){if(t=Nut?null:e.b)return t;e=Nut?null:e.d}return pS(),Eut}function Apn(n){var t,e;for(e=uM(pK(n.a.of((XYn(),LDt)))),t=new Ww(n.a.Sf());t.a>5),15,1))[e]=1<3;)r*=10,--c;n=(n+(r>>1))/r|0}return i.i=n,!0}function emn(n,t){var e,i,r;if(null==n.i&&eqn(n),e=n.i,-1!=(i=t.Lj()))for(r=e.length;i=0;--i)for(t=e[i],r=0;r>1,this.k=t-1>>1}function hmn(n){Stn(),uG(n.of((XYn(),q$t)),181).Hc((aUn(),oKt))&&(uG(n.of(bDt),181).Fc((eNn(),pRt)),uG(n.of(q$t),181).Mc(oKt))}function fmn(n){var t,e;t=n.d==(vAn(),Bdt),e=dPn(n),kfn(n.a,(jYn(),byt),t&&!e||!t&&e?(nMn(),LNt):(nMn(),ANt))}function lmn(){lmn=E,ZS(),jYn(),WTt=ETt,QTt=n7(Uhn(cT(lNt,1),m9n,149,0,[wTt,dTt,pTt,mTt,yTt,MTt,TTt,jTt,PTt,ITt,gTt,vTt,STt]))}function bmn(n,t){var e;return(e=uG(l8(n,ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15)).Qc(Nq(e.gc()))}function wmn(n,t){var e,i;if((i=new od(n.a.ad(t,!0))).a.gc()<=1)throw hv(new Rv);return(e=i.a.ec().Kc()).Pb(),uG(e.Pb(),40)}function dmn(n,t,e){var i;return i=uM(n.p[t.i.p])+uM(n.d[t.i.p])+t.n.b+t.a.b,uM(n.p[e.i.p])+uM(n.d[e.i.p])+e.n.b+e.a.b-i}function gmn(n,t){return n.i>0&&(t.lengthn.i&&uQ(t,n.i,null),t}function pmn(n){var t;return 64&n.Db?Wwn(n):((t=new fx(Wwn(n))).a+=" (instanceClassName: ",zA(t,n.D),t.a+=")",t.a)}function mmn(n){var t,e,i,r;for(r=0,e=0,i=n.length;e0&&(n._j(),-1!=Txn(n,((e=null==t?0:Hon(t))&vZn)%n.d.length,e,t))}function Mmn(n,t){var i,r;n.a=Lgn(n.a,1),n.c=e.Math.min(n.c,t),n.b=e.Math.max(n.b,t),n.d+=t,i=t-n.f,r=n.e+i,n.f=r-n.e-i,n.e=r}function Tmn(n,t){switch(t){case 3:return void vcn(n,0);case 4:return void kcn(n,0);case 5:return void ycn(n,0);case 6:return void Mcn(n,0)}Awn(n,t)}function jmn(n,t){switch(t.g){case 1:return YU(n.j,(Lun(),ybt));case 2:return YU(n.j,(Lun(),Tbt));default:return hZ(),hZ(),Vot}}function Emn(n){var t;switch(ZW(),(t=n.Pc()).length){case 0:return jat;case 1:return new Uq(WW(t[0]));default:return new t1(Ugn(t))}}function Smn(n,t){n.Xj();try{n.d.bd(n.e++,t),n.f=n.d.j,n.g=-1}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function Pmn(){Pmn=E,lBt=new Is,cBt=new Os,aBt=new As,oBt=new Ls,uBt=new Ns,sBt=new $s,hBt=new Ds,fBt=new xs,bBt=new Rs}function Cmn(n,t){var e,i;return wL(),i=null,t==(e=bF((qy(),qy(),Hat)))&&(i=uG(U1(Bat,n),624)),i||(i=new JW(n),t==e&&r2(Bat,n,i)),i}function Imn(n){return Yyn(),(n.q?n.q:(hZ(),hZ(),zot))._b((jYn(),LMt))?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203)}function Omn(n,t){var e,i;return i=null,vR(n,(jYn(),kTt))&&(e=uG(oIn(n,kTt),96)).pf(t)&&(i=e.of(t)),null==i&&(i=oIn(HQ(n),t)),i}function Amn(n,t){var e,i,r;return!!F$(t,44)&&(i=(e=uG(t,44)).ld(),xQ(r=Xwn(n.Rc(),i),e.md())&&(null!=r||n.Rc()._b(i)))}function Lmn(n,t){var e,i;return n.f>0&&(n._j(),e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?e.md():null}function Nmn(n,t,e){var i,r,c;return n.Pj()?(i=n.i,c=n.Qj(),edn(n,i,t),r=n.Ij(3,null,t,i,c),e?e.nj(r):e=r):edn(n,n.i,t),e}function $mn(n,t,e){var i,r;return i=new Ken(n.e,4,10,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),null,Hyn(n,t),!1),e?e.nj(i):e=i,e}function Dmn(n,t,e){var i,r;return i=new Ken(n.e,3,10,null,F$(r=t.c,90)?uG(r,29):(YYn(),x_t),Hyn(n,t),!1),e?e.nj(i):e=i,e}function xmn(n){var t;return zK(),t=new eN(uG(n.e.of((XYn(),U$t)),8)),n.B.Hc((aUn(),eKt))&&(t.a<=0&&(t.a=20),t.b<=0&&(t.b=20)),t}function Rmn(n){var t,e;return cHn(),e=pV(n),0!=(t=pV(DV(n,32)))?new x3(e,t):e>10||e<0?new Z5(1,e):Rot[e]}function Kmn(n,t){var e;return _L(n)&&_L(t)&&p0n<(e=n%t)&&e=0?c=c.a[1]:(r=c,c=c.a[0])}return r}function nvn(n,t,e){var i,r,c;for(r=null,c=n.b;c;){if(i=n.a.Ne(t,c.d),e&&0==i)return c;i<=0?c=c.a[0]:(r=c,c=c.a[1])}return r}function tvn(n,t,e,i){var r,c,a;return r=!1,nWn(n.f,e,i)&&(hkn(n.f,n.a[t][e],n.a[t][i]),a=(c=n.a[t])[i],c[i]=c[e],c[e]=a,r=!0),r}function evn(n,t,e){var i,r,c;for(r=uG(cQ(n.b,e),183),i=0,c=new Ww(t.j);c.a>5,t&=31,r=n.d+e+(0==t?0:1),kCn(i=Inn(YHt,W1n,28,r,15,1),n.a,e,t),K4(c=new zz(n.e,r,i)),c}function cvn(n,t){var e;for(e=new FV(ix(Xgn(n).a.Kc(),new h));hDn(e);)if(uG(N9(e),18).d.i.c==t)return!1;return!0}function avn(n,t,i){var r,c,a,o,u;return o=n.k,u=t.k,c=pK(Omn(n,r=i[o.g][u.g])),a=pK(Omn(t,r)),e.Math.max((tJ(c),c),(tJ(a),a))}function ovn(){return Error.stackTraceLimit>0?(e.Error.stackTraceLimit=Error.stackTraceLimit=64,!0):"stack"in new Error}function uvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))>0}function svn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<0}function hvn(n,t){return YN(),YN(),oan(T1n),(e.Math.abs(n-t)<=T1n||n==t||isNaN(n)&&isNaN(t)?0:nt?1:KL(isNaN(n),isNaN(t)))<=0}function fvn(n,t){for(var e=0;!t[e]||""==t[e];)e++;for(var i=t[e++];e0&&this.b>0&&(this.g=mX(this.c,this.b,this.a))}function Tvn(n,t){var e,i=n.a;t=String(t),i.hasOwnProperty(t)&&(e=i[t]);var r=(Cfn(),Wat)[typeof e];return r?r(e):zbn(typeof e)}function jvn(n){if(!(Iet in n.a))throw hv(new SM("Every element must have an id."));return fNn(v0(n,Iet))}function Evn(n){var t,e;for(e=WOn(n),t=null;2==n.c;)EYn(n),t||(QYn(),QYn(),vVn(t=new QN(2),e),e=t),e.Jm(WOn(n));return e}function Svn(n,t){var e,i;return n._j(),(e=ZNn(n,((i=null==t?0:Hon(t))&vZn)%n.d.length,i,t))?(uan(n,e),e.md()):null}function Pvn(n,t){return n.e>t.e?1:n.et.d?n.e:n.d=48&&n<48+e.Math.min(10,10)?n-48:n>=97&&n<97?n-97+10:n>=65&&n<65?n-65+10:-1}function Ivn(n,t){if(t.c==n)return t.d;if(t.d==n)return t.c;throw hv(new vM("Input edge is not connected to the input port."))}function Ovn(n){if(Bvn(Fnt,n))return qx(),eot;if(Bvn(_nt,n))return qx(),tot;throw hv(new vM("Expecting true or false"))}function Avn(n){switch(typeof n){case pZn:return pln(n);case gZn:return OL(n);case dZn:return XK(n);default:return null==n?0:xx(n)}}function Lvn(n,t){if(n.a<0)throw hv(new kM("Did not call before(...) or after(...) before calling add(...)."));return hR(n,n.a,t),n}function Nvn(n){return W0(),F$(n,162)?uG(cQ(AFt,iut),295).Rg(n):Pz(AFt,Tbn(n))?uG(cQ(AFt,Tbn(n)),295).Rg(n):null}function $vn(n){var t;return 32&n.Db||0!=(t=iQ(uG(Lsn(n,16),29)||n.ii())-iQ(n.ii()))&&Dvn(n,32,Inn(dat,EZn,1,t,5,1)),n}function Dvn(n,t,e){var i;0!=(n.Db&t)?null==e?H$n(n,t):-1==(i=jTn(n,t))?n.Eb=e:uQ(Kcn(n.Eb),i,e):null!=e&&lFn(n,t,e)}function xvn(n,t,e,i){var r;0!=t.c.length&&(r=gRn(e,i),kS(krn(new fX(null,new h3(WLn(t),1)),new ba),new pY(n,e,r,i)))}function Rvn(n,t){var e,i,r;return i=n.a.length-1,e=t-n.b&i,r=n.c-t&i,jK(e<(n.c-n.b&i)),e>=r?(Pbn(n,t),-1):(Sbn(n,t),1)}function Kvn(n){var t,e,i;if(!(i=n.Jh()))for(t=0,e=n.Ph();e;e=e.Ph()){if(++t>O0n)return e.Qh();if((i=e.Jh())||e==n)break}return i}function Fvn(n,t){var e;return xA(t)===xA(n)||!!F$(t,21)&&(e=uG(t,21)).gc()==n.gc()&&n.Ic(e)}function _vn(n,t){return n.et.e?1:n.ft.f?1:Hon(n)-Hon(t)}function Bvn(n,t){return tJ(n),null!=t&&(!!m_(n,t)||n.length==t.length&&m_(n.toLowerCase(),t.toLowerCase()))}function Hvn(n){var t,e;return dwn(n,-129)>0&&dwn(n,128)<0?(tX(),t=pV(n)+128,!(e=got[t])&&(e=got[t]=new Ow(n)),e):new Ow(n)}function Uvn(){Uvn=E,tbt=new EC(q4n,0),Zlt=new EC("INSIDE_PORT_SIDE_GROUPS",1),Ylt=new EC("GROUP_MODEL_ORDER",2),nbt=new EC(X4n,3)}function Gvn(n){var t;return n.b||wj(n,!(t=QF(n.e,n.a))||!m_(_nt,Lmn((!t.b&&(t.b=new XR((YYn(),H_t),wBt,t)),t.b),"qualified"))),n.c}function qvn(n,t){var e,i;for(s3(t,n.length),e=n.charCodeAt(t),i=t+1;i2e3&&(Gat=n,qat=e.setTimeout(vE,10)),0==Uat++&&(Pin((Gy(),Fat)),!0)}function wkn(n,t,e){var i;(Aut?(Opn(n),1):Lut||Dut?(pS(),1):$ut&&(pS(),0))&&((i=new iB(t)).b=e,qIn(n,i))}function dkn(n,t){var e;e=!n.A.Hc((Qmn(),JRt))||n.q==($Pn(),cRt),n.u.Hc((eNn(),wRt))?e?QQn(n,t):MQn(n,t):n.u.Hc(gRt)&&(e?YWn(n,t):MJn(n,t))}function gkn(n){var t;xA(VDn(n,(XYn(),E$t)))===xA((Own(),Oxt))&&(R0(n)?(t=uG(VDn(R0(n),E$t),346),Myn(n,E$t,t)):Myn(n,E$t,Axt))}function pkn(n){var t,e;return!!vR(n.d.i,(jYn(),UMt))&&(t=uG(oIn(n.c.i,UMt),17),e=uG(oIn(n.d.i,UMt),17),d$(t.a,e.a)>0)}function mkn(n,t,i){return new gY(e.Math.min(n.a,t.a)-i/2,e.Math.min(n.b,t.b)-i/2,e.Math.abs(n.a-t.a)+i,e.Math.abs(n.b-t.b)+i)}function vkn(n){var t;this.d=new Zm,this.j=new sj,this.g=new sj,t=n.g.b,this.f=uG(oIn(HQ(t),(jYn(),Byt)),88),this.e=uM(pK(eyn(t,yTt)))}function kkn(n){this.d=new Zm,this.e=new u8,this.c=Inn(YHt,W1n,28,(KQn(),Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=n}function ykn(n,t,e){var i;switch(i=e[n.g][t],n.g){case 1:case 3:return new MO(0,i);case 2:case 4:return new MO(i,0);default:return null}}function Mkn(n,t,e){var i;i=uG(A1(t.f),205);try{i.rf(n,e),WQ(t.f,i)}catch(r){throw F$(r=Ehn(r),103),hv(r)}}function Tkn(n,t,e){var i,r,c,a;return i=null,(c=Dzn(aan(),t))&&(r=null,null!=(a=vzn(c,e))&&(r=n.qf(c,a)),i=r),i}function jkn(n,t,e,i){var r;if(t>=(r=n.length))return r;for(t=t>0?t:0;ti&&uQ(t,i,null),t}function Skn(n,t){var e,i;for(i=n.a.length,t.lengthi&&uQ(t,i,null),t}function Pkn(n,t){var e,i;++n.j,null!=t&&e$n(t,e=F$(i=n.a.Cb,99)?uG(i,99).th():null)?Dvn(n.a,4,e):Dvn(n.a,4,uG(t,129))}function Ckn(n){var t;if(null==n)return null;if(null==(t=Exn(yXn(n,!0))))throw hv(new PM("Invalid hexBinary value: '"+n+"'"));return t}function Ikn(n,t,e){var i;t.a.length>0&&(kD(n.b,new hG(t.a,e)),0<(i=t.a.length)?t.a=r1(t.a,0,0):0>i&&(t.a+=z$(Inn(JHt,N1n,28,-i,15,1))))}function Okn(n,t,e){var i;if(!e[t.d])for(e[t.d]=!0,i=new Ww(Ebn(t));i.a=n.b>>1)for(i=n.c,e=n.b;e>t;--e)i=i.b;else for(i=n.a.a,e=0;e=0?n.Wh(r):$Nn(n,i):e<0?$Nn(n,i):uG(i,69).wk().Bk(n,n.hi(),e)}function Qkn(n){var t,e;for(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),t=(e=n.o).c.Kc();t.e!=t.i.gc();)uG(t.Yj(),44).md();return Tnn(e)}function Jkn(n){var t;if(F$(n.a,4)){if(null==(t=Nvn(n.a)))throw hv(new kM(Bnt+n.b+"'. "+Rnt+(vK($Ft),$Ft.k)+Knt));return t}return n.a}function Ykn(n,t){var e,i;if(n.j.length!=t.j.length)return!1;for(e=0,i=n.j.length;e=64&&t<128&&(r=S3(r,NV(1,t-64)));return r}function eyn(n,t){var e,i;return i=null,vR(n,(XYn(),ODt))&&(e=uG(oIn(n,ODt),96)).pf(t)&&(i=e.of(t)),null==i&&HQ(n)&&(i=oIn(HQ(n),t)),i}function iyn(n,t){var e;return e=uG(oIn(n,(jYn(),bMt)),75),_$(t,cbt)?e?BY(e):(e=new Uk,kfn(n,bMt,e)):e&&kfn(n,bMt,null),e}function ryn(){ryn=E,XYn(),ift=SDt,Jht=M$t,Xht=c$t,Yht=W$t,MEn(),tft=cst,nft=ist,eft=ost,Zht=est,pbn(),zht=Hht,Vht=Bht,Wht=Ght,Qht=qht}function cyn(n){switch(qS(),this.c=new Zm,this.d=n,n.g){case 0:case 2:this.a=kJ(Qlt),this.b=M0n;break;case 3:case 1:this.a=Qlt,this.b=T0n}}function ayn(n){var t;L_(uG(oIn(n,(jYn(),JMt)),101))&&(c$n((u3(0,(t=n.b).c.length),uG(t.c[0],30))),c$n(uG(Vq(t,t.c.length-1),30)))}function oyn(n,t){t.Ug("Self-Loop post-processing",1),kS(JJ(JJ(sin(new fX(null,new h3(n.b,16)),new Di),new xi),new Ri),new Ki),t.Vg()}function uyn(n,t,e){var i;if(n.c)ycn(n.c,n.c.i+t),Mcn(n.c,n.c.j+e);else for(i=new Ww(n.b);i.a=0&&(e.d=n.t);break;case 3:n.t>=0&&(e.a=n.t)}n.C&&(e.b=n.C.b,e.c=n.C.c)}function pyn(){pyn=E,Tjt=new wI(k9n,0),kjt=new wI(D6n,1),yjt=new wI("LINEAR_SEGMENTS",2),vjt=new wI("BRANDES_KOEPF",3),Mjt=new wI(v9n,4)}function myn(){myn=E,Nht=new lC(o3n,0),Lht=new lC(u3n,1),$ht=new lC(s3n,2),Dht=new lC(h3n,3),Nht.a=!1,Lht.a=!0,$ht.a=!1,Dht.a=!0}function vyn(){vyn=E,yht=new hC(o3n,0),kht=new hC(u3n,1),Mht=new hC(s3n,2),Tht=new hC(h3n,3),yht.a=!1,kht.a=!0,Mht.a=!1,Tht.a=!0}function kyn(n,t,e,i){var r;return e>=0?n.Sh(t,e,i):(n.Ph()&&(i=(r=n.Fh())>=0?n.Ah(i):n.Ph().Th(n,-1-r,null,i)),n.Ch(t,e,i))}function yyn(n,t){switch(t){case 7:return!n.e&&(n.e=new f_(aFt,n,7,4)),void CVn(n.e);case 8:return!n.d&&(n.d=new f_(aFt,n,8,5)),void CVn(n.d)}Tmn(n,t)}function Myn(n,t,e){return null==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Svn(n.o,t)):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),rSn(n.o,t,e)),n}function Tyn(n,t){var e,i,r,c;for(hZ(),e=n,c=t,F$(n,21)&&!F$(t,21)&&(e=t,c=n),r=e.Kc();r.Ob();)if(i=r.Pb(),c.Hc(i))return!1;return!0}function jyn(n,t,e,i){if(t.ae.b)return!0}return!1}function Eyn(n,t){return RA(n)?!!bZn[t]:n.Sm?!!n.Sm[t]:FA(n)?!!lZn[t]:!!KA(n)&&!!fZn[t]}function Syn(n){var t;t=n.a;do{(t=uG(N9(new FV(ix(qgn(t).a.Kc(),new h))),18).c.i).k==(VIn(),wbt)&&n.b.Fc(t)}while(t.k==(VIn(),wbt));n.b=Spn(n.b)}function Pyn(n,t){var i,r,c;for(c=n,r=new FV(ix(qgn(t).a.Kc(),new h));hDn(r);)(i=uG(N9(r),18)).c.i.c&&(c=e.Math.max(c,i.c.i.c.p));return c}function Cyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.d+e.b.Mf().b+e.d.a,i.Ob()&&(r+=n.w);return r}function Iyn(n,t){var e,i,r;for(r=0,i=uG(uG(Y9(n.r,t),21),87).Kc();i.Ob();)r+=(e=uG(i.Pb(),117)).d.b+e.b.Mf().a+e.d.c,i.Ob()&&(r+=n.w);return r}function Oyn(n){var t,e,i;if(e=0,0==(i=GFn(n)).c.length)return 1;for(t=new Ww(i);t.a=0?n.Lh(a,e,!0):YNn(n,c,e):uG(c,69).wk().yk(n,n.hi(),r,e,i)}function xyn(n,t,e,i){var r;(r=bdn(t.pf((XYn(),K$t))?uG(t.of(K$t),21):n.j))!=(JYn(),sht)&&(e&&!vvn(r)||LOn(Sxn(n,r,i),t))}function Ryn(n){switch(n.g){case 1:return ehn(),pht;case 3:return ehn(),wht;case 2:return ehn(),ght;case 4:return ehn(),dht;default:return null}}function Kyn(n,t,e){if(n.e)switch(n.b){case 1:JY(n.c,t,e);break;case 0:YY(n.c,t,e)}else C5(n.c,t,e);n.a[t.p][e.p]=n.c.i,n.a[e.p][t.p]=n.c.e}function Fyn(n){var t,e;if(null==n)return null;for(e=Inn(pbt,VZn,199,n.length,0,2),t=0;t=0)return i;if(n.ol())for(e=0;e=(r=n.gc()))throw hv(new w_(t,r));if(n.Si()&&(i=n.dd(e))>=0&&i!=t)throw hv(new vM(Xet));return n.Xi(t,e)}function Gyn(n,t){if(this.a=uG(WW(n),253),this.b=uG(WW(t),253),n.Ed(t)>0||n==(py(),Mat)||t==(my(),Tat))throw hv(new vM("Invalid range: "+N5(n,t)))}function qyn(n){var t,e;for(this.b=new Zm,this.c=n,this.a=!1,e=new Ww(n.a);e.a0),(t&-t)==t)return t0(t*uRn(n,31)*4.656612873077393e-10);do{i=(e=uRn(n,31))%t}while(e-i+(t-1)<0);return t0(i)}function rMn(n,t,e){switch(e.g){case 1:n.a=t.a/2,n.b=0;break;case 2:n.a=t.a,n.b=t.b/2;break;case 3:n.a=t.a/2,n.b=t.b;break;case 4:n.a=0,n.b=t.b/2}}function cMn(n,t,e,i){var r,c;for(r=t;r1&&(r=Xyn(n,t)),r}function sMn(n){var t;return new MO(t=uM(pK(VDn(n,(XYn(),BDt))))*e.Math.sqrt((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a).i),t/uM(pK(VDn(n,_Dt))))}function hMn(n){var t;return n.f&&n.f.Vh()&&(t=uG(n.f,54),n.f=uG(mwn(n,t),84),n.f!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,9,8,t,n.f))),n.f}function fMn(n){var t;return n.i&&n.i.Vh()&&(t=uG(n.i,54),n.i=uG(mwn(n,t),84),n.i!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,9,7,t,n.i))),n.i}function lMn(n){var t;return n.b&&64&n.b.Db&&(t=n.b,n.b=uG(mwn(n,t),19),n.b!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,9,21,t,n.b))),n.b}function bMn(n,t){var e,i,r;null==n.d?(++n.e,++n.f):(i=t.Bi(),eKn(n,n.f+1),r=(i&vZn)%n.d.length,!(e=n.d[r])&&(e=n.d[r]=n.dk()),e.Fc(t),++n.f)}function wMn(n,t,e){var i;return!t.tk()&&(-2!=t.Ik()?null==(i=t.ik())?null==e:udn(i,e):t.qk()==n.e.Dh()&&null==e)}function dMn(){var n;man(16,b1n),n=aon(16),this.b=Inn(Cat,l1n,303,n,0,1),this.c=Inn(Cat,l1n,303,n,0,1),this.a=null,this.e=null,this.i=0,this.f=n-1,this.g=0}function gMn(n){LF.call(this),this.k=(VIn(),dbt),this.j=(man(6,g1n),new R7(6)),this.b=(man(2,g1n),new R7(2)),this.d=new $k,this.f=new xk,this.a=n}function pMn(n){var t,e;n.c.length<=1||(iAn(n,uG((t=w_n(n,(KQn(),KRt))).a,17).a,uG(t.b,17).a),iAn(n,uG((e=w_n(n,_Rt)).a,17).a,uG(e.b,17).a))}function mMn(n,t,e){var i,r;for(i=(r=n.a.b).c.length;i102?-1:n<=57?n-48:n<65?-1:n<=70?n-65+10:n<97?-1:n-97+10}function IMn(n,t){if(null==n)throw hv(new MM("null key in entry: null="+t));if(null==t)throw hv(new MM("null value in entry: "+n+"=null"))}function OMn(n,t){for(var e,i;n.Ob();){if(!t.Ob())return!1;if(e=n.Pb(),i=t.Pb(),!(xA(e)===xA(i)||null!=e&&udn(e,i)))return!1}return!t.Ob()}function AMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[Nbn(n.a[0],t),Nbn(n.a[1],t),Nbn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LMn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[$bn(n.a[0],t),$bn(n.a[1],t),$bn(n.a[2],t)]),n.d&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function NMn(n,t,e){L_(uG(oIn(t,(jYn(),JMt)),101))||(Z8(n,t,yOn(t,e)),Z8(n,t,yOn(t,(KQn(),KRt))),Z8(n,t,yOn(t,yRt)),hZ(),f$(t.j,new Gg(n)))}function $Mn(n){var t,e;for(n.c||ozn(n),e=new Uk,N3(t=new Ww(n.a));t.a0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function nTn(n){var t;return null==n?null:new PN((t=yXn(n,!0)).length>0&&(s3(0,t.length),43==t.charCodeAt(0))?(s3(1,t.length+1),t.substr(1)):t)}function tTn(n,t,e,i,r,c,a,o){var u,s;i&&((u=i.a[0])&&tTn(n,t,e,u,r,c,a,o),ljn(n,e,i.d,r,c,a,o)&&t.Fc(i),(s=i.a[1])&&tTn(n,t,e,s,r,c,a,o))}function eTn(n,t,e){try{return _A(Son(n,t,e),1)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function iTn(n,t,e){try{return _A(Son(n,t,e),0)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function rTn(n,t,e){try{return _A(Son(n,t,e),2)}catch(i){throw F$(i=Ehn(i),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(i)}}function cTn(n,t){if(-1==n.g)throw hv(new xv);n.Xj();try{n.d.hd(n.g,t),n.f=n.d.j}catch(e){throw F$(e=Ehn(e),77)?hv(new Fv):hv(e)}}function aTn(n){var t,e,i;for(e=new Ww(n.b);e.ac&&uQ(t,c,null),t}function uTn(n,t){var e,i;if(i=n.gc(),null==t){for(e=0;e0&&(u+=r),s[h]=a,a+=o*(u+i)}function TTn(n){var t,e,i;for(i=n.f,n.n=Inn(eUt,I0n,28,i,15,1),n.d=Inn(eUt,I0n,28,i,15,1),t=0;t0?n.c:0),++c;n.b=r,n.d=a}function ATn(n,t){var i;return i=Uhn(cT(eUt,1),I0n,28,15,[eMn(n,(Yrn(),jst),t),eMn(n,Est,t),eMn(n,Sst,t)]),n.f&&(i[0]=e.Math.max(i[0],i[2]),i[2]=i[0]),i}function LTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!1,!0)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function NTn(n,t,e){try{HBn(n,t+n.j,e+n.k,!0,!1)}catch(i){throw F$(i=Ehn(i),77)?hv(new dM(i.g+g3n+t+TZn+e+").")):hv(i)}}function $Tn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((zDn(),Bxt))?(t.Mc(Bxt),t.Fc(Uxt)):t.Hc(Uxt)&&(t.Mc(Uxt),t.Fc(Bxt)))}function DTn(n){var t;vR(n,(jYn(),PMt))&&((t=uG(oIn(n,PMt),21)).Hc((zDn(),zxt))?(t.Mc(zxt),t.Fc(Xxt)):t.Hc(Xxt)&&(t.Mc(Xxt),t.Fc(zxt)))}function xTn(n,t,e,i){var r,c,a;return null==n.a&&nOn(n,t),a=t.b.j.c.length,c=e.d.p,(r=i.d.p-1)<0&&(r=a-1),c<=r?n.a[r]-n.a[c]:n.a[a-1]-n.a[c]+n.a[r]}function RTn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,27).kh().i),e=new DD(uG(n.f,27).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function KTn(n){var t,e;if(!n.e)for(n.e=o6(RJ(uG(n.f,27)).i),e=new DD(RJ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),123),kD(n.e,new Jp(t));return n.e}function FTn(n){var t,e;if(!n.a)for(n.a=o6(wZ(uG(n.f,27)).i),e=new DD(wZ(uG(n.f,27)));e.e!=e.i.gc();)t=uG(Zkn(e),27),kD(n.a,new Wx(n,t));return n.a}function _Tn(n){var t;if(!n.C&&(null!=n.D||null!=n.B))if(t=KWn(n))n.hl(t);else try{n.hl(null)}catch(e){if(!F$(e=Ehn(e),63))throw hv(e)}return n.C}function BTn(n){switch(n.q.g){case 5:QEn(n,(KQn(),yRt)),QEn(n,KRt);break;case 4:Tzn(n,(KQn(),yRt)),Tzn(n,KRt);break;default:PAn(n,(KQn(),yRt)),PAn(n,KRt)}}function HTn(n){switch(n.q.g){case 5:JEn(n,(KQn(),kRt)),JEn(n,_Rt);break;case 4:jzn(n,(KQn(),kRt)),jzn(n,_Rt);break;default:CAn(n,(KQn(),kRt)),CAn(n,_Rt)}}function UTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),c.a,0),c.a+=i.f.a+t,c.b=e.Math.max(c.b,i.f.b);return c.b>0&&(c.b+=t),c}function GTn(n,t){var i,r,c;for(c=new sj,r=n.Kc();r.Ob();)tHn(i=uG(r.Pb(),36),0,c.b),c.b+=i.f.b+t,c.a=e.Math.max(c.a,i.f.a);return c.a>0&&(c.a+=t),c}function qTn(n){var t,i,r;for(r=vZn,i=new Ww(n.a);i.a>16==6?n.Cb.Th(n,5,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function WTn(n){EZ();var t=n.e;if(t&&t.stack){var e=t.stack,i=t+"\n";return e.substring(0,i.length)==i&&(e=e.substring(i.length)),e.split("\n")}return[]}function QTn(n){var t;return Tan(),(t=wot)[n>>>28]|t[n>>24&15]<<4|t[n>>20&15]<<8|t[n>>16&15]<<12|t[n>>12&15]<<16|t[n>>8&15]<<20|t[n>>4&15]<<24|t[15&n]<<28}function JTn(n){var t,i,r;n.b==n.c&&(r=n.a.length,i=pfn(e.Math.max(8,r))<<1,0!=n.b?(Pon(n,t=MF(n.a,i),r),n.a=t,n.b=0):Xv(n.a,i),n.c=r)}function YTn(n,t){var e;return(e=n.b).pf((XYn(),uDt))?e.ag()==(KQn(),_Rt)?-e.Mf().a-uM(pK(e.of(uDt))):t+uM(pK(e.of(uDt))):e.ag()==(KQn(),_Rt)?-e.Mf().a:t}function ZTn(n){var t;return 0!=n.b.c.length&&uG(Vq(n.b,0),72).a?uG(Vq(n.b,0),72).a:null!=(t=sY(n))?t:""+(n.c?Ten(n.c.a,n,0):-1)}function njn(n){var t;return 0!=n.f.c.length&&uG(Vq(n.f,0),72).a?uG(Vq(n.f,0),72).a:null!=(t=sY(n))?t:""+(n.i?Ten(n.i.j,n,0):-1)}function tjn(n,t){var e,i;if(t<0||t>=n.gc())return null;for(e=t;e0?n.c:0),c=e.Math.max(c,t.d),++r;n.e=a,n.b=c}function rjn(n){var t,e;if(!n.b)for(n.b=o6(uG(n.f,123).kh().i),e=new DD(uG(n.f,123).kh());e.e!=e.i.gc();)t=uG(Zkn(e),135),kD(n.b,new Wy(t));return n.b}function cjn(n,t){var e,i,r;if(t.dc())return EK(),EK(),KFt;for(e=new cF(n,t.gc()),r=new DD(n);r.e!=r.i.gc();)i=Zkn(r),t.Hc(i)&&ttn(e,i);return e}function ajn(n,t,e,i){return 0==t?i?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),n.o):(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),Tnn(n.o)):Dyn(n,t,e,i)}function ojn(n){var t,e;if(n.rb)for(t=0,e=n.rb.i;t>22))>>22)<0||(n.l=e&f0n,n.m=i&f0n,n.h=r&l0n,0)))}function ljn(n,t,e,i,r,c,a){var o,u;return!(t.Te()&&(u=n.a.Ne(e,i),u<0||!r&&0==u)||t.Ue()&&(o=n.a.Ne(e,c),o>0||!a&&0==o))}function bjn(n,t){if(Cln(),0!=n.j.g-t.j.g)return 0;switch(n.j.g){case 2:return Wgn(t,edt)-Wgn(n,edt);case 4:return Wgn(n,tdt)-Wgn(t,tdt)}return 0}function wjn(n){switch(n.g){case 0:return jgt;case 1:return Egt;case 2:return Sgt;case 3:return Pgt;case 4:return Cgt;case 5:return Igt;default:return null}}function djn(n,t,e){var i,r;return Kbn(r=new ny,t),qon(r,e),ttn((!n.c&&(n.c=new fz(m_t,n,12,10)),n.c),r),Pcn(i=r,0),Ccn(i,1),mdn(i,!0),ddn(i,!0),i}function gjn(n,t){var e,i;if(t>=n.i)throw hv(new pL(t,n.i));return++n.j,e=n.g[t],(i=n.i-t-1)>0&&qGn(n.g,t+1,n.g,t,i),uQ(n.g,--n.i,null),n.Qi(t,e),n.Ni(),e}function pjn(n,t){var e;return n.Db>>16==17?n.Cb.Th(n,21,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||n.ii(),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function mjn(n){var t,e,i;for(hZ(),f$(n.c,n.a),i=new Ww(n.c);i.ae.a.c.length))throw hv(new vM("index must be >= 0 and <= layer node count"));n.c&&men(n.c.a,n),n.c=e,e&&GX(e.a,t,n)}function Djn(n,t){var e,i,r;for(i=new FV(ix(Ggn(n).a.Kc(),new h));hDn(i);)return e=uG(N9(i),18),new Ul(WW((r=uG(t.Kb(e),10)).n.b+r.o.b/2));return gy(),gy(),wat}function xjn(n,t){this.c=new Ym,this.a=n,this.b=t,this.d=uG(oIn(n,(GYn(),kmt)),312),xA(oIn(n,(jYn(),CMt)))===xA((Wtn(),Lgt))?this.e=new Pk:this.e=new Sk}function Rjn(n,t){var e,i;return i=null,n.pf((XYn(),ODt))&&(e=uG(n.of(ODt),96)).pf(t)&&(i=e.of(t)),null==i&&n.Tf()&&(i=n.Tf().of(t)),null==i&&(i=Jkn(t)),i}function Kjn(n,t){var e,i;e=n.fd(t);try{return i=e.Pb(),e.Qb(),i}catch(r){throw F$(r=Ehn(r),112)?hv(new dM("Can't remove element "+t)):hv(r)}}function Fjn(n,t){var e,i,r;if(0==(e=Wqn(n,t,r=new Lfn((i=new QE).q.getFullYear()-z1n,i.q.getMonth(),i.q.getDate())))||e0?t:0),++i;return new MO(r,c)}function Vjn(n,t){var e;return n.Db>>16==6?n.Cb.Th(n,6,aFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),BKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function zjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,1,iFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),UKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Wjn(n,t){var e;return n.Db>>16==9?n.Cb.Th(n,9,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),qKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Qjn(n,t){var e;return n.Db>>16==5?n.Cb.Th(n,9,w_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),O_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Jjn(n,t){var e;return n.Db>>16==7?n.Cb.Th(n,6,fFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),F_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Yjn(n,t){var e;return n.Db>>16==3?n.Cb.Th(n,0,uFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),T_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function Zjn(){this.a=new ss,this.g=new dMn,this.j=new dMn,this.b=new Ym,this.d=new dMn,this.i=new dMn,this.k=new Ym,this.c=new Ym,this.e=new Ym,this.f=new Ym}function nEn(n,t,e){var i,r,c;for(e<0&&(e=0),c=n.i,r=e;rO0n)return eEn(n,i);if(i==n)return!0}}return!1}function iEn(n){switch(Gx(),n.q.g){case 5:uNn(n,(KQn(),yRt)),uNn(n,KRt);break;case 4:Kxn(n,(KQn(),yRt)),Kxn(n,KRt);break;default:$Qn(n,(KQn(),yRt)),$Qn(n,KRt)}}function rEn(n){switch(Gx(),n.q.g){case 5:k$n(n,(KQn(),kRt)),k$n(n,_Rt);break;case 4:fyn(n,(KQn(),kRt)),fyn(n,_Rt);break;default:DQn(n,(KQn(),kRt)),DQn(n,_Rt)}}function cEn(n){var t,e;(t=uG(oIn(n,(rGn(),Dft)),17))?(e=t.a,kfn(n,(mon(),Qft),0==e?new Upn:new v8(e))):kfn(n,(mon(),Qft),new v8(1))}function aEn(n,t){var e;switch(e=n.i,t.g){case 1:return-(n.n.b+n.o.b);case 2:return n.n.a-e.o.a;case 3:return n.n.b-e.o.b;case 4:return-(n.n.a+n.o.a)}return 0}function oEn(n,t){switch(n.g){case 0:return t==(Gpn(),Imt)?qwt:Xwt;case 1:return t==(Gpn(),Imt)?qwt:Gwt;case 2:return t==(Gpn(),Imt)?Gwt:Xwt;default:return Gwt}}function uEn(n,t){var i,r,c;for(men(n.a,t),n.e-=t.r+(0==n.a.c.length?0:n.c),c=b7n,r=new Ww(n.a);r.a>16==3?n.Cb.Th(n,12,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),_Kt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function hEn(n,t){var e;return n.Db>>16==11?n.Cb.Th(n,10,bFt,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(tYn(),GKt),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function fEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,11,h_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),R_t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function lEn(n,t){var e;return n.Db>>16==10?n.Cb.Th(n,12,p_t,t):(e=lMn(uG(ern(uG(Lsn(n,16),29)||(YYn(),__t),n.Db>>16),19)),n.Cb.Th(n,e.n,e.f,t))}function bEn(n){var t;return 1&n.Bb||!n.r||!n.r.Vh()||(t=uG(n.r,54),n.r=uG(mwn(n,t),142),n.r!=t&&4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,9,8,t,n.r))),n.r}function wEn(n,t,i){var r;return r=Uhn(cT(eUt,1),I0n,28,15,[BCn(n,(Yrn(),jst),t,i),BCn(n,Est,t,i),BCn(n,Sst,t,i)]),n.f&&(r[0]=e.Math.max(r[0],r[2]),r[2]=r[0]),r}function dEn(n,t){var e,i,r;if(0!=(r=lyn(n,t)).c.length)for(f$(r,new ti),e=r.c.length,i=0;i>19)!=(o=t.h>>19)?o-a:(i=n.h)!=(c=t.h)?i-c:(e=n.m)!=(r=t.m)?e-r:n.l-t.l}function MEn(){MEn=E,W_n(),ost=new mL($2n,ust=dst),Xin(),cst=new mL(D2n,ast=Zut),_kn(),ist=new mL(x2n,rst=Wut),est=new mL(R2n,(qx(),!0))}function TEn(n,t,e){var i,r;i=t*e,F$(n.g,154)?(r=Q6(n)).f.d?r.f.a||(n.d.a+=i+Z2n):(n.d.d-=i+Z2n,n.d.a+=i+Z2n):F$(n.g,10)&&(n.d.d-=i,n.d.a+=2*i)}function jEn(n,t,i){var r,c,a,o,u;for(c=n[i.g],u=new Ww(t.d);u.a0?n.b:0),++i;t.b=r,t.e=c}function SEn(n){var t,e,i;if(i=n.b,aS(n.i,i.length)){for(e=2*i.length,n.b=Inn(Cat,l1n,303,e,0,1),n.c=Inn(Cat,l1n,303,e,0,1),n.f=e-1,n.i=0,t=n.a;t;t=t.c)HLn(n,t,t);++n.g}}function PEn(n,t,e,i){var r,c,a,o;for(r=0;ro&&(u=o/r),(c=e.Math.abs(n.b))>a&&(s=a/c),vD(n,e.Math.min(u,s)),n}function AEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),aet),2113))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new rs}function LEn(){var n,t;tXn();try{if(t=uG(ASn((MP(),l_t),Drt),2040))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new _s}function NEn(){var n,t;Ftn();try{if(t=uG(ASn((MP(),l_t),lct),2122))return t}catch(e){if(!F$(e=Ehn(e),103))throw hv(e);n=e,AW((t$(),n))}return new Nh}function $En(n,t,e){var i,r;return r=n.e,n.e=t,4&n.Db&&!(1&n.Db)&&(i=new lz(n,1,4,r,t),e?e.nj(i):e=i),r!=t&&(e=PWn(n,t?bRn(n,t):n.a,e)),e}function DEn(){QE.call(this),this.e=-1,this.a=!1,this.p=j1n,this.k=-1,this.c=-1,this.b=-1,this.g=!1,this.f=-1,this.j=-1,this.n=-1,this.i=-1,this.d=-1,this.o=j1n}function xEn(n,t){var e,i,r;if(i=n.b.d.d,n.a||(i+=n.b.d.a),r=t.b.d.d,t.a||(r+=t.b.d.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function REn(n,t){var e,i,r;if(i=n.b.b.d,n.a||(i+=n.b.b.a),r=t.b.b.d,t.a||(r+=t.b.b.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function KEn(n,t){var e,i,r;if(i=n.b.g.d,n.a||(i+=n.b.g.a),r=t.b.g.d,t.a||(r+=t.b.g.a),0==(e=ugn(i,r))){if(!n.a&&t.a)return-1;if(!t.a&&n.a)return 1}return e}function FEn(){FEn=E,klt=wV(Aq(Aq(Aq(new wJ,(uIn(),Slt),(VYn(),owt)),Slt,fwt),Plt,mwt),Plt,Wbt),Mlt=Aq(Aq(new wJ,Slt,Fbt),Slt,Qbt),ylt=wV(new wJ,Plt,Ybt)}function _En(n){var t,e,i,r,c;for(t=uG(oIn(n,(GYn(),$pt)),85),c=n.n,i=t.Cc().Kc();i.Ob();)(r=(e=uG(i.Pb(),314)).i).c+=c.a,r.d+=c.b,e.c?P_n(e):C_n(e);kfn(n,$pt,null)}function BEn(n,t,e){var i,r;switch(i=(r=n.b).d,t.g){case 1:return-i.d-e;case 2:return r.o.a+i.c+e;case 3:return r.o.b+i.a+e;case 4:return-i.b-e;default:return-1}}function HEn(n,t,e){var i;for(e.Ug("Interactive node placement",1),n.a=uG(oIn(t,(GYn(),kmt)),312),i=new Ww(t.b);i.a0&&(r=ZNn(n,(c&vZn)%n.d.length,c,t))?r.nd(e):(i=n.ck(c,t,e),n.c.Fc(i),null)}function cSn(n,t){var e,i,r,c;switch(tdn(n,t).Kl()){case 3:case 2:for(r=0,c=(e=hXn(t)).i;r=0;r--)if(m_(n[r].d,t)||m_(n[r].d,i)){n.length>=r+1&&n.splice(0,r+1);break}return n}function bSn(n,t){var i;return _L(n)&&_L(t)&&p0n<(i=n/t)&&i0&&(n.b+=2,n.a+=r):(n.b+=1,n.a+=e.Math.min(r,c))}function ySn(n){var t;t=uG(oIn(uG(hyn(n.b,0),40),(QGn(),pCt)),107),kfn(n,(OQn(),kPt),new MO(0,0)),iUn(new L7,n,t.b+t.c-uM(pK(oIn(n,PPt))),t.d+t.a-uM(pK(oIn(n,IPt))))}function MSn(n,t){var e;if(e=!1,RA(t)&&(e=!0,pQ(n,new QW(mK(t)))),e||F$(t,242)&&(e=!0,pQ(n,new Pb(Q_(uG(t,242))))),!e)throw hv(new pM(Cet))}function TSn(n,t,e,i){var r,c,a;return r=new Ken(n.e,1,10,F$(a=t.c,90)?uG(a,29):(YYn(),x_t),F$(c=e.c,90)?uG(c,29):(YYn(),x_t),Hyn(n,t),!1),i?i.nj(r):i=r,i}function jSn(n){var t,e;switch(uG(oIn(HQ(n),(jYn(),lMt)),429).g){case 0:return t=n.n,e=n.o,new MO(t.a+e.a/2,t.b+e.b/2);case 1:return new eN(n.n);default:return null}}function ESn(){ESn=E,Fgt=new rI(q4n,0),Kgt=new rI("LEFTUP",1),Bgt=new rI("RIGHTUP",2),Rgt=new rI("LEFTDOWN",3),_gt=new rI("RIGHTDOWN",4),xgt=new rI("BALANCED",5)}function SSn(n,t,e){var i,r,c;if(0==(i=ugn(n.a[t.p],n.a[e.p]))){if(r=uG(oIn(t,(GYn(),zpt)),15),c=uG(oIn(e,zpt),15),r.Hc(e))return-1;if(c.Hc(t))return 1}return i}function PSn(n){switch(n.g){case 1:return new So;case 2:return new Po;case 3:return new Eo;case 0:return null;default:throw hv(new vM(k7n+(null!=n.f?n.f:""+n.g)))}}function CSn(n,t,e){switch(t){case 1:return!n.n&&(n.n=new fz(lFt,n,1,7)),CVn(n.n),!n.n&&(n.n=new fz(lFt,n,1,7)),void CW(n.n,uG(e,16));case 2:return void Gan(n,mK(e))}bln(n,t,e)}function ISn(n,t,e){switch(t){case 3:return void vcn(n,uM(pK(e)));case 4:return void kcn(n,uM(pK(e)));case 5:return void ycn(n,uM(pK(e)));case 6:return void Mcn(n,uM(pK(e)))}CSn(n,t,e)}function OSn(n,t,e){var i,r;(i=CCn(r=new ny,t,null))&&i.oj(),qon(r,e),ttn((!n.c&&(n.c=new fz(m_t,n,12,10)),n.c),r),Pcn(r,0),Ccn(r,1),mdn(r,!0),ddn(r,!0)}function ASn(n,t){var e,i;return F$(e=_P(n.i,t),241)?((i=uG(e,241)).zi(),i.wi()):F$(e,507)?i=uG(e,2037).b:null}function LSn(n,t,e,i){var r,c;return WW(t),WW(e),Ren(!!(c=uG(W_(n.d,t),17)),"Row %s not in %s",t,n.e),Ren(!!(r=uG(W_(n.b,e),17)),"Column %s not in %s",e,n.c),Hhn(n,c.a,r.a,i)}function NSn(n,t,e,i,r,c,a){var o,u,s,h,f;if(f=PTn(o=(s=c==a-1)?i:0,h=r[c]),10!=i&&Uhn(cT(n,a-c),t[c],e[c],o,f),!s)for(++c,u=0;u1||-1==o?(c=uG(u,15),r.Wb(zpn(n,c))):r.Wb(oUn(n,uG(u,58))))}function VSn(n,t,e,i){kE();var r=hZn;function c(){for(var n=0;n0)return!1;return!0}function QSn(n){var t,e,i,r,c;for(i=new bsn(new Nw(n.b).a);i.b;)t=uG((e=von(i)).ld(),10),c=uG(uG(e.md(),42).a,10),r=uG(uG(e.md(),42).b,8),JF(dL(t.n),JF(D$(c.n),r))}function JSn(n){switch(uG(oIn(n.b,(jYn(),Jyt)),387).g){case 1:kS(YJ(sin(new fX(null,new h3(n.d,16)),new zr),new Wr),new Qr);break;case 2:gBn(n);break;case 0:mLn(n)}}function YSn(n,t,e){var i,r,c;for(!(i=e)&&(i=new fy),i.Ug("Layout",n.a.c.length),c=new Ww(n.a);c.a$9n)return e;i>-1e-6&&++e}return e}function rPn(n,t){var e;t!=n.b?(e=null,n.b&&(e=O1(n.b,n,-4,e)),t&&(e=kyn(t,n,-4,e)),(e=kwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,3,t,t))}function cPn(n,t){var e;t!=n.f?(e=null,n.f&&(e=O1(n.f,n,-1,e)),t&&(e=kyn(t,n,-1,e)),(e=vwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,0,t,t))}function aPn(n,t,e,i){var r,c,a;return uN(n.e)&&(a=zZ(n,1,r=t.Lk(),t.md(),c=e.md(),r.Jk()?Dqn(n,r,c,F$(r,102)&&0!=(uG(r,19).Bb&P0n)):-1,!0),i?i.nj(a):i=a),i}function oPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new VM,t=e.Kc();t.Ob();)zA(i,(uzn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function uPn(n){var t,e,i;if(null==n)return null;if((e=uG(n,15)).dc())return"";for(i=new VM,t=e.Kc();t.Ob();)zA(i,(uzn(),mK(t.Pb()))),i.a+=" ";return CL(i,i.a.length-1)}function sPn(n,t,e){var i,r;return i=n.c[t.c.p][t.p],r=n.c[e.c.p][e.p],null!=i.a&&null!=r.a?RV(i.a,r.a):null!=i.a?-1:null!=r.a?1:0}function hPn(n,t,e){return e.Ug("Tree layout",1),_J(n.b),Jz(n.b,(Cjn(),VSt),VSt),Jz(n.b,zSt,zSt),Jz(n.b,WSt,WSt),Jz(n.b,QSt,QSt),n.a=QVn(n.b,t),YSn(n,t,e.eh(1)),e.Vg(),t}function fPn(n,t){var e,i,r;if(t)for(r=((e=new GV(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),QJ(new om(n).a,i)}function lPn(n,t){var e,i,r;if(t)for(r=((e=new GV(t.a.length)).b-e.a)*e.c<0?(CP(),XHt):new xD(e);r.Ob();)i=v6(t,uG(r.Pb(),17).a),WJ(new Yp(n).a,i)}function bPn(n){if(null!=n&&n.length>0&&33==zJ(n,n.length-1))try{return null==sxn(r1(n,0,n.length-1)).e}catch(t){if(!F$(t=Ehn(t),33))throw hv(t)}return!1}function wPn(n,t,e){var i,r;switch(i=pgn(HQ(t)),o2(r=new lOn,t),e.g){case 1:NLn(r,Gdn(Ipn(i)));break;case 2:NLn(r,Ipn(i))}return kfn(r,(jYn(),QMt),pK(oIn(n,QMt))),r}function dPn(n){var t,e;return t=uG(N9(new FV(ix(qgn(n.a).a.Kc(),new h))),18),e=uG(N9(new FV(ix(Xgn(n.a).a.Kc(),new h))),18),oM(gK(oIn(t,(GYn(),pmt))))||oM(gK(oIn(e,pmt)))}function gPn(){gPn=E,wdt=new VC("ONE_SIDE",0),gdt=new VC("TWO_SIDES_CORNER",1),pdt=new VC("TWO_SIDES_OPPOSING",2),ddt=new VC("THREE_SIDES",3),bdt=new VC("FOUR_SIDES",4)}function pPn(n,t){var e,i,r,c;for(c=new Zm,r=0,i=t.Kc();i.Ob();){for(e=xwn(uG(i.Pb(),17).a+r);e.a=n.f)break;mv(c.c,e)}return c}function mPn(n,t){var e,i,r;for(i=new Ww(t.a);i.a0&&Mjn(this,this.c-1,(KQn(),kRt)),this.c0&&n[0].length>0&&(this.c=oM(gK(oIn(HQ(n[0][0]),(GYn(),Wpt))))),this.a=Inn(REt,VZn,2117,n.length,0,2),this.b=Inn(UEt,VZn,2118,n.length,0,2),this.d=new Vbn}function LPn(n){return 0!=n.c.length&&((u3(0,n.c.length),uG(n.c[0],18)).c.i.k==(VIn(),wbt)||o9(YJ(new fX(null,new h3(n,16)),new xc),new Rc))}function NPn(n,t){var i,r,c,a,o,u;for(o=GFn(t),c=t.f,u=t.g,a=e.Math.sqrt(c*c+u*u),r=0,i=new Ww(o);i.a=0?(e=bSn(n,g0n),i=Kmn(n,g0n)):(e=bSn(t=DV(n,1),5e8),i=Lgn(NV(i=Kmn(t,5e8),1),E3(n,1))),S3(NV(i,32),E3(e,L0n))}function YPn(n,t,e){var i;switch(MK(0!=t.b),i=uG(Lrn(t,t.a.a),8),e.g){case 0:i.b=0;break;case 2:i.b=n.f;break;case 3:i.a=0;break;default:i.a=n.g}return lW(Fkn(t,0),i),t}function ZPn(n,t,e,i){var r,c,a,o,u;switch(u=n.b,o=ykn(a=(c=t.d).j,u.d[a.g],e),r=JF(D$(c.n),c.a),c.j.g){case 1:case 3:o.a+=r.a;break;case 2:case 4:o.b+=r.b}s8(i,o,i.c.b,i.c)}function nCn(n,t,e){var i,r,c,a;for(a=Ten(n.e,t,0),(c=new Tk).b=e,i=new N4(n.e,a);i.b1;t>>=1)1&t&&(i=j5(i,e)),e=1==e.d?j5(e,e):new nkn(FUn(e.a,e.d,Inn(YHt,W1n,28,e.d<<1,15,1)));return i=j5(i,e)}function aCn(){var n,t,e,i;for(aCn=E,but=Inn(eUt,I0n,28,25,15,1),wut=Inn(eUt,I0n,28,33,15,1),i=152587890625e-16,t=32;t>=0;t--)wut[t]=i,i*=.5;for(e=1,n=24;n>=0;n--)but[n]=e,e*=.5}function oCn(n){var t,e;if(oM(gK(VDn(n,(jYn(),sMt)))))for(e=new FV(ix(eRn(n).a.Kc(),new h));hDn(e);)if(BNn(t=uG(N9(e),74))&&oM(gK(VDn(t,hMt))))return!0;return!1}function uCn(n,t){var e,i,r;Fz(n.f,t)&&(t.b=n,i=t.c,-1!=Ten(n.j,i,0)||kD(n.j,i),r=t.d,-1!=Ten(n.j,r,0)||kD(n.j,r),0!=(e=t.a.b).c.length&&(!n.i&&(n.i=new vkn(n)),Psn(n.i,e)))}function sCn(n){var t,e,i,r;return(e=(t=n.c.d).j)==(r=(i=n.d.d).j)?t.p=0&&m_(n.substr(t,3),"GMT")||t>=0&&m_(n.substr(t,3),"UTC")?(e[0]=t+3,SUn(n,e,i)):SUn(n,e,i)}function wCn(n,t){var e,i,r,c,a;for(c=n.g.a,a=n.g.b,i=new Ww(n.d);i.ae;c--)n[c]|=t[c-e-1]>>>a,n[c-1]=t[c-e-1]<0&&qGn(n.g,t,n.g,t+i,o),a=e.Kc(),n.i+=i,r=0;r>4&15,c=15&n[i],a[r++]=JKt[e],a[r++]=JKt[c];return mvn(a,0,a.length)}function $Cn(n){var t,e;return n>=P0n?(t=C0n+(n-P0n>>10&1023)&D1n,e=56320+(n-P0n&1023)&D1n,String.fromCharCode(t)+""+String.fromCharCode(e)):String.fromCharCode(n&D1n)}function DCn(n,t){var e,i,r,c;return zK(),(r=uG(uG(Y9(n.r,t),21),87)).gc()>=2&&(i=uG(r.Kc().Pb(),117),e=n.u.Hc((eNn(),bRt)),c=n.u.Hc(pRt),!i.a&&!e&&(2==r.gc()||c))}function xCn(n,t,e,i,r){var c,a,o;for(c=VFn(n,t,e,i,r),o=!1;!c;)gxn(n,r,!0),o=!0,c=VFn(n,t,e,i,r);o&&gxn(n,r,!1),0!=(a=Jhn(r)).c.length&&(n.d&&n.d.Gg(a),xCn(n,r,e,i,a))}function RCn(){RCn=E,mxt=new OO(q4n,0),gxt=new OO("DIRECTED",1),vxt=new OO("UNDIRECTED",2),wxt=new OO("ASSOCIATION",3),pxt=new OO("GENERALIZATION",4),dxt=new OO("DEPENDENCY",5)}function KCn(n,t){var e;if(!h0(n))throw hv(new kM(Stt));switch(e=h0(n),t.g){case 1:return-(n.j+n.f);case 2:return n.i-e.g;case 3:return n.j-e.f;case 4:return-(n.i+n.g)}return 0}function FCn(n,t,e){var i,r,c;return i=t.Lk(),c=t.md(),r=i.Jk()?zZ(n,4,i,c,null,Dqn(n,i,c,F$(i,102)&&0!=(uG(i,19).Bb&P0n)),!0):zZ(n,i.tk()?2:1,i,c,i.ik(),-1,!0),e?e.nj(r):e=r,e}function _Cn(n,t){var e,i;for(tJ(t),i=n.b.c.length,kD(n.b,t);i>0;){if(e=i,i=(i-1)/2|0,n.a.Ne(Vq(n.b,i),t)<=0)return Y8(n.b,e,t),!0;Y8(n.b,e,Vq(n.b,i))}return Y8(n.b,i,t),!0}function BCn(n,t,i,r){var c,a;if(c=0,i)c=$bn(n.a[i.g][t.g],r);else for(a=0;a<$st;a++)c=e.Math.max(c,$bn(n.a[a][t.g],r));return t==(Yrn(),Est)&&n.b&&(c=e.Math.max(c,n.b.a)),c}function HCn(n,t){var e,i,r,c,a;return i=n.i,r=t.i,!(!i||!r)&&i.i==r.i&&i.i!=(KQn(),kRt)&&i.i!=(KQn(),_Rt)&&(e=(c=i.g.a)+i.j.a,c<=(a=r.g.a)+r.j.a&&e>=a)}function UCn(n){switch(n.g){case 0:return new Uo;case 1:return new qo;default:throw hv(new vM("No implementation is available for the width approximator "+(null!=n.f?n.f:""+n.g)))}}function GCn(n,t,e,i){var r;if(r=!1,RA(i)&&(r=!0,ZG(t,e,mK(i))),r||KA(i)&&(r=!0,GCn(n,t,e,i)),r||F$(i,242)&&(r=!0,vZ(t,e,uG(i,242))),!r)throw hv(new pM(Cet))}function qCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),mBt).length;++i)if(m_(mBt[i],r))return i;return 0}function XCn(n,t){var e,i,r;if((e=t.qi(n.a))&&null!=(r=Lmn((!e.b&&(e.b=new XR((YYn(),H_t),wBt,e)),e.b),Srt)))for(i=1;i<(gAn(),vBt).length;++i)if(m_(vBt[i],r))return i;return 0}function VCn(n,t){var e,i,r,c;if(tJ(t),(c=n.a.gc())0?1:0;c.a[r]!=e;)c=c.a[r],r=n.a.Ne(e.d,c.d)>0?1:0;c.a[r]=i,i.b=e.b,i.a[0]=e.a[0],i.a[1]=e.a[1],e.a[0]=null,e.a[1]=null}function ZCn(n){var t,e,i,r;for(t=new Zm,Vz(e=Inn(ZHt,B2n,28,n.a.c.length,16,1),e.length),r=new Ww(n.a);r.a0&&fUn((u3(0,e.c.length),uG(e.c[0],30)),n),e.c.length>1&&fUn(uG(Vq(e,e.c.length-1),30),n),t.Vg()}function eIn(n){return eNn(),!(qsn(X1(WX(wRt,Uhn(cT(BRt,1),p1n,279,0,[gRt])),n))>1||qsn(X1(WX(bRt,Uhn(cT(BRt,1),p1n,279,0,[lRt,pRt])),n))>1)}function iIn(n,t){F$(U1((MP(),l_t),n),507)?r2(l_t,n,new EA(this,t)):r2(l_t,n,this),HIn(this,t),t==(vj(),y_t)?(this.wb=uG(this,2038),uG(t,2040)):this.wb=(tQ(),M_t)}function rIn(n){var t,e;if(null==n)return null;for(t=null,e=0;e=$1n?"error":i>=900?"warn":i>=800?"info":"log",n.a),n.b&&SKn(t,e,n.b,"Exception: ",!0))}function oIn(n,t){var e,i;return!n.q&&(n.q=new Ym),null!=(i=cQ(n.q,t))?i:(F$(e=t.Sg(),4)&&(null==e?(!n.q&&(n.q=new Ym),u7(n.q,t)):(!n.q&&(n.q=new Ym),vJ(n.q,t,e))),e)}function uIn(){uIn=E,Tlt=new gC("P1_CYCLE_BREAKING",0),jlt=new gC("P2_LAYERING",1),Elt=new gC("P3_NODE_ORDERING",2),Slt=new gC("P4_NODE_PLACEMENT",3),Plt=new gC("P5_EDGE_ROUTING",4)}function sIn(n,t){var e;if(Win(),n.c==t.c){if(n.b==t.b||eun(n.b,t.b)){if(e=BL(n.b)?1:-1,n.a&&!t.a)return e;if(!n.a&&t.a)return-e}return d$(n.b.g,t.b.g)}return ugn(n.c,t.c)}function hIn(n,t){var e,i;if(kIn(n,t))return!0;for(i=new Ww(t);i.a=(r=n.Ej())||t<0)throw hv(new dM(Vet+t+zet+r));if(e>=r||e<0)throw hv(new dM(Wet+e+zet+r));return t!=e?(c=n.Cj(e),n.qj(t,c),i=c):i=n.xj(e),i}function mIn(n){var t,e,i;if(i=n,n)for(t=0,e=n.Eh();e;e=e.Eh()){if(++t>O0n)return mIn(e);if(i=e,e==n)throw hv(new kM("There is a cycle in the containment hierarchy of "+n))}return i}function vIn(n){var t,e,i;for(i=new Ysn(TZn,"[","]"),e=n.Kc();e.Ob();)o7(i,xA(t=e.Pb())===xA(n)?"(this Collection)":null==t?IZn:cpn(t));return i.a?0==i.e.length?i.a.a:i.a.a+""+i.e:i.c}function kIn(n,t){var e,i;if(i=!1,t.gc()<2)return!1;for(e=0;e1&&(n.j.b+=n.e)):(n.j.a+=i.a,n.j.b=e.Math.max(n.j.b,i.b),n.d.c.length>1&&(n.j.a+=n.e))}function jIn(){jIn=E,ydt=Uhn(cT(YRt,1),V4n,64,0,[(KQn(),yRt),kRt,KRt]),kdt=Uhn(cT(YRt,1),V4n,64,0,[kRt,KRt,_Rt]),Mdt=Uhn(cT(YRt,1),V4n,64,0,[KRt,_Rt,yRt]),Tdt=Uhn(cT(YRt,1),V4n,64,0,[_Rt,yRt,kRt])}function EIn(n,t,e,i){var r,c,a,o,u;if(c=n.c.d,a=n.d.d,c.j!=a.j)for(u=n.b,r=c.j,o=null;r!=a.j;)o=0==t?qdn(r):Udn(r),aq(i,JF(ykn(r,u.d[r.g],e),ykn(o,u.d[o.g],e))),r=o}function SIn(n,t,e,i){var r,c,a,o,u;return o=uG((a=Sjn(n.a,t,e)).a,17).a,c=uG(a.b,17).a,i&&(u=uG(oIn(t,(GYn(),lmt)),10),r=uG(oIn(e,lmt),10),u&&r&&(C5(n.b,u,r),o+=n.b.i,c+=n.b.e)),o>c}function PIn(n){var t,e,i,r,c,a,o,u;for(this.a=Fyn(n),this.b=new Zm,i=0,r=(e=n).length;iGK(n.d).c?(n.i+=n.g.c,Bmn(n.d)):GK(n.d).c>GK(n.g).c?(n.e+=n.d.c,Bmn(n.g)):(n.i+=TX(n.g),n.e+=TX(n.d),Bmn(n.g),Bmn(n.d))}function LIn(n,t,e){var i,r,c,a;for(c=t.q,a=t.r,new A2((_7(),$St),t,c,1),new A2($St,c,a,1),r=new Ww(e);r.au&&(s=u/r),(c=e.Math.abs(t.b-n.b))>a&&(h=a/c),o=e.Math.min(s,h),n.a+=o*(t.a-n.a),n.b+=o*(t.b-n.b)}function FIn(n,t,e,i,r){var c,a;for(a=!1,c=uG(Vq(e.b,0),27);Sqn(n,t,c,i,r)&&(a=!0,HSn(e,c),0!=e.b.c.length);)c=uG(Vq(e.b,0),27);return 0==e.b.c.length&&uEn(e.j,e),a&&OTn(t.q),a}function _In(n,t){var e,i,r,c;if(l_n(),t.b<2)return!1;for(i=e=uG(I6(c=Fkn(t,0)),8);c.b!=c.d.c;){if(zRn(n,i,r=uG(I6(c),8)))return!0;i=r}return!!zRn(n,i,e)}function BIn(n,t,e,i){return 0==e?(!n.o&&(n.o=new ltn((tYn(),XKt),EFt,n,0)),G_(n.o,t,i)):uG(ern(uG(Lsn(n,16),29)||n.ii(),e),69).wk().Ak(n,$vn(n),e-iQ(n.ii()),t,i)}function HIn(n,t){var e;t!=n.sb?(e=null,n.sb&&(e=uG(n.sb,54).Th(n,1,sFt,e)),t&&(e=uG(t,54).Rh(n,1,sFt,e)),(e=Jwn(n,t,e))&&e.oj()):4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,4,t,t))}function UIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need an end point."));e=$cn(t,"x"),mcn(new rm(n).a,(tJ(e),e)),i=$cn(t,"y"),jcn(new cm(n).a,(tJ(i),i))}function GIn(n,t){var e,i;if(!t)throw hv(new SM("All edge sections need a start point."));e=$cn(t,"x"),Tcn(new tm(n).a,(tJ(e),e)),i=$cn(t,"y"),Ecn(new em(n).a,(tJ(i),i))}function qIn(n,t){var e,i,r,c,a;for(i=0,c=xln(n).length;i>22-t,r=n.h<>22-t):t<44?(e=0,i=n.l<>44-t):(e=0,i=0,r=n.l<n)throw hv(new vM("k must be smaller than n"));return 0==t||t==n?1:0==n?0:uSn(n)/(uSn(t)*uSn(n-t))}function iOn(n,t){var e,i,r,c;for(e=new jN(n);null!=e.g||e.c?null==e.g||0!=e.i&&uG(e.g[e.i-1],51).Ob():O0(e);)if(F$(c=uG(Wxn(e),58),167))for(i=uG(c,167),r=0;r>4],t[2*e+1]=mHt[15&r];return mvn(t,0,t.length)}function vOn(n){var t;switch(TJ(),n.c.length){case 0:return Eat;case 1:return fq((t=uG(ULn(new Ww(n)),44)).ld(),t.md());default:return new xy(uG(Ekn(n,Inn(Sat,c1n,44,n.c.length,0,1)),173))}}function kOn(n){var t,e,i,r,c;for(t=new ND,e=new ND,A6(t,n),A6(e,n);e.b!=e.c;)for(c=new Ww(uG(xz(e),36).a);c.a0&&sHn(n,e,t),r):j$n(n,t,e)}function jOn(){jOn=E,XYn(),BIt=mDt,zIt=DDt,$It=_$t,DIt=U$t,xIt=q$t,NIt=K$t,RIt=z$t,_It=bDt,EHn(),AIt=dIt,LIt=gIt,UIt=MIt,XIt=EIt,GIt=TIt,qIt=jIt,KIt=mIt,FIt=kIt,HIt=yIt,VIt=SIt,WIt=CIt,OIt=wIt}function EOn(n,t){var e,i,r,c,a;if(n.e<=t)return n.g;if(l3(n,n.g,t))return n.g;for(c=n.r,i=n.g,a=n.r,r=(c-i)/2+i;i+11&&(n.e.b+=n.a)):(n.e.a+=i.a,n.e.b=e.Math.max(n.e.b,i.b),n.d.c.length>1&&(n.e.a+=n.a))}function NOn(n){var t,e,i,r;switch(t=(r=n.i).b,i=r.j,e=r.g,r.a.g){case 0:e.a=(n.g.b.o.a-i.a)/2;break;case 1:e.a=t.d.n.a+t.d.a.a;break;case 2:e.a=t.d.n.a+t.d.a.a-i.a;break;case 3:e.b=t.d.n.b+t.d.a.b}}function $On(n,t,e){var i,r,c;for(r=new FV(ix(Ggn(e).a.Kc(),new h));hDn(r);)v9(i=uG(N9(r),18))||!v9(i)&&i.c.i.c==i.d.i.c||(c=aRn(n,i,e,new Ck)).c.length>1&&mv(t.c,c)}function DOn(n,t,e,i,r){if(ii&&(n.a=i),n.br&&(n.b=r),n}function xOn(n){if(F$(n,143))return dKn(uG(n,143));if(F$(n,233))return Mpn(uG(n,233));if(F$(n,23))return WIn(uG(n,23));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[n])))))}function ROn(n,t,e,i,r){var c,a,o;for(c=!0,a=0;a>>r|e[a+i+1]<>>r,++a}return c}function KOn(n,t,e,i){var r,c;if(t.k==(VIn(),wbt))for(c=new FV(ix(qgn(t).a.Kc(),new h));hDn(c);)if((r=uG(N9(c),18)).c.i.k==wbt&&n.c.a[r.c.i.c.p]==i&&n.c.a[t.c.p]==e)return!0;return!1}function FOn(n,t){var e,i,r,c;return t&=63,e=n.h&l0n,t<22?(c=e>>>t,r=n.m>>t|e<<22-t,i=n.l>>t|n.m<<22-t):t<44?(c=0,r=e>>>t-22,i=n.m>>t-22|n.h<<44-t):(c=0,r=0,i=e>>>t-44),p$(i&f0n,r&f0n,c&l0n)}function _On(n,t,e,i){var r;this.b=i,this.e=n==(ean(),BEt),r=t[e],this.d=Jq(ZHt,[VZn,B2n],[183,28],16,[r.length,r.length],2),this.a=Jq(YHt,[VZn,W1n],[53,28],15,[r.length,r.length],2),this.c=new IPn(t,e)}function BOn(n){var t,e,i;for(n.k=new L2((KQn(),Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,n.j.c.length),i=new Ww(n.j);i.a=e)return YOn(n,t,i.p),!0;return!1}function XOn(n,t,e,i){var r,c,a,o,u,s;for(a=e.length,c=0,r=-1,s=Tin((s3(t,n.length+1),n.substr(t)),(cB(),out)),o=0;oc&&Iz(s,Tin(e[o],out))&&(r=o,c=u);return r>=0&&(i[0]=t+c),r}function VOn(n){var t;return 64&n.Db?rOn(n):(t=new lx(Ftt),!n.a||JA(JA((t.a+=' "',t),n.a),'"'),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function zOn(n,t,e){var i,r,c,a,o;for(o=zKn(n.e.Dh(),t),r=uG(n.g,124),i=0,a=0;ae?iLn(n,e,"start index"):t<0||t>e?iLn(t,e,"end index"):LBn("end index (%s) must not be less than start index (%s)",Uhn(cT(dat,1),EZn,1,5,[xwn(t),xwn(n)]))}function JOn(n,t){var e,i,r,c;for(i=0,r=n.length;i0&&nAn(n,c,e));t.p=0}function tAn(n){var t;this.c=new lS,this.f=n.e,this.e=n.d,this.i=n.g,this.d=n.c,this.b=n.b,this.k=n.j,this.a=n.a,n.i?this.j=n.i:this.j=new nB(t=uG(Mj(MNt),9),uG(MF(t,t.length),9),0),this.g=n.f}function eAn(n){var t,e,i,r;for(t=jQ(JA(new lx("Predicates."),"and"),40),e=!0,r=new Jw(n);r.b0?o[a-1]:Inn(pbt,e6n,10,0,0,1),r=o[a],s=a=0?n.ki(r):VLn(n,i)}else sdn(n,e,i)}function uAn(n){var t,e;if(e=null,t=!1,F$(n,211)&&(t=!0,e=uG(n,211).a),t||F$(n,263)&&(t=!0,e=""+uG(n,263).a),t||F$(n,493)&&(t=!0,e=""+uG(n,493).a),!t)throw hv(new pM(Cet));return e}function sAn(n,t,e){var i,r,c,a,o,u;for(u=zKn(n.e.Dh(),t),i=0,o=n.i,r=uG(n.g,124),a=0;a=n.d.b.c.length&&((t=new bQ(n.d)).p=i.p-1,kD(n.d.b,t),(e=new bQ(n.d)).p=i.p,kD(n.d.b,e)),a2(i,uG(Vq(n.d.b,i.p),30))}function yAn(n,t,e){var i,r,c;if(!n.b[t.g]){for(n.b[t.g]=!0,!(i=e)&&(i=new L7),aq(i.b,t),c=n.a[t.g].Kc();c.Ob();)(r=uG(c.Pb(),65)).b!=t&&yAn(n,r.b,i),r.c!=t&&yAn(n,r.c,i),aq(i.a,r);return i}return null}function MAn(n){switch(n.g){case 0:case 1:case 2:return KQn(),yRt;case 3:case 4:case 5:return KQn(),KRt;case 6:case 7:case 8:return KQn(),_Rt;case 9:case 10:case 11:return KQn(),kRt;default:return KQn(),FRt}}function TAn(n,t){var e;return 0!=n.c.length&&(e=Imn((u3(0,n.c.length),uG(n.c[0],18)).c.i),n2(),e==(Yyn(),wjt)||e==bjt||o9(YJ(new fX(null,new h3(n,16)),new Kc),new up(t)))}function jAn(n,t){if(F$(t,207))return KN(n,uG(t,27));if(F$(t,193))return FN(n,uG(t,123));if(F$(t,452))return RN(n,uG(t,166));throw hv(new vM(Aet+vIn(new IM(Uhn(cT(dat,1),EZn,1,5,[t])))))}function EAn(n,t,e){var i,r;if(this.f=n,e7(e,r=(i=uG(cQ(n.b,t),260))?i.a:0),e>=(r/2|0))for(this.e=i?i.c:null,this.d=r;e++0;)Ein(this);this.b=t,this.a=null}function SAn(n,t){var e,i;t.a?WKn(n,t):(!!(e=uG(jS(n.b,t.b),60))&&e==n.a[t.b.f]&&!!e.a&&e.a!=t.b.a&&e.c.Fc(t.b),!!(i=uG(TS(n.b,t.b),60))&&n.a[i.f]==t.b&&!!i.a&&i.a!=t.b.a&&t.b.c.Fc(i),sD(n.b,t.b))}function PAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.b=0,void(e.n.c=0);e.n.b=n.C.b,e.n.c=n.C.c,n.A.Hc((Qmn(),JRt))&&vBn(n,t),i=Iyn(n,t),M_n(n,t)==(zkn(),Zxt)&&(i+=2*n.w),e.a.a=i}function CAn(n,t){var e,i;if(e=uG(AJ(n.b,t),127),uG(uG(Y9(n.r,t),21),87).dc())return e.n.d=0,void(e.n.a=0);e.n.d=n.C.d,e.n.a=n.C.a,n.A.Hc((Qmn(),JRt))&&kBn(n,t),i=Cyn(n,t),M_n(n,t)==(zkn(),Zxt)&&(i+=2*n.w),e.a.b=i}function IAn(n,t){var e,i,r,c;for(c=new Zm,i=new Ww(t);i.ai&&(s3(t-1,n.length),n.charCodeAt(t-1)<=32);)--t;return i>0||te.a&&(i.Hc((ZSn(),zNt))?r=(t.a-e.a)/2:i.Hc(QNt)&&(r=t.a-e.a)),t.b>e.b&&(i.Hc((ZSn(),YNt))?c=(t.b-e.b)/2:i.Hc(JNt)&&(c=t.b-e.b)),JCn(n,r,c)}function eLn(n,t,e,i,r,c,a,o,u,s,h,f,l){F$(n.Cb,90)&&yLn(y9(uG(n.Cb,90)),4),qon(n,e),n.f=a,Qdn(n,o),Ydn(n,u),Wdn(n,s),Jdn(n,h),mdn(n,f),Cgn(n,l),ddn(n,!0),Pcn(n,r),n.Zk(c),Kbn(n,t),null!=i&&(n.i=null,lon(n,i))}function iLn(n,t,e){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,[e,xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must not be greater than size (%s)",Uhn(cT(dat,1),EZn,1,5,[e,xwn(n),xwn(t)]))}function rLn(n,t,e,i,r,c){var a,o,u;if(i-e<7)Ygn(t,e,i,c);else if(rLn(t,n,o=e+r,u=o+((a=i+r)-o>>1),-r,c),rLn(t,n,u,a,-r,c),c.Ne(n[u-1],n[u])<=0)for(;e=0?n.bi(c,e):lRn(n,r,e)}else lpn(n,i,r,e)}function hLn(n){var t,e;if(n.f){for(;n.n>0;){if(F$(e=(t=uG(n.k.Xb(n.n-1),76)).Lk(),102)&&0!=(uG(e,19).Bb&Qtt)&&(!n.e||e.pk()!=tFt||0!=e.Lj())&&null!=t.md())return!0;--n.n}return!1}return n.n>0}function fLn(n){var t,e,i,r;if(e=uG(n,54)._h())try{if(i=null,(t=jxn((MP(),l_t),DUn(jpn(e))))&&(r=t.ai())&&(i=r.Fl(bM(e.e))),i&&i!=n)return fLn(i)}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}return n}function lLn(n,t,e){var i,r;e.Ug("Remove overlaps",1),e.dh(t,l7n),i=uG(VDn(t,(SK(),VCt)),27),n.f=i,n.a=aMn(uG(VDn(t,(jOn(),VIt)),300)),rw(n,(tJ(r=pK(VDn(t,(XYn(),DDt)))),r)),xWn(n,t,GFn(i),e),e.dh(t,w7n)}function bLn(n){var t,e,i;if(oM(gK(VDn(n,(XYn(),C$t))))){for(i=new Zm,e=new FV(ix(eRn(n).a.Kc(),new h));hDn(e);)BNn(t=uG(N9(e),74))&&oM(gK(VDn(t,I$t)))&&mv(i.c,t);return i}return hZ(),hZ(),Vot}function wLn(n){if(!n)return By(),zat;var t=n.valueOf?n.valueOf():n;if(t!==n){var i=Wat[typeof t];return i?i(t):zbn(typeof t)}return n instanceof Array||n instanceof e.Array?new Eb(n):new Cb(n)}function dLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.b=e.Math.max(c.b,a.a),c.b>a.a&&!t&&(c.b=a.a),c.c=-(c.b-a.a)/2,i.g){case 1:c.d=-c.a;break;case 3:c.d=a.b}YGn(r),rqn(r)}function gLn(n,t,i){var r,c,a;switch(a=n.o,(c=(r=uG(AJ(n.p,i),252)).i).b=gNn(r),c.a=dNn(r),c.a=e.Math.max(c.a,a.b),c.a>a.b&&!t&&(c.a=a.b),c.d=-(c.a-a.b)/2,i.g){case 4:c.c=-c.b;break;case 2:c.c=a.a}YGn(r),rqn(r)}function pLn(n,t){var e,i,r,c,a;if(!t.dc())if(r=uG(t.Xb(0),131),1!=t.gc())for(e=1;e0)try{i=mUn(t,j1n,vZn)}catch(r){throw F$(r=Ehn(r),130)?hv(new Pen(r)):hv(r)}return!n.a&&(n.a=new qm(n)),i<(e=n.a).i&&i>=0?uG(Vrn(e,i),58):null}function TLn(n,t){if(n<0)return LBn(jZn,Uhn(cT(dat,1),EZn,1,5,["index",xwn(n)]));if(t<0)throw hv(new vM(SZn+t));return LBn("%s (%s) must be less than size (%s)",Uhn(cT(dat,1),EZn,1,5,["index",xwn(n),xwn(t)]))}function jLn(n){var t,e,i,r,c;if(null==n)return IZn;for(c=new Ysn(TZn,"[","]"),i=0,r=(e=n).length;i=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Zl(t)}function zLn(n){var t,i;return n>-0x800000000000&&n<0x800000000000?0==n?0:((t=n<0)&&(n=-n),i=t0(e.Math.floor(e.Math.log(n)/.6931471805599453)),(!t||n!=e.Math.pow(2,i))&&++i,i):dhn(Bsn(n))}function WLn(n){var t,e,i,r,c,a,o;for(c=new XL,e=new Ww(n);e.a2&&o.e.b+o.j.b<=2&&(r=o,i=a),c.a.zc(r,c),r.q=i);return c}function QLn(n,t,e){e.Ug("Eades radial",1),e.dh(t,w7n),n.d=uG(VDn(t,(SK(),VCt)),27),n.c=uM(pK(VDn(t,(jOn(),HIt)))),n.e=aMn(uG(VDn(t,VIt),300)),n.a=_pn(uG(VDn(t,WIt),434)),n.b=PSn(uG(VDn(t,KIt),354)),UEn(n),e.dh(t,w7n)}function JLn(n,t){if(t.Ug("Target Width Setter",1),!vnn(n,(S_n(),vAt)))throw hv(new jM("A target width has to be set if the TargetWidthWidthApproximator should be used."));Myn(n,(lBn(),POt),pK(VDn(n,vAt))),t.Vg()}function YLn(n,t){var e,i,r;return Vsn(i=new gMn(n),t),kfn(i,(GYn(),Kpt),t),kfn(i,(jYn(),JMt),($Pn(),cRt)),kfn(i,byt,(nMn(),ONt)),Hb(i,(VIn(),lbt)),o2(e=new lOn,i),NLn(e,(KQn(),_Rt)),o2(r=new lOn,i),NLn(r,kRt),i}function ZLn(n){switch(n.g){case 0:return new Vy((ean(),_Et));case 1:return new bl;case 2:return new wl;default:throw hv(new vM("No implementation is available for the crossing minimizer "+(null!=n.f?n.f:""+n.g)))}}function nNn(n,t){var e,i,r,c;for(n.c[t.p]=!0,kD(n.a,t),c=new Ww(t.j);c.a=(c=a.gc()))a.$b();else for(r=a.Kc(),i=0;i0?HM():c<0&&bNn(n,t,-c),!0)}function dNn(n){var t,e,i,r,c,a;if(a=0,0==n.b){for(t=0,r=0,c=(i=AMn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}else a=fT(Mun(ZJ(JJ(Bz(n.a),new jn),new En)));return a>0?a+n.n.d+n.n.a:0}function gNn(n){var t,e,i,r,c,a;if(a=0,0==n.b)a=fT(Mun(ZJ(JJ(Bz(n.a),new Mn),new Tn)));else{for(t=0,r=0,c=(i=LMn(n,!0)).length;r0&&(a+=e,++t);t>1&&(a+=n.c*(t-1))}return a>0?a+n.n.b+n.n.c:0}function pNn(n){var t,e;if(2!=n.c.length)throw hv(new kM("Order only allowed for two paths."));u3(0,n.c.length),t=uG(n.c[0],18),u3(1,n.c.length),e=uG(n.c[1],18),t.d.i!=e.c.i&&(n.c.length=0,mv(n.c,e),mv(n.c,t))}function mNn(n,t,e){var i;for(vN(e,t.g,t.f),kN(e,t.i,t.j),i=0;i<(!t.a&&(t.a=new fz(bFt,t,10,11)),t.a).i;i++)mNn(n,uG(Vrn((!t.a&&(t.a=new fz(bFt,t,10,11)),t.a),i),27),uG(Vrn((!e.a&&(e.a=new fz(bFt,e,10,11)),e.a),i),27))}function vNn(n,t){var i,r,c,a;for(i=(a=uG(AJ(n.b,t),127)).a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).c&&(i.a=e.Math.max(i.a,rq(r.c)));if(i.a>0)switch(t.g){case 2:a.n.c=n.s;break;case 4:a.n.b=n.s}}function kNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(rGn(),$ft)),17).a-uG(oIn(n,$ft),17).a)?(i=YF(D$(uG(oIn(n,(mon(),Vft)),8)),uG(oIn(n,zft),8)),r=YF(D$(uG(oIn(t,Vft),8)),uG(oIn(t,zft),8)),ugn(i.a*i.b,r.a*r.b)):e}function yNn(n,t){var e,i,r;return 0==(e=uG(oIn(t,(QGn(),yCt)),17).a-uG(oIn(n,yCt),17).a)?(i=YF(D$(uG(oIn(n,(OQn(),vPt)),8)),uG(oIn(n,kPt),8)),r=YF(D$(uG(oIn(t,vPt),8)),uG(oIn(t,kPt),8)),ugn(i.a*i.b,r.a*r.b)):e}function MNn(n){var t,e;return(e=new WM).a+="e_",null!=(t=bhn(n))&&(e.a+=""+t),n.c&&n.d&&(JA((e.a+=" ",e),njn(n.c)),JA(QA((e.a+="[",e),n.c.i),"]"),JA((e.a+=Y4n,e),njn(n.d)),JA(QA((e.a+="[",e),n.d.i),"]")),e.a}function TNn(n){switch(n.g){case 0:return new Tl;case 1:return new jl;case 2:return new yl;case 3:return new kl;default:throw hv(new vM("No implementation is available for the layout phase "+(null!=n.f?n.f:""+n.g)))}}function jNn(n,t,i,r,c){var a;switch(a=0,c.g){case 1:a=e.Math.max(0,t.b+n.b-(i.b+r));break;case 3:a=e.Math.max(0,-n.b-r);break;case 2:a=e.Math.max(0,-n.a-r);break;case 4:a=e.Math.max(0,t.a+n.a-(i.a+r))}return a}function ENn(n,t,e){var i,r,c;if(e)for(c=((i=new GV(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)r=v6(e,uG(c.Pb(),17).a),vet in r.a||ket in r.a?bHn(n,r,t):JJn(n,r,t),GD(uG(cQ(n.b,jvn(r)),74))}function SNn(n){var t,e;switch(n.b){case-1:return!0;case 0:return(e=n.t)>1||-1==e||(t=bEn(n))&&(PP(),t.lk()==srt)?(n.b=-1,!0):(n.b=1,!1);default:return!1}}function PNn(n,t){var e,i,r,c;if(EYn(n),0!=n.c||123!=n.a)throw hv(new CM(rZn((t$(),bit))));if(c=112==t,i=n.d,(e=aR(n.i,125,i))<0)throw hv(new CM(rZn((t$(),wit))));return r=r1(n.i,i,e),n.d=e+1,itn(r,c,!(512&~n.e))}function CNn(n){var t,e,i,r,c,a,o;if((i=n.a.c.length)>0)for(a=n.c.d,r=vD(YF(new MO((o=n.d.d).a,o.b),a),1/(i+1)),c=new MO(a.a,a.b),e=new Ww(n.a);e.a=0&&i=0?n.Lh(e,!0,!0):YNn(n,r,!0),160),uG(i,220).Wl(t);throw hv(new vM(Gtt+t.xe()+Vtt))}function DNn(){var n;return IP(),pBt?uG(jxn((MP(),l_t),Drt),2038):(ML(Sat,new Eh),yWn(),n=uG(F$(U1((MP(),l_t),Drt),560)?U1(l_t,Drt):new dJ,560),pBt=!0,HYn(n),oZn(n),vJ((pP(),k_t),n,new Bs),r2(l_t,Drt,n),n)}function xNn(n,t){var e,i,r,c;n.j=-1,uN(n.e)?(e=n.i,c=0!=n.i,V9(n,t),i=new Ken(n.e,3,n.c,null,t,e,c),r=t.zl(n.e,n.c,null),(r=yPn(n,t,r))?(r.nj(i),r.oj()):Msn(n.e,i)):(V9(n,t),(r=t.zl(n.e,n.c,null))&&r.oj())}function RNn(n,t){var e,i,r;if(r=0,(i=t[0])>=n.length)return-1;for(s3(i,n.length),e=n.charCodeAt(i);e>=48&&e<=57&&(r=10*r+(e-48),!(++i>=n.length));)s3(i,n.length),e=n.charCodeAt(i);return i>t[0]?t[0]=i:r=-1,r}function KNn(n){var t,i,r,c,a;return i=c=uG(n.a,17).a,r=a=uG(n.b,17).a,t=e.Math.max(e.Math.abs(c),e.Math.abs(a)),c<=0&&c==a?(i=0,r=a-1):c==-t&&a!=t?(i=a,r=c,a>=0&&++i):(i=-a,r=c),new WO(xwn(i),xwn(r))}function FNn(n,t,e,i){var r,c,a,o,u,s;for(r=0;r=0&&s>=0&&u=n.i)throw hv(new dM(Vet+t+zet+n.i));if(e>=n.i)throw hv(new dM(Wet+e+zet+n.i));return i=n.g[e],t!=e&&(t>16))>>16&16),e+=t=(i=(n>>=t)-256)>>16&8,e+=t=(i=(n<<=t)-j0n)>>16&4,(e+=t=(i=(n<<=t)-zZn)>>16&2)+2-(t=(i=(n<<=t)>>14)&~(i>>1)))}function qNn(n){var t,e,i,r;for(lZ(),aft=new Zm,cft=new Ym,rft=new Zm,!n.a&&(n.a=new fz(bFt,n,10,11)),JQn(t=n.a),r=new DD(t);r.e!=r.i.gc();)i=uG(Zkn(r),27),-1==Ten(aft,i,0)&&(e=new Zm,kD(rft,e),skn(i,e));return rft}function XNn(n,t,e){var i,r,c,a;n.a=e.b.d,F$(t,326)?(V8(c=COn(r=JFn(uG(t,74),!1,!1)),i=new Kd(n)),sqn(c,r),null!=t.of((XYn(),L$t))&&V8(uG(t.of(L$t),75),i)):((a=uG(t,422)).rh(a.nh()+n.a.a),a.sh(a.oh()+n.a.b))}function VNn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).c.g==n.g&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new kp(e))&&mv(r.c,e);return f$(r,new ja),r}function zNn(n,t,e){var i,r,c,a;return F$(t,153)&&F$(e,153)?(c=uG(t,153),a=uG(e,153),n.a[c.a][a.a]+n.a[a.a][c.a]):F$(t,250)&&F$(e,250)&&(i=uG(t,250),r=uG(e,250),i.a==r.a)?uG(oIn(r.a,(rGn(),$ft)),17).a:0}function WNn(n,t){var i,r,c,a,o,u,s,h;for(h=uM(pK(oIn(t,(jYn(),ITt)))),s=n[0].n.a+n[0].o.a+n[0].d.c+h,u=1;u=0?e:(o=NQ(YF(new MO(a.c+a.b/2,a.d+a.a/2),new MO(c.c+c.b/2,c.d+c.a/2))),-(oGn(c,a)-1)*o)}function JNn(n,t,e){var i;kS(new fX(null,(!e.a&&(e.a=new fz(oFt,e,6,6)),new h3(e.a,16))),new VO(n,t)),kS(new fX(null,(!e.n&&(e.n=new fz(lFt,e,1,7)),new h3(e.n,16))),new zO(n,t)),(i=uG(VDn(e,(XYn(),L$t)),75))&&fun(i,n,t)}function YNn(n,t,e){var i,r,c;if(c=izn((gAn(),kBt),n.Dh(),t))return PP(),uG(c,69).xk()||(c=_3(Nen(kBt,c))),r=uG((i=n.Ih(c))>=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Sl(t,e);throw hv(new vM(Gtt+t.xe()+Vtt))}function ZNn(n,t,e,i){var r,c,a,o,u;if(r=n.d[t])if(c=r.g,u=r.i,null!=i){for(o=0;o=e&&(i=t,c=(u=(o.c+o.a)/2)-e,o.c<=u-e&&GX(n,i++,new OU(o.c,c)),(a=u+e)<=o.a&&(r=new OU(a,o.a),o3(i,n.c.length),pC(n.c,i,r)))}function o$n(n,t,e){var i,r,c,a;if(!t.dc()){for(i=new lS,a=t.Kc();a.Ob();)for(c=uG(a.Pb(),40),vJ(n.a,xwn(c.g),xwn(e)),r=new Tp(Fkn(new Mp(c).a.d,0));Jj(r.a);)s8(i,uG(I6(r.a),65).c,i.c.b,i.c);o$n(n,i,e+1)}}function u$n(n){var t;if(n.c||null!=n.g){if(null==n.g)return!0;if(0==n.i)return!1;t=uG(n.g[n.i-1],51)}else n.d=n.bj(n.f),ttn(n,n.d),t=n.d;return t==n.b&&null.Vm>=null.Um()?(Wxn(n),u$n(n)):t.Ob()}function s$n(n){if(this.a=n,n.c.i.k==(VIn(),lbt))this.c=n.c,this.d=uG(oIn(n.c.i,(GYn(),Fpt)),64);else{if(n.d.i.k!=lbt)throw hv(new vM("Edge "+n+" is not an external edge."));this.c=n.d,this.d=uG(oIn(n.d.i,(GYn(),Fpt)),64)}}function h$n(n,t){var e,i,r;r=n.b,n.b=t,4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,3,r,n.b)),t?t!=n&&(qon(n,t.zb),Icn(n,t.d),Uan(n,null==(e=null==(i=t.c)?t.zb:i)||m_(e,t.zb)?null:e)):(qon(n,null),Icn(n,0),Uan(n,null))}function f$n(n,t){var e;this.e=(ZW(),WW(n),ZW(),Emn(n)),this.c=(WW(t),Emn(t)),FD(this.e.Rd().dc()==this.c.Rd().dc()),this.d=Qgn(this.e),this.b=Qgn(this.c),e=Jq(dat,[VZn,EZn],[5,1],5,[this.e.Rd().gc(),this.c.Rd().gc()],2),this.a=e,wan(this)}function l$n(n){var t=(!Rat&&(Rat=mJn()),Rat);return'"'+n.replace(/[\x00-\x1f\xad\u0600-\u0603\u06dd\u070f\u17b4\u17b5\u200b-\u200f\u2028-\u202e\u2060-\u2064\u206a-\u206f\ufeff\ufff9-\ufffb"\\]/g,function(n){return V1(n,t)})+'"'}function b$n(n,t,i,r,c,a){var o,u,s,h,f;if(0!=c)for(xA(n)===xA(i)&&(n=n.slice(t,t+c),t=0),s=i,u=t,h=t+c;u=(a=null==(e=uG(Lsn(n.a,4),129))?0:e.length))throw hv(new w_(t,a));return r=e[t],1==a?i=null:(qGn(e,0,i=Inn(xFt,Uit,424,a-1,0,1),0,t),(c=a-t-1)>0&&qGn(e,t+1,i,t,c)),Pkn(n,i),GAn(n,t,r),r}function p$n(n){var t,e;if(n.f){for(;n.n0?Ipn(e):Gdn(Ipn(e)),Myn(t,eTt,r)}function M$n(n,t){t.Ug("Partition preprocessing",1),kS(uG(l8(JJ(sin(JJ(new fX(null,new h3(n.a,16)),new mi),new vi),new ki),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Oc(),new yi),t.Vg()}function T$n(n,t){var e,i,r,c,a;for(a=n.j,t.a!=t.b&&f$(a,new Yr),r=a.c.length/2|0,i=0;i0&&sHn(n,e,t),c):null!=i.a?(sHn(n,t,e),-1):null!=r.a?(sHn(n,e,t),1):0}function E$n(n,t){var e,i,r,c,a;for(r=t.b.b,n.a=Inn(yat,H3n,15,r,0,1),n.b=Inn(ZHt,B2n,28,r,16,1),a=Fkn(t.b,0);a.b!=a.d.c;)c=uG(I6(a),40),n.a[c.g]=new lS;for(i=Fkn(t.a,0);i.b!=i.d.c;)e=uG(I6(i),65),n.a[e.b.g].Fc(e),n.a[e.c.g].Fc(e)}function S$n(n,t){var e,i,r,c;n.Pj()?(e=n.Ej(),c=n.Qj(),++n.j,n.qj(e,n.Zi(e,t)),i=n.Ij(3,null,t,e,c),n.Mj()&&(r=n.Nj(t,null))?(r.nj(i),r.oj()):n.Jj(i)):(vQ(n,t),n.Mj()&&(r=n.Nj(t,null))&&r.oj())}function P$n(n,t,e){var i,r,c;n.Pj()?(c=n.Qj(),edn(n,t,e),i=n.Ij(3,null,e,t,c),n.Mj()?(r=n.Nj(e,null),n.Tj()&&(r=n.Uj(e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):n.Jj(i)):(edn(n,t,e),n.Mj()&&(r=n.Nj(e,null))&&r.oj())}function C$n(n,t){var e,i,r,c,a;for(a=zKn(n.e.Dh(),t),r=new ls,e=uG(n.g,124),c=n.i;--c>=0;)i=e[c],a.am(i.Lk())&&ttn(r,i);!PJn(n,r)&&uN(n.e)&&Yv(n,t.Jk()?zZ(n,6,t,(hZ(),Vot),null,-1,!1):zZ(n,t.tk()?2:1,t,null,null,-1,!1))}function I$n(n,t){var e,i,r,c;return n.a==(RIn(),zgt)||(r=t.a.c,e=t.a.c+t.a.b,!(t.j&&(c=(i=t.A).c.c.a-i.o.a/2,r-(i.n.a+i.o.a)>c)||t.q&&(c=(i=t.C).c.c.a-i.o.a/2,i.n.a-e>c)))}function O$n(n){var t,e,i,r,c,a;for(e2(),e=new u8,i=new Ww(n.e.b);i.a1?n.e*=uM(n.a):n.f/=uM(n.a),_bn(n),zvn(n),EBn(n),kfn(n.b,(ryn(),Qht),n.g)}function x$n(n,t,e){var i,r,c,a,o;for(i=0,o=e,t||(i=e*(n.c.length-1),o*=-1),c=new Ww(n);c.a=0?n.Ah(null):n.Ph().Th(n,-1-t,null,null),n.Bh(uG(r,54),e),i&&i.oj(),n.vh()&&n.wh()&&e>-1&&Msn(n,new lz(n,9,e,c,r)),r):c}function Y$n(n,t){var e,i,r,c,a;for(c=n.b.Ce(t),i=null==(e=n.a.get(c))?Inn(dat,EZn,1,0,5,1):e,a=0;a>5)>=n.d)return n.e<0;if(e=n.a[r],t=1<<(31&t),n.e<0){if(r<(i=_un(n)))return!1;e=i==r?-e:~e}return 0!=(e&t)}function oDn(n,t,e,i){var r;uG(e.b,68),uG(e.b,68),uG(i.b,68),uG(i.b,68),RG(r=YF(D$(uG(e.b,68).c),uG(i.b,68).c),LLn(uG(e.b,68),uG(i.b,68),r)),uG(i.b,68),uG(i.b,68),uG(i.b,68).c.a,r.a,uG(i.b,68).c.b,r.b,uG(i.b,68),Prn(i.a,new $U(n,t,i))}function uDn(n,t){var e,i,r,c,a,o,u;if(c=t.e)for(e=J$n(c),i=uG(n.g,689),a=0;a>16)),15).dd(c))0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d+=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a-=r-1))}function bDn(n){var t,i,r,c,a;if(a=VUn(n,c=new Zm),t=uG(oIn(n,(GYn(),lmt)),10))for(r=new Ww(t.j);r.a>t,c=n.m>>t|e<<22-t,r=n.l>>t|n.m<<22-t):t<44?(a=i?l0n:0,c=e>>t-22,r=n.m>>t-22|e<<44-t):(a=i?l0n:0,c=i?f0n:0,r=e>>t-44),p$(r&f0n,c&f0n,a&l0n)}function pDn(n){var t,i,r,c,a,o;for(this.c=new Zm,this.d=n,r=M0n,c=M0n,t=T0n,i=T0n,o=Fkn(n,0);o.b!=o.d.c;)a=uG(I6(o),8),r=e.Math.min(r,a.a),c=e.Math.min(c,a.b),t=e.Math.max(t,a.a),i=e.Math.max(i,a.b);this.a=new gY(r,c,t-r,i-c)}function mDn(n,t){var e,i,r,c;for(i=new Ww(n.b);i.a0&&F$(t,44)&&(n.a._j(),c=null==(u=(s=uG(t,44)).ld())?0:Hon(u),a=iF(n.a,c),e=n.a.d[a]))for(i=uG(e.g,379),h=e.i,o=0;o=2)for(t=pK((i=c.Kc()).Pb());i.Ob();)a=t,t=pK(i.Pb()),r=e.Math.min(r,(tJ(t),t-(tJ(a),a)));return r}function xDn(n,t){var e,i,r;for(r=new Zm,i=Fkn(t.a,0);i.b!=i.d.c;)(e=uG(I6(i),65)).b.g==n.g&&!m_(e.b.c,H9n)&&xA(oIn(e.b,(QGn(),ACt)))!==xA(oIn(e.c,ACt))&&!o9(new fX(null,new h3(r,16)),new yp(e))&&mv(r.c,e);return f$(r,new Ca),r}function RDn(n,t){var e,i,r;if(xA(t)===xA(WW(n)))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),(r=n.gc())!=i.gc())return!1;if(F$(i,59)){for(e=0;e0&&(r=e),a=new Ww(n.f.e);a.a0?(t-=1,e-=1):i>=0&&r<0?(t+=1,e+=1):i>0&&r>=0?(t-=1,e+=1):(t+=1,e-=1),new WO(xwn(t),xwn(e))}function exn(n,t){return n.ct.c?1:n.bt.b?1:n.a!=t.a?Hon(n.a)-Hon(t.a):n.d==(Z6(),YEt)&&t.d==JEt?-1:n.d==JEt&&t.d==YEt?1:0}function ixn(n,t){var e,i,r,c,a;return a=(c=t.a).c.i==t.b?c.d:c.c,i=c.c.i==t.b?c.c:c.d,(r=dmn(n.a,a,i))>0&&r0):r<0&&-r0)}function rxn(n,t,e,i){var r,c,a,o,u,s;for(r=(t-n.d)/n.c.c.length,c=0,n.a+=e,n.d=t,s=new Ww(n.c);s.a>24;return a}function axn(n){if(n.ze()){var t=n.c;return t.Ae()?n.o="["+t.n:t.ze()?n.o="["+t.xe():n.o="[L"+t.xe()+";",n.b=t.we()+"[]",void(n.k=t.ye()+"[]")}var e=n.j,i=n.d;i=i.split("/"),n.o=fvn(".",[e,fvn("$",i)]),n.b=fvn(".",[e,fvn(".",i)]),n.k=i[i.length-1]}function oxn(n,t){var e,i,r,c,a;for(a=null,c=new Ww(n.e.a);c.a=0;t-=2)for(e=0;e<=t;e+=2)(n.b[e]>n.b[e+2]||n.b[e]===n.b[e+2]&&n.b[e+1]>n.b[e+3])&&(i=n.b[e+2],n.b[e+2]=n.b[e],n.b[e]=i,i=n.b[e+3],n.b[e+3]=n.b[e+1],n.b[e+1]=i);n.c=!0}}function mxn(n,t){var e,i,r,c,a,o,u,s,h;for(s=-1,h=0,o=0,u=(a=n).length;o0&&++h;++s}return h}function vxn(n){var t;return(t=new lx(Ij(n.Rm))).a+="@",JA(t,(Hon(n)>>>0).toString(16)),n.Vh()?(t.a+=" (eProxyURI: ",QA(t,n._h()),n.Kh()&&(t.a+=" eClass: ",QA(t,n.Kh())),t.a+=")"):n.Kh()&&(t.a+=" (eClass: ",QA(t,n.Kh()),t.a+=")"),t.a}function kxn(n){var t,e,i;if(n.e)throw hv(new kM((vK(Qut),v2n+Qut.k+k2n)));for(n.d==(xdn(),ZDt)&&GWn(n,JDt),e=new Ww(n.a.a);e.a>24}return e}function Sxn(n,t,e){var i,r,c;if(!(r=uG(AJ(n.i,t),314)))if(r=new Yin(n.d,t,e),Uz(n.i,t,r),vvn(t))iD(n.a,t.c,t.b,r);else switch(c=MAn(t),i=uG(AJ(n.p,c),252),c.g){case 1:case 3:r.j=!0,nM(i,t.b,r);break;case 4:case 2:r.k=!0,nM(i,t.c,r)}return r}function Pxn(n,t){var e,i,r,c,a,o,u,s,h;for(u=iR(n.c-n.b&n.a.length-1),s=null,h=null,c=new XJ(n);c.a!=c.b;)r=uG(rwn(c),10),e=(o=uG(oIn(r,(GYn(),Zpt)),12))?o.i:null,i=(a=uG(oIn(r,nmt),12))?a.i:null,s==e&&h==i||(F$n(u,t),s=e,h=i),mv(u.c,r);F$n(u,t)}function Cxn(n,t,e,i){var r,c,a,o,u,s;if(o=new ls,u=zKn(n.e.Dh(),t),r=uG(n.g,124),PP(),uG(t,69).xk())for(a=0;a=0)return r;for(c=1,a=new Ww(t.j);a.a=0)return r;for(c=1,a=new Ww(t.j);a.a0&&t.Ne((u3(r-1,n.c.length),uG(n.c[r-1],10)),c)>0;)Y8(n,r,(u3(r-1,n.c.length),uG(n.c[r-1],10))),--r;u3(r,n.c.length),n.c[r]=c}e.a=new Ym,e.b=new Ym}function Lxn(n,t,e){var i,r,c,a,o,u,s;for(s=new nB(i=uG(t.e&&t.e(),9),uG(MF(i,i.length),9),0),a=0,o=(c=WGn(e,"[\\[\\]\\s,]+")).length;a=0?(t||(t=new zM,i>0&&zA(t,(Knn(0,i,n.length),n.substr(0,i)))),t.a+="\\",TQ(t,e&D1n)):t&&TQ(t,e&D1n);return t?t.a:n}function $xn(n){var t,i,r;for(i=new Ww(n.a.a.b);i.a0&&((!hN(n.a.c)||!t.n.d)&&(!fN(n.a.c)||!t.n.b)&&(t.g.d-=e.Math.max(0,r/2-.5)),(!hN(n.a.c)||!t.n.a)&&(!fN(n.a.c)||!t.n.c)&&(t.g.a+=e.Math.max(0,r-1)))}function Dxn(n,t,e){var i;if(2==(n.c-n.b&n.a.length-1))t==(KQn(),yRt)||t==kRt?(prn(uG(Rfn(n),15),(Ajn(),$xt)),prn(uG(Rfn(n),15),Dxt)):(prn(uG(Rfn(n),15),(Ajn(),Dxt)),prn(uG(Rfn(n),15),$xt));else for(i=new XJ(n);i.a!=i.b;)prn(uG(rwn(i),15),e)}function xxn(n,t){var e,i,r,c,a,o;for(a=new N4(i=rG(new Pm(n)),i.c.length),o=new N4(r=rG(new Pm(t)),r.c.length),c=null;a.b>0&&o.b>0&&(MK(a.b>0),e=uG(a.a.Xb(a.c=--a.b),27),MK(o.b>0),e==uG(o.a.Xb(o.c=--o.b),27));)c=e;return c}function Rxn(n,t,e){var i,r,c,a;Y3(n,t)>Y3(n,e)?(i=Dgn(e,(KQn(),kRt)),n.d=i.dc()?0:dq(uG(i.Xb(0),12)),a=Dgn(t,_Rt),n.b=a.dc()?0:dq(uG(a.Xb(0),12))):(r=Dgn(e,(KQn(),_Rt)),n.d=r.dc()?0:dq(uG(r.Xb(0),12)),c=Dgn(t,kRt),n.b=c.dc()?0:dq(uG(c.Xb(0),12)))}function Kxn(n,t){var e,i,r,c;for(e=n.o.a,c=uG(uG(Y9(n.r,t),21),87).Kc();c.Ob();)(r=uG(c.Pb(),117)).e.a=e*uM(pK(r.b.of(bht))),r.e.b=(i=r.b).pf((XYn(),uDt))?i.ag()==(KQn(),yRt)?-i.Mf().b-uM(pK(i.of(uDt))):uM(pK(i.of(uDt))):i.ag()==(KQn(),yRt)?-i.Mf().b:0}function Fxn(n,t){var e,i,r,c;for(t.Ug("Self-Loop pre-processing",1),i=new Ww(n.a);i.an.c));a++)r.a>=n.s&&(c<0&&(c=a),o=a);return u=(n.s+n.c)/2,c>=0&&(u=wP((u3(i=fHn(n,t,c,o),t.c.length),uG(t.c[i],339))),a$n(t,i,e)),u}function Hxn(n,t,e){var i,r,c,a,o;for(Yan(r=new vs,(tJ(t),t)),!r.b&&(r.b=new XR((YYn(),H_t),wBt,r)),o=r.b,a=1;a0&&tzn(this,r)}function Gxn(n,t,e,i,r,c){var a,o,u;if(!r[t.a]){for(r[t.a]=!0,!(a=i)&&(a=new d7),kD(a.e,t),u=c[t.a].Kc();u.Ob();)(o=uG(u.Pb(),290)).d!=e&&o.c!=e&&(o.c!=t&&Gxn(n,o.c,t,a,r,c),o.d!=t&&Gxn(n,o.d,t,a,r,c),kD(a.c,o),Ohn(a.d,o.b));return a}return null}function qxn(n){var t,e,i;for(t=0,e=new Ww(n.e);e.a=2}function Xxn(n,t,e,i,r){var c,a,o,u,s;for(c=n.c.d.j,a=uG(hyn(e,0),8),s=1;s1||qsn(X1(WX(Bxt,Uhn(cT(eRt,1),p1n,95,0,[_xt,Uxt])),n))>1||qsn(X1(WX(zxt,Uhn(cT(eRt,1),p1n,95,0,[Vxt,Xxt])),n))>1)}function zxn(n,t,e){var i,r,c;for(c=new Ww(n.t);c.a0&&(i.b.n-=i.c,i.b.n<=0&&i.b.u>0&&aq(t,i.b));for(r=new Ww(n.i);r.a0&&(i.a.u-=i.c,i.a.u<=0&&i.a.n>0&&aq(e,i.a))}function Wxn(n){var t,e,i;if(null==n.g&&(n.d=n.bj(n.f),ttn(n,n.d),n.c))return n.f;if(i=(t=uG(n.g[n.i-1],51)).Pb(),n.e=t,(e=n.bj(i)).Ob())n.d=e,ttn(n,e);else for(n.d=null;!t.Ob()&&(uQ(n.g,--n.i,null),0!=n.i);)t=uG(n.g[n.i-1],51);return i}function Qxn(n,t){var e,i,r,c,a,o;if(r=(i=t).Lk(),EFn(n.e,r)){if(r.Si()&&H5(n,r,i.md()))return!1}else for(o=zKn(n.e.Dh(),r),e=uG(n.g,124),c=0;c1||e>1)return 2;return t+e==1?2:0}function uRn(n,t){var i,r,c,a;return c=n.a*X0n+1502*n.b,a=n.b*X0n+11,c+=i=e.Math.floor(a*V0n),a-=i*z0n,c%=z0n,n.a=c,n.b=a,t<=24?e.Math.floor(n.a*but[t]):((r=n.a*(1<=2147483648&&(r-=4294967296),r)}function sRn(n,t,e){var i,r,c,a,o,u,s;for(c=new Zm,Uqn(n,s=new lS,a=new lS,t),Rzn(n,s,a,t,e),u=new Ww(n);u.ai.b.g&&mv(c.c,i);return c}function hRn(n,t,e){var i,r,c,a,o;for(a=n.c,c=(e.q?e.q:(hZ(),hZ(),zot)).vc().Kc();c.Ob();)r=uG(c.Pb(),44),!Qj(JJ(new fX(null,new h3(a,16)),new hd(new kO(t,r)))).Bd((vS(),Kut))&&(F$(o=r.md(),4)&&null!=(i=Nvn(o))&&(o=i),t.qf(uG(r.ld(),149),o))}function fRn(n,t,e){var i;if(_J(n.b),Jz(n.b,(Rdn(),HAt),(eP(),GLt)),Jz(n.b,UAt,t.g),Jz(n.b,GAt,t.a),n.a=QVn(n.b,t),e.Ug("Compaction by shrinking a tree",n.a.c.length),t.i.c.length>1)for(i=new Ww(n.a);i.a=0?n.Lh(i,!0,!0):YNn(n,c,!0),160),uG(r,220).Xl(t,e)}function bRn(n,t){var e,i,r,c;if(t){for(c=!(r=F$(n.Cb,90)||F$(n.Cb,102))&&F$(n.Cb,331),e=new DD((!t.a&&(t.a=new AX(t,g_t,t)),t.a));e.e!=e.i.gc();)if(i=MGn(uG(Zkn(e),89)),r?F$(i,90):c?F$(i,156):i)return i;return r?(YYn(),x_t):(YYn(),N_t)}return null}function wRn(n,t){var e,i,r;for(t.Ug("Resize child graph to fit parent.",1),i=new Ww(n.b);i.a=2*t&&kD(e,new OU(a[i-1]+t,a[i]-t));return e}function pRn(n,t,e){var i,r,c,a,o;if(e)for(c=((i=new GV(e.a.length)).b-i.a)*i.c<0?(CP(),XHt):new xD(i);c.Ob();)(r=v6(e,uG(c.Pb(),17).a))&&(Gan(a=b5(n,(gj(),o=new Hk,!!t&&LRn(o,t),o),r),k6(r,Iet)),fCn(r,a),kLn(r,a),qfn(n,r,a))}function mRn(n){var t,e,i,r;if(!n.j){if(r=new Ss,null==(t=z_t).a.zc(n,t)){for(i=new DD(n1(n));i.e!=i.i.gc();)CW(r,mRn(e=uG(Zkn(i),29))),ttn(r,e);t.a.Bc(n)}lbn(r),n.j=new vL((uG(Vrn(gZ((tQ(),M_t).o),11),19),r.i),r.g),y9(n).b&=-33}return n.j}function vRn(n){var t,e,i,r;if(null==n)return null;if(i=yXn(n,!0),r=yct.length,m_(i.substr(i.length-r,r),yct))if(4==(e=i.length)){if(s3(0,i.length),43==(t=i.charCodeAt(0)))return fHt;if(45==t)return hHt}else if(3==e)return fHt;return new tk(i)}function kRn(n){var t,e,i;return(e=n.l)&e-1||(i=n.m)&i-1||(t=n.h)&t-1||0==t&&0==i&&0==e?-1:0==t&&0==i&&0!=e?pan(e):0==t&&0!=i&&0==e?pan(i)+22:0!=t&&0==i&&0==e?pan(t)+44:-1}function yRn(n,t){var e,i,r,c,a;for(r=t.a&n.f,c=null,i=n.b[r];;i=i.b){if(i==t){c?c.b=t.b:n.b[r]=t.b;break}c=i}for(a=t.f&n.f,c=null,e=n.c[a];;e=e.d){if(e==t){c?c.d=t.d:n.c[a]=t.d;break}c=e}t.e?t.e.c=t.c:n.a=t.c,t.c?t.c.e=t.e:n.e=t.e,--n.i,++n.g}function MRn(n,t){var e;t.d?t.d.b=t.b:n.a=t.b,t.b?t.b.d=t.d:n.e=t.d,t.e||t.c?(--(e=uG(nJ(uG(cQ(n.b,t.a),260)),260)).a,t.e?t.e.c=t.c:e.b=uG(nJ(t.c),511),t.c?t.c.e=t.e:e.c=uG(nJ(t.e),511)):((e=uG(nJ(uG(u7(n.b,t.a),260)),260)).a=0,++n.c),--n.d}function TRn(n){var t,i,r,c,a,o,u,s,h,f;for(i=n.o,t=n.p,o=vZn,c=j1n,u=vZn,a=j1n,h=0;h0),c.a.Xb(c.c=--c.b),pF(c,r),MK(c.b3&&Fen(n,0,t-3))}function CRn(n){var t,e,i,r;return xA(oIn(n,(jYn(),rMt)))===xA((Own(),Ixt))?!n.e&&xA(oIn(n,Oyt))!==xA((ihn(),hpt)):(i=uG(oIn(n,Ayt),299),r=oM(gK(oIn(n,Ryt)))||xA(oIn(n,Kyt))===xA((jan(),Ydt)),t=uG(oIn(n,Iyt),17).a,e=n.a.c.length,!r&&i!=(ihn(),hpt)&&(0==t||t>e))}function IRn(n){var t,e;for(e=0;e0);e++);if(e>0&&e0);t++);return t>0&&e>16!=6&&t){if(eEn(n,t))throw hv(new vM(net+A$n(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Vjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,6,i)),(i=ZK(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,6,t,t))}function ARn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+SXn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?sEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,12,i)),(i=nF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,3,t,t))}function LRn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=9&&t){if(eEn(n,t))throw hv(new vM(net+zBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Wjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,9,i)),(i=tF(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,9,t,t))}function NRn(n){var t,e,i,r,c;if(i=bEn(n),null==(c=n.j)&&i)return n.Jk()?null:i.ik();if(F$(i,156)){if((e=i.jk())&&(r=e.wi())!=n.i){if((t=uG(i,156)).nk())try{n.g=r.ti(t,c)}catch(a){if(!F$(a=Ehn(a),82))throw hv(a);n.g=null}n.i=r}return n.g}return null}function $Rn(n){var t;return kD(t=new Zm,new ZP(new MO(n.c,n.d),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c,n.d),new MO(n.c,n.d+n.a))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c+n.b,n.d))),kD(t,new ZP(new MO(n.c+n.b,n.d+n.a),new MO(n.c,n.d+n.a))),t}function DRn(n){var t,e;if(null==n)return IZn;try{return cpn(n)}catch(i){if(F$(i=Ehn(i),103))return t=i,e=Ij(Tbn(n))+"@"+(bS(),(Avn(n)>>>0).toString(16)),wkn(ghn(),(pS(),"Exception during lenientFormat for "+e),t),"<"+e+" threw "+Ij(t.Rm)+">";throw hv(i)}}function xRn(n,t,e){var i,r;for(r=t.a.ec().Kc();r.Ob();)i=uG(r.Pb(),74),!uG(cQ(n.b,i),272)&&(R0(bIn(i))==R0(gIn(i))?QKn(n,i,e):bIn(i)==R0(gIn(i))?null==cQ(n.c,i)&&null!=cQ(n.b,gIn(i))&&bWn(n,i,e,!1):null==cQ(n.d,i)&&null!=cQ(n.b,bIn(i))&&bWn(n,i,e,!0))}function RRn(n,t){var e,i,r,c,a,o,u;for(r=n.Kc();r.Ob();)for(i=uG(r.Pb(),10),o2(o=new lOn,i),NLn(o,(KQn(),kRt)),kfn(o,(GYn(),fmt),(qx(),!0)),a=t.Kc();a.Ob();)c=uG(a.Pb(),10),o2(u=new lOn,c),NLn(u,_Rt),kfn(u,fmt,!0),kfn(e=new UZ,fmt,!0),c2(e,o),u2(e,u)}function KRn(n,t,e,i){var r,c,a,o;r=evn(n,t,e),c=evn(n,e,t),a=uG(cQ(n.c,t),118),o=uG(cQ(n.c,e),118),r1)for(t=jx((e=new sk,++n.b,e),n.d),o=Fkn(c,0);o.b!=o.d.c;)a=uG(I6(o),125),RKn(xS(DS(RS($S(new uk,1),0),t),a))}function URn(n,t,e){var i,r,c,a;for(e.Ug("Breaking Point Removing",1),n.a=uG(oIn(t,(jYn(),zyt)),223),r=new Ww(t.b);r.a>16!=11&&t){if(eEn(n,t))throw hv(new vM(net+VBn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?hEn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=kyn(t,n,10,i)),(i=n_(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,11,t,t))}function qRn(n){var t,e,i,r;for(i=new bsn(new Nw(n.b).a);i.b;)r=uG((e=von(i)).ld(),12),kfn(t=uG(e.md(),10),(GYn(),rmt),r),kfn(r,lmt,t),kfn(r,qpt,(qx(),!0)),NLn(r,uG(oIn(t,Fpt),64)),oIn(t,Fpt),kfn(r.i,(jYn(),JMt),($Pn(),oRt)),uG(oIn(HQ(r.i),Hpt),21).Fc((r_n(),rpt))}function XRn(n,t,e){var i,r,c;if(i=0,r=0,n.c)for(c=new Ww(n.d.i.j);c.ac.a)return-1;if(r.a(u=null==n.d?0:n.d.length)){for(h=n.d,n.d=Inn(IFt,qit,66,2*u+4,0,1),c=0;c=0x8000000000000000?(tin(),Jat):(i=!1,n<0&&(i=!0,n=-n),e=0,n>=d0n&&(n-=(e=t0(n/d0n))*d0n),t=0,n>=w0n&&(n-=(t=t0(n/w0n))*w0n),r=p$(t0(n),t,e),i&&Yfn(r),r)}function uKn(n){var t,e,i,r,c;if(c=new Zm,Prn(n.b,new Ed(c)),n.b.c.length=0,0!=c.c.length){for(u3(0,c.c.length),t=uG(c.c[0],82),e=1,i=c.c.length;e=-t&&r==t?new WO(xwn(i-1),xwn(r)):new WO(xwn(i),xwn(r-1))}function bKn(){return VYn(),Uhn(cT(zwt,1),p1n,81,0,[qbt,Hbt,Xbt,uwt,Pwt,lwt,Nwt,pwt,Ewt,iwt,ywt,gwt,Swt,Zbt,Dwt,xbt,kwt,Iwt,swt,Cwt,Rwt,Twt,Rbt,jwt,Kwt,Awt,xwt,hwt,Qbt,fwt,owt,$wt,_bt,zbt,wwt,Fbt,dwt,cwt,nwt,mwt,ewt,Ubt,Bbt,awt,twt,vwt,Lwt,Kbt,Mwt,rwt,bwt,Jbt,Wbt,Owt,Vbt,Ybt,Gbt])}function wKn(n,t,e){n.d=0,n.b=0,t.k==(VIn(),gbt)&&e.k==gbt&&uG(oIn(t,(GYn(),rmt)),10)==uG(oIn(e,rmt),10)&&(jen(t).j==(KQn(),yRt)?Rxn(n,t,e):Rxn(n,e,t)),t.k==gbt&&e.k==wbt?jen(t).j==(KQn(),yRt)?n.d=1:n.b=1:e.k==gbt&&t.k==wbt&&(jen(e).j==(KQn(),yRt)?n.b=1:n.d=1),GMn(n,t,e)}function dKn(n){var t,e,i,r,c;return c=gCn(n),null!=n.a&&ZG(c,"category",n.a),!pE(new Lw(n.d))&&(nrn(c,"knownOptions",i=new Ib),t=new Mm(i),V8(new Lw(n.d),t)),!pE(n.g)&&(nrn(c,"supportedFeatures",r=new Ib),e=new Tm(r),V8(n.g,e)),c}function gKn(n){var t,e,i,r,c,a,o,u;for(t=336,e=0,r=new UF(n.length),o=0,u=(a=n).length;o>16!=7&&t){if(eEn(n,t))throw hv(new vM(net+VOn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?zjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,1,iFt,i)),(i=dV(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,7,t,t))}function kKn(n,t){var e,i;if(t!=n.Cb||n.Db>>16!=3&&t){if(eEn(n,t))throw hv(new vM(net+fdn(n)));i=null,n.Cb&&(i=(e=n.Db>>16)>=0?Yjn(n,i):n.Cb.Th(n,-1-e,null,i)),t&&(i=uG(t,54).Rh(n,0,uFt,i)),(i=gV(n,t,i))&&i.oj()}else 4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,3,t,t))}function yKn(n,t){var e,i,r,c,a,o,u,s,h;return b_n(),t.d>n.d&&(o=n,n=t,t=o),t.d<63?KFn(n,t):(s=$9(n,a=(-2&n.d)<<4),h=$9(t,a),i=mXn(n,D9(s,a)),r=mXn(t,D9(h,a)),u=yKn(s,h),e=yKn(i,r),c=D9(c=ZVn(ZVn(c=yKn(mXn(s,i),mXn(r,h)),u),e),a),ZVn(ZVn(u=D9(u,a<<1),c),e))}function MKn(){MKn=E,rjt=new fI(v9n,0),tjt=new fI("LONGEST_PATH",1),ejt=new fI("LONGEST_PATH_SOURCE",2),YTt=new fI("COFFMAN_GRAHAM",3),njt=new fI(D6n,4),cjt=new fI("STRETCH_WIDTH",5),ijt=new fI("MIN_WIDTH",6),JTt=new fI("BF_MODEL_ORDER",7),ZTt=new fI("DF_MODEL_ORDER",8)}function TKn(n,t,e){var i,r,c,a,o;for(a=zwn(n,e),o=Inn(pbt,e6n,10,t.length,0,1),i=0,c=a.Kc();c.Ob();)oM(gK(oIn(r=uG(c.Pb(),12),(GYn(),qpt))))&&(o[i++]=uG(oIn(r,lmt),10));if(i=0;r+=e?1:-1)c|=t.c.lg(o,r,e,i&&!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,(GYn(),mmt))))),c|=t.q.ug(o,r,e),c|=wBn(n,o[r],e,i);return Fz(n.c,t),c}function CKn(n,t,e){var i,r,c,a,o,u,s,h;for(s=0,h=(u=s6(n.j)).length;s1&&(n.a=!0),YX(uG(e.b,68),JF(D$(uG(t.b,68).c),vD(YF(D$(uG(e.b,68).a),uG(t.b,68).a),r))),f2(n,t),AKn(n,e)}function LKn(n){var t,e,i,r,c,a;for(r=new Ww(n.a.a);r.a0&&c>0?t++:i>0?e++:c>0?r++:e++}hZ(),f$(n.j,new bi)}function $Kn(n){var t,e;e=null,t=uG(Vq(n.g,0),18);do{if(vR(e=t.d.i,(GYn(),nmt)))return uG(oIn(e,nmt),12).i;if(e.k!=(VIn(),dbt)&&hDn(new FV(ix(Xgn(e).a.Kc(),new h))))t=uG(N9(new FV(ix(Xgn(e).a.Kc(),new h))),18);else if(e.k!=dbt)return null}while(e&&e.k!=(VIn(),dbt));return e}function DKn(n,t){var e,i,r,c,a,o,u,s,h;for(o=t.j,a=t.g,u=uG(Vq(o,o.c.length-1),113),u3(0,o.c.length),s=xTn(n,a,u,h=uG(o.c[0],113)),c=1;cs&&(u=e,h=r,s=i);t.a=h,t.c=u}function xKn(n,t,e){var i,r,c,a,o,u,s;for(s=new Hj(new ip(n)),o=0,u=(a=Uhn(cT(Abt,1),i6n,12,0,[t,e])).length;ou-n.b&&ou-n.a&&o0?c.a?e>(o=c.b.Mf().a)&&(r=(e-o)/2,c.d.b=r,c.d.c=r):c.d.c=n.s+e:cz(n.u)&&((i=ECn(c.b)).c<0&&(c.d.b=-i.c),i.c+i.b>c.b.Mf().a&&(c.d.c=i.c+i.b-c.b.Mf().a))}function rFn(n,t){var e,i,r,c,a;a=new Zm,e=t;do{(c=uG(cQ(n.b,e),131)).B=e.c,c.D=e.d,mv(a.c,c),e=uG(cQ(n.k,e),18)}while(e);return u3(0,a.c.length),(i=uG(a.c[0],131)).j=!0,i.A=uG(i.d.a.ec().Kc().Pb(),18).c.i,(r=uG(Vq(a,a.c.length-1),131)).q=!0,r.C=uG(r.d.a.ec().Kc().Pb(),18).d.i,a}function cFn(n){var t,i;if(t=uG(n.a,17).a,i=uG(n.b,17).a,t>=0){if(t==i)return new WO(xwn(-t-1),xwn(-t-1));if(t==-i)return new WO(xwn(-t),xwn(i+1))}return e.Math.abs(t)>e.Math.abs(i)?new WO(xwn(-t),xwn(t<0?i:i+1)):new WO(xwn(t+1),xwn(i))}function aFn(n){var t,e;e=uG(oIn(n,(jYn(),gMt)),171),t=uG(oIn(n,(GYn(),Xpt)),311),e==(Gpn(),Imt)?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),ppt))):e==Amt?(kfn(n,gMt,Lmt),kfn(n,Xpt,(Zen(),dpt))):t==(Zen(),ppt)?(kfn(n,gMt,Imt),kfn(n,Xpt,gpt)):t==dpt&&(kfn(n,gMt,Amt),kfn(n,Xpt,gpt))}function oFn(){oFn=E,LSt=new oa,CSt=Aq(new wJ,(uIn(),Elt),(VYn(),swt)),ASt=wV(Aq(new wJ,Elt,Twt),Plt,Mwt),NSt=Lvn(Lvn(gP(wV(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),ISt=wV(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),OSt=wV(Aq(Aq(new wJ,Slt,dwt),Slt,zbt),Plt,Vbt)}function uFn(){uFn=E,KSt=Aq(wV(new wJ,(uIn(),Plt),(VYn(),Jbt)),Elt,swt),HSt=Lvn(Lvn(gP(wV(Aq(new wJ,Tlt,Nwt),Plt,Lwt),Slt),Awt),$wt),FSt=wV(Aq(Aq(Aq(new wJ,jlt,lwt),Slt,wwt),Slt,dwt),Plt,bwt),BSt=Aq(Aq(new wJ,Elt,Twt),Plt,Mwt),_St=wV(Aq(Aq(new wJ,Slt,dwt),Slt,zbt),Plt,Vbt)}function sFn(n,t,e,i,r){var c,a;(v9(t)||t.c.i.c!=t.d.i.c)&&uon(Gfn(Uhn(cT(PNt,1),VZn,8,0,[r.i.n,r.n,r.a])),e)||v9(t)||(t.c==r?sR(t.a,0,new eN(e)):aq(t.a,new eN(e)),i&&!cS(n.a,e)&&((a=uG(oIn(t,(jYn(),bMt)),75))||(a=new Uk,kfn(t,bMt,a)),s8(a,c=new eN(e),a.c.b,a.c),Fz(n.a,c)))}function hFn(n,t){var e,i,r,c;for(e=(c=pV(Ngn(h1n,PJ(pV(Ngn(null==t?0:Hon(t),f1n)),15))))&n.b.length-1,r=null,i=n.b[e];i;r=i,i=i.a)if(i.d==c&&xQ(i.i,t))return r?r.a=i.a:n.b[e]=i.a,RM(uG(nJ(i.c),604),uG(nJ(i.f),604)),Tv(uG(nJ(i.b),227),uG(nJ(i.e),227)),--n.f,++n.e,!0;return!1}function fFn(n){var t;for(t=new FV(ix(qgn(n).a.Kc(),new h));hDn(t);)if(uG(N9(t),18).c.i.k!=(VIn(),bbt))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST, but has at least one incoming edge that does not come from a FIRST_SEPARATE node. That must not happen."))}function lFn(n,t,e){var i,r,c,a,o,u;if(0==(r=Cdn(254&n.Db)))n.Eb=e;else{if(1==r)a=Inn(dat,EZn,1,2,5,1),0==jTn(n,t)?(a[0]=e,a[1]=n.Eb):(a[0]=n.Eb,a[1]=e);else for(a=Inn(dat,EZn,1,r+1,5,1),c=Kcn(n.Eb),i=2,o=0,u=0;i<=128;i<<=1)i==t?a[u++]=e:0!=(n.Db&i)&&(a[u++]=c[o++]);n.Eb=a}n.Db|=t}function bFn(n,t,i){var r,c,a,o;for(this.b=new Zm,c=0,r=0,o=new Ww(n);o.a0&&(c+=(a=uG(Vq(this.b,0),176)).o,r+=a.p),c*=2,r*=2,t>1?c=t0(e.Math.ceil(c*t)):r=t0(e.Math.ceil(r/t)),this.a=new smn(c,r)}function wFn(n,t,i,r,c,a){var o,u,s,h,f,l,b,w,d,g;for(h=r,t.j&&t.o?(d=(b=uG(cQ(n.f,t.A),60)).d.c+b.d.b,--h):d=t.a.c+t.a.b,f=c,i.q&&i.o?(s=(b=uG(cQ(n.f,i.C),60)).d.c,++f):s=i.a.c,w=d+(u=(s-d)/e.Math.max(2,f-h)),l=h;l=0;a+=r?1:-1){for(o=t[a],u=i==(KQn(),kRt)?r?Dgn(o,i):Spn(Dgn(o,i)):r?Spn(Dgn(o,i)):Dgn(o,i),c&&(n.c[o.p]=u.gc()),f=u.Kc();f.Ob();)h=uG(f.Pb(),12),n.d[h.p]=s++;Ohn(e,u)}}function pFn(n,t,e){var i,r,c,a,o,u,s,h;for(c=uM(pK(n.b.Kc().Pb())),s=uM(pK(whn(t.b))),i=vD(D$(n.a),s-e),r=vD(D$(t.a),e-c),vD(h=JF(i,r),1/(s-c)),this.a=h,this.b=new Zm,o=!0,(a=n.b.Kc()).Pb();a.Ob();)u=uM(pK(a.Pb())),o&&u-e>$9n&&(this.b.Fc(e),o=!1),this.b.Fc(u);o&&this.b.Fc(e)}function mFn(n){var t,e,i,r;if(wHn(n,n.n),n.d.c.length>0){for(AM(n.c);fDn(n,uG(N3(new Ww(n.e.a)),125))>5,t&=31,i>=n.d)return n.e<0?(cHn(),Dot):(cHn(),_ot);if(c=n.d-i,ROn(r=Inn(YHt,W1n,28,c+1,15,1),c,n.a,i,t),n.e<0){for(e=0;e0&&n.a[e]<<32-t){for(e=0;e=0)&&(!(e=izn((gAn(),kBt),r,t))||((i=e.Ik())>1||-1==i)&&3!=sJ(Nen(kBt,e))))}function SFn(n,t,e,i){var r,c,a,o,u;return o=lCn(uG(Vrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84)),u=lCn(uG(Vrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84)),R0(o)==R0(u)||Ern(u,o)?null:(a=s0(t))==e?i:(c=uG(cQ(n.a,a),10))&&(r=c.e)?r:null}function PFn(n,t,e){var i,r,c,a;for(e.Ug("Longest path to source layering",1),n.a=t,a=n.a.a,n.b=Inn(YHt,W1n,28,a.c.length,15,1),i=0,c=new Ww(a);c.a0&&(i[0]+=n.d,o-=i[0]),i[2]>0&&(i[2]+=n.d,o-=i[2]),a=e.Math.max(0,o),i[1]=e.Math.max(i[1],o),Q9(n,Est,c.c+r.b+i[0]-(i[1]-o)/2,i),t==Est&&(n.c.b=a,n.c.c=c.c+r.b+(a-o)/2)}function BFn(){this.c=Inn(eUt,I0n,28,(KQn(),Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt])).length,15,1),this.b=Inn(eUt,I0n,28,Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),this.a=Inn(eUt,I0n,28,Uhn(cT(YRt,1),V4n,64,0,[FRt,yRt,kRt,KRt,_Rt]).length,15,1),KP(this.c,M0n),KP(this.b,T0n),KP(this.a,T0n)}function HFn(n,t,e){var i,r,c,a;if(t<=e?(r=t,c=e):(r=e,c=t),i=0,null==n.b)n.b=Inn(YHt,W1n,28,2,15,1),n.b[0]=r,n.b[1]=c,n.c=!0;else{if(i=n.b.length,n.b[i-1]+1==r)return void(n.b[i-1]=c);a=Inn(YHt,W1n,28,i+2,15,1),qGn(n.b,0,a,0,i),n.b=a,n.b[i-1]>=r&&(n.c=!1,n.a=!1),n.b[i++]=r,n.b[i]=c,n.c||pxn(n)}}function UFn(n,t,e){var i,r,c,a,o,u,s;for(s=t.d,n.a=new R7(s.c.length),n.c=new Ym,o=new Ww(s);o.a=0?n.Lh(s,!1,!0):YNn(n,e,!1),61).Kc();c.Ob();){for(r=uG(c.Pb(),58),h=0;h1;)e_n(r,r.i-1);return i}function YFn(n,t){var e,i,r,c,a,o;for(e=new ND,r=new Ww(n.b);r.an.d[a.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c)));for(;!LM(n.a);)lin(n.b,uG(xz(n.a),17).a)}return e}function n_n(n){var t,e,i,r,c,a,o;for(n.a=new xF,o=0,r=0,i=new Ww(n.i.b);i.au.d&&(f=u.d+u.a+h));i.c.d=f,t.a.zc(i,t),s=e.Math.max(s,i.c.d+i.c.a)}return s}function r_n(){r_n=E,Zgt=new aI("COMMENTS",0),tpt=new aI("EXTERNAL_PORTS",1),ept=new aI("HYPEREDGES",2),ipt=new aI("HYPERNODES",3),rpt=new aI("NON_FREE_PORTS",4),cpt=new aI("NORTH_SOUTH_PORTS",5),opt=new aI(F6n,6),Ygt=new aI("CENTER_LABELS",7),npt=new aI("END_LABELS",8),apt=new aI("PARTITIONS",9)}function c_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),VZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,V1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),VZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function a_n(n,t,e,i,r){return i<0?((i=XOn(n,r,Uhn(cT($ot,1),VZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,V1n]),t))<0&&(i=XOn(n,r,Uhn(cT($ot,1),VZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),t)),!(i<0||(e.k=i,0))):i>0&&(e.k=i-1,!0)}function o_n(n,t,e,i,r,c){var a,o,u;if(o=32,i<0){if(t[0]>=n.length)return!1;if(43!=(o=zJ(n,t[0]))&&45!=o)return!1;if(++t[0],(i=RNn(n,t))<0)return!1;45==o&&(i=-i)}return 32==o&&t[0]-e==2&&2==r.b&&(a=(u=(new QE).q.getFullYear()-z1n+z1n-80)%100,c.a=i==a,i+=100*(u/100|0)+(i=0?Rmn(n):hW(Rmn(Men(n)))),qot[t]=BA(NV(n,t),0)?Rmn(NV(n,t)):hW(Rmn(Men(NV(n,t)))),n=Ngn(n,5);for(;t=h&&(s=r);s&&(f=e.Math.max(f,s.a.o.a)),f>b&&(l=h,b=f)}return l}function v_n(n){var t,e,i,r,c,a,o;for(c=new Hj(uG(WW(new Dn),50)),o=T0n,e=new Ww(n.d);e.aF7n?f$(s,n.b):r<=F7n&&r>_7n?f$(s,n.d):r<=_7n&&r>B7n?f$(s,n.c):r<=B7n&&f$(s,n.a),a=T_n(n,s,a);return c}function j_n(n,t,e,i){var r,c,a,o,u;for(r=(i.c+i.a)/2,BY(t.j),aq(t.j,r),BY(e.e),aq(e.e,r),u=new hj,a=new Ww(n.f);a.a1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),VZn,8,0,[f,h]))}function O_n(n,t,e){var i,r;for(t=48;e--)pHt[e]=e-48<<24>>24;for(i=70;i>=65;i--)pHt[i]=i-65+10<<24>>24;for(r=102;r>=97;r--)pHt[r]=r-97+10<<24>>24;for(c=0;c<10;c++)mHt[c]=48+c&D1n;for(n=10;n<=15;n++)mHt[n]=65+n-10&D1n}function N_n(n,t){t.Ug("Process graph bounds",1),kfn(n,(OQn(),PPt),$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Ka)))),kfn(n,IPt,$I(Tun(ZJ(new fX(null,new h3(n.b,16)),new Fa)))),kfn(n,SPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new _a)))),kfn(n,CPt,$I(Mun(ZJ(new fX(null,new h3(n.b,16)),new Ba)))),t.Vg()}function $_n(n){var t,i,r,c,a;c=uG(oIn(n,(jYn(),DMt)),21),a=uG(oIn(n,KMt),21),t=new eN(i=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a)),c.Hc((Qmn(),zRt))&&(r=uG(oIn(n,RMt),8),a.Hc((aUn(),eKt))&&(r.a<=0&&(r.a=20),r.b<=0&&(r.b=20)),t.a=e.Math.max(i.a,r.a),t.b=e.Math.max(i.b,r.b)),oM(gK(oIn(n,xMt)))||cXn(n,i,t)}function D_n(n,t){var e,i,r,c;for(c=Dgn(t,(KQn(),KRt)).Kc();c.Ob();)i=uG(c.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[t.p].d),n.i[e.p].a));for(r=Dgn(t,yRt).Kc();r.Ob();)i=uG(r.Pb(),12),(e=uG(oIn(i,(GYn(),lmt)),10))&&RKn(xS(DS(RS($S(new uk,0),.1),n.i[e.p].d),n.i[t.p].a))}function x_n(n){var t,e,i,r,c;if(!n.c){if(c=new ks,null==(t=z_t).a.zc(n,t)){for(i=new DD(V5(n));i.e!=i.i.gc();)F$(r=MGn(e=uG(Zkn(i),89)),90)&&CW(c,x_n(uG(r,29))),ttn(c,e);t.a.Bc(n),t.a.gc()}imn(c),lbn(c),n.c=new vL((uG(Vrn(gZ((tQ(),M_t).o),15),19),c.i),c.g),y9(n).b&=-33}return n.c}function R_n(n){var t;if(10!=n.c)throw hv(new CM(rZn((t$(),eit))));switch(t=n.a){case 110:t=10;break;case 114:t=13;break;case 116:t=9;break;case 92:case 124:case 46:case 94:case 45:case 63:case 42:case 43:case 123:case 125:case 40:case 41:case 91:case 93:break;default:throw hv(new CM(rZn((t$(),Lit))))}return t}function K_n(n){var t,e,i,r;if(0==n.l&&0==n.m&&0==n.h)return"0";if(n.h==b0n&&0==n.m&&0==n.l)return"-9223372036854775808";if(n.h>>19)return"-"+K_n(gfn(n));for(e=n,i="";0!=e.l||0!=e.m||0!=e.h;){if(e=YVn(e,_9(g0n),!0),t=""+Tj(Qat),0!=e.l||0!=e.m||0!=e.h)for(r=9-t.length;r>0;r--)t="0"+t;i=t+i}return i}function F_n(n){var t,e,i,r,c,a,o;for(t=!1,e=0,r=new Ww(n.d.b);r.a=n.a)return-1;if(!_Pn(t,i))return-1;if(P6(uG(r.Kb(t),20)))return 1;for(c=0,o=uG(r.Kb(t),20).Kc();o.Ob();){if(-1==(u=U_n(n,(a=uG(o.Pb(),18)).c.i==t?a.d.i:a.c.i,i,r)))return-1;if((c=e.Math.max(c,u))>n.c-1)return-1}return c+1}function G_n(n,t){var e,i,r,c,a,o;if(xA(t)===xA(n))return!0;if(!F$(t,15))return!1;if(i=uG(t,15),o=n.gc(),i.gc()!=o)return!1;if(a=i.Kc(),n.Yi()){for(e=0;e0)if(n._j(),null!=t){for(c=0;c>24;case 97:case 98:case 99:case 100:case 101:case 102:return n-97+10<<24>>24;case 65:case 66:case 67:case 68:case 69:case 70:return n-65+10<<24>>24;default:throw hv(new ZM("Invalid hexadecimal"))}}function W_n(){W_n=E,pst=new rC("SPIRAL",0),lst=new rC("LINE_BY_LINE",1),bst=new rC("MANHATTAN",2),fst=new rC("JITTER",3),dst=new rC("QUADRANTS_LINE_BY_LINE",4),gst=new rC("QUADRANTS_MANHATTAN",5),wst=new rC("QUADRANTS_JITTER",6),hst=new rC("COMBINE_LINE_BY_LINE_MANHATTAN",7),sst=new rC("COMBINE_JITTER_MANHATTAN",8)}function Q_n(n,t,e,i){var r,c,a,o,u,s;for(u=pSn(n,e),s=pSn(t,e),r=!1;u&&s&&(i||ejn(u,s,e));)a=pSn(u,e),o=pSn(s,e),Ien(t),Ien(n),c=u.c,pzn(u,!1),pzn(s,!1),e?($jn(t,s.p,c),t.p=s.p,$jn(n,u.p+1,c),n.p=u.p):($jn(n,u.p,c),n.p=u.p,$jn(t,s.p+1,c),t.p=s.p),a2(u,null),a2(s,null),u=a,s=o,r=!0;return r}function J_n(n){switch(n.g){case 0:return new ul;case 1:return new al;case 3:return new iP;case 4:return new Sc;case 5:return new RF;case 6:return new ol;case 2:return new cl;case 7:return new Zf;case 8:return new tl;default:throw hv(new vM("No implementation is available for the layerer "+(null!=n.f?n.f:""+n.g)))}}function Y_n(n,t,e,i){var r,c,a,o,u;for(r=!1,c=!1,o=new Ww(i.j);o.a=t.length)throw hv(new dM("Greedy SwitchDecider: Free layer not in graph."));this.c=t[n],this.e=new R_(i),Aon(this.e,this.c,(KQn(),_Rt)),this.i=new R_(i),Aon(this.i,this.c,kRt),this.f=new sX(this.c),this.a=!c&&r.i&&!r.s&&this.c[0].k==(VIn(),lbt),this.a&&rAn(this,n,t.length)}function iBn(n,t){var e,i,r,c,a,o;c=!n.B.Hc((aUn(),nKt)),a=n.B.Hc(iKt),n.a=new umn(a,c,n.c),n.n&&WY(n.a.n,n.n),nM(n.g,(Yrn(),Est),n.a),t||((i=new tkn(1,c,n.c)).n.a=n.k,Uz(n.p,(KQn(),yRt),i),(r=new tkn(1,c,n.c)).n.d=n.k,Uz(n.p,KRt,r),(o=new tkn(0,c,n.c)).n.c=n.k,Uz(n.p,_Rt,o),(e=new tkn(0,c,n.c)).n.b=n.k,Uz(n.p,kRt,e))}function rBn(n){var t,e,i;switch((t=uG(oIn(n.d,(jYn(),zyt)),223)).g){case 2:e=UJn(n);break;case 3:i=new Zm,kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Or),new Ar),new Lr),new pr),new Ng(i)),e=i;break;default:throw hv(new kM("Compaction not supported for "+t+" edges."))}xVn(n,e),V8(new Lw(n.g),new Ag(n))}function cBn(n,t){var e,i,r,c,a,o,u;if(t.Ug("Process directions",1),(e=uG(oIn(n,(QGn(),cCt)),88))!=(xdn(),QDt))for(r=Fkn(n.b,0);r.b!=r.d.c;){switch(i=uG(I6(r),40),o=uG(oIn(i,(OQn(),GPt)),17).a,u=uG(oIn(i,qPt),17).a,e.g){case 4:u*=-1;break;case 1:c=o,o=u,u=c;break;case 2:a=o,o=-u,u=a}kfn(i,GPt,xwn(o)),kfn(i,qPt,xwn(u))}t.Vg()}function aBn(n,t){var e;return e=new Yn,t&&Vsn(e,uG(cQ(n.a,iFt),96)),F$(t,422)&&Vsn(e,uG(cQ(n.a,rFt),96)),F$(t,366)?(Vsn(e,uG(cQ(n.a,lFt),96)),e):(F$(t,84)&&Vsn(e,uG(cQ(n.a,cFt),96)),F$(t,207)?(Vsn(e,uG(cQ(n.a,bFt),96)),e):F$(t,193)?(Vsn(e,uG(cQ(n.a,wFt),96)),e):(F$(t,326)&&Vsn(e,uG(cQ(n.a,aFt),96)),e))}function oBn(n){var t,e,i,r,c,a,o;for(o=new c9,a=new Ww(n.a);a.a0&&t=0)return!1;if(t.p=e.b,kD(e.e,t),i==(VIn(),wbt)||i==gbt)for(r=new Ww(t.j);r.an.d[o.p]&&(e+=J8(n.b,c),A6(n.a,xwn(c))):++a;for(e+=n.b.d*a;!LM(n.a);)lin(n.b,uG(xz(n.a),17).a)}return e}function $Bn(n){var t,e,i,r,c,a;return c=0,(t=bEn(n)).kk()&&(c|=4),0!=(n.Bb&hrt)&&(c|=2),F$(n,102)?(r=lMn(e=uG(n,19)),0!=(e.Bb&Qtt)&&(c|=32),r&&(iQ(K0(r)),c|=8,((a=r.t)>1||-1==a)&&(c|=16),0!=(r.Bb&Qtt)&&(c|=64)),0!=(e.Bb&P0n)&&(c|=frt),c|=w1n):F$(t,469)?c|=512:(i=t.kk())&&1&i.i&&(c|=256),512&n.Bb&&(c|=128),c}function DBn(n,t){var e;return n.f==CBt?(e=sJ(Nen((gAn(),kBt),t)),n.e?4==e&&t!=(m$n(),NBt)&&t!=(m$n(),OBt)&&t!=(m$n(),ABt)&&t!=(m$n(),LBt):2==e):!(!n.d||!(n.d.Hc(t)||n.d.Hc(_3(Nen((gAn(),kBt),t)))||n.d.Hc(izn((gAn(),kBt),n.b,t))))||!(!n.f||!WRn((gAn(),n.f),HJ(Nen(kBt,t))))&&(e=sJ(Nen(kBt,t)),n.e?4==e:2==e)}function xBn(n){var t,e,i,r,c,a,o,u,s,h,f,l;for(f=-1,l=0,s=0,h=(u=n).length;s0&&++l;++f}return l}function RBn(n,t,i,r){var c,a,o,u,s,h,f,l;return s=(o=uG(VDn(i,(XYn(),mDt)),8)).a,f=o.b+n,(c=e.Math.atan2(f,s))<0&&(c+=f7n),(c+=t)>f7n&&(c-=f7n),h=(u=uG(VDn(r,mDt),8)).a,l=u.b+n,(a=e.Math.atan2(l,h))<0&&(a+=f7n),(a+=t)>f7n&&(a-=f7n),YN(),oan(1e-10),e.Math.abs(c-a)<=1e-10||c==a||isNaN(c)&&isNaN(a)?0:ca?1:KL(isNaN(c),isNaN(a))}function KBn(n){var t,e,i,r,c,a,o;for(o=new Ym,i=new Ww(n.a.b);i.a=n.o)throw hv(new Ik);a=t>>5,c=NV(1,pV(NV(31&t,1))),n.n[e][a]=r?S3(n.n[e][a],c):E3(n.n[e][a],CG(c)),c=NV(c,1),n.n[e][a]=i?S3(n.n[e][a],c):E3(n.n[e][a],CG(c))}catch(o){throw F$(o=Ehn(o),333)?hv(new dM(b3n+n.o+"*"+n.p+w3n+t+TZn+e+d3n)):hv(o)}}function UBn(n,t,e,i){var r,c,a,o,u,s,h,f;for(f=new Hj(new ep(n)),o=0,u=(a=Uhn(cT(pbt,1),e6n,10,0,[t,e])).length;o0&&(!(i=(!n.n&&(n.n=new fz(lFt,n,1,7)),uG(Vrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function zBn(n){var t,e,i;return 64&n.Db?rOn(n):(t=new lx(Btt),(e=n.k)?JA(JA((t.a+=' "',t),e),'"'):(!n.n&&(n.n=new fz(lFt,n,1,7)),n.n.i>0&&(!(i=(!n.n&&(n.n=new fz(lFt,n,1,7)),uG(Vrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),i),'"'))),JA(Nj(JA(Nj(JA(Nj(JA(Nj((t.a+=" (",t),n.i),","),n.j)," | "),n.g),","),n.f),")"),t.a)}function WBn(n,t){var e,i,r,c,a;for(t==(Sln(),rEt)&&_An(uG(Y9(n.a,(gPn(),wdt)),15)),r=uG(Y9(n.a,(gPn(),wdt)),15).Kc();r.Ob();)switch(i=uG(r.Pb(),105),e=uG(Vq(i.j,0),113).d.j,f$(c=new Z_(i.j),new Fr),t.g){case 2:TCn(n,c,e,(gon(),Edt),1);break;case 1:case 0:TCn(n,new C2(c,0,a=IRn(c)),e,(gon(),Edt),0),TCn(n,new C2(c,a,c.c.length),e,Edt,1)}}function QBn(n,t){var e,i,r,c,a,o;if(null==t||0==t.length)return null;if(!(r=uG(U1(n.a,t),143))){for(i=new _w(new Fw(n.b).a.vc().Kc());i.a.Ob();)if(c=uG(i.a.Pb(),44),a=(e=uG(c.md(),143)).c,o=t.length,m_(a.substr(a.length-o,o),t)&&(t.length==a.length||46==zJ(a,a.length-t.length-1))){if(r)return null;r=e}r&&r2(n.a,t,r)}return r}function JBn(n,t){var e,i,r;return e=new Bn,(i=uG(l8(YJ(new fX(null,new h3(n.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Out),Iut]))),21).gc())<(r=uG(l8(YJ(new fX(null,new h3(t.f,16)),e),gen(new W,new Q,new rn,new cn,Uhn(cT(Rut,1),p1n,108,0,[Out,Iut]))),21).gc())?-1:i==r?0:1}function YBn(n){var t,e,i;vR(n,(jYn(),PMt))&&((i=uG(oIn(n,PMt),21)).dc()||(e=new nB(t=uG(Mj(eRt),9),uG(MF(t,t.length),9),0),i.Hc((zDn(),Gxt))?Mon(e,Gxt):Mon(e,qxt),i.Hc(Hxt)||Mon(e,Hxt),i.Hc(Bxt)?Mon(e,zxt):i.Hc(_xt)?Mon(e,Vxt):i.Hc(Uxt)&&Mon(e,Xxt),i.Hc(zxt)?Mon(e,Bxt):i.Hc(Vxt)?Mon(e,_xt):i.Hc(Xxt)&&Mon(e,Uxt),kfn(n,PMt,e)))}function ZBn(n){var t,e,i,r,c,a,o;for(r=uG(oIn(n,(GYn(),Vpt)),10),u3(0,(i=n.j).c.length),e=uG(i.c[0],12),a=new Ww(r.j);a.ar.p?(NLn(c,KRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=o-t)):c.j==KRt&&r.p>n.p&&(NLn(c,yRt),c.d&&(o=c.o.b,t=c.a.b,c.a.b=-(o-t)));break}return r}function nHn(n,t,e,i,r){var c,a,o,u,s,h,f;if(!(F$(t,207)||F$(t,366)||F$(t,193)))throw hv(new vM("Method only works for ElkNode-, ElkLabel and ElkPort-objects."));return a=n.a/2,u=t.i+i-a,h=t.j+r-a,s=u+t.g+n.a,f=h+t.f+n.a,aq(c=new Uk,new MO(u,h)),aq(c,new MO(u,f)),aq(c,new MO(s,f)),aq(c,new MO(s,h)),Vsn(o=new pDn(c),t),e&&vJ(n.b,t,o),o}function tHn(n,t,e){var i,r,c,a,o,u,s,h;for(c=new MO(t,e),s=new Ww(n.a);s.a1&&(i=new MO(r,e.b),aq(t.a,i)),dan(t.a,Uhn(cT(PNt,1),VZn,8,0,[f,h]))}function THn(){THn=E,$jt=new dI(q4n,0),Ijt=new dI("NIKOLOV",1),Ljt=new dI("NIKOLOV_PIXEL",2),Ojt=new dI("NIKOLOV_IMPROVED",3),Ajt=new dI("NIKOLOV_IMPROVED_PIXEL",4),Sjt=new dI("DUMMYNODE_PERCENTAGE",5),Njt=new dI("NODECOUNT_PERCENTAGE",6),Djt=new dI("NO_BOUNDARY",7),Pjt=new dI("MODEL_ORDER_LEFT_TO_RIGHT",8),Cjt=new dI("MODEL_ORDER_RIGHT_TO_LEFT",9)}function jHn(n){var t,e,i,r,c;for(i=n.length,t=new zM,c=0;c=40)&&IGn(n),iVn(n),mFn(n),e=ign(n),i=0;e&&i0&&aq(n.f,c)):(n.c[a]-=s+1,n.c[a]<=0&&n.a[a]>0&&aq(n.e,c))))}function iUn(n,t,e,i){var r,c,a,o,u,s,h;for(YF(u=new MO(e,i),uG(oIn(t,(OQn(),kPt)),8)),h=Fkn(t.b,0);h.b!=h.d.c;)JF((s=uG(I6(h),40)).e,u),aq(n.b,s);for(o=uG(l8(_0(new fX(null,new h3(t.a,16))),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15).Kc();o.Ob();){for(c=Fkn((a=uG(o.Pb(),65)).a,0);c.b!=c.d.c;)(r=uG(I6(c),8)).a+=u.a,r.b+=u.b;aq(n.a,a)}}function rUn(n,t){var e,i,r,c;if(0<(F$(n,16)?uG(n,16).gc():x5(n.Kc()))){if(1<(r=t)){for(--r,c=new Ea,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=Vcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));return rUn(c,r)}if(r<0){for(c=new Sa,i=n.Kc();i.Ob();)e=uG(i.Pb(),40),c=Vcn(Uhn(cT(vat,1),EZn,20,0,[c,new Mp(e)]));if(0<(F$(c,16)?uG(c,16).gc():x5(c.Kc())))return rUn(c,r)}}return uG(B$(n.Kc()),40)}function cUn(n,t,e){var i,r,c,a;for(e.Ug("Processor order nodes",2),n.b=uM(pK(oIn(t,(QGn(),ECt)))),n.a=uG(oIn(t,cCt),88),n.a==(xdn(),ZDt)&&(n.a=QDt,kfn(t,cCt,n.a)),r=new lS,a=Fkn(t.b,0);a.b!=a.d.c;)oM(gK(oIn(c=uG(I6(a),40),(OQn(),UPt))))&&s8(r,c,r.c.b,r.c);MK(0!=r.b),eVn(n,i=uG(r.a.a.c,40)),e.fh(1),GBn(n,i,0-uM(pK(oIn(i,(OQn(),NPt))))/2,0),e.fh(1),e.Vg()}function aUn(){aUn=E,eKt=new FO("DEFAULT_MINIMUM_SIZE",0),rKt=new FO("MINIMUM_SIZE_ACCOUNTS_FOR_PADDING",1),tKt=new FO("COMPUTE_PADDING",2),cKt=new FO("OUTSIDE_NODE_LABELS_OVERHANG",3),aKt=new FO("PORTS_OVERHANG",4),uKt=new FO("UNIFORM_PORT_SPACING",5),oKt=new FO("SPACE_EFFICIENT_PORT_LABELS",6),iKt=new FO("FORCE_TABULAR_NODE_LABELS",7),nKt=new FO("ASYMMETRICAL",8)}function oUn(n,t){var e,i,r,c,a,o,u,s;if(t){if(e=(c=t.Dh())?Hrn(c).wi().si(c):null){for(Akn(n,t,e),u=0,s=(null==(r=t.Dh()).i&&eqn(r),r.i).length;u=0&&u2*c?(h=new Jrn(f),s=EX(a)/jX(a),u=KJn(h,t,new Dk,e,i,r,s),JF(dL(h.e),u),f.c.length=0,c=0,mv(f.c,h),mv(f.c,a),c=EX(h)*jX(h)+EX(a)*jX(a)):(mv(f.c,a),c+=EX(a)*jX(a));return f}function fUn(n,t){var e,i,r,c,a,o;if((o=uG(oIn(t,(jYn(),JMt)),101))==($Pn(),aRt)||o==cRt)for(r=new MO(t.f.a+t.d.b+t.d.c,t.f.b+t.d.d+t.d.a).b,a=new Ww(n.a);a.ae?t:e;s<=f;++s)s==e?o=i++:(c=r[s],h=w.am(c.Lk()),s==t&&(u=s!=f||h?i:i-1),h&&++i);return l=uG(Vdn(n,t,e),76),o!=u&&Yv(n,new wtn(n.e,7,a,xwn(o),b.md(),u)),l}return uG(Vdn(n,t,e),76)}function bUn(n,t){var e,i,r,c,a,o;for(t.Ug("Port order processing",1),o=uG(oIn(n,(jYn(),iTt)),430),e=new Ww(n.b);e.a=0&&(!fjn(n,a)||(u<22?o.l|=1<>>1,a.m=s>>>1|(1&h)<<21,a.l=f>>>1|(1&s)<<21,--u;return e&&Yfn(o),c&&(i?(Qat=gfn(n),r&&(Qat=Thn(Qat,(tin(),Zat)))):Qat=p$(n.l,n.m,n.h)),o}function pUn(n,t){var e,i,r,c,a,o,u,s,h,f;for(s=n.e[t.c.p][t.p]+1,u=t.c.a.c.length+1,o=new Ww(n.a);o.a0&&(s3(0,n.length),45==n.charCodeAt(0)||(s3(0,n.length),43==n.charCodeAt(0)))?1:0;ie)throw hv(new ZM(y0n+n+'"'));return a}function vUn(n){var t,i,r,c,a,o;for(a=new lS,c=new Ww(n.a);c.a1)&&1==t&&uG(n.a[n.b],10).k==(VIn(),bbt)?Gqn(uG(n.a[n.b],10),(Ajn(),$xt)):i&&(!e||(n.c-n.b&n.a.length-1)>1)&&1==t&&uG(n.a[n.c-1&n.a.length-1],10).k==(VIn(),bbt)?Gqn(uG(n.a[n.c-1&n.a.length-1],10),(Ajn(),Dxt)):2==(n.c-n.b&n.a.length-1)?(Gqn(uG(Rfn(n),10),(Ajn(),$xt)),Gqn(uG(Rfn(n),10),Dxt)):Pxn(n,r),q5(n)}function jUn(n,t,i){var r,c,a,o,u;for(a=0,c=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));c.e!=c.i.gc();)o="",0==(!(r=uG(Zkn(c),27)).n&&(r.n=new fz(lFt,r,1,7)),r.n).i||(o=uG(Vrn((!r.n&&(r.n=new fz(lFt,r,1,7)),r.n),0),135).a),Vsn(u=new wln(a++,t,o),r),kfn(u,(OQn(),RPt),r),u.e.b=r.j+r.f/2,u.f.a=e.Math.max(r.g,1),u.e.a=r.i+r.g/2,u.f.b=e.Math.max(r.f,1),aq(t.b,u),zAn(i.f,r,u)}function EUn(n){var t,e,i,r,c;i=uG(oIn(n,(GYn(),rmt)),27),c=uG(VDn(i,(jYn(),DMt)),181).Hc((Qmn(),JRt)),n.e||(r=uG(oIn(n,Hpt),21),t=new MO(n.f.a+n.d.b+n.d.c,n.f.b+n.d.d+n.d.a),r.Hc((r_n(),tpt))?(Myn(i,JMt,($Pn(),cRt)),ZQn(i,t.a,t.b,!1,!0)):oM(gK(VDn(i,xMt)))||ZQn(i,t.a,t.b,!0,!0)),Myn(i,DMt,c?ggn(JRt):new nB(e=uG(Mj(sKt),9),uG(MF(e,e.length),9),0))}function SUn(n,t,e){var i,r,c,a;if(t[0]>=n.length)return e.o=0,!0;switch(zJ(n,t[0])){case 43:r=1;break;case 45:r=-1;break;default:return e.o=0,!0}if(++t[0],c=t[0],0==(a=RNn(n,t))&&t[0]==c)return!1;if(t[0]a&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.c.i,e)));hZ(),f$(s,n.c),GX(n.b,o.p,s)}}function OUn(n,t){var e,i,r,c,a,o,u,s;for(c=new Ww(t.b);c.aa&&(a=r,s.c.length=0),r==a&&kD(s,new WO(e.d.i,e)));hZ(),f$(s,n.c),GX(n.f,o.p,s)}}function AUn(n,t){var e,i,r,c,a,o,u;if(null==(u=gK(oIn(t,(QGn(),TCt))))||(tJ(u),u)){for(E$n(n,t),r=new Zm,o=Fkn(t.b,0);o.b!=o.d.c;)(e=yAn(n,uG(I6(o),40),null))&&(Vsn(e,t),mv(r.c,e));if(n.a=null,n.b=null,r.c.length>1)for(i=new Ww(r);i.a=0&&o!=e&&(c=new lz(n,1,o,a,null),i?i.nj(c):i=c),e>=0&&(c=new lz(n,1,e,o==e?a:null,t),i?i.nj(c):i=c)),i}function DUn(n){var t,e,i;if(null==n.b){if(i=new VM,null!=n.i&&(zA(i,n.i),i.a+=":"),256&n.f){for(256&n.f&&null!=n.a&&(aY(n.i)||(i.a+="//"),zA(i,n.a)),null!=n.d&&(i.a+="/",zA(i,n.d)),16&n.f&&(i.a+="/"),t=0,e=n.j.length;ts)&&(u+o+uXn(i,s,!1).a<=t.b&&(dtn(e,c-e.s),e.c=!0,dtn(i,c-e.s),oMn(i,e.s,e.t+e.d+o),i.k=!0,Gun(e.q,i),h=!0,r&&(fan(t,i),i.j=t,n.c.length>a&&(uEn((u3(a,n.c.length),uG(n.c[a],186)),i),0==(u3(a,n.c.length),uG(n.c[a],186)).a.c.length&&i7(n,a)))),h)}function HUn(n,t){var e,i,r,c,a;if(t.Ug("Partition midprocessing",1),r=new K1,kS(JJ(new fX(null,new h3(n.a,16)),new di),new kg(r)),0!=r.d){for(a=uG(l8(f3(new fX(null,(r.i||(r.i=new RD(r,r.c))).Nc())),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),e=uG((i=a.Kc()).Pb(),17);i.Ob();)c=uG(i.Pb(),17),RRn(uG(Y9(r,e),21),uG(Y9(r,c),21)),e=c;t.Vg()}}function UUn(n,t,e){var i,r,c,a,o;if(0==t.p){for(t.p=1,(r=e)||(r=new WO(new Zm,new nB(i=uG(Mj(YRt),9),uG(MF(i,i.length),9),0))),uG(r.a,15).Fc(t),t.k==(VIn(),lbt)&&uG(r.b,21).Fc(uG(oIn(t,(GYn(),Fpt)),64)),a=new Ww(t.j);a.a0)if(r=uG(n.Ab.g,2033),null==t){for(c=0;ci.s&&ua)return KQn(),kRt;break;case 4:case 3:if(h<0)return KQn(),yRt;if(h+e>c)return KQn(),KRt}return(u=(s+o/2)/a)+(i=(h+e/2)/c)<=1&&u-i<=0?(KQn(),_Rt):u+i>=1&&u-i>=0?(KQn(),kRt):i<.5?(KQn(),yRt):(KQn(),KRt)}function nGn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b;for(e=!1,u=uM(pK(oIn(t,(jYn(),ETt)))),l=T1n*u,r=new Ww(t.b);r.aa.n.b-a.d.d+h.a+l&&(b=s.g+h.g,h.a=(h.g*h.a+s.g*s.a)/b,h.g=b,s.f=h,e=!0)),c=a,s=h;return e}function tGn(n,t,e,i,r,c,a){var o,u,s,h,f;for(f=new cN,u=t.Kc();u.Ob();)for(h=new Ww(uG(u.Pb(),853).Rf());h.a0?o.a?r>(s=o.b.Mf().b)&&(n.v||1==o.c.d.c.length?(a=(r-s)/2,o.d.d=a,o.d.a=a):(i=(uG(Vq(o.c.d,0),187).Mf().b-s)/2,o.d.d=e.Math.max(0,i),o.d.a=r-i-s)):o.d.a=n.t+r:cz(n.u)&&((c=ECn(o.b)).d<0&&(o.d.d=-c.d),c.d+c.a>o.b.Mf().b&&(o.d.a=c.d+c.a-o.b.Mf().b))}function rGn(){rGn=E,$ft=new _N((XYn(),vDt),xwn(1)),_ft=new _N(DDt,80),Fft=new _N(CDt,5),kft=new _N(c$t,r4n),Dft=new _N(kDt,xwn(1)),Kft=new _N(TDt,(qx(),!0)),Aft=new CN(50),Oft=new _N(W$t,Aft),Mft=O$t,Lft=sDt,yft=new _N(p$t,!1),Ift=z$t,Pft=H$t,Cft=q$t,Sft=_$t,Eft=K$t,Nft=bDt,oOn(),jft=sft,Bft=wft,Tft=uft,xft=fft,Rft=bft,Gft=HDt,Xft=XDt,Uft=BDt,Hft=_Dt,Iwn(),new _N(UDt,qft=fKt)}function cGn(n,t){var e;switch(Min(n)){case 6:return RA(t);case 7:return FA(t);case 8:return KA(t);case 3:return Array.isArray(t)&&!((e=Min(t))>=14&&e<=16);case 11:return null!=t&&typeof t===mZn;case 12:return null!=t&&(typeof t===wZn||typeof t==mZn);case 0:return Eyn(t,n.__elementTypeId$);case 2:return Nz(t)&&!(t.Tm===j);case 1:return Nz(t)&&!(t.Tm===j)||Eyn(t,n.__elementTypeId$);default:return!0}}function aGn(n){var t,i,r,c;r=n.o,zK(),n.A.dc()||udn(n.A,lht)?c=r.a:(c=n.D?e.Math.max(r.a,gNn(n.f)):gNn(n.f),n.A.Hc((Qmn(),WRt))&&!n.B.Hc((aUn(),cKt))&&(c=e.Math.max(c,gNn(uG(AJ(n.p,(KQn(),yRt)),252))),c=e.Math.max(c,gNn(uG(AJ(n.p,KRt),252)))),(t=fsn(n))&&(c=e.Math.max(c,t.a))),oM(gK(n.e.Tf().of((XYn(),H$t))))?r.a=e.Math.max(r.a,c):r.a=c,(i=n.f.i).c=0,i.b=c,YGn(n.f)}function oGn(n,t){var i,r,c,a;return r=e.Math.min(e.Math.abs(n.c-(t.c+t.b)),e.Math.abs(n.c+n.b-t.c)),a=e.Math.min(e.Math.abs(n.d-(t.d+t.a)),e.Math.abs(n.d+n.a-t.d)),(i=e.Math.abs(n.c+n.b/2-(t.c+t.b/2)))>n.b/2+t.b/2||(c=e.Math.abs(n.d+n.a/2-(t.d+t.a/2)))>n.a/2+t.a/2?1:0==i&&0==c?0:0==i?a/c+1:0==c?r/i+1:e.Math.min(r/i,a/c)+1}function uGn(n,t){var e,i,r,c,a,o,u;for(c=0,o=0,u=0,r=new Ww(n.f.e);r.a0&&n.d!=(Jen(),plt)&&(o+=a*(i.d.a+n.a[t.a][i.a]*(t.d.a-i.d.a)/e)),e>0&&n.d!=(Jen(),dlt)&&(u+=a*(i.d.b+n.a[t.a][i.a]*(t.d.b-i.d.b)/e)));switch(n.d.g){case 1:return new MO(o/c,t.d.b);case 2:return new MO(t.d.a,u/c);default:return new MO(o/c,u/c)}}function sGn(n){var t,e,i,r,c;for(kD(c=new R7((!n.a&&(n.a=new MD(eFt,n,5)),n.a).i+2),new MO(n.j,n.k)),kS(new fX(null,(!n.a&&(n.a=new MD(eFt,n,5)),new h3(n.a,16))),new zp(c)),kD(c,new MO(n.b,n.c)),t=1;t0&&(hfn(u,!1,(xdn(),JDt)),hfn(u,!0,YDt)),Prn(t.g,new UC(n,e)),vJ(n.g,t,e)}function lGn(){var n;for(lGn=E,pot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,30,19,15,13,11,11,10,9,9,8,8,8,8,7,7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,5]),mot=Inn(YHt,W1n,28,37,15,1),vot=Uhn(cT(YHt,1),W1n,28,15,[-1,-1,63,40,32,28,25,23,21,20,19,19,18,18,17,17,16,16,16,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13,13,13,13]),kot=Inn(nUt,E0n,28,37,14,1),n=2;n<=36;n++)mot[n]=t0(e.Math.pow(n,pot[n])),kot[n]=bSn(YZn,mot[n])}function bGn(n){var t;if(1!=(!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i));return t=new Uk,Shn(uG(Vrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84))&&Qon(t,pYn(n,Shn(uG(Vrn((!n.b&&(n.b=new f_(cFt,n,4,7)),n.b),0),84)),!1)),Shn(uG(Vrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84))&&Qon(t,pYn(n,Shn(uG(Vrn((!n.c&&(n.c=new f_(cFt,n,5,8)),n.c),0),84)),!0)),t}function wGn(n,t){var e,i,r;for(r=!1,i=new FV(ix((t.d?n.a.c==(b0(),fSt)?qgn(t.b):Xgn(t.b):n.a.c==(b0(),hSt)?qgn(t.b):Xgn(t.b)).a.Kc(),new h));hDn(i);)if(e=uG(N9(i),18),(oM(n.a.f[n.a.g[t.b.p].p])||v9(e)||e.c.i.c!=e.d.i.c)&&!oM(n.a.n[n.a.g[t.b.p].p])&&!oM(n.a.n[n.a.g[t.b.p].p])&&(r=!0,cS(n.b,n.a.g[vTn(e,t.b).p])))return t.c=!0,t.a=e,t;return t.c=r,t.a=null,t}function dGn(n,t,e){var i,r,c,a,o,u,s;if(0==(i=e.gc()))return!1;if(n.Pj())if(u=n.Qj(),nmn(n,t,e),a=1==i?n.Ij(3,null,e.Kc().Pb(),t,u):n.Ij(5,null,e,t,u),n.Mj()){for(o=i<100?null:new cj(i),c=t+i,r=t;r0){for(o=0;o>16==-15&&n.Cb.Yh()&&Cen(new btn(n.Cb,9,13,e,n.c,Hyn(Aen(uG(n.Cb,62)),n))):F$(n.Cb,90)&&n.Db>>16==-23&&n.Cb.Yh()&&(F$(t=n.c,90)||(YYn(),t=x_t),F$(e,90)||(YYn(),e=x_t),Cen(new btn(n.Cb,9,10,e,t,Hyn(V5(uG(n.Cb,29)),n)))))),n.c}function TGn(n,t,e){var i,r,c,a,o,u,s,h;for(e.Ug("Hyperedge merging",1),CDn(n,t),o=new N4(t.b,0);o.b0,o=hpn(t,c),Px(e?o.b:o.g,t),1==Ebn(o).c.length&&s8(i,o,i.c.b,i.c),r=new WO(c,t),A6(n.o,r),men(n.e.a,c))}function OGn(n,t){var i,r,c,a;return r=e.Math.abs(Az(n.b).a-Az(t.b).a),a=e.Math.abs(Az(n.b).b-Az(t.b).b),i=1,c=1,r>n.b.b/2+t.b.b/2&&(i=1-e.Math.min(e.Math.abs(n.b.c-(t.b.c+t.b.b)),e.Math.abs(n.b.c+n.b.b-t.b.c))/r),a>n.b.a/2+t.b.a/2&&(c=1-e.Math.min(e.Math.abs(n.b.d-(t.b.d+t.b.a)),e.Math.abs(n.b.d+n.b.a-t.b.d))/a),(1-e.Math.min(i,c))*e.Math.sqrt(r*r+a*a)}function AGn(n){var t,e,i;for(wQn(n,n.e,n.f,(l0(),USt),!0,n.c,n.i),wQn(n,n.e,n.f,USt,!1,n.c,n.i),wQn(n,n.e,n.f,GSt,!0,n.c,n.i),wQn(n,n.e,n.f,GSt,!1,n.c,n.i),yGn(n,n.c,n.e,n.f,n.i),e=new N4(n.i,0);e.b=65;e--)dHt[e]=e-65<<24>>24;for(i=122;i>=97;i--)dHt[i]=i-97+26<<24>>24;for(r=57;r>=48;r--)dHt[r]=r-48+52<<24>>24;for(dHt[43]=62,dHt[47]=63,c=0;c<=25;c++)gHt[c]=65+c&D1n;for(a=26,u=0;a<=51;++a,u++)gHt[a]=97+u&D1n;for(n=52,o=0;n<=61;++n,o++)gHt[n]=48+o&D1n;gHt[62]=43,gHt[63]=47}function $Gn(n,t){var i,r,c,a,o,u;return(c=nun(n))==(u=nun(t))?n.e==t.e&&n.a<54&&t.a<54?n.ft.f?1:0:(r=n.e-t.e,(i=(n.d>0?n.d:e.Math.floor((n.a-1)*A0n)+1)-(t.d>0?t.d:e.Math.floor((t.a-1)*A0n)+1))>r+1?c:i0&&(o=j5(o,_qn(r))),Pvn(a,o))):cs&&(l=0,b+=u+t,u=0),tHn(a,l,b),i=e.Math.max(i,l+h.a),u=e.Math.max(u,h.b),l+=h.a+t;return new MO(i+t,b+u+t)}function RGn(n,t){var e,i,r,c,a,o,u;if(!h0(n))throw hv(new kM(Stt));if(c=(i=h0(n)).g,r=i.f,c<=0&&r<=0)return KQn(),FRt;switch(o=n.i,u=n.j,t.g){case 2:case 1:if(o<0)return KQn(),_Rt;if(o+n.g>c)return KQn(),kRt;break;case 4:case 3:if(u<0)return KQn(),yRt;if(u+n.f>r)return KQn(),KRt}return(a=(o+n.g/2)/c)+(e=(u+n.f/2)/r)<=1&&a-e<=0?(KQn(),_Rt):a+e>=1&&a-e>=0?(KQn(),kRt):e<.5?(KQn(),yRt):(KQn(),KRt)}function KGn(n,t,e,i,r){var c,a;if(c=Lgn(E3(t[0],L0n),E3(i[0],L0n)),n[0]=pV(c),c=$V(c,32),e>=r){for(a=1;a0&&(r.b[a++]=0,r.b[a++]=c.b[0]-1),t=1;t0&&(Qb(u,u.d-r.d),r.c==(_7(),$St)&&zb(u,u.a-r.d),u.d<=0&&u.i>0&&s8(t,u,t.c.b,t.c));for(c=new Ww(n.f);c.a0&&(Jb(o,o.i-r.d),r.c==(_7(),$St)&&Wb(o,o.b-r.d),o.i<=0&&o.d>0&&s8(e,o,e.c.b,e.c))}function GGn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b;for(hZ(),f$(n,new Bu),a=oG(n),b=new Zm,l=new Zm,o=null,u=0;0!=a.b;)c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),163),!o||EX(o)*jX(o)/21&&(u>EX(o)*jX(o)/2||0==a.b)&&(f=new Jrn(l),h=EX(o)/jX(o),s=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),s),o=f,mv(b.c,f),u=0,l.c.length=0));return Ohn(b,l),b}function qGn(n,t,e,i,r){var c,a,o,u,s,h,f;if(bS(),aW(n,"src"),aW(e,"dest"),f=Tbn(n),u=Tbn(e),yG(!!(4&f.i),"srcType is not an array"),yG(!!(4&u.i),"destType is not an array"),h=f.c,a=u.c,yG(1&h.i?h==a:!(1&a.i),"Array types don't match"),$fn(n,t,e,i,r),1&h.i||f==u)b$n(n,t,e,i,r,!0);else if(s=Kcn(n),c=Kcn(e),xA(n)===xA(e)&&ti;)uQ(c,o,s[--t]);else for(o=i+r;i0),i.a.Xb(i.c=--i.b),h>f+o&&LQ(i);for(c=new Ww(l);c.a0),i.a.Xb(i.c=--i.b)}}function zGn(){var n,t,e,i,r,c;if(QYn(),WHt)return WHt;for(TXn(n=new K3(4),kJn(iat,!0)),lWn(n,kJn("M",!0)),lWn(n,kJn("C",!0)),c=new K3(4),i=0;i<11;i++)HFn(c,i,i);return TXn(t=new K3(4),kJn("M",!0)),HFn(t,4448,4607),HFn(t,65438,65439),vVn(r=new QN(2),n),vVn(r,OHt),(e=new QN(2)).Jm(CX(c,kJn("L",!0))),e.Jm(t),e=new n8(3,e),e=new eW(r,e),WHt=e}function WGn(n,t){var e,i,r,c,a,o,u,s;for(e=new RegExp(t,"g"),u=Inn($ot,VZn,2,0,6,1),i=0,s=n,c=null;;){if(null==(o=e.exec(s))||""==s){u[i]=s;break}a=o.index,u[i]=(Knn(0,a,s.length),s.substr(0,a)),s=r1(s,a+o[0].length,s.length),e.lastIndex=0,c==s&&(u[i]=(Knn(0,1,s.length),s.substr(0,1)),s3(1,s.length+1),s=s.substr(1)),c=s,++i}if(n.length>0){for(r=u.length;r>0&&""==u[r-1];)--r;r0&&(l-=r[0]+n.c,r[0]+=n.c),r[2]>0&&(l-=r[2]+n.c),r[1]=e.Math.max(r[1],l),qX(n.a[1],i.c+t.b+r[0]-(r[1]-l)/2,r[1]);for(u=0,h=(a=n.a).length;u0?(n.n.c.length-1)*n.i:0,i=new Ww(n.n);i.a1)for(i=Fkn(r,0);i.b!=i.d.c;)for(c=0,o=new Ww((e=uG(I6(i),235)).e);o.a0&&(t[0]+=n.c,l-=t[0]),t[2]>0&&(l-=t[2]+n.c),t[1]=e.Math.max(t[1],l),XX(n.a[1],r.d+i.d+t[0]-(t[1]-l)/2,t[1]);else for(w=r.d+i.d,b=r.a-i.d-i.a,s=0,f=(o=n.a).length;s0||0==Fgn(c.b.d,n.b.d+n.b.a)&&r.b<0||0==Fgn(c.b.d+c.b.a,n.b.d)&&r.b>0){u=0;break}}else u=e.Math.min(u,LLn(n,c,r));u=e.Math.min(u,uqn(n,a,u,r))}return u}function sqn(n,t){var e,i,r,c,a,o;if(n.b<2)throw hv(new vM("The vector chain must contain at least a source and a target point."));for(MK(0!=n.b),MN(t,(i=uG(n.a.a.c,8)).a,i.b),o=new Zx((!t.a&&(t.a=new MD(eFt,t,5)),t.a)),c=Fkn(n,1);c.a=0&&c!=e)throw hv(new vM(Xet));for(r=0,u=0;uuM(oD(a.g,a.d[0]).a)?(MK(u.b>0),u.a.Xb(u.c=--u.b),pF(u,a),r=!0):o.e&&o.e.gc()>0&&(c=(!o.e&&(o.e=new Zm),o.e).Mc(t),s=(!o.e&&(o.e=new Zm),o.e).Mc(e),(c||s)&&((!o.e&&(o.e=new Zm),o.e).Fc(a),++a.c));r||mv(i.c,a)}function bqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;return h=n.a.i+n.a.g/2,f=n.a.i+n.a.g/2,a=new MO(t.i+t.g/2,t.j+t.f/2),(u=uG(VDn(t,(XYn(),mDt)),8)).a=u.a+h,u.b=u.b+f,r=(a.b-u.b)/(a.a-u.a),i=a.b-r*a.a,o=new MO(e.i+e.g/2,e.j+e.f/2),(s=uG(VDn(e,mDt),8)).a=s.a+h,s.b=s.b+f,c=(o.b-s.b)/(o.a-s.a),l=(i-(o.b-c*o.a))/(c-r),!(u.a>>0).toString(16),t.length-2,t.length):n>=P0n?"\\v"+r1(t="0"+(n>>>0).toString(16),t.length-6,t.length):""+String.fromCharCode(n&D1n)}return e}function Tqn(n){var t,e,i;if(sN(uG(oIn(n,(jYn(),JMt)),101)))for(e=new Ww(n.j);e.a=t.o&&e.f<=t.f||.5*t.a<=e.f&&1.5*t.a>=e.f){if((c=uG(Vq(t.n,t.n.c.length-1),209)).e+c.d+e.g+r<=i&&(uG(Vq(t.n,t.n.c.length-1),209).f-n.f+e.f<=n.b||1==n.a.c.length))return ipn(t,e),!0;if(t.s+e.g<=i&&(t.t+t.d+e.f+r<=n.b||1==n.a.c.length))return kD(t.b,e),a=uG(Vq(t.n,t.n.c.length-1),209),kD(t.n,new c0(t.s,a.f+a.a+t.i,t.i)),VMn(uG(Vq(t.n,t.n.c.length-1),209),e),nqn(t,e),!0}return!1}function Pqn(n,t,e){var i,r,c,a;return n.Pj()?(r=null,c=n.Qj(),i=n.Ij(1,a=iin(n,t,e),e,t,c),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))?(null!=a&&(r=n.Oj(a,r)),r=n.Nj(e,r),n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)):(n.Tj()&&(r=n.Wj(a,e,r)),r?(r.nj(i),r.oj()):n.Jj(i)),a):(a=iin(n,t,e),n.Mj()&&!(n.Yi()&&null!=a?udn(a,e):xA(a)===xA(e))&&(r=null,null!=a&&(r=n.Oj(a,null)),(r=n.Nj(e,r))&&r.oj()),a)}function Cqn(n,t){var e,i,r,c;if(t.Ug("Path-Like Graph Wrapping",1),0!=n.b.c.length)if(null==(r=new dDn(n)).i&&(r.i=aun(r,new pc)),e=uM(r.i)*r.f/(null==r.i&&(r.i=aun(r,new pc)),uM(r.i)),r.b>e)t.Vg();else{switch(uG(oIn(n,(jYn(),BTt)),351).g){case 2:c=new kc;break;case 0:c=new hc;break;default:c=new yc}if(i=c.og(n,r),!c.pg())switch(uG(oIn(n,VTt),352).g){case 2:i=KLn(r,i);break;case 1:i=pPn(r,i)}kVn(n,r,i),t.Vg()}else t.Vg()}function Iqn(n,t){var i,r,c,a,o,u,s;t%=24,n.q.getHours()!=t&&((i=new e.Date(n.q.getTime())).setDate(i.getDate()+1),(o=n.q.getTimezoneOffset()-i.getTimezoneOffset())>0&&(u=o/60|0,s=o%60,r=n.q.getDate(),n.q.getHours()+u>=24&&++r,c=new e.Date(n.q.getFullYear(),n.q.getMonth(),r,t+u,n.q.getMinutes()+s,n.q.getSeconds(),n.q.getMilliseconds()),n.q.setTime(c.getTime()))),a=n.q.getTime(),n.q.setTime(a+36e5),n.q.getHours()!=t&&n.q.setTime(a)}function Oqn(n,t){var e,i,r,c;if(a3(n.d,n.e),n.c.a.$b(),0!=uM(pK(oIn(t.j,(jYn(),yyt))))||0!=uM(pK(oIn(t.j,yyt))))for(e=B3n,xA(oIn(t.j,Syt))!==xA((yvn(),Fjt))&&kfn(t.j,(GYn(),Bpt),(qx(),!0)),c=uG(oIn(t.j,OTt),17).a,r=0;r(u3(c+1,t.c.length),uG(t.c[c+1],17)).a-i&&++o,kD(r,(u3(c+o,t.c.length),uG(t.c[c+o],17))),a+=(u3(c+o,t.c.length),uG(t.c[c+o],17)).a-i,++e;e=g&&n.e[s.p]>w*n.b||v>=i*g)&&(mv(l.c,u),u=new Zm,Qon(o,a),a.a.$b(),h-=f,b=e.Math.max(b,h*n.b+d),h+=v,m=v,v=0,f=0,d=0);return new WO(b,l)}function $qn(n){var t,e,i,r,c;if(!n.d){if(c=new js,null==(t=z_t).a.zc(n,t)){for(e=new DD(n1(n));e.e!=e.i.gc();)CW(c,$qn(uG(Zkn(e),29)));t.a.Bc(n),t.a.gc()}for(r=c.i,!n.q&&(n.q=new fz(p_t,n,11,10)),i=new DD(n.q);i.e!=i.i.gc();++r)uG(Zkn(i),411);CW(c,(!n.q&&(n.q=new fz(p_t,n,11,10)),n.q)),lbn(c),n.d=new vL((uG(Vrn(gZ((tQ(),M_t).o),9),19),c.i),c.g),n.e=uG(c.g,688),null==n.e&&(n.e=W_t),y9(n).b&=-17}return n.d}function Dqn(n,t,e,i){var r,c,a,o,u,s;if(s=zKn(n.e.Dh(),t),u=0,r=uG(n.g,124),PP(),uG(t,69).xk()){for(a=0;a1||-1==w)if(f=uG(d,71),l=uG(h,71),f.dc())l.$b();else for(a=!!lMn(t),c=0,o=n.a?f.Kc():f.Ii();o.Ob();)s=uG(o.Pb(),58),(r=uG(ain(n,s),58))?(a?-1==(u=l.dd(r))?l.Gi(c,r):c!=u&&l.Ui(c,r):l.Gi(c,r),++c):n.b&&!a&&(l.Gi(c,s),++c);else null==d?h.Wb(null):null==(r=ain(n,d))?n.b&&!lMn(t)&&h.Wb(d):h.Wb(r)}function Rqn(n,t){var i,r,c,a,o,u,s,f;for(i=new Ne,c=new FV(ix(qgn(t).a.Kc(),new h));hDn(c);)if(!v9(r=uG(N9(c),18))&&_Pn(u=r.c.i,$bt)){if(-1==(f=U_n(n,u,$bt,Nbt)))continue;i.b=e.Math.max(i.b,f),!i.a&&(i.a=new Zm),kD(i.a,u)}for(o=new FV(ix(Xgn(t).a.Kc(),new h));hDn(o);)if(!v9(a=uG(N9(o),18))&&_Pn(s=a.d.i,Nbt)){if(-1==(f=U_n(n,s,Nbt,$bt)))continue;i.d=e.Math.max(i.d,f),!i.c&&(i.c=new Zm),kD(i.c,s)}return i}function Kqn(n,t,e,i){var r,c,a,o,u,s,h;if(e.d.i!=t.i){for(Hb(r=new gMn(n),(VIn(),wbt)),kfn(r,(GYn(),rmt),e),kfn(r,(jYn(),JMt),($Pn(),cRt)),mv(i.c,r),o2(a=new lOn,r),NLn(a,(KQn(),_Rt)),o2(o=new lOn,r),NLn(o,kRt),h=e.d,u2(e,a),Vsn(c=new UZ,e),kfn(c,bMt,null),c2(c,o),u2(c,h),s=new N4(e.b,0);s.b1e6)throw hv(new wM("power of ten too big"));if(n<=vZn)return D9(t$n(Got[1],t),t);for(r=i=t$n(Got[1],vZn),e=Bsn(n-vZn),t=t0(n%vZn);dwn(e,vZn)>0;)r=j5(r,i),e=$gn(e,vZn);for(r=D9(r=j5(r,t$n(Got[1],t)),vZn),e=Bsn(n-vZn);dwn(e,vZn)>0;)r=D9(r,vZn),e=$gn(e,vZn);return r=D9(r,t)}function Bqn(n){var t,e,i,r,c,a,o,u;for(a=new Ww(n.a);a.as&&i>s)){r=!1,e._g()&&e.bh("bk node placement breaks on "+o+" which should have been after "+h);break}h=o,s=uM(t.p[o.p])+uM(t.d[o.p])+o.o.b+o.d.a}if(!r)break}return e._g()&&e.bh(t+" is feasible: "+r),r}function Xqn(n,t,e,i){var r,c,a,o,u,s,h;if(Hb(c=new gMn(n),(VIn(),gbt)),kfn(c,(jYn(),JMt),($Pn(),cRt)),r=0,t){for(kfn(a=new lOn,(GYn(),rmt),t),kfn(c,rmt,t.i),NLn(a,(KQn(),_Rt)),o2(a,c),s=0,h=(u=x4(t.e)).length;s0)){if(r=-1,32==zJ(h.c,0)){if(f=s[0],win(t,s),s[0]>f)continue}else if(WZ(t,h.c,s[0])){s[0]+=h.c.length;continue}return 0}if(r<0&&h.a&&(r=u,c=s[0],i=0),r>=0){if(o=h.b,u==r&&0==(o-=i++))return 0;if(!rJn(t,s,h,o,a)){u=r-1,s[0]=c;continue}}else if(r=-1,!rJn(t,s,h,0,a))return 0}return LQn(a,e)?s[0]:0}function Qqn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(h=new KV(new Fd(e)),Vz(o=Inn(ZHt,B2n,28,n.f.e.c.length,16,1),o.length),e[t.a]=0,s=new Ww(n.f.e);s.a=0&&!eTn(n,h,f);)--f;r[h]=f}for(b=0;b=0&&!eTn(n,o,w);)--o;c[w]=o}for(u=0;ut[l]&&li[u]&&HBn(n,u,l,!1,!0)}function Yqn(n){var t,e,i,r,c,a,o,u;e=oM(gK(oIn(n,(rGn(),yft)))),c=n.a.c.d,o=n.a.d.d,e?(a=vD(YF(new MO(o.a,o.b),c),.5),u=vD(D$(n.e),.5),t=YF(JF(new MO(c.a,c.b),a),u),_R(n.d,t)):(r=uM(pK(oIn(n.a,Fft))),i=n.d,c.a>=o.a?c.b>=o.b?(i.a=o.a+(c.a-o.a)/2+r,i.b=o.b+(c.b-o.b)/2-r-n.e.b):(i.a=o.a+(c.a-o.a)/2+r,i.b=c.b+(o.b-c.b)/2+r):c.b>=o.b?(i.a=c.a+(o.a-c.a)/2+r,i.b=o.b+(c.b-o.b)/2+r):(i.a=c.a+(o.a-c.a)/2+r,i.b=c.b+(o.b-c.b)/2-r-n.e.b))}function Zqn(n){var t,e,i,r,c,a;if(!n.f){if(a=new Ms,c=new Ms,null==(t=z_t).a.zc(n,t)){for(r=new DD(n1(n));r.e!=r.i.gc();)CW(a,Zqn(uG(Zkn(r),29)));t.a.Bc(n),t.a.gc()}for(!n.s&&(n.s=new fz(o_t,n,21,17)),i=new DD(n.s);i.e!=i.i.gc();)F$(e=uG(Zkn(i),179),102)&&ttn(c,uG(e,19));lbn(c),n.r=new JG(n,(uG(Vrn(gZ((tQ(),M_t).o),6),19),c.i),c.g),CW(a,n.r),lbn(a),n.f=new vL((uG(Vrn(gZ(M_t.o),5),19),a.i),a.g),y9(n).b&=-3}return n.f}function nXn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,$3n),"ELK DisCo"),"Layouter for arranging unconnected subgraphs. The subgraphs themselves are, by default, not laid out."),new ct))),U4(n,$3n,D3n,Jkn(ift)),U4(n,$3n,x3n,Jkn(Jht)),U4(n,$3n,R3n,Jkn(Xht)),U4(n,$3n,K3n,Jkn(Yht)),U4(n,$3n,D2n,Jkn(tft)),U4(n,$3n,x2n,Jkn(nft)),U4(n,$3n,$2n,Jkn(eft)),U4(n,$3n,R2n,Jkn(Zht)),U4(n,$3n,I3n,Jkn(zht)),U4(n,$3n,O3n,Jkn(Vht)),U4(n,$3n,A3n,Jkn(Wht)),U4(n,$3n,L3n,Jkn(Qht))}function tXn(){tXn=E,JKt=Uhn(cT(JHt,1),N1n,28,15,[48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70]),YKt=new RegExp("[ \t\n\r\f]+");try{QKt=Uhn(cT(iBt,1),EZn,2114,0,[new Km((wL(),Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSSZ",bF((qy(),qy(),Hat))))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss'.'SSS",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm:ss",bF(Hat))),new Km(Cmn("yyyy-MM-dd'T'HH:mm",bF(Hat))),new Km(Cmn("yyyy-MM-dd",bF(Hat)))])}catch(n){if(!F$(n=Ehn(n),82))throw hv(n)}}function eXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==rHn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=rHn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=rHn(n,t)}while(r>e);return r}function iXn(n,t){var e,i,r;if(i=0!=uRn(n.d,1),0==BAn(n,t)&&oM(gK(oIn(t.j,(GYn(),Bpt)))))return 0;!oM(gK(oIn(t.j,(GYn(),Bpt))))&&!oM(gK(oIn(t.j,mmt)))||xA(oIn(t.j,(jYn(),Syt)))===xA((yvn(),Fjt))?t.c.mg(t.e,i):i=oM(gK(oIn(t.j,Bpt))),PKn(n,t,i,!0),oM(gK(oIn(t.j,mmt)))&&kfn(t.j,mmt,(qx(),!1)),oM(gK(oIn(t.j,Bpt)))&&(kfn(t.j,Bpt,(qx(),!1)),kfn(t.j,mmt,!0)),e=BAn(n,t);do{if(Gon(n),0==e)return 0;r=e,PKn(n,t,i=!i,!1),e=BAn(n,t)}while(r>e);return r}function rXn(n,t,i,r){var c,a,o,u,s,h,f,l,b;return h=(s=YF(new MO(i.a,i.b),n)).a*t.b-s.b*t.a,f=t.a*r.b-t.b*r.a,l=(s.a*r.b-s.b*r.a)/f,b=h/f,0==f?0==h?(a=atn(n,c=JF(new MO(i.a,i.b),vD(new MO(r.a,r.b),.5))),o=atn(JF(new MO(n.a,n.b),t),c),u=.5*e.Math.sqrt(r.a*r.a+r.b*r.b),a=0&&l<=1&&b>=0&&b<=1?JF(new MO(n.a,n.b),vD(new MO(t.a,t.b),l)):null}function cXn(n,t,e){var i,r,c,a,o;if(i=uG(oIn(n,(jYn(),Pyt)),21),e.a>t.a&&(i.Hc((ZSn(),zNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(o=new Ww(n.a);o.at.a&&(i.Hc((ZSn(),zNt))?n.c.a+=(e.a-t.a)/2:i.Hc(QNt)&&(n.c.a+=e.a-t.a)),e.b>t.b&&(i.Hc((ZSn(),YNt))?n.c.b+=(e.b-t.b)/2:i.Hc(JNt)&&(n.c.b+=e.b-t.b)),uG(oIn(n,(GYn(),Hpt)),21).Hc((r_n(),tpt))&&(e.a>t.a||e.b>t.b))for(a=new Ww(n.a);a.a0?n.i:0)>t&&s>0&&(a=0,o+=s+n.i,c=e.Math.max(c,b),r+=s+n.i,s=0,b=0,i&&(++l,kD(n.n,new c0(n.s,o,n.i))),u=0),b+=h.g+(u>0?n.i:0),s=e.Math.max(s,h.f),i&&VMn(uG(Vq(n.n,l),209),h),a+=h.g+(u>0?n.i:0),++u;return c=e.Math.max(c,b),r+=s,i&&(n.r=c,n.d=r,ijn(n.j)),new gY(n.s,n.t,c,r)}function sXn(n){var t,i,r,c,a,o,u,s,h,f,l;for(n.b=!1,f=M0n,u=T0n,l=M0n,s=T0n,i=n.e.a.ec().Kc();i.Ob();)for(r=(t=uG(i.Pb(),272)).a,f=e.Math.min(f,r.c),u=e.Math.max(u,r.c+r.b),l=e.Math.min(l,r.d),s=e.Math.max(s,r.d+r.a),a=new Ww(t.c);a.an.o.a&&(f=(s-n.o.a)/2,u.b=e.Math.max(u.b,f),u.c=e.Math.max(u.c,f))}}function wXn(n){var t,e,i,r,c,a;for(YL(r=new r4,(Whn(),YLt)),i=new Jw(new IM(new JE(n,Yon(n,Inn($ot,VZn,2,0,6,1))).b));i.bo?1:-1:Hln(n.a,t.a,c)))f=-u,h=a==u?t7(t.a,o,n.a,c):Cnn(t.a,o,n.a,c);else if(f=a,a==u){if(0==r)return cHn(),_ot;h=t7(n.a,c,t.a,o)}else h=Cnn(n.a,c,t.a,o);return K4(s=new zz(f,h.length,h)),s}function vXn(n,t){var e,i,r;if(r=PGn(t),!t.c&&(t.c=new fz(wFt,t,9,9)),kS(new fX(null,(!t.c&&(t.c=new fz(wFt,t,9,9)),new h3(t.c,16))),new Jd(r)),CWn(t,i=uG(oIn(r,(GYn(),Hpt)),21)),i.Hc((r_n(),tpt)))for(e=new DD((!t.c&&(t.c=new fz(wFt,t,9,9)),t.c));e.e!=e.i.gc();)pQn(n,t,r,uG(Zkn(e),123));return 0!=uG(VDn(t,(jYn(),DMt)),181).gc()&&u_n(t,r),oM(gK(oIn(r,HMt)))&&i.Fc(apt),vR(r,fTt)&&iM(new omn(uM(pK(oIn(r,fTt)))),r),xA(VDn(t,rMt))===xA((Own(),Ixt))?UYn(n,t,r):dYn(n,t,r),r}function kXn(n){var t,e,i,r,c,a,o;for(i=new Ww(n.b);i.a0?r1(e.a,0,c-1):"":(Knn(0,c-1,n.length),n.substr(0,c-1)):e?e.a:n}function MXn(n,t){var e,i,r,c,a,o,u;for(t.Ug("Sort By Input Model "+oIn(n,(jYn(),Syt)),1),r=0,i=new Ww(n.b);i.a=n.b.length?(c[r++]=a.b[i++],c[r++]=a.b[i++]):i>=a.b.length?(c[r++]=n.b[e++],c[r++]=n.b[e++]):a.b[i]0?n.i:0)),++t;for(dgn(n.n,s),n.d=i,n.r=r,n.g=0,n.f=0,n.e=0,n.o=M0n,n.p=M0n,a=new Ww(n.b);a.a0&&(!(r=(!n.n&&(n.n=new fz(lFt,n,1,7)),uG(Vrn(n.n,0),135)).a)||JA(JA((t.a+=' "',t),r),'"'))),!n.b&&(n.b=new f_(cFt,n,4,7)),e=!(n.b.i<=1&&(!n.c&&(n.c=new f_(cFt,n,5,8)),n.c.i<=1)),t.a+=e?" [":" ",JA(t,KD(new FM,new DD(n.b))),e&&(t.a+="]"),t.a+=Y4n,e&&(t.a+="["),JA(t,KD(new FM,new DD(n.c))),e&&(t.a+="]"),t.a)}function PXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(k=n.c,y=t.c,e=Ten(k.a,n,0),i=Ten(y.a,t,0),m=uG(jmn(n,(can(),zjt)).Kc().Pb(),12),j=uG(jmn(n,Wjt).Kc().Pb(),12),v=uG(jmn(t,zjt).Kc().Pb(),12),E=uG(jmn(t,Wjt).Kc().Pb(),12),g=x4(m.e),M=x4(j.g),p=x4(v.e),T=x4(E.g),$jn(n,i,y),s=0,b=(c=p).length;sh?new A2((_7(),DSt),i,t,s-h):s>0&&h>0&&(new A2((_7(),DSt),t,i,0),new A2(DSt,i,t,0))),a)}function AXn(n,t,e){var i,r,c;for(n.a=new Zm,c=Fkn(t.b,0);c.b!=c.d.c;){for(r=uG(I6(c),40);uG(oIn(r,(QGn(),ACt)),17).a>n.a.c.length-1;)kD(n.a,new WO(B3n,G9n));i=uG(oIn(r,ACt),17).a,e==(xdn(),JDt)||e==YDt?(r.e.auM(pK(uG(Vq(n.a,i),42).b))&&sw(uG(Vq(n.a,i),42),r.e.a+r.f.a)):(r.e.buM(pK(uG(Vq(n.a,i),42).b))&&sw(uG(Vq(n.a,i),42),r.e.b+r.f.b))}}function LXn(n,t,e,i){var r,c,a,o,u,s;if(c=pgn(i),!oM(gK(oIn(i,(jYn(),jMt))))&&!oM(gK(oIn(n,uMt)))||sN(uG(oIn(n,JMt),101)))switch(o2(o=new lOn,n),t?((s=o.n).a=t.a-n.n.a,s.b=t.b-n.n.b,DOn(s,0,0,n.o.a,n.o.b),NLn(o,ZUn(o,c))):(r=Ipn(c),NLn(o,e==(can(),Wjt)?r:Gdn(r))),a=uG(oIn(i,(GYn(),Hpt)),21),u=o.j,c.g){case 2:case 1:(u==(KQn(),yRt)||u==KRt)&&a.Fc((r_n(),cpt));break;case 4:case 3:(u==(KQn(),kRt)||u==_Rt)&&a.Fc((r_n(),cpt))}else r=Ipn(c),o=XUn(n,e,e==(can(),Wjt)?r:Gdn(r));return o}function NXn(n,t){var i,r,c,a,o;for(o=new bsn(new Nw(n.f.b).a);o.b;){if(c=uG((a=von(o)).ld(),602),1==t){if(c.Af()!=(xdn(),nxt)&&c.Af()!=QDt)continue}else if(c.Af()!=(xdn(),JDt)&&c.Af()!=YDt)continue;switch(r=uG(uG(a.md(),42).b,86),i=uG(uG(a.md(),42).a,194).c,c.Af().g){case 2:r.g.c=n.e.a,r.g.b=e.Math.max(1,r.g.b+i);break;case 1:r.g.c=r.g.c+i,r.g.b=e.Math.max(1,r.g.b-i);break;case 4:r.g.d=n.e.b,r.g.a=e.Math.max(1,r.g.a+i);break;case 3:r.g.d=r.g.d+i,r.g.a=e.Math.max(1,r.g.a-i)}}}function $Xn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(u=Inn(YHt,W1n,28,t.b.c.length,15,1),h=Inn(vbt,p1n,273,t.b.c.length,0,1),s=Inn(pbt,e6n,10,t.b.c.length,0,1),b=0,w=(l=n.a).length;b0&&s[r]&&(d=y$(n.b,s[r],c)),g=e.Math.max(g,c.c.c.b+d);for(a=new Ww(f.e);a.a1)throw hv(new vM(dct));u||(c=R5(t,i.Kc().Pb()),a.Fc(c))}return bfn(n,sAn(n,t,e),a)}function BXn(n,t,e){var i,r,c,a,o,u,s;if(EFn(n.e,t))PP(),C$n((o=uG(t,69).xk()?new Cq(t,n):new OA(t,n)).c,o.b),K$(o,uG(e,16));else{for(s=zKn(n.e.Dh(),t),i=uG(n.g,124),c=0;c"}null!=u&&(t.a+=""+u)}else n.e?null!=(o=n.e.zb)&&(t.a+=""+o):(t.a+="?",n.b?(t.a+=" super ",qXn(n.b,t)):n.f&&(t.a+=" extends ",qXn(n.f,t)))}function XXn(n){n.b=null,n.a=null,n.o=null,n.q=null,n.v=null,n.w=null,n.B=null,n.p=null,n.Q=null,n.R=null,n.S=null,n.T=null,n.U=null,n.V=null,n.W=null,n.bb=null,n.eb=null,n.ab=null,n.H=null,n.db=null,n.c=null,n.d=null,n.f=null,n.n=null,n.r=null,n.s=null,n.u=null,n.G=null,n.J=null,n.e=null,n.j=null,n.i=null,n.g=null,n.k=null,n.t=null,n.F=null,n.I=null,n.L=null,n.M=null,n.O=null,n.P=null,n.$=null,n.N=null,n.Z=null,n.cb=null,n.K=null,n.D=null,n.A=null,n.C=null,n._=null,n.fb=null,n.X=null,n.Y=null,n.gb=!1,n.hb=!1}function VXn(n){var t,i,r,c;if(r=bYn((!n.c&&(n.c=j2(Bsn(n.f))),n.c),0),0==n.e||0==n.a&&-1!=n.f&&n.e<0)return r;if(t=nun(n)<0?1:0,i=n.e,r.length,e.Math.abs(t0(n.e)),c=new QM,1==t&&(c.a+="-"),n.e>0)if((i-=r.length-t)>=0){for(c.a+="0.";i>Pot.length;i-=Pot.length)Xq(c,Pot);lF(c,Pot,t0(i)),JA(c,(s3(t,r.length+1),r.substr(t)))}else JA(c,r1(r,t,t0(i=t-i))),c.a+=".",JA(c,sQ(r,t0(i)));else{for(JA(c,(s3(t,r.length+1),r.substr(t)));i<-Pot.length;i+=Pot.length)Xq(c,Pot);lF(c,Pot,t0(-i))}return c.a}function zXn(n){var t,e,i,r,c;if(n.k!=(VIn(),dbt))return!1;if(n.j.c.length<=1)return!1;if(uG(oIn(n,(jYn(),JMt)),101)==($Pn(),cRt))return!1;if(Yyn(),(i=(n.q?n.q:(hZ(),hZ(),zot))._b(LMt)?uG(oIn(n,LMt),203):uG(oIn(HQ(n),NMt),203))==djt)return!1;if(i!=wjt&&i!=bjt){if(r=uM(pK(Omn(n,ITt))),!(t=uG(oIn(n,CTt),140))&&(t=new OF(r,r,r,r)),c=Dgn(n,(KQn(),_Rt)),t.d+t.a+(c.gc()-1)*r>n.o.b)return!1;if(e=Dgn(n,kRt),t.d+t.a+(e.gc()-1)*r>n.o.b)return!1}return!0}function WXn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;t.Ug("Orthogonal edge routing",1),s=uM(pK(oIn(n,(jYn(),STt)))),e=uM(pK(oIn(n,gTt))),i=uM(pK(oIn(n,vTt))),l=new NW(0,e),d=0,a=new N4(n.b,0),o=null,h=null,u=null,f=null;do{f=(h=a.b0?(b=(w-1)*e,o&&(b+=i),h&&(b+=i),bt||oM(gK(VDn(o,(S_n(),nAt)))))&&(r=0,c+=s.b+e,mv(h.c,s),fan(s=new e4(c,e),i=new dln(0,s.f,s,e)),r=0),0==i.b.c.length||!oM(gK(VDn(R0(o),(S_n(),uAt))))&&(o.f>=i.o&&o.f<=i.f||.5*i.a<=o.f&&1.5*i.a>=o.f)?ipn(i,o):(fan(s,a=new dln(i.s+i.r+e,s.f,s,e)),ipn(a,o)),r=o.i+o.g;return mv(h.c,s),h}function uVn(n){var t,e,i,r;if(!(null==n.b||n.b.length<=2||n.a)){for(t=0,r=0;r=n.b[r+1])r+=2;else{if(!(e0)for(i=new Z_(uG(Y9(n.a,c),21)),hZ(),f$(i,new Gd(t)),r=new N4(c.b,0);r.b0&&i>=-6?i>=0?Ex(c,e-t0(n.e),String.fromCharCode(46)):(psn(c,t-1,t-1,"0."),Ex(c,t+1,mvn(Pot,0,-t0(i)-1))):(e-t>=1&&(Ex(c,t,String.fromCharCode(46)),++e),Ex(c,e,String.fromCharCode(69)),i>0&&Ex(c,++e,String.fromCharCode(43)),Ex(c,++e,""+oz(Bsn(i)))),n.g=c.a,n.g))}function dVn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;r=uM(pK(oIn(t,(jYn(),AMt)))),l=4,c=3,M=20/(y=uG(oIn(t,OTt),17).a),b=!1,s=0,o=vZn;do{for(a=1!=s,f=0!=s,T=0,m=0,k=(g=n.a).length;my)?(s=2,o=vZn):0==s?(s=1,o=T):(s=0,o=T):(b=T>=o||o-T0?1:KL(isNaN(r),isNaN(0)))>=0^(oan(I9n),(e.Math.abs(u)<=I9n||0==u||isNaN(u)&&isNaN(0)?0:u<0?-1:u>0?1:KL(isNaN(u),isNaN(0)))>=0)?e.Math.max(u,r):(oan(I9n),(e.Math.abs(r)<=I9n||0==r||isNaN(r)&&isNaN(0)?0:r<0?-1:r>0?1:KL(isNaN(r),isNaN(0)))>0?e.Math.sqrt(u*u+r*r):-e.Math.sqrt(u*u+r*r))}function vVn(n,t){var e,i,r,c,a;if(t)if(!n.a&&(n.a=new ck),2!=n.e)if(1!=t.e)0!=(a=n.a.a.c.length)?0!=(c=uG(DQ(n.a,a-1),122)).e&&10!=c.e||0!=t.e&&10!=t.e?Vv(n.a,t):(0==t.e||t.Mm().length,0==c.e?(e=new zM,(i=c.Km())>=P0n?zA(e,Ogn(i)):TQ(e,i&D1n),c=new F1(10,null,0),Gz(n.a,c,a-1)):(c.Mm().length,zA(e=new zM,c.Mm())),0==t.e?(i=t.Km())>=P0n?zA(e,Ogn(i)):TQ(e,i&D1n):zA(e,t.Mm()),uG(c,530).b=e.a):Vv(n.a,t);else for(r=0;r1&&(u=s.Hg(u,n.a,o));return 1==u.c.length?uG(Vq(u,u.c.length-1),238):2==u.c.length?tVn((u3(0,u.c.length),uG(u.c[0],238)),(u3(1,u.c.length),uG(u.c[1],238)),a,c):null}function EVn(n,t,e){var i,r,c,a,o,u,s;for(e.Ug("Find roots",1),n.a.c.length=0,r=Fkn(t.b,0);r.b!=r.d.c;)0==(i=uG(I6(r),40)).b.b&&(kfn(i,(OQn(),UPt),(qx(),!0)),kD(n.a,i));switch(n.a.c.length){case 0:kfn(c=new wln(0,t,"DUMMY_ROOT"),(OQn(),UPt),(qx(),!0)),kfn(c,jPt,!0),aq(t.b,c);break;case 1:break;default:for(a=new wln(0,t,H9n),u=new Ww(n.a);u.a=e.Math.abs(r.b)?(r.b=0,a.d+a.a>o.d&&a.do.c&&a.c0){if(t=new AA(n.i,n.g),c=(e=n.i)<100?null:new cj(e),n.Tj())for(i=0;i0){for(o=n.g,s=n.i,z9(n),c=s<100?null:new cj(s),i=0;i>13|(15&n.m)<<9,r=n.m>>4&8191,c=n.m>>17|(255&n.h)<<5,a=(1048320&n.h)>>8,g=i*(o=8191&t.l),p=r*o,m=c*o,v=a*o,0!=(u=t.l>>13|(15&t.m)<<9)&&(g+=e*u,p+=i*u,m+=r*u,v+=c*u),0!=(s=t.m>>4&8191)&&(p+=e*s,m+=i*s,v+=r*s),0!=(h=t.m>>17|(255&t.h)<<5)&&(m+=e*h,v+=i*h),0!=(f=(1048320&t.h)>>8)&&(v+=e*f),b=((d=e*o)>>22)+(g>>9)+((262143&p)<<4)+((31&m)<<17),w=(p>>18)+(m>>5)+((4095&v)<<8),w+=(b+=(l=(d&f0n)+((511&g)<<13))>>22)>>22,p$(l&=f0n,b&=f0n,w&=l0n)}function AVn(n){var t,i,r,c,a,o,u;if(0!=(u=uG(Vq(n.j,0),12)).g.c.length&&0!=u.e.c.length)throw hv(new kM("Interactive layout does not support NORTH/SOUTH ports with incoming _and_ outgoing edges."));if(0!=u.g.c.length){for(a=M0n,i=new Ww(u.g);i.a4){if(!n.fk(t))return!1;if(n.al()){if(o=(e=(i=uG(t,54)).Eh())==n.e&&(n.ml()?i.yh(i.Fh(),n.il())==n.jl():-1-i.Fh()==n.Lj()),n.nl()&&!o&&!e&&i.Jh())for(r=0;r0&&nAn(n,o,h);for(r=new Ww(h);r.an.d[r.p]&&(e+=J8(n.b,i)*uG(a.b,17).a,A6(n.a,xwn(i)));for(;!LM(n.a);)lin(n.b,uG(xz(n.a),17).a)}return e}function DVn(n,t){var e,i,r,c,a,o,u,s,h,f;if(h=uG(oIn(n,(GYn(),Fpt)),64),i=uG(Vq(n.j,0),12),h==(KQn(),yRt)?NLn(i,KRt):h==KRt&&NLn(i,yRt),uG(oIn(t,(jYn(),DMt)),181).Hc((Qmn(),JRt))){if(u=uM(pK(oIn(n,TTt))),s=uM(pK(oIn(n,jTt))),a=uM(pK(oIn(n,yTt))),(o=uG(oIn(t,nTt),21)).Hc((eNn(),wRt)))for(e=s,f=n.o.a/2-i.n.a,c=new Ww(i.f);c.a0&&(s=n.n.a/c);break;case 2:case 4:(r=n.i.o.b)>0&&(s=n.n.b/r)}kfn(n,(GYn(),bmt),s)}if(u=n.o,a=n.a,i)a.a=i.a,a.b=i.b,n.d=!0;else if(t!=uRt&&t!=sRt&&o!=FRt)switch(o.g){case 1:a.a=u.a/2;break;case 2:a.a=u.a,a.b=u.b/2;break;case 3:a.a=u.a/2,a.b=u.b;break;case 4:a.b=u.b/2}else a.a=u.a/2,a.b=u.b/2}function _Vn(n){var t,e,i,r,c,a,o,u,s,h;if(n.Pj())if(h=n.Ej(),u=n.Qj(),h>0)if(t=new Hun(n.pj()),c=(e=h)<100?null:new cj(e),QK(n,e,t.g),r=1==e?n.Ij(4,Vrn(t,0),null,0,u):n.Ij(6,t,null,-1,u),n.Mj()){for(i=new DD(t);i.e!=i.i.gc();)c=n.Oj(Zkn(i),c);c?(c.nj(r),c.oj()):n.Jj(r)}else c?(c.nj(r),c.oj()):n.Jj(r);else QK(n,n.Ej(),n.Fj()),n.Jj(n.Ij(6,(hZ(),Vot),null,-1,u));else if(n.Mj())if((h=n.Ej())>0){for(o=n.Fj(),s=h,QK(n,h,o),c=s<100?null:new cj(s),i=0;i1&&EX(a)*jX(a)/2>o[0]){for(c=0;co[c];)++c;f=new Jrn(new C2(b,0,c+1)),h=EX(a)/jX(a),u=KJn(f,t,new Dk,e,i,r,h),JF(dL(f.e),u),kG(_Cn(l,f),D0n),_jn(l,new C2(b,c+1,b.c.length)),b.c.length=0,s=0,VX(o,o.length,0)}else null!=(0==l.b.c.length?null:Vq(l.b,0))&&Con(l,0),s>0&&(o[s]=o[s-1]),o[s]+=EX(a)*jX(a),++s,mv(b.c,a);return b}function HVn(n,t){var e,i,r,c;c=new Z_((e=t.b).j),r=0,(i=e.j).c.length=0,mW(uG(ssn(n.b,(KQn(),yRt),(gon(),Sdt)),15),e),r=cMn(c,r,new Br,i),mW(uG(ssn(n.b,yRt,Edt),15),e),r=cMn(c,r,new $r,i),mW(uG(ssn(n.b,yRt,jdt),15),e),mW(uG(ssn(n.b,kRt,Sdt),15),e),mW(uG(ssn(n.b,kRt,Edt),15),e),r=cMn(c,r,new Hr,i),mW(uG(ssn(n.b,kRt,jdt),15),e),mW(uG(ssn(n.b,KRt,Sdt),15),e),r=cMn(c,r,new Ur,i),mW(uG(ssn(n.b,KRt,Edt),15),e),r=cMn(c,r,new Gr,i),mW(uG(ssn(n.b,KRt,jdt),15),e),mW(uG(ssn(n.b,_Rt,Sdt),15),e),r=cMn(c,r,new Rr,i),mW(uG(ssn(n.b,_Rt,Edt),15),e),mW(uG(ssn(n.b,_Rt,jdt),15),e)}function UVn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;for(o=new Ww(t);o.a.5?p-=2*a*(w-.5):w<.5&&(p+=2*c*(.5-w)),p<(r=o.d.b)&&(p=r),d=o.d.c,p>g.a-d-h&&(p=g.a-d-h),o.n.a=t+p}}function WVn(n){var t,e,i;if((e=uG(oIn(n,(jYn(),gMt)),171))==(Gpn(),Imt)){for(t=new FV(ix(qgn(n).a.Kc(),new h));hDn(t);)if(!F9(uG(N9(t),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to FIRST_SEPARATE, but has at least one incoming edge. FIRST_SEPARATE nodes must not have incoming edges."))}else if(e==Amt)for(i=new FV(ix(Xgn(n).a.Kc(),new h));hDn(i);)if(!F9(uG(N9(i),18)))throw hv(new jM(y6n+ZTn(n)+"' has its layer constraint set to LAST_SEPARATE, but has at least one outgoing edge. LAST_SEPARATE nodes must not have outgoing edges."))}function QVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(n.e&&n.c.c>19&&(t=gfn(t),u=!u),a=kRn(t),c=!1,r=!1,i=!1,n.h==b0n&&0==n.m&&0==n.l){if(r=!0,c=!0,-1!=a)return o=gDn(n,a),u&&Yfn(o),e&&(Qat=p$(0,0,0)),o;n=LL((tin(),Jat)),i=!0,u=!u}else n.h>>19&&(c=!0,n=gfn(n),i=!0,u=!u);return-1!=a?nln(n,a,u,c,e):yEn(n,t)<0?(e&&(Qat=c?gfn(n):p$(n.l,n.m,n.h)),p$(0,0,0)):gUn(i?n:p$(n.l,n.m,n.h),t,u,c,r,e)}function ZVn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w;if(a=n.e,u=t.e,0==a)return t;if(0==u)return n;if((c=n.d)+(o=t.d)==2)return e=E3(n.a[0],L0n),i=E3(t.a[0],L0n),a==u?(w=pV(h=Lgn(e,i)),0==(b=pV(DV(h,32)))?new Z5(a,w):new zz(a,2,Uhn(cT(YHt,1),W1n,28,15,[w,b]))):(cHn(),BA(a<0?$gn(i,e):$gn(e,i),0)?Rmn(a<0?$gn(i,e):$gn(e,i)):hW(Rmn(Men(a<0?$gn(i,e):$gn(e,i)))));if(a==u)l=a,f=c>=o?Cnn(n.a,c,t.a,o):Cnn(t.a,o,n.a,c);else{if(0==(r=c!=o?c>o?1:-1:Hln(n.a,t.a,c)))return cHn(),_ot;1==r?(l=a,f=t7(n.a,c,t.a,o)):(l=u,f=t7(t.a,o,n.a,c))}return K4(s=new zz(l,f.length,f)),s}function nzn(n,t){var e,i,r,c,a,o,u;if(!(n.g>t.f||t.g>n.f)){for(e=0,i=0,a=n.w.a.ec().Kc();a.Ob();)r=uG(a.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),VZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&++e;for(o=n.r.a.ec().Kc();o.Ob();)r=uG(o.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),VZn,8,0,[r.i.n,r.n,r.a])).b,t.g,t.f)&&--e;for(u=t.w.a.ec().Kc();u.Ob();)r=uG(u.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),VZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&++i;for(c=t.r.a.ec().Kc();c.Ob();)r=uG(c.Pb(),12),Wbn(Gfn(Uhn(cT(PNt,1),VZn,8,0,[r.i.n,r.n,r.a])).b,n.g,n.f)&&--i;e=0)return e;switch(sJ(Nen(n,e))){case 2:if(m_("",tdn(n,e.qk()).xe())){if(u=hxn(n,t,o=HJ(Nen(n,e)),BJ(Nen(n,e))))return u;for(a=0,s=(r=AHn(n,t)).gc();a1)throw hv(new vM(dct));for(h=zKn(n.e.Dh(),t),i=uG(n.g,124),a=0;a1,h=new w7(b.b);l$(h.a)||l$(h.b);)l=(s=uG(l$(h.a)?N3(h.a):N3(h.b),18)).c==b?s.d:s.c,e.Math.abs(Gfn(Uhn(cT(PNt,1),VZn,8,0,[l.i.n,l.n,l.a])).b-o.b)>1&&sFn(n,s,o,a,b)}}function ozn(n){var t,i,r,c,a,o;if(c=new N4(n.e,0),r=new N4(n.a,0),n.d)for(i=0;i$9n;){for(a=t,o=0;e.Math.abs(t-a)<$9n;)++o,t=uM((MK(c.b0),c.a.Xb(c.c=--c.b),VGn(n,n.b-o,a,r,c),MK(c.b0),r.a.Xb(r.c=--r.b)}if(!n.d)for(i=0;i0?(n.f[s.p]=l/(s.e.c.length+s.g.c.length),n.c=e.Math.min(n.c,n.f[s.p]),n.b=e.Math.max(n.b,n.f[s.p])):o&&(n.f[s.p]=l)}}function hzn(n){n.b=null,n.bb=null,n.fb=null,n.qb=null,n.a=null,n.c=null,n.d=null,n.e=null,n.f=null,n.n=null,n.M=null,n.L=null,n.Q=null,n.R=null,n.K=null,n.db=null,n.eb=null,n.g=null,n.i=null,n.j=null,n.k=null,n.gb=null,n.o=null,n.p=null,n.q=null,n.r=null,n.$=null,n.ib=null,n.S=null,n.T=null,n.t=null,n.s=null,n.u=null,n.v=null,n.w=null,n.B=null,n.A=null,n.C=null,n.D=null,n.F=null,n.G=null,n.H=null,n.I=null,n.J=null,n.P=null,n.Z=null,n.U=null,n.V=null,n.W=null,n.X=null,n.Y=null,n._=null,n.ab=null,n.cb=null,n.hb=null,n.nb=null,n.lb=null,n.mb=null,n.ob=null,n.pb=null,n.jb=null,n.kb=null,n.N=!1,n.O=!1}function fzn(n,t,e){var i,r;for(e.Ug("Graph transformation ("+n.a+")",1),r=T3(t.a),i=new Ww(t.b);i.a=o.b.c)&&(o.b=t),(!o.c||t.c<=o.c.c)&&(o.d=o.c,o.c=t),(!o.e||t.d>=o.e.d)&&(o.e=t),(!o.f||t.d<=o.f.d)&&(o.f=t);return i=new cyn((Xhn(),Flt)),O4(n,zlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[i]))),a=new cyn(Hlt),O4(n,Vlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[a]))),r=new cyn(_lt),O4(n,Xlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[r]))),c=new cyn(Blt),O4(n,qlt,new IM(Uhn(cT(Klt,1),EZn,382,0,[c]))),jRn(i.c,Flt),jRn(r.c,_lt),jRn(c.c,Blt),jRn(a.c,Hlt),o.a.c.length=0,Ohn(o.a,i.c),Ohn(o.a,Spn(r.c)),Ohn(o.a,c.c),Ohn(o.a,Spn(a.c)),o}function wzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d;for(t.Ug(snt,1),w=uM(pK(VDn(n,(lBn(),POt)))),o=uM(pK(VDn(n,(S_n(),bAt)))),u=uG(VDn(n,hAt),107),Non((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a)),f=oVn((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a),w,o),!n.a&&(n.a=new fz(bFt,n,10,11)),h=new Ww(f);h.a0&&(n.a=o+(l-1)*r,t.c.b+=n.a,t.f.b+=n.a),0!=b.a.gc()&&(l=Yzn(new NW(1,r),t,b,w,t.f.b+o-t.c.b))>0&&(t.f.b+=o+(l-1)*r)}function gzn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(f=uM(pK(oIn(n,(jYn(),mTt)))),r=uM(pK(oIn(n,RTt))),kfn(b=new Qu,mTt,f+r),m=(h=t).d,g=h.c.i,v=h.d.i,p=GL(g.c),k=GL(v.c),c=new Zm,l=p;l<=k;l++)Hb(u=new gMn(n),(VIn(),wbt)),kfn(u,(GYn(),rmt),h),kfn(u,JMt,($Pn(),cRt)),kfn(u,kTt,b),w=uG(Vq(n.b,l),30),l==p?$jn(u,w.a.c.length-i,w):a2(u,w),(y=uM(pK(oIn(h,tMt))))<0&&kfn(h,tMt,y=0),u.o.b=y,d=e.Math.floor(y/2),NLn(o=new lOn,(KQn(),_Rt)),o2(o,u),o.n.b=d,NLn(s=new lOn,kRt),o2(s,u),s.n.b=d,u2(h,o),Vsn(a=new UZ,h),kfn(a,bMt,null),c2(a,s),u2(a,m),IEn(u,h,a),mv(c.c,a),h=a;return c}function pzn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(o=uG(yOn(n,(KQn(),_Rt)).Kc().Pb(),12).e,f=uG(yOn(n,kRt).Kc().Pb(),12).g,a=o.c.length,g=n3(uG(Vq(n.j,0),12));a-- >0;){for(u3(0,o.c.length),b=uG(o.c[0],18),u3(0,f.c.length),r=Ten((i=uG(f.c[0],18)).d.e,i,0),w6(b,i.d,r),c2(i,null),u2(i,null),l=b.a,t&&aq(l,new eN(g)),e=Fkn(i.a,0);e.b!=e.d.c;)aq(l,new eN(uG(I6(e),8)));for(d=b.b,h=new Ww(i.b);h.aa)&&Fz(n.b,uG(g.b,18));++o}c=a}}}function vzn(n,t){var e;if(null==t||m_(t,IZn))return null;if(0==t.length&&n.k!=(lAn(),pNt))return null;switch(n.k.g){case 1:return Bvn(t,Fnt)?(qx(),eot):Bvn(t,_nt)?(qx(),tot):null;case 2:try{return xwn(mUn(t,j1n,vZn))}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 4:try{return YIn(t)}catch(i){if(F$(i=Ehn(i),130))return null;throw hv(i)}case 3:return t;case 5:return wbn(n),NNn(n,t);case 6:return wbn(n),Lxn(n,n.a,t);case 7:try{return(e=Q$n(n)).cg(t),e}catch(i){if(F$(i=Ehn(i),33))return null;throw hv(i)}default:throw hv(new kM("Invalid type set for this layout option."))}}function kzn(n){var t;switch(n.d){case 1:if(n.Sj())return-2!=n.o;break;case 2:if(n.Sj())return-2==n.o;break;case 3:case 5:case 4:case 6:case 7:return n.o>-2;default:return!1}switch(t=n.Rj(),n.p){case 0:return null!=t&&oM(gK(t))!=HA(n.k,0);case 1:return null!=t&&uG(t,222).a!=pV(n.k)<<24>>24;case 2:return null!=t&&uG(t,180).a!=(pV(n.k)&D1n);case 6:return null!=t&&HA(uG(t,168).a,n.k);case 5:return null!=t&&uG(t,17).a!=pV(n.k);case 7:return null!=t&&uG(t,191).a!=pV(n.k)<<16>>16;case 3:return null!=t&&uM(pK(t))!=n.j;case 4:return null!=t&&uG(t,161).a!=n.j;default:return null==t?null!=n.n:!udn(t,n.n)}}function yzn(n,t,e){var i,r,c,a;return n.ol()&&n.nl()&&xA(a=Cz(n,uG(e,58)))!==xA(e)?(n.xj(t),n.Dj(t,Atn(n,t,a)),n.al()&&(r=uG(e,54),c=n.ml()?n.kl()?r.Th(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),null):r.Th(n.b,emn(r.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,null):r.Th(n.b,-1-n.Lj(),null,null),!uG(a,54).Ph()&&(i=uG(a,54),c=n.ml()?n.kl()?i.Rh(n.b,lMn(uG(ern(e1(n.b),n.Lj()),19)).n,uG(ern(e1(n.b),n.Lj()).Hk(),29).kk(),c):i.Rh(n.b,emn(i.Dh(),lMn(uG(ern(e1(n.b),n.Lj()),19))),null,c):i.Rh(n.b,-1-n.Lj(),null,c)),c&&c.oj()),uN(n.b)&&n.Jj(n.Ij(9,e,a,t,!1)),a):e}function Mzn(n){var t,e,i,r,c,a,o,u,s,h;for(i=new Zm,a=new Ww(n.e.a);a.a0&&(o=e.Math.max(o,run(n.C.b+r.d.b,c))),f=r,l=c,b=a;n.C&&n.C.c>0&&(w=b+n.C.c,h&&(w+=f.d.c),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(l-1)<=Z2n||1==l||isNaN(l)&&isNaN(1)?0:w/(1-l)))),i.n.b=0,i.a.a=o}function jzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w;if(i=uG(AJ(n.b,t),127),(s=uG(uG(Y9(n.r,t),21),87)).dc())return i.n.d=0,void(i.n.a=0);for(h=n.u.Hc((eNn(),wRt)),o=0,n.A.Hc((Qmn(),JRt))&&kBn(n,t),u=s.Kc(),f=null,b=0,l=0;u.Ob();)a=uM(pK((r=uG(u.Pb(),117)).b.of((Gx(),bht)))),c=r.b.Mf().b,f?(w=l+f.d.a+n.w+r.d.d,o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-a)<=Z2n||b==a||isNaN(b)&&isNaN(a)?0:w/(a-b)))):n.C&&n.C.d>0&&(o=e.Math.max(o,run(n.C.d+r.d.d,a))),f=r,b=a,l=c;n.C&&n.C.a>0&&(w=l+n.C.a,h&&(w+=f.d.a),o=e.Math.max(o,(YN(),oan(Z2n),e.Math.abs(b-1)<=Z2n||1==b||isNaN(b)&&isNaN(1)?0:w/(1-b)))),i.n.d=0,i.a.b=o}function Ezn(n,t,e,i,r,c,a,o){var u,s,h,f,l,b,w,d;if(b=!1,u=cKn(e.q,t.f+t.b-e.q.f),l=i.f>t.b&&o,h=uXn(i,d=r-(e.q.e+u-a),!1).a,l&&h>i.f)return!1;if(l){for(f=0,w=new Ww(t.d);w.a=(u3(c,n.c.length),uG(n.c[c],186)).e,!(!l&&h>t.b&&!s)&&((s||l||h<=t.b)&&(s&&h>t.b?(e.d=h,dtn(e,EOn(e,h))):(USn(e.q,u),e.c=!0),dtn(i,r-(e.s+e.r)),oMn(i,e.q.e+e.q.d,t.f),fan(t,i),n.c.length>c&&(uEn((u3(c,n.c.length),uG(n.c[c],186)),i),0==(u3(c,n.c.length),uG(n.c[c],186)).a.c.length&&i7(n,c)),b=!0),b))}function Szn(n,t,e){var i,r,c,a,o,u;for(this.g=n,o=t.d.length,u=e.d.length,this.d=Inn(pbt,e6n,10,o+u,0,1),a=0;a0?Rrn(this,this.f/this.a):null!=oD(t.g,t.d[0]).a&&null!=oD(e.g,e.d[0]).a?Rrn(this,(uM(oD(t.g,t.d[0]).a)+uM(oD(e.g,e.d[0]).a))/2):null!=oD(t.g,t.d[0]).a?Rrn(this,oD(t.g,t.d[0]).a):null!=oD(e.g,e.d[0]).a&&Rrn(this,oD(e.g,e.d[0]).a)}function Pzn(n,t){var e,i,r,c,a,o,u,s,h;for(n.a=new wQ(efn(axt)),i=new Ww(t.a);i.a=1&&(g-a>0&&f>=0?(u.n.a+=d,u.n.b+=c*a):g-a<0&&h>=0&&(u.n.a+=d*g,u.n.b+=c));n.o.a=t.a,n.o.b=t.b,kfn(n,(jYn(),DMt),(Qmn(),new nB(i=uG(Mj(sKt),9),uG(MF(i,i.length),9),0)))}function Lzn(n,t,e,i,r,c){if(null!=t&&mpn(t,YFt,ZFt))throw hv(new vM("invalid scheme: "+t));if(!(n||null!=e&&-1==xL(e,$Cn(35))&&e.length>0&&(s3(0,e.length),47!=e.charCodeAt(0))))throw hv(new vM("invalid opaquePart: "+e));if(n&&(null==t||!ZE(UFt,t.toLowerCase()))&&null!=e&&mpn(e,n_t,t_t))throw hv(new vM(zit+e));if(n&&null!=t&&ZE(UFt,t.toLowerCase())&&!bPn(e))throw hv(new vM(zit+e));if(!Ppn(i))throw hv(new vM("invalid device: "+i));if(!Jbn(r))throw hv(new vM(null==r?"invalid segments: null":"invalid segment: "+Lbn(r)));if(null!=c&&-1!=xL(c,$Cn(35)))throw hv(new vM("invalid query: "+c))}function Nzn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(i.Ug("Network simplex layering",1),n.b=t,p=4*uG(oIn(t,(jYn(),OTt)),17).a,(g=n.b.a).c.length<1)i.Vg();else{for(d=null,c=Fkn(a=xHn(n,g),0);c.b!=c.d.c;){for(r=uG(I6(c),15),u=p*t0(e.Math.sqrt(r.gc())),JHn(kT(MT(yT(_B(o=wUn(r)),u),d),!0),i.eh(1)),l=n.b.b,w=new Ww(o.a);w.a1)for(d=Inn(YHt,W1n,28,n.b.b.c.length,15,1),f=0,h=new Ww(n.b.b);h.a0?(Ikn(n,e,0),e.a+=String.fromCharCode(i),Ikn(n,e,r=qvn(t,c)),c+=r-1):39==i?c+10&&w.a<=0){u.c.length=0,mv(u.c,w);break}(b=w.i-w.d)>=o&&(b>o&&(u.c.length=0,o=b),mv(u.c,w))}0!=u.c.length&&(a=uG(Vq(u,iMn(r,u.c.length)),118),v.a.Bc(a),a.g=h++,UGn(a,t,e,i),u.c.length=0)}for(g=n.c.length+1,l=new Ww(n);l.aT0n||t.o==wSt&&s=o&&r<=u)o<=r&&c<=u?(e[h++]=r,e[h++]=c,i+=2):o<=r?(e[h++]=r,e[h++]=u,n.b[i]=u+1,a+=2):c<=u?(e[h++]=o,e[h++]=c,i+=2):(e[h++]=o,e[h++]=u,n.b[i]=u+1);else{if(!(uT1n)&&u<10);ET(n.c,new yt),_zn(n),Yz(n.c),lzn(n.f)}function Xzn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(i=uG(oIn(n,(jYn(),JMt)),101),o=n.f,a=n.d,u=o.a+a.b+a.c,s=0-a.d-n.c.b,f=o.b+a.d+a.a-n.c.b,h=new Zm,l=new Zm,c=new Ww(t);c.a=2){for(a=uG(I6(u=Fkn(e,0)),8),o=uG(I6(u),8);o.a0&&hfn(u,!0,(xdn(),YDt)),a.k==(VIn(),lbt)&&XQ(u),vJ(n.f,a,t)):((s=(i=uG(pZ(Ggn(a)),18)).c.i)==a&&(s=i.d.i),f=new WO(s,YF(D$(a.n),s.n)),vJ(n.b,a,f))}function Wzn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(i=uG(oIn(n,(OQn(),RPt)),27),u=vZn,s=vZn,a=j1n,o=j1n,m=Fkn(n.b,0);m.b!=m.d.c;)l=(g=uG(I6(m),40)).e,b=g.f,u=e.Math.min(u,l.a-b.a/2),s=e.Math.min(s,l.b-b.b/2),a=e.Math.max(a,l.a+b.a/2),o=e.Math.max(o,l.b+b.b/2);for(f=uG(VDn(i,(QGn(),pCt)),107),p=Fkn(n.b,0);p.b!=p.d.c;)F$(h=oIn(g=uG(I6(p),40),RPt),207)&&(kN(r=uG(h,27),g.e.a,g.e.b),aKn(r,g));for(d=Fkn(n.a,0);d.b!=d.d.c;)w=uG(I6(d),65),(t=uG(oIn(w,RPt),74))&&sqn(w.a,JFn(t,!0,!0));v=a-u+(f.b+f.c),c=o-s+(f.d+f.a),oM(gK(VDn(i,(XYn(),H$t))))||ZQn(i,v,c,!1,!1),Myn(i,h$t,v-(f.b+f.c)),Myn(i,s$t,c-(f.d+f.a))}function Qzn(n,t){var e,i,r,c,a,o,u,s,f;for(o=!0,r=0,u=n.g[t.p],s=t.o.b+n.o,e=n.d[t.p][2],Y8(n.b,u,xwn(uG(Vq(n.b,u),17).a-1+e)),Y8(n.c,u,uM(pK(Vq(n.c,u)))-s+e*n.f),++u>=n.j?(++n.j,kD(n.b,xwn(1)),kD(n.c,s)):(i=n.d[t.p][1],Y8(n.b,u,xwn(uG(Vq(n.b,u),17).a+1-i)),Y8(n.c,u,uM(pK(Vq(n.c,u)))+s-i*n.f)),(n.r==(THn(),Ijt)&&(uG(Vq(n.b,u),17).a>n.k||uG(Vq(n.b,u-1),17).a>n.k)||n.r==Ljt&&(uM(pK(Vq(n.c,u)))>n.n||uM(pK(Vq(n.c,u-1)))>n.n))&&(o=!1),c=new FV(ix(qgn(t).a.Kc(),new h));hDn(c);)a=uG(N9(c),18).c.i,n.g[a.p]==u&&(r+=uG((f=Qzn(n,a)).a,17).a,o=o&&oM(gK(f.b)));return n.g[t.p]=u,new WO(xwn(r+=n.d[t.p][0]),(qx(),!!o))}function Jzn(n,t){var e,i;uM(pK(oIn(t,(jYn(),dTt))))<2&&kfn(t,dTt,2),uG(oIn(t,Byt),88)==(xdn(),ZDt)&&kfn(t,Byt,pgn(t)),0==(e=uG(oIn(t,sTt),17)).a?kfn(t,(GYn(),dmt),new Upn):kfn(t,(GYn(),dmt),new v8(e.a)),null==gK(oIn(t,OMt))&&kfn(t,OMt,(qx(),xA(oIn(t,zyt))===xA((_gn(),uxt)))),kS(new fX(null,new h3(t.a,16)),new Hd(n)),kS(sin(new fX(null,new h3(t.b,16)),new dt),new Ud(n)),i=new Czn(t),kfn(t,(GYn(),kmt),i),_J(n.a),Jz(n.a,(uIn(),Tlt),uG(oIn(t,Fyt),188)),Jz(n.a,jlt,uG(oIn(t,MMt),188)),Jz(n.a,Elt,uG(oIn(t,Kyt),188)),Jz(n.a,Slt,uG(oIn(t,$Mt),188)),Jz(n.a,Plt,Rsn(uG(oIn(t,zyt),223))),ZL(n.a,iYn(t)),kfn(t,wmt,QVn(n.a,t))}function Yzn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m;for(l=new Ym,o=new Zm,HAn(n,i,n.d.Ag(),o,l),HAn(n,r,n.d.Bg(),o,l),n.b=.2*(g=DDn(sin(new fX(null,new h3(o,16)),new pa)),p=DDn(sin(new fX(null,new h3(o,16)),new ma)),e.Math.min(g,p)),a=0,u=0;u=2&&(m=sRn(o,!0,b),!n.e&&(n.e=new pp(n)),xvn(n.e,m,o,n.b)),BPn(o,b),oWn(o),w=-1,f=new Ww(o);f.ao)}function tWn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(h=M0n,f=M0n,u=T0n,s=T0n,b=new Ww(t.i);b.a-1){for(r=Fkn(o,0);r.b!=r.d.c;)(i=uG(I6(r),131)).v=a;for(;0!=o.b;)for(t=new Ww((i=uG(Kjn(o,0),131)).i);t.a-1){for(c=new Ww(o);c.a0||(Yb(u,e.Math.min(u.o,r.o-1)),Jb(u,u.i-1),0==u.i&&mv(o.c,u))}}function uWn(n,t,i,r,c){var a,o,u,s;return s=M0n,o=!1,a=!!(u=rXn(n,YF(new MO(t.a,t.b),n),JF(new MO(i.a,i.b),c),YF(new MO(r.a,r.b),i)))&&!(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt||e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt),(u=rXn(n,YF(new MO(t.a,t.b),n),i,c))&&((e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a?s=e.Math.min(s,NQ(YF(u,i))):o=!0),(u=rXn(n,YF(new MO(t.a,t.b),n),r,c))&&(o||(e.Math.abs(u.a-n.a)<=Hnt&&e.Math.abs(u.b-n.b)<=Hnt)==(e.Math.abs(u.a-t.a)<=Hnt&&e.Math.abs(u.b-t.b)<=Hnt)||a)&&(s=e.Math.min(s,NQ(YF(u,r)))),s}function sWn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,$4n),D4n),"Minimizes the stress within a layout using stress majorization. Stress exists if the euclidean distance between a pair of nodes doesn't match their graph theoretic distance, that is, the shortest path between the two nodes. The method allows to specify individual edge lengths."),new gt),c4n))),U4(n,$4n,f4n,Jkn(olt)),U4(n,$4n,b4n,(qx(),!0)),U4(n,$4n,p4n,Jkn(hlt)),U4(n,$4n,x4n,Jkn(flt)),U4(n,$4n,g4n,Jkn(llt)),U4(n,$4n,m4n,Jkn(slt)),U4(n,$4n,w4n,Jkn(blt)),U4(n,$4n,v4n,Jkn(wlt)),U4(n,$4n,I4n,Jkn(alt)),U4(n,$4n,A4n,Jkn(rlt)),U4(n,$4n,L4n,Jkn(clt)),U4(n,$4n,N4n,Jkn(ult)),U4(n,$4n,O4n,Jkn(ilt))}function hWn(n){var t,e,i,r,c,a,o,u;for(t=null,i=new Ww(n);i.a0&&0==e.c&&(!t&&(t=new Zm),mv(t.c,e));if(t)for(;0!=t.c.length;){if((e=uG(i7(t,0),239)).b&&e.b.c.length>0)for(!e.b&&(e.b=new Zm),c=new Ww(e.b);c.aTen(n,e,0))return new WO(r,e)}else if(uM(oD(r.g,r.d[0]).a)>uM(oD(e.g,e.d[0]).a))return new WO(r,e);for(o=(!e.e&&(e.e=new Zm),e.e).Kc();o.Ob();)!(a=uG(o.Pb(),239)).b&&(a.b=new Zm),o3(0,(u=a.b).c.length),pC(u.c,0,e),a.c==u.c.length&&mv(t.c,a)}return null}function fWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(t.Ug("Interactive crossing minimization",1),a=0,c=new Ww(n.b);c.a0&&(e+=u.n.a+u.o.a/2,++f),b=new Ww(u.j);b.a0&&(e/=f),g=Inn(eUt,I0n,28,i.a.c.length,15,1),o=0,s=new Ww(i.a);s.a=o&&r<=u)o<=r&&c<=u?i+=2:o<=r?(n.b[i]=u+1,a+=2):c<=u?(e[h++]=r,e[h++]=o-1,i+=2):(e[h++]=r,e[h++]=o-1,n.b[i]=u+1,a+=2);else{if(!(u2?(Ohn(s=new Zm,new C2(w,1,w.b)),Vsn(d=new pDn(vYn(s,g+n.a)),t),mv(i.c,d)):d=uG(cQ(n.b,r?bIn(t):gIn(t)),272),o=bIn(t),r&&(o=gIn(t)),a=GOn(b,o),u=g+n.a,a.a?(u+=e.Math.abs(b.b-h.b),l=new MO(h.a,(h.b+b.b)/2)):(u+=e.Math.abs(b.a-h.a),l=new MO((h.a+b.a)/2,h.b)),vJ(r?n.d:n.c,t,new bTn(d,a,l,u)),vJ(n.b,t,d),!t.n&&(t.n=new fz(lFt,t,1,7)),f=new DD(t.n);f.e!=f.i.gc();)c=nHn(n,uG(Zkn(f),135),!0,0,0),mv(i.c,c)}function wWn(n){var t,e,i,r,c,a,o;if(!n.A.dc()){if(n.A.Hc((Qmn(),QRt))&&(uG(AJ(n.b,(KQn(),yRt)),127).k=!0,uG(AJ(n.b,KRt),127).k=!0,t=n.q!=($Pn(),aRt)&&n.q!=cRt,Db(uG(AJ(n.b,kRt),127),t),Db(uG(AJ(n.b,_Rt),127),t),Db(n.g,t),n.A.Hc(JRt)&&(uG(AJ(n.b,yRt),127).j=!0,uG(AJ(n.b,KRt),127).j=!0,uG(AJ(n.b,kRt),127).k=!0,uG(AJ(n.b,_Rt),127).k=!0,n.g.k=!0)),n.A.Hc(WRt))for(n.a.j=!0,n.a.k=!0,n.g.j=!0,n.g.k=!0,o=n.B.Hc((aUn(),cKt)),c=0,a=(r=Nkn()).length;c0),c=uG(s.a.Xb(s.c=--s.b),18);c!=i&&s.b>0;)n.a[c.p]=!0,n.a[i.p]=!0,MK(s.b>0),c=uG(s.a.Xb(s.c=--s.b),18);s.b>0&&LQ(s)}}function pWn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;if(!n.b)return!1;for(a=null,l=null,r=1,(u=new _nn(null,null)).a[1]=n.b,f=u;f.a[r];)s=r,o=l,l=f,f=f.a[r],r=(i=n.a.Ne(t,f.d))<0?0:1,0==i&&(!e.c||OJ(f.e,e.d))&&(a=f),f&&f.b||NM(f.a[r])||(NM(f.a[1-r])?l=l.a[s]=Ton(f,r):NM(f.a[1-r])||(b=l.a[1-s])&&(NM(b.a[1-s])||NM(b.a[s])?(c=o.a[1]==l?1:0,NM(b.a[s])?o.a[c]=P4(l,s):NM(b.a[1-s])&&(o.a[c]=Ton(l,s)),f.b=o.a[c].b=!0,o.a[c].a[0].b=!1,o.a[c].a[1].b=!1):(l.b=!1,b.b=!0,f.b=!0)));return a&&(e.b=!0,e.d=a.e,f!=a&&(YCn(n,u,a,h=new _nn(f.d,f.e)),l==a&&(l=h)),l.a[l.a[1]==f?1:0]=f.a[f.a[0]?0:1],--n.c),n.b=u.a[1],n.b&&(n.b.b=!1),e.b}function mWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;for(c=new Ww(n.a.a.b);c.a0?r-=864e5:r+=864e5,u=new DK(Lgn(Bsn(t.q.getTime()),r))),h=new QM,s=n.a.length,c=0;c=97&&i<=122||i>=65&&i<=90){for(a=c+1;a=s)throw hv(new vM("Missing trailing '"));a+1=14&&o<=16?F$(i,183)?o7(e,PLn(uG(i,183))):F$(i,195)?o7(e,xPn(uG(i,195))):F$(i,201)?o7(e,aOn(uG(i,201))):F$(i,2111)?o7(e,RPn(uG(i,2111))):F$(i,53)?o7(e,SLn(uG(i,53))):F$(i,376)?o7(e,aNn(uG(i,376))):F$(i,846)?o7(e,ELn(uG(i,846))):F$(i,109)&&o7(e,jLn(uG(i,109))):t.a._b(i)?(e.a?JA(e.a,e.b):e.a=new lx(e.d),WA(e.a,"[...]")):o7(e,MWn(Kcn(i),new oX(t))):o7(e,null==i?IZn:cpn(i));return e.a?0==e.e.length?e.a.a:e.a.a+""+e.e:e.c}function TWn(n,t){var e,i,r,c;c=n.F,null==t?(n.F=null,sbn(n,null)):(n.F=(tJ(t),t),-1!=(i=xL(t,$Cn(60)))?(Knn(0,i,t.length),r=t.substr(0,i),-1==xL(t,$Cn(46))&&!m_(r,dZn)&&!m_(r,lrt)&&!m_(r,brt)&&!m_(r,wrt)&&!m_(r,drt)&&!m_(r,grt)&&!m_(r,prt)&&!m_(r,mrt)&&(r=vrt),-1!=(e=ax(t,$Cn(62)))&&(r+=""+(s3(e+1,t.length+1),t.substr(e+1))),sbn(n,r)):(r=t,-1==xL(t,$Cn(46))&&(-1!=(i=xL(t,$Cn(91)))&&(Knn(0,i,t.length),r=t.substr(0,i)),m_(r,dZn)||m_(r,lrt)||m_(r,brt)||m_(r,wrt)||m_(r,drt)||m_(r,grt)||m_(r,prt)||m_(r,mrt)?r=t:(r=vrt,-1!=i&&(r+=""+(s3(i,t.length+1),t.substr(i))))),sbn(n,r),r==t&&(n.F=n.D))),4&n.Db&&!(1&n.Db)&&Msn(n,new lz(n,1,5,c,t))}function jWn(n,t){var e,i,r,c,a,o,u,s;if(s3(o=t.length-1,t.length),93==(a=t.charCodeAt(o))){if((c=xL(t,$Cn(91)))>=0)return r=fpn(n,(Knn(1,c,t.length),t.substr(1,c-1))),Knn(c+1,o,t.length),GJn(n,t.substr(c+1,o-(c+1)),r)}else{if(e=-1,null==oot&&(oot=new RegExp("\\d")),oot.test(String.fromCharCode(a))&&(e=T_(t,$Cn(46),o-1))>=0){i=uG(U9(n,jrn(n,(Knn(1,e,t.length),t.substr(1,e-1))),!1),61),u=0;try{u=mUn((s3(e+1,t.length+1),t.substr(e+1)),j1n,vZn)}catch(h){throw F$(h=Ehn(h),130)?hv(new Pen(h)):hv(h)}if(u>16==-10?e=uG(n.Cb,292).Yk(t,e):n.Db>>16==-15&&(!t&&(YYn(),t=N_t),!o&&(YYn(),o=N_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,13,o,t,Hyn(Aen(uG(n.Cb,62)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,90))n.Db>>16==-23&&(F$(t,90)||(YYn(),t=x_t),F$(o,90)||(YYn(),o=x_t),n.Cb.Yh()&&(a=new Ken(n.Cb,1,10,o,t,Hyn(V5(uG(n.Cb,29)),n),!1),e?e.nj(a):e=a));else if(F$(n.Cb,457))for(!(c=uG(n.Cb,850)).b&&(c.b=new Um(new ty)),r=new Gm(new bsn(new Nw(c.b.a).a));r.a.b;)e=PWn(i=uG(von(r.a).ld(),89),bRn(i,c),e);return e}function CWn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(a=oM(gK(VDn(n,(jYn(),sMt)))),l=uG(VDn(n,nTt),21),u=!1,s=!1,f=new DD((!n.c&&(n.c=new fz(wFt,n,9,9)),n.c));!(f.e==f.i.gc()||u&&s);){for(c=uG(Zkn(f),123),o=0,r=Oz(Vcn(Uhn(cT(vat,1),EZn,20,0,[(!c.d&&(c.d=new f_(aFt,c,8,5)),c.d),(!c.e&&(c.e=new f_(aFt,c,7,4)),c.e)])));hDn(r)&&(i=uG(N9(r),74),h=a&&BNn(i)&&oM(gK(VDn(i,hMt))),e=LVn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),c)?n==R0(lCn(uG(Vrn((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c),0),84))):n==R0(lCn(uG(Vrn((!i.b&&(i.b=new f_(cFt,i,4,7)),i.b),0),84))),!((h||e)&&++o>1)););(o>0||l.Hc((eNn(),wRt))&&(!c.n&&(c.n=new fz(lFt,c,1,7)),c.n).i>0)&&(u=!0),o>1&&(s=!0)}u&&t.Fc((r_n(),tpt)),s&&t.Fc((r_n(),ept))}function IWn(n){var t,i,r,c,a,o,u,s,h,f,l,b;if((b=uG(VDn(n,(XYn(),_$t)),21)).dc())return null;if(u=0,o=0,b.Hc((Qmn(),QRt))){for(f=uG(VDn(n,sDt),101),r=2,i=2,c=2,a=2,t=R0(n)?uG(VDn(R0(n),d$t),88):uG(VDn(n,d$t),88),h=new DD((!n.c&&(n.c=new fz(wFt,n,9,9)),n.c));h.e!=h.i.gc();)if(s=uG(Zkn(h),123),(l=uG(VDn(s,gDt),64))==(KQn(),FRt)&&(l=RGn(s,t),Myn(s,gDt,l)),f==($Pn(),cRt))switch(l.g){case 1:r=e.Math.max(r,s.i+s.g);break;case 2:i=e.Math.max(i,s.j+s.f);break;case 3:c=e.Math.max(c,s.i+s.g);break;case 4:a=e.Math.max(a,s.j+s.f)}else switch(l.g){case 1:r+=s.g+2;break;case 2:i+=s.f+2;break;case 3:c+=s.g+2;break;case 4:a+=s.f+2}u=e.Math.max(r,c),o=e.Math.max(i,a)}return ZQn(n,u,o,!0,!0)}function OWn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(v=uG(l8(krn(JJ(new fX(null,new h3(t.d,16)),new Rg(i)),new Kg(i)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),l=vZn,f=j1n,s=new Ww(t.b.j);s.a0)?s&&(h=d.p,a?++h:--h,f=!(zRn(i=afn(uG(Vq(d.c.a,h),10)),k,e[0])||rz(i,k,e[0]))):f=!0),l=!1,(v=t.D.i)&&v.c&&o.e&&(a&&v.p>0||!a&&v.p=0){for(u=null,o=new N4(h.a,s+1);o.ba?1:KL(isNaN(0),isNaN(a)))<0&&(oan(I9n),(e.Math.abs(a-1)<=I9n||1==a||isNaN(a)&&isNaN(1)?0:a<1?-1:a>1?1:KL(isNaN(a),isNaN(1)))<0)&&(oan(I9n),(e.Math.abs(0-o)<=I9n||0==o||isNaN(0)&&isNaN(o)?0:0o?1:KL(isNaN(0),isNaN(o)))<0)&&(oan(I9n),(e.Math.abs(o-1)<=I9n||1==o||isNaN(o)&&isNaN(1)?0:o<1?-1:o>1?1:KL(isNaN(o),isNaN(1)))<0))}function KWn(n){var t,e,i,r;if(-1!=(t=xL(e=null!=n.D?n.D:n.B,$Cn(91)))){Knn(0,t,e.length),i=e.substr(0,t),r=new VM;do{r.a+="["}while(-1!=(t=aR(e,91,++t)));m_(i,dZn)?r.a+="Z":m_(i,lrt)?r.a+="B":m_(i,brt)?r.a+="C":m_(i,wrt)?r.a+="D":m_(i,drt)?r.a+="F":m_(i,grt)?r.a+="I":m_(i,prt)?r.a+="J":m_(i,mrt)?r.a+="S":(r.a+="L",r.a+=""+i,r.a+=";");try{return null}catch(c){if(!F$(c=Ehn(c),63))throw hv(c)}}else if(-1==xL(e,$Cn(46))){if(m_(e,dZn))return ZHt;if(m_(e,lrt))return tUt;if(m_(e,brt))return JHt;if(m_(e,wrt))return eUt;if(m_(e,drt))return iUt;if(m_(e,grt))return YHt;if(m_(e,prt))return nUt;if(m_(e,mrt))return rUt}return null}function FWn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(n.e=t,o=qNn(t),v=new Zm,i=new Ww(o);i.a=0&&d=s.c.c.length?B5((VIn(),dbt),wbt):B5((VIn(),wbt),wbt),h*=2,c=i.a.g,i.a.g=e.Math.max(c,c+(h-c)),a=i.b.g,i.b.g=e.Math.max(a,a+(h-a)),r=t}else pNn(o),zXn((u3(0,o.c.length),uG(o.c[0],18)).d.i)||kD(n.o,o)}function UWn(n){var t,i,r,c;for(kS(JJ(new fX(null,new h3(n.a.b,16)),new kr),new yr),QSn(n),kS(JJ(new fX(null,new h3(n.a.b,16)),new Mr),new Tr),n.c==(_gn(),hxt)&&(kS(JJ(sin(new fX(null,new h3(new Lw(n.f),1)),new jr),new Er),new Og(n)),kS(JJ(YJ(sin(sin(new fX(null,new h3(n.d.b,16)),new Sr),new Pr),new Cr),new Ir),new Lg(n))),c=new MO(M0n,M0n),t=new MO(T0n,T0n),r=new Ww(n.a.b);r.a0&&(t.a+=TZn),XWn(uG(Zkn(a),167),t);for(t.a+=Y4n,o=new Zx((!i.c&&(i.c=new f_(cFt,i,5,8)),i.c));o.e!=o.i.gc();)o.e>0&&(t.a+=TZn),XWn(uG(Zkn(o),167),t);t.a+=")"}}}function VWn(n,t,i){var r,c,a,o,u,s,f,l;for(s=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));s.e!=s.i.gc();)for(c=new FV(ix(eRn(u=uG(Zkn(s),27)).a.Kc(),new h));hDn(c);){if(!(r=uG(N9(c),74)).b&&(r.b=new f_(cFt,r,4,7)),!(r.b.i<=1&&(!r.c&&(r.c=new f_(cFt,r,5,8)),r.c.i<=1)))throw hv(new EM("Graph must not contain hyperedges."));if(!V$n(r)&&u!=lCn(uG(Vrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84)))for(Vsn(f=new $F,r),kfn(f,(mon(),Wft),r),Kb(f,uG(DA(FX(i.f,u)),153)),Bb(f,uG(cQ(i,lCn(uG(Vrn((!r.c&&(r.c=new f_(cFt,r,5,8)),r.c),0),84))),153)),kD(t.c,f),o=new DD((!r.n&&(r.n=new fz(lFt,r,1,7)),r.n));o.e!=o.i.gc();)Vsn(l=new A5(f,(a=uG(Zkn(o),135)).a),a),kfn(l,Wft,a),l.e.a=e.Math.max(a.g,1),l.e.b=e.Math.max(a.f,1),Yqn(l),kD(t.d,l)}}function zWn(n,t,i){var r,c,a,o,u,s,h,f;switch(i.Ug("Node promotion heuristic",1),n.i=t,n.r=uG(oIn(t,(jYn(),yMt)),243),n.r!=(THn(),Pjt)&&n.r!=Cjt?RQn(n):n_n(n),f=uG(oIn(n.i,kMt),17).a,a=new hi,n.r.g){case 2:case 1:default:nVn(n,a);break;case 3:for(n.r=Djt,nVn(n,a),s=0,u=new Ww(n.b);u.an.k&&(n.r=Ijt,nVn(n,a));break;case 4:for(n.r=Djt,nVn(n,a),h=0,c=new Ww(n.c);c.an.n&&(n.r=Ljt,nVn(n,a));break;case 6:nVn(n,new mg(t0(e.Math.ceil(n.g.length*f/100))));break;case 5:nVn(n,new vg(t0(e.Math.ceil(n.e*f/100))));break;case 8:IYn(n,!0);break;case 9:IYn(n,!1)}n.r!=Pjt&&n.r!=Cjt?JKn(n,t):BBn(n,t),i.Vg()}function WWn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;for(pF(u=new N4(s=n.b,0),new bQ(n)),g=!1,c=1;u.b0&&(b.d+=f.n.d,b.d+=f.d),b.a>0&&(b.a+=f.n.a,b.a+=f.d),b.b>0&&(b.b+=f.n.b,b.b+=f.d),b.c>0&&(b.c+=f.n.c,b.c+=f.d),b}function JWn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d;for(b=i.d,l=i.c,o=(a=new MO(i.f.a+i.d.b+i.d.c,i.f.b+i.d.d+i.d.a)).b,h=new Ww(n.a);h.a0&&(n.c[t.c.p][t.p].d+=uRn(n.i,24)*V0n*.07000000029802322-.03500000014901161,n.c[t.c.p][t.p].a=n.c[t.c.p][t.p].d/n.c[t.c.p][t.p].b)}}function tQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w;for(l=new Ww(n);l.ar.d,r.d=e.Math.max(r.d,t),u&&i&&(r.d=e.Math.max(r.d,r.a),r.a=r.d+c);break;case 3:i=t>r.a,r.a=e.Math.max(r.a,t),u&&i&&(r.a=e.Math.max(r.a,r.d),r.d=r.a+c);break;case 2:i=t>r.c,r.c=e.Math.max(r.c,t),u&&i&&(r.c=e.Math.max(r.b,r.c),r.b=r.c+c);break;case 4:i=t>r.b,r.b=e.Math.max(r.b,t),u&&i&&(r.b=e.Math.max(r.b,r.c),r.c=r.b+c)}}}function rQn(n,t){var e,i,r,c,a,o,u,s,h;return s="",0==t.length?n.ne(L1n,O1n,-1,-1):(m_((h=KAn(t)).substr(0,3),"at ")&&(s3(3,h.length+1),h=h.substr(3)),-1==(a=(h=h.replace(/\[.*?\]/g,"")).indexOf("("))?-1==(a=h.indexOf("@"))?(s=h,h=""):(s=KAn((s3(a+1,h.length+1),h.substr(a+1))),h=KAn((Knn(0,a,h.length),h.substr(0,a)))):(Knn(a+1,e=h.indexOf(")",a),h.length),s=h.substr(a+1,e-(a+1)),h=KAn((Knn(0,a,h.length),h.substr(0,a)))),-1!=(a=xL(h,$Cn(46)))&&(s3(a+1,h.length+1),h=h.substr(a+1)),(0==h.length||m_(h,"Anonymous function"))&&(h=O1n),o=ax(s,$Cn(58)),r=T_(s,$Cn(58),o-1),u=-1,i=-1,c=L1n,-1!=o&&-1!=r&&(Knn(0,r,s.length),c=s.substr(0,r),u=rR((Knn(r+1,o,s.length),s.substr(r+1,o-(r+1)))),i=rR((s3(o+1,s.length+1),s.substr(o+1)))),n.ne(c,h,u,i))}function cQn(n){var t,e,i,r,c,a,o,u,s,h,f;for(s=new Ww(n);s.a0||h.j==_Rt&&h.e.c.length-h.g.c.length<0)){t=!1;break}for(r=new Ww(h.g);r.a=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u));if(i)for(o=new Ww(v.e);o.a=h&&M>=p&&(b+=d.n.b+g.n.b+g.a.b-y,++u))}u>0&&(T+=b/u,++w)}w>0?(t.a=c*T/w,t.g=w):(t.a=0,t.g=0)}function oQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(l=(c=n.f.b).a,h=c.b,w=n.e.g,b=n.e.f,vN(n.e,c.a,c.b),M=l/w,T=h/b,s=new DD(xJ(n.e));s.e!=s.i.gc();)ycn(u=uG(Zkn(s),135),u.i*M),Mcn(u,u.j*T);for(m=new DD(RJ(n.e));m.e!=m.i.gc();)k=(p=uG(Zkn(m),123)).i,y=p.j,k>0&&ycn(p,k*M),y>0&&Mcn(p,y*T);for(Yun(n.b,new ft),t=new Zm,o=new bsn(new Nw(n.c).a);o.b;)i=uG((a=von(o)).ld(),74),e=uG(a.md(),407).a,r=JFn(i,!1,!1),sqn(f=YPn(bIn(i),COn(r),e),r),(v=wIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.a.a.c,8)),e));for(g=new bsn(new Nw(n.d).a);g.b;)i=uG((d=von(g)).ld(),74),e=uG(d.md(),407).a,r=JFn(i,!1,!1),f=YPn(gIn(i),fln(COn(r)),e),sqn(f=fln(f),r),(v=dIn(i))&&-1==Ten(t,v,0)&&(mv(t.c,v),iY(v,(MK(0!=f.b),uG(f.c.b.c,8)),e))}function uQn(n,t,e,i){var r,c,a,o,u;return sKn(o=new EQn(t),i),r=!0,n&&n.pf((XYn(),d$t))&&(r=(c=uG(n.of((XYn(),d$t)),88))==(xdn(),ZDt)||c==JDt||c==YDt),iBn(o,!1),Prn(o.e.Rf(),new DB(o,!1,r)),W1(o,o.f,(Yrn(),jst),(KQn(),yRt)),W1(o,o.f,Sst,KRt),W1(o,o.g,jst,_Rt),W1(o,o.g,Sst,kRt),gyn(o,yRt),gyn(o,KRt),IJ(o,kRt),IJ(o,_Rt),zK(),(a=o.A.Hc((Qmn(),zRt))&&o.B.Hc((aUn(),rKt))?xmn(o):null)&&dT(o.a,a),iQn(o),BTn(o),HTn(o),wWn(o),aGn(o),iEn(o),dkn(o,yRt),dkn(o,KRt),IBn(o),TVn(o),e?(wpn(o),rEn(o),dkn(o,kRt),dkn(o,_Rt),u=o.B.Hc((aUn(),cKt)),dLn(o,u,yRt),dLn(o,u,KRt),gLn(o,u,kRt),gLn(o,u,_Rt),kS(new fX(null,new h3(new Fw(o.i),0)),new Cn),kS(JJ(new fX(null,FW(o.r).a.oc()),new In),new On),jPn(o),o.e.Pf(o.o),kS(new fX(null,FW(o.r).a.oc()),new An),o.o):o.o}function sQn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.a1)for(V8(v,new BI(n,b=new IVn(w,v,r))),mv(o.c,b),f=v.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b);if(u.a.gc()>1)for(V8(u,new HI(n,b=new IVn(w,u,r))),mv(o.c,b),f=u.a.ec().Kc();f.Ob();)men(a,uG(f.Pb(),42).b)}}function dQn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(g=n.n,p=n.o,b=n.d,l=uM(pK(Omn(n,(jYn(),lTt)))),t){for(f=l*(t.gc()-1),w=0,s=t.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b-b.d+w,c=r=p.a/(t.gc()+1),u=t.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a-o.o.b,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=o.o.b,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=0,o2(d,n)),c+=r}if(i){for(f=l*(i.gc()-1),w=0,s=i.Kc();s.Ob();)f+=(o=uG(s.Pb(),10)).o.a,w=e.Math.max(w,o.o.b);for(m=g.a-(f-p.a)/2,a=g.b+p.b+b.a-w,c=r=p.a/(i.gc()+1),u=i.Kc();u.Ob();)(o=uG(u.Pb(),10)).n.a=m,o.n.b=a,m+=o.o.a+l,(h=ERn(o)).n.a=o.o.a/2-h.a.a,h.n.b=0,(d=uG(oIn(o,(GYn(),Ppt)),12)).e.c.length+d.g.c.length==1&&(d.n.a=c-d.a.a,d.n.b=p.b,o2(d,n)),c+=r}}function gQn(n,t){var i,r,c,a,o,u;if(uG(oIn(t,(GYn(),Hpt)),21).Hc((r_n(),tpt))){for(u=new Ww(t.a);u.a=0&&a0&&(uG(AJ(n.b,t),127).a.b=i)}function TQn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d;if(l=uM(pK(oIn(n,(jYn(),TTt)))),b=uM(pK(oIn(n,jTt))),f=uM(pK(oIn(n,yTt))),o=n.o,a=(c=uG(Vq(n.j,0),12)).n,d=hAn(c,f)){if(t.Hc((eNn(),wRt)))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:d.c=(o.a-d.b)/2-a.a,d.d=b;break;case 3:d.c=(o.a-d.b)/2-a.a,d.d=-b-d.a;break;case 2:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(Vq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=-l-d.b;break;case 4:e&&0==c.e.c.length&&0==c.g.c.length?(h=i?d.a:uG(Vq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=o.b+b-a.b,d.c=l}else if(t.Hc(gRt))switch(uG(oIn(n,(GYn(),Fpt)),64).g){case 1:case 3:d.c=a.a+l;break;case 2:case 4:e&&!c.c?(h=i?d.a:uG(Vq(c.f,0),72).o.b,d.d=(o.b-h)/2-a.b):d.d=a.b+b}for(r=d.d,s=new Ww(c.f);s.a=n.length)return{done:!0};var i=n[e++];return{value:[i,t.get(i)],done:!1}}}},__n()||(n.prototype.createObject=function(){return{}},n.prototype.get=function(n){return this.obj[":"+n]},n.prototype.set=function(n,t){this.obj[":"+n]=t},n.prototype[U0n]=function(n){delete this.obj[":"+n]},n.prototype.keys=function(){var n=[];for(var t in this.obj)58==t.charCodeAt(0)&&n.push(t.substring(1));return n}),n}function OQn(){OQn=E,RPt=new Cm(E4n),new Cm(S4n),new uF("DEPTH",xwn(0)),EPt=new uF("FAN",xwn(0)),TPt=new uF(Q9n,xwn(0)),UPt=new uF("ROOT",(qx(),!1)),APt=new uF("LEFTNEIGHBOR",null),BPt=new uF("RIGHTNEIGHBOR",null),LPt=new uF("LEFTSIBLING",null),HPt=new uF("RIGHTSIBLING",null),jPt=new uF("DUMMY",!1),new uF("LEVEL",xwn(0)),_Pt=new uF("REMOVABLE_EDGES",new lS),GPt=new uF("XCOOR",xwn(0)),qPt=new uF("YCOOR",xwn(0)),NPt=new uF("LEVELHEIGHT",0),DPt=new uF("LEVELMIN",0),$Pt=new uF("LEVELMAX",0),PPt=new uF("GRAPH_XMIN",0),IPt=new uF("GRAPH_YMIN",0),SPt=new uF("GRAPH_XMAX",0),CPt=new uF("GRAPH_YMAX",0),MPt=new uF("COMPACT_LEVEL_ASCENSION",!1),yPt=new uF("COMPACT_CONSTRAINTS",new Zm),OPt=new uF("ID",""),KPt=new uF("POSITION",xwn(0)),FPt=new uF("PRELIM",0),xPt=new uF("MODIFIER",0),kPt=new Cm(P4n),vPt=new Cm(C4n)}function AQn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(NGn(),null==n)return null;if(0==(f=8*n.length))return"";for(l=f/24|0,c=null,c=Inn(JHt,N1n,28,4*(0!=(o=f%24)?l+1:l),15,1),s=0,h=0,t=0,e=0,i=0,a=0,r=0,u=0;u>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,d=-128&(i=n[r++])?(i>>6^252)<<24>>24:i>>6<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2|d],c[a++]=gHt[63&i];return 8==o?(s=(3&(t=n[r]))<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,c[a++]=gHt[b],c[a++]=gHt[s<<4],c[a++]=61,c[a++]=61):16==o&&(t=n[r],h=(15&(e=n[r+1]))<<24>>24,s=(3&t)<<24>>24,b=-128&t?(t>>2^192)<<24>>24:t>>2<<24>>24,w=-128&e?(e>>4^240)<<24>>24:e>>4<<24>>24,c[a++]=gHt[b],c[a++]=gHt[w|s<<4],c[a++]=gHt[h<<2],c[a++]=61),mvn(c,0,c.length)}function LQn(n,t){var i,r,c,a,o,u;if(0==n.e&&n.p>0&&(n.p=-(n.p-1)),n.p>j1n&&F5(t,n.p-z1n),o=t.q.getDate(),k0(t,1),n.k>=0&&H0(t,n.k),n.c>=0?k0(t,n.c):n.k>=0?(r=35-new Lfn(t.q.getFullYear()-z1n,t.q.getMonth(),35).q.getDate(),k0(t,e.Math.min(r,o))):k0(t,o),n.f<0&&(n.f=t.q.getHours()),n.b>0&&n.f<12&&(n.f+=12),tD(t,24==n.f&&n.g?0:n.f),n.j>=0&&y7(t,n.j),n.n>=0&&Nnn(t,n.n),n.i>=0&&TL(t,Lgn(Ngn(bSn(Bsn(t.q.getTime()),$1n),$1n),n.i)),n.a&&(F5(c=new QE,c.q.getFullYear()-z1n-80),$P(Bsn(t.q.getTime()),Bsn(c.q.getTime()))&&F5(t,c.q.getFullYear()-z1n+100)),n.d>=0)if(-1==n.c)(i=(7+n.d-t.q.getDay())%7)>3&&(i-=7),u=t.q.getMonth(),k0(t,t.q.getDate()+i),t.q.getMonth()!=u&&k0(t,t.q.getDate()+(i>0?-7:7));else if(t.q.getDay()!=n.d)return!1;return n.o>j1n&&(a=t.q.getTimezoneOffset(),TL(t,Lgn(Bsn(t.q.getTime()),60*(n.o-a)*$1n))),!0}function NQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;if(F$(r=oIn(t,(GYn(),rmt)),207)){for(b=uG(r,27),w=t.e,f=new eN(t.c),c=t.d,f.a+=c.b,f.b+=c.d,$x(uG(VDn(b,(jYn(),KMt)),181),(aUn(),tKt))&&(Ab(l=uG(VDn(b,_Mt),107),c.a),_b(l,c.d),Lb(l,c.b),Fb(l,c.c)),e=new Zm,s=new Ww(t.a);s.ai.c.length-1;)kD(i,new WO(B3n,G9n));e=uG(oIn(r,ACt),17).a,hN(uG(oIn(n,cCt),88))?(r.e.auM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.a+r.f.a)):(r.e.buM(pK((u3(e,i.c.length),uG(i.c[e],42)).b))&&sw((u3(e,i.c.length),uG(i.c[e],42)),r.e.b+r.f.b))}for(c=Fkn(n.b,0);c.b!=c.d.c;)r=uG(I6(c),40),e=uG(oIn(r,(QGn(),ACt)),17).a,kfn(r,(OQn(),DPt),pK((u3(e,i.c.length),uG(i.c[e],42)).a)),kfn(r,$Pt,pK((u3(e,i.c.length),uG(i.c[e],42)).b));t.Vg()}function RQn(n){var t,i,r,c,a,o,u,s,f,l,b,w,d,g,p;for(n.o=uM(pK(oIn(n.i,(jYn(),ETt)))),n.f=uM(pK(oIn(n.i,vTt))),n.j=n.i.b.c.length,u=n.j-1,w=0,n.k=0,n.n=0,n.b=n7(Inn(dot,VZn,17,n.j,0,1)),n.c=n7(Inn(fot,VZn,345,n.j,7,1)),o=new Ww(n.i.b);o.a0&&kD(n.q,l),kD(n.p,l);d=s+(t-=r),f+=t*n.f,Y8(n.b,u,xwn(d)),Y8(n.c,u,f),n.k=e.Math.max(n.k,d),n.n=e.Math.max(n.n,f),n.e+=t,t+=p}}function KQn(){var n;KQn=E,FRt=new RO(Y2n,0),yRt=new RO(o3n,1),kRt=new RO(u3n,2),KRt=new RO(s3n,3),_Rt=new RO(h3n,4),hZ(),SRt=new nT(new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),PRt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[]))),MRt=Nwn(WX(kRt,Uhn(cT(YRt,1),V4n,64,0,[]))),DRt=Nwn(WX(KRt,Uhn(cT(YRt,1),V4n,64,0,[]))),RRt=Nwn(WX(_Rt,Uhn(cT(YRt,1),V4n,64,0,[]))),LRt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[KRt]))),ERt=Nwn(WX(kRt,Uhn(cT(YRt,1),V4n,64,0,[_Rt]))),$Rt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[_Rt]))),CRt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[kRt]))),xRt=Nwn(WX(KRt,Uhn(cT(YRt,1),V4n,64,0,[_Rt]))),TRt=Nwn(WX(kRt,Uhn(cT(YRt,1),V4n,64,0,[KRt]))),ARt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[kRt,_Rt]))),jRt=Nwn(WX(kRt,Uhn(cT(YRt,1),V4n,64,0,[KRt,_Rt]))),NRt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[KRt,_Rt]))),IRt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[kRt,KRt]))),ORt=Nwn(WX(yRt,Uhn(cT(YRt,1),V4n,64,0,[kRt,KRt,_Rt])))}function FQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;for(t.Ug(j6n,1),w=new Zm,k=new Zm,s=new Ww(n.b);s.a0&&(y-=d),zVn(o,y),l=0,w=new Ww(o.a);w.a0),u.a.Xb(u.c=--u.b)),s=.4*r*l,!a&&u.b0&&(s3(0,t.length),64!=(o=t.charCodeAt(0)))){if(37==o&&(u=!1,0!=(h=t.lastIndexOf("%"))&&(h==f-1||(s3(h+1,t.length),u=46==t.charCodeAt(h+1))))){if(Knn(1,h,t.length),m=m_("%",a=t.substr(1,h-1))?null:eJn(a),i=0,u)try{i=mUn((s3(h+2,t.length+1),t.substr(h+2)),j1n,vZn)}catch(v){throw F$(v=Ehn(v),130)?hv(new Pen(v)):hv(v)}for(d=kon(n.Gh());d.Ob();)if(F$(b=Ksn(d),519)&&(p=(r=uG(b,598)).d,(null==m?null==p:m_(m,p))&&0==i--))return r;return null}if(l=-1==(s=t.lastIndexOf("."))?t:(Knn(0,s,t.length),t.substr(0,s)),e=0,-1!=s)try{e=mUn((s3(s+1,t.length+1),t.substr(s+1)),j1n,vZn)}catch(v){if(!F$(v=Ehn(v),130))throw hv(v);l=t}for(l=m_("%",l)?null:eJn(l),w=kon(n.Gh());w.Ob();)if(F$(b=Ksn(w),197)&&(g=(c=uG(b,197)).xe(),(null==l?null==g:m_(l,g))&&0==e--))return c;return null}return jWn(n,t)}function WQn(n){var t,e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m;for(s=new Ym,o=new K1,i=new Ww(n.a.a.b);i.at.d.c){if((b=n.c[t.a.d])==(g=n.c[f.a.d]))continue;RKn(xS(DS(RS($S(new uk,1),100),b),g))}}}function QQn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(b=uG(uG(Y9(n.r,t),21),87),t!=(KQn(),kRt)&&t!=_Rt){for(a=t==yRt?(ehn(),wht):(ehn(),pht),y=t==yRt?(Yen(),Fst):(Yen(),Rst),c=(r=(i=uG(AJ(n.b,t),127)).i).c+Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.b,n.C.b,n.k])),m=r.c+r.b-Trn(Uhn(cT(eUt,1),I0n,28,15,[i.n.c,n.C.c,n.k])),o=TT(BB(a),n.t),v=t==yRt?T0n:M0n,l=b.Kc();l.Ob();)!(h=uG(l.Pb(),117)).c||h.c.d.c.length<=0||(p=h.b.Mf(),g=h.e,(d=(w=h.c).i).b=(s=w.n,w.e.a+s.b+s.c),d.a=(u=w.n,w.e.b+u.d+u.a),ZZ(y,W2n),w.f=y,etn(w,(Ktn(),Lst)),d.c=g.a-(d.b-p.a)/2,M=e.Math.min(c,g.a),T=e.Math.max(m,g.a+p.a),d.cT&&(d.c=T-d.b),kD(o.d,new ZX(d,Hdn(o,d))),v=t==yRt?e.Math.max(v,g.b+h.b.Mf().b):e.Math.min(v,g.b));for(v+=t==yRt?n.t:-n.t,(k=cmn((o.e=v,o)))>0&&(uG(AJ(n.b,t),127).a.b=k),f=b.Kc();f.Ob();)!(h=uG(f.Pb(),117)).c||h.c.d.c.length<=0||((d=h.c.i).c-=h.e.a,d.d-=h.e.b)}else MQn(n,t)}function JQn(n){var t,e,i,r,c,a,o,u,s,f;for(t=new Ym,a=new DD(n);a.e!=a.i.gc();){for(c=uG(Zkn(a),27),e=new ek,vJ(cft,c,e),f=new at,i=uG(l8(new fX(null,new LW(new FV(ix(tRn(c).a.Kc(),new h)))),HX(f,ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)])))),85),Ycn(e,uG(i.xc((qx(),!0)),16),new ot),r=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ut),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();r.Ob();)(s=wIn(uG(r.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),zAn(t.f,s,o)),Qon(e,o));for(i=uG(l8(new fX(null,new LW(new FV(ix(eRn(c).a.Kc(),new h)))),HX(f,ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut])))),85),Ycn(e,uG(i.xc(!0),16),new st),u=uG(l8(JJ(uG(i.xc(!1),15).Lc(),new ht),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15).Kc();u.Ob();)(s=dIn(uG(u.Pb(),74)))&&((o=uG(DA(FX(t.f,s)),21))||(o=TFn(s),zAn(t.f,s,o)),Qon(e,o))}}function YQn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d;if(pXn(),(u=dwn(n,0)<0)&&(n=Men(n)),0==dwn(n,0))switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(b=new WM).a+=t<0?"0E+":"0E",b.a+=t==j1n?"2147483648":""+-t,b.a}f=Inn(JHt,N1n,28,1+(h=18),15,1),e=h,d=n;do{s=d,d=bSn(d,10),f[--e]=pV(Lgn(48,$gn(s,Ngn(d,10))))&D1n}while(0!=dwn(d,0));if(r=$gn($gn($gn(h,e),t),1),0==t)return u&&(f[--e]=45),mvn(f,e,h-e);if(t>0&&dwn(r,-6)>=0){if(dwn(r,0)>=0){for(c=e+pV(r),o=h-1;o>=c;o--)f[o+1]=f[o];return f[++c]=46,u&&(f[--e]=45),mvn(f,e,h-e+1)}for(a=2;$P(a,Lgn(Men(r),1));a++)f[--e]=48;return f[--e]=46,f[--e]=48,u&&(f[--e]=45),mvn(f,e,h-e)}return w=e+1,i=h,l=new QM,u&&(l.a+="-"),i-w>=1?(jQ(l,f[e]),l.a+=".",l.a+=mvn(f,e+1,h-e-1)):l.a+=mvn(f,e,h-e),l.a+="E",dwn(r,0)>0&&(l.a+="+"),l.a+=""+oz(r),l.a}function ZQn(n,t,i,r,c){var a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;if(p=new MO(n.g,n.f),(g=xAn(n)).a=e.Math.max(g.a,t),g.b=e.Math.max(g.b,i),T=g.a/p.a,f=g.b/p.b,y=g.a-p.a,s=g.b-p.b,r)for(o=R0(n)?uG(VDn(R0(n),(XYn(),d$t)),88):uG(VDn(n,(XYn(),d$t)),88),u=xA(VDn(n,(XYn(),sDt)))===xA(($Pn(),cRt)),v=new DD((!n.c&&(n.c=new fz(wFt,n,9,9)),n.c));v.e!=v.i.gc();)switch(m=uG(Zkn(v),123),(k=uG(VDn(m,gDt),64))==(KQn(),FRt)&&(k=RGn(m,o),Myn(m,gDt,k)),k.g){case 1:u||ycn(m,m.i*T);break;case 2:ycn(m,m.i+y),u||Mcn(m,m.j*f);break;case 3:u||ycn(m,m.i*T),Mcn(m,m.j+s);break;case 4:u||Mcn(m,m.j*f)}if(vN(n,g.a,g.b),c)for(b=new DD((!n.n&&(n.n=new fz(lFt,n,1,7)),n.n));b.e!=b.i.gc();)w=(l=uG(Zkn(b),135)).i+l.g/2,d=l.j+l.f/2,(M=w/p.a)+(h=d/p.b)>=1&&(M-h>0&&d>=0?(ycn(l,l.i+y),Mcn(l,l.j+s*h)):M-h<0&&w>=0&&(ycn(l,l.i+y*M),Mcn(l,l.j+s)));return Myn(n,(XYn(),_$t),(Qmn(),new nB(a=uG(Mj(sKt),9),uG(MF(a,a.length),9),0))),new MO(T,f)}function nJn(n){hP(n,new hCn(xT(FT(DT(KT(RT(new bu,x7n),"ELK Radial"),'A radial layout provider which is based on the algorithm of Peter Eades published in "Drawing free trees.", published by International Institute for Advanced Study of Social Information Science, Fujitsu Limited in 1991. The radial layouter takes a tree and places the nodes in radial order around the root. The nodes of the same tree level are placed on the same radius.'),new Oo),x7n))),U4(n,x7n,b9n,Jkn(BIt)),U4(n,x7n,o4n,Jkn(zIt)),U4(n,x7n,p4n,Jkn($It)),U4(n,x7n,x4n,Jkn(DIt)),U4(n,x7n,g4n,Jkn(xIt)),U4(n,x7n,m4n,Jkn(NIt)),U4(n,x7n,w4n,Jkn(RIt)),U4(n,x7n,v4n,Jkn(_It)),U4(n,x7n,P7n,Jkn(AIt)),U4(n,x7n,S7n,Jkn(LIt)),U4(n,x7n,E7n,Jkn(UIt)),U4(n,x7n,A7n,Jkn(XIt)),U4(n,x7n,L7n,Jkn(GIt)),U4(n,x7n,N7n,Jkn(qIt)),U4(n,x7n,O7n,Jkn(KIt)),U4(n,x7n,T7n,Jkn(FIt)),U4(n,x7n,j7n,Jkn(HIt)),U4(n,x7n,C7n,Jkn(VIt)),U4(n,x7n,I7n,Jkn(WIt)),U4(n,x7n,M7n,Jkn(OIt))}function tJn(n){var t,e,i,r,c,a,o,u,s,h,f;if(null==n)throw hv(new ZM(IZn));if(s=n,u=!1,(c=n.length)>0&&(s3(0,n.length),45!=(t=n.charCodeAt(0))&&43!=t||(s3(1,n.length+1),n=n.substr(1),--c,u=45==t)),0==c)throw hv(new ZM(y0n+s+'"'));for(;n.length>0&&(s3(0,n.length),48==n.charCodeAt(0));)s3(1,n.length+1),n=n.substr(1),--c;if(c>(lGn(),vot)[10])throw hv(new ZM(y0n+s+'"'));for(r=0;r0&&(f=-parseInt((Knn(0,i,n.length),n.substr(0,i)),10),s3(i,n.length+1),n=n.substr(i),c-=i,e=!1);c>=a;){if(i=parseInt((Knn(0,a,n.length),n.substr(0,a)),10),s3(a,n.length+1),n=n.substr(a),c-=a,e)e=!1;else{if(dwn(f,o)<0)throw hv(new ZM(y0n+s+'"'));f=Ngn(f,h)}f=$gn(f,i)}if(dwn(f,0)>0)throw hv(new ZM(y0n+s+'"'));if(!u&&dwn(f=Men(f),0)<0)throw hv(new ZM(y0n+s+'"'));return f}function eJn(n){var t,e,i,r,c,a,o,u;if(YXn(),null==n)return null;if((r=xL(n,$Cn(37)))<0)return n;for(u=new lx((Knn(0,r,n.length),n.substr(0,r))),t=Inn(tUt,ret,28,4,15,1),o=0,i=0,a=n.length;rr+2&&mfn((s3(r+1,n.length),n.charCodeAt(r+1)),QFt,JFt)&&mfn((s3(r+2,n.length),n.charCodeAt(r+2)),QFt,JFt))if(e=AG((s3(r+1,n.length),n.charCodeAt(r+1)),(s3(r+2,n.length),n.charCodeAt(r+2))),r+=2,i>0?128==(192&e)?t[o++]=e<<24>>24:i=0:e>=128&&(192==(224&e)?(t[o++]=e<<24>>24,i=2):224==(240&e)?(t[o++]=e<<24>>24,i=3):240==(248&e)&&(t[o++]=e<<24>>24,i=4)),i>0){if(o==i){switch(o){case 2:jQ(u,((31&t[0])<<6|63&t[1])&D1n);break;case 3:jQ(u,((15&t[0])<<12|(63&t[1])<<6|63&t[2])&D1n)}o=0,i=0}}else{for(c=0;c=2){if(0==(!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i)gj(),i=new is,ttn((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a),i);else if((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i>1)for(l=new Zx((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a));l.e!=l.i.gc();)$Sn(l);sqn(t,uG(Vrn((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a),0),166))}if(f)for(r=new DD((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a));r.e!=r.i.gc();)for(s=new DD((!(i=uG(Zkn(r),166)).a&&(i.a=new MD(eFt,i,5)),i.a));s.e!=s.i.gc();)u=uG(Zkn(s),377),o.a=e.Math.max(o.a,u.a),o.b=e.Math.max(o.b,u.b);for(a=new DD((!n.n&&(n.n=new fz(lFt,n,1,7)),n.n));a.e!=a.i.gc();)c=uG(Zkn(a),135),(h=uG(VDn(c,Cxt),8))&&kN(c,h.a,h.b),f&&(o.a=e.Math.max(o.a,c.i+c.g),o.b=e.Math.max(o.b,c.j+c.f));return o}function rJn(n,t,e,i,r){var c,a,o;if(win(n,t),a=t[0],c=zJ(e.c,0),o=-1,Jfn(e))if(i>0){if(a+i>n.length)return!1;o=RNn((Knn(0,a+i,n.length),n.substr(0,a+i)),t)}else o=RNn(n,t);switch(c){case 71:return o=XOn(n,a,Uhn(cT($ot,1),VZn,2,6,[Q1n,J1n]),t),r.e=o,!0;case 77:return c_n(n,t,r,o,a);case 76:return a_n(n,t,r,o,a);case 69:return XAn(n,t,a,r);case 99:return VAn(n,t,a,r);case 97:return o=XOn(n,a,Uhn(cT($ot,1),VZn,2,6,["AM","PM"]),t),r.b=o,!0;case 121:return o_n(n,t,a,o,e,r);case 100:return!(o<=0||(r.c=o,0));case 83:return!(o<0)&&tmn(o,a,t[0],r);case 104:12==o&&(o=0);case 75:case 72:return!(o<0||(r.f=o,r.g=!1,0));case 107:return!(o<0||(r.f=o,r.g=!0,0));case 109:return!(o<0||(r.j=o,0));case 115:return!(o<0||(r.n=o,0));case 90:if(aT[s]&&(d=s),f=new Ww(n.a.b);f.a1;){if(c=nKn(t),l=a.g,d=uG(VDn(t,hAt),107),g=uM(pK(VDn(t,zOt))),(!t.a&&(t.a=new fz(bFt,t,10,11)),t.a).i>1&&uM(pK(VDn(t,(lBn(),jOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))1&&uM(pK(VDn(t,(lBn(),TOt))))!=M0n&&(a.c+(d.b+d.c))/(a.b+(d.d+d.a))>g&&Myn(c,(lBn(),POt),e.Math.max(uM(pK(VDn(t,EOt))),uM(pK(VDn(c,POt)))-uM(pK(VDn(t,TOt))))),(h=(s=kYn(w=new vO(r,f),c,b)).g)>=l&&h==h){for(o=0;o<(!c.a&&(c.a=new fz(bFt,c,10,11)),c.a).i;o++)mNn(n,uG(Vrn((!c.a&&(c.a=new fz(bFt,c,10,11)),c.a),o),27),uG(Vrn((!t.a&&(t.a=new fz(bFt,t,10,11)),t.a),o),27));Irn(t,w),x1(a,s.c),D1(a,s.b)}--u}Myn(t,(lBn(),mOt),a.b),Myn(t,vOt,a.c),i.Vg()}function uJn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug("Interactive node layering",1),i=new Zm,b=new Ww(n.a);b.a=u){MK(v.b>0),v.a.Xb(v.c=--v.b);break}p.a>s&&(r?(Ohn(r.b,p.b),r.a=e.Math.max(r.a,p.a),LQ(v)):(kD(p.b,f),p.c=e.Math.min(p.c,s),p.a=e.Math.max(p.a,u),r=p))}r||((r=new Mk).c=s,r.a=u,pF(v,r),kD(r.b,f))}for(o=n.b,h=0,m=new Ww(i);m.aw&&(a&&(cL(M,b),cL(j,xwn(h.b-1))),I=i.b,O+=b+t,b=0,f=e.Math.max(f,i.b+i.c+C)),ycn(u,I),Mcn(u,O),f=e.Math.max(f,I+C+i.c),b=e.Math.max(b,l),I+=C+t;if(f=e.Math.max(f,r),(P=O+b+i.a)t4n,S=e.Math.abs(b.b-d.b)>t4n,(!i&&E&&S||i&&(E||S))&&aq(p.a,y)),Qon(p.a,r),0==r.b?b=y:(MK(0!=r.b),b=uG(r.c.b.c,8)),hhn(w,l,g),kun(c)==j&&(HQ(j.i)!=c.a&&pAn(g=new sj,HQ(j.i),v),kfn(p,Smt,g)),sOn(w,p,v),f.a.zc(w,f);c2(p,M),u2(p,j)}for(h=f.a.ec().Kc();h.Ob();)c2(s=uG(h.Pb(),18),null),u2(s,null);t.Vg()}function fJn(n,t){var e,i,r,c,a,o,u,s,h,f,l;for(h=(r=uG(oIn(n,(QGn(),cCt)),88))==(xdn(),JDt)||r==YDt?QDt:YDt,e=uG(l8(JJ(new fX(null,new h3(n.b,16)),new $a),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),(u=uG(l8(YJ(e.Oc(),new Pp(t)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15)).Gc(uG(l8(YJ(e.Oc(),new Cp(t)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),16)),u.jd(new Ip(h)),l=new Hj(new Op(r)),i=new Ym,o=u.Kc();o.Ob();)a=uG(o.Pb(),240),s=uG(a.a,40),oM(gK(a.c))?(l.a.zc(s,(qx(),tot)),new od(l.a.Zc(s,!1)).a.gc()>0&&vJ(i,s,uG(new od(l.a.Zc(s,!1)).a.Vc(),40)),new od(l.a.ad(s,!0)).a.gc()>1&&vJ(i,wmn(l,s),s)):(new od(l.a.Zc(s,!1)).a.gc()>0&&xA(c=uG(new od(l.a.Zc(s,!1)).a.Vc(),40))===xA(DA(FX(i.f,s)))&&uG(oIn(s,(OQn(),yPt)),15).Fc(c),new od(l.a.ad(s,!0)).a.gc()>1&&(f=wmn(l,s),xA(DA(FX(i.f,f)))===xA(s)&&uG(oIn(f,(OQn(),yPt)),15).Fc(s)),l.a.Bc(s))}function lJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;if(1==n.gc())return uG(n.Xb(0),235);if(n.gc()<=0)return new d7;for(c=n.Kc();c.Ob();){for(i=uG(c.Pb(),235),d=0,f=vZn,l=vZn,s=j1n,h=j1n,w=new Ww(i.e);w.au&&(k=0,y+=o+m,o=0),tUn(g,i,k,y),t=e.Math.max(t,k+p.a),o=e.Math.max(o,p.b),k+=p.a+m;return g}function bJn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b,w,d,g;if(NGn(),null==n)return null;if((w=hgn(c=_en(n)))%4!=0)return null;if(0==(d=w/4|0))return Inn(tUt,ret,28,0,15,1);for(f=null,t=0,e=0,i=0,r=0,a=0,o=0,u=0,s=0,b=0,l=0,h=0,f=Inn(tUt,ret,28,3*d,15,1);b>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24}return mE(a=c[h++])&&mE(o=c[h++])?(t=dHt[a],e=dHt[o],u=c[h++],s=c[h++],-1==dHt[u]||-1==dHt[s]?61==u&&61==s?15&e?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+1,15,1),0,3*b),g[l]=(t<<2|e>>4)<<24>>24,g):61!=u&&61==s?3&(i=dHt[u])?null:(qGn(f,0,g=Inn(tUt,ret,28,3*b+2,15,1),0,3*b),g[l++]=(t<<2|e>>4)<<24>>24,g[l]=((15&e)<<4|i>>2&15)<<24>>24,g):null:(i=dHt[u],r=dHt[s],f[l++]=(t<<2|e>>4)<<24>>24,f[l++]=((15&e)<<4|i>>2&15)<<24>>24,f[l++]=(i<<6|r)<<24>>24,f)):null}function wJn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;for(t.Ug(j6n,1),l=uG(oIn(n,(jYn(),zyt)),223),i=new Ww(n.b);i.a=2){for(b=!0,e=uG(N3(h=new Ww(r.j)),12),f=null;h.a0)if(r=f.gc(),s=t0(e.Math.floor((r+1)/2))-1,c=t0(e.Math.ceil((r+1)/2))-1,t.o==dSt)for(h=c;h>=s;h--)t.a[k.p]==k&&(d=uG(f.Xb(h),42),w=uG(d.a,10),!cS(i,d.b)&&b>n.b.e[w.p]&&(t.a[w.p]=k,t.g[k.p]=t.g[w.p],t.a[k.p]=t.g[k.p],t.f[t.g[k.p].p]=(qx(),!!(oM(t.f[t.g[k.p].p])&k.k==(VIn(),wbt))),b=n.b.e[w.p]));else for(h=s;h<=c;h++)t.a[k.p]==k&&(p=uG(f.Xb(h),42),g=uG(p.a,10),!cS(i,p.b)&&b0&&(c=uG(Vq(p.c.a,T-1),10),o=n.i[c.p],E=e.Math.ceil(y$(n.n,c,p)),a=M.a.e-p.d.d-(o.a.e+c.o.b+c.d.a)-E),h=M0n,T0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)<0,d=k.a.e.e-k.a.a-(k.b.e.e-k.b.a)<0&&j.a.e.e-j.a.a-(j.b.e.e-j.b.a)>0,w=k.a.e.e+k.b.aj.b.e.e+j.a.a,y=0,!g&&!d&&(b?a+l>0?y=l:h-r>0&&(y=r):w&&(a+u>0?y=u:h-v>0&&(y=v))),M.a.e+=y,M.b&&(M.d.e+=y),1)))}function pJn(n,t,i){var r,c,a,o,u,s,h,f,l,b;if(r=new gY(t.Lf().a,t.Lf().b,t.Mf().a,t.Mf().b),c=new cN,n.c)for(o=new Ww(t.Rf());o.as&&(i.a+=z$(Inn(JHt,N1n,28,-s,15,1))),i.a+="Is",xL(u,$Cn(32))>=0)for(r=0;r=i.o.b/2}p?(g=uG(oIn(i,(GYn(),Pmt)),15))?l?c=g:(r=uG(oIn(i,Ept),15))?c=g.gc()<=r.gc()?g:r:(c=new Zm,kfn(i,Ept,c)):(c=new Zm,kfn(i,Pmt,c)):(r=uG(oIn(i,(GYn(),Ept)),15))?f?c=r:(g=uG(oIn(i,Pmt),15))?c=r.gc()<=g.gc()?r:g:(c=new Zm,kfn(i,Pmt,c)):(c=new Zm,kfn(i,Ept,c)),c.Fc(n),kfn(n,(GYn(),Ppt),e),t.d==e?(u2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null),Nln(e)):(c2(t,null),e.e.c.length+e.g.c.length==0&&o2(e,null)),BY(t.a)}function jJn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(i.Ug("MinWidth layering",1),w=t.b,j=t.a,A=uG(oIn(t,(jYn(),mMt)),17).a,u=uG(oIn(t,vMt),17).a,n.b=uM(pK(oIn(t,dTt))),n.d=M0n,y=new Ww(j);y.a0?(h=0,p&&(h+=u),h+=(E-1)*o,v&&(h+=u),j&&v&&(h=e.Math.max(h,GKn(v,o,m,T))),h=n.a&&(r=Rqn(n,m),l=e.Math.max(l,r.b),k=e.Math.max(k,r.d),kD(u,new WO(m,r)));for(T=new Zm,f=0;f0),g.a.Xb(g.c=--g.b),pF(g,j=new bQ(n.b)),MK(g.b0){for(l=h<100?null:new cj(h),w=(s=new Hun(t)).g,g=Inn(YHt,W1n,28,h,15,1),i=0,v=new Drn(h),r=0;r=0;)if(null!=b?udn(b,w[u]):xA(b)===xA(w[u])){g.length<=i&&qGn(g,0,g=Inn(YHt,W1n,28,2*g.length,15,1),0,i),g[i++]=r,ttn(v,w[u]);break n}if(xA(b)===xA(o))break}}if(s=v,w=v.g,h=i,i>g.length&&qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i),i>0){for(m=!0,c=0;c=0;)gjn(n,g[a]);if(i!=h){for(r=h;--r>=i;)gjn(s,r);qGn(g,0,g=Inn(YHt,W1n,28,i,15,1),0,i)}t=s}}}else for(t=cjn(n,t),r=n.i;--r>=0;)t.Hc(n.g[r])&&(gjn(n,r),m=!0);if(m){if(null!=g){for(f=1==(e=t.gc())?i2(n,4,t.Kc().Pb(),null,g[0],d):i2(n,6,t,g,g[0],d),l=e<100?null:new cj(e),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l?(l.nj(f),l.oj()):Msn(n.e,f)}else{for(l=qF(t.gc()),r=t.Kc();r.Ob();)l=X_(n,uG(b=r.Pb(),76),l);l&&l.oj()}return!0}return!1}function CJn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v;for((e=new qyn(t)).a||MUn(t),s=oBn(t),u=new K1,g=new BFn,d=new Ww(t.a);d.a0||i.o==dSt&&c=e}function AJn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;for(f=t,h=new K1,l=new K1,c=p6(f,yet),IOn((i=new SY(n,e,h,l)).a,i.b,i.c,i.d,c),d=(h.i||(h.i=new RD(h,h.c))).Kc();d.Ob();)for(w=uG(d.Pb(),166),o=uG(Y9(h,w),21).Kc();o.Ob();){if(a=o.Pb(),!(b=uG(dcn(n.d,a),166)))throw r=k6(f,Iet),hv(new SM(Det+a+xet+r+$et));!w.e&&(w.e=new f_(oFt,w,10,9)),ttn(w.e,b)}for(p=(l.i||(l.i=new RD(l,l.c))).Kc();p.Ob();)for(g=uG(p.Pb(),166),s=uG(Y9(l,g),21).Kc();s.Ob();){if(u=s.Pb(),!(b=uG(dcn(n.d,u),166)))throw r=k6(f,Iet),hv(new SM(Det+u+xet+r+$et));!g.g&&(g.g=new f_(oFt,g,9,10)),ttn(g.g,b)}!e.b&&(e.b=new f_(cFt,e,4,7)),0!=e.b.i&&(!e.c&&(e.c=new f_(cFt,e,5,8)),0!=e.c.i)&&(!e.b&&(e.b=new f_(cFt,e,4,7)),e.b.i<=1&&(!e.c&&(e.c=new f_(cFt,e,5,8)),e.c.i<=1))&&1==(!e.a&&(e.a=new fz(oFt,e,6,6)),e.a).i&&(hMn(m=uG(Vrn((!e.a&&(e.a=new fz(oFt,e,6,6)),e.a),0),166))||fMn(m)||(Xan(m,uG(Vrn((!e.b&&(e.b=new f_(cFt,e,4,7)),e.b),0),84)),Van(m,uG(Vrn((!e.c&&(e.c=new f_(cFt,e,5,8)),e.c),0),84))))}function LJn(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(k=0,y=(v=n.a).length;k0?(f=uG(Vq(l.c.a,a-1),10),j=y$(n.b,l,f),g=l.n.b-l.d.d-(f.n.b+f.o.b+f.d.a+j)):g=l.n.b-l.d.d,s=e.Math.min(g,s),a1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,1),8).b-f.b)))));else for(d=new Ww(t.j);d.ac&&(a=b.a-c,o=vZn,r.c.length=0,c=b.a),b.a>=c&&(mv(r.c,u),u.a.b>1&&(o=e.Math.min(o,e.Math.abs(uG(hyn(u.a,u.a.b-2),8).b-b.b)))));if(0!=r.c.length&&a>t.o.a/2&&o>t.o.b/2){for(o2(w=new lOn,t),NLn(w,(KQn(),yRt)),w.n.a=t.o.a/2,o2(g=new lOn,t),NLn(g,KRt),g.n.a=t.o.a/2,g.n.b=t.o.b,s=new Ww(r);s.a=h.b?c2(u,g):c2(u,w)):(h=uG(eG(u.a),8),(0==u.a.b?n3(u.c):uG(pR(u.a),8)).b>=h.b?u2(u,g):u2(u,w)),(l=uG(oIn(u,(jYn(),bMt)),75))&&Wpn(l,h,!0);t.n.a=c-t.o.a/2}}function $Jn(n,t,i){var r,c,a,o,u,s,h,f,l;for(u=Fkn(n.b,0);u.b!=u.d.c;)if(!m_((o=uG(I6(u),40)).c,H9n))for(h=xDn(o,n),t==(xdn(),JDt)||t==YDt?f$(h,new co):f$(h,new ao),s=h.c.length,r=0;r=0?Ipn(o):Gdn(Ipn(o)),n.qf(eTt,b)),s=new sj,l=!1,n.pf(WMt)?(_R(s,uG(n.of(WMt),8)),l=!0):mD(s,a.a/2,a.b/2),b.g){case 4:kfn(h,gMt,(Gpn(),Imt)),kfn(h,Npt,(Pfn(),ygt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),kRt)),l||(s.a=a.a),s.a-=a.a;break;case 2:kfn(h,gMt,(Gpn(),Amt)),kfn(h,Npt,(Pfn(),vgt)),h.o.b=a.b,d<0&&(h.o.a=-d),NLn(f,(KQn(),_Rt)),l||(s.a=0);break;case 1:kfn(h,Xpt,(Zen(),ppt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),KRt)),l||(s.b=a.b),s.b-=a.b;break;case 3:kfn(h,Xpt,(Zen(),dpt)),h.o.a=a.a,d<0&&(h.o.b=-d),NLn(f,(KQn(),yRt)),l||(s.b=0)}if(_R(f.n,s),kfn(h,WMt,s),t==rRt||t==aRt||t==cRt){if(w=0,t==rRt&&n.pf(YMt))switch(b.g){case 1:case 2:w=uG(n.of(YMt),17).a;break;case 3:case 4:w=-uG(n.of(YMt),17).a}else switch(b.g){case 4:case 2:w=c.b,t==aRt&&(w/=r.b);break;case 1:case 3:w=c.a,t==aRt&&(w/=r.a)}kfn(h,bmt,w)}return kfn(h,Fpt,b),h}function xJn(){function n(n){var t=this;this.dispatch=function(t){var e=t.data;switch(e.cmd){case"algorithms":var i=rmn((hZ(),new qw(new Fw(NFt.b))));n.postMessage({id:e.id,data:i});break;case"categories":var r=rmn((hZ(),new qw(new Fw(NFt.c))));n.postMessage({id:e.id,data:r});break;case"options":var c=rmn((hZ(),new qw(new Fw(NFt.d))));n.postMessage({id:e.id,data:c});break;case"register":Ozn(e.algorithms),n.postMessage({id:e.id});break;case"layout":zqn(e.graph,e.layoutOptions||{},e.options||{}),n.postMessage({id:e.id,data:e.graph})}},this.saveDispatch=function(e){try{t.dispatch(e)}catch(i){n.postMessage({id:e.data.id,error:i})}}}function e(t){var e=this;this.dispatcher=new n({postMessage:function(n){e.onmessage({data:n})}}),this.postMessage=function(n){setTimeout(function(){e.dispatcher.saveDispatch({data:n})},0)}}if(mj(),typeof document===r2n&&typeof self!==r2n){var r=new n(self);self.onmessage=r.saveDispatch}else typeof t!==r2n&&t.exports&&(Object.defineProperty(i,"__esModule",{value:!0}),t.exports={default:e,Worker:e})}function RJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(Vsn(h=new gMn(e),t),kfn(h,(GYn(),rmt),t),h.o.a=t.g,h.o.b=t.f,h.n.a=t.i,h.n.b=t.j,kD(e.a,h),vJ(n.a,t,h),(0!=(!t.a&&(t.a=new fz(bFt,t,10,11)),t.a).i||oM(gK(VDn(t,(jYn(),sMt)))))&&kfn(h,Cpt,(qx(),!0)),s=uG(oIn(e,Hpt),21),(f=uG(oIn(h,(jYn(),JMt)),101))==($Pn(),sRt)?kfn(h,JMt,uRt):f!=uRt&&s.Fc((r_n(),rpt)),l=0,i=uG(oIn(e,Byt),88),u=new DD((!t.c&&(t.c=new fz(wFt,t,9,9)),t.c));u.e!=u.i.gc();)o=uG(Zkn(u),123),(xA(VDn(r=R0(t),Syt))!==xA((yvn(),Fjt))||xA(VDn(r,Fyt))===xA((kvn(),lgt))||xA(VDn(r,Fyt))===xA((kvn(),hgt))||oM(gK(VDn(r,Cyt)))||xA(VDn(r,kyt))!==xA((Uvn(),tbt))||xA(VDn(r,yMt))===xA((THn(),Pjt))||xA(VDn(r,yMt))===xA((THn(),Cjt))||xA(VDn(r,MMt))===xA((MKn(),JTt))||xA(VDn(r,MMt))===xA((MKn(),ZTt)))&&!oM(gK(VDn(t,jyt)))&&Myn(o,imt,xwn(l++)),oM(gK(VDn(o,FMt)))||mQn(n,o,h,s,i,f);for(a=new DD((!t.n&&(t.n=new fz(lFt,t,1,7)),t.n));a.e!=a.i.gc();)!oM(gK(VDn(c=uG(Zkn(a),135),FMt)))&&c.a&&kD(h.b,own(c));return oM(gK(oIn(h,gyt)))&&s.Fc((r_n(),Zgt)),oM(gK(oIn(h,uMt)))&&(s.Fc((r_n(),ipt)),s.Fc(ept),kfn(h,JMt,uRt)),h}function KJn(n,t,i,r,c,a,o){var u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A;for(g=0,P=0,h=new Ww(n.b);h.ag&&(a&&(cL(T,w),cL(E,xwn(f.b-1)),kD(n.d,d),u.c.length=0),O=i.b,A+=w+t,w=0,l=e.Math.max(l,i.b+i.c+I)),mv(u.c,s),uyn(s,O,A),l=e.Math.max(l,O+I+i.c),w=e.Math.max(w,b),O+=I+t,d=s;if(Ohn(n.a,u),kD(n.d,uG(Vq(u,u.c.length-1),163)),l=e.Math.max(l,r),(C=A+w+i.a)r.d.d+r.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))),i.b!=i.d.c&&(t=e);f&&(c=uG(cQ(n.f,a.d.i),60),t.bc.d.d+c.d.a?f.f.d=!0:(f.f.d=!0,f.f.a=!0))}for(o=new FV(ix(qgn(b).a.Kc(),new h));hDn(o);)0!=(a=uG(N9(o),18)).a.b&&(t=uG(pR(a.a),8),a.d.j==(KQn(),yRt)&&((g=new Hqn(t,new MO(t.a,r.d.d),r,a)).f.a=!0,g.a=a.d,mv(d.c,g)),a.d.j==KRt&&((g=new Hqn(t,new MO(t.a,r.d.d+r.d.a),r,a)).f.d=!0,g.a=a.d,mv(d.c,g)))}return d}function GJn(n,t,e){var i,r,c,a,o,u,s,h,f,l;for(u=new Zm,f=t.length,a=Ffn(e),s=0;s=w&&(m>w&&(b.c.length=0,w=m),mv(b.c,a));0!=b.c.length&&(l=uG(Vq(b,iMn(t,b.c.length)),131),P.a.Bc(l),l.s=d++,zxn(l,E,M),b.c.length=0)}for(k=n.c.length+1,o=new Ww(n);o.aS.s&&(LQ(e),men(S.i,i),i.c>0&&(i.a=S,kD(S.t,i),i.b=T,kD(T.i,i)))}function VJn(n,t,e,i,r){var c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(w=new R7(t.b),m=new R7(t.b),l=new R7(t.b),M=new R7(t.b),d=new R7(t.b),y=Fkn(t,0);y.b!=y.d.c;)for(o=new Ww((v=uG(I6(y),12)).g);o.a0,g=v.g.c.length>0,s&&g?mv(l.c,v):s?mv(w.c,v):g&&mv(m.c,v);for(b=new Ww(w);b.av.nh()-h.b&&(b=v.nh()-h.b),w>v.oh()-h.d&&(w=v.oh()-h.d),f0){for(k=Fkn(n.f,0);k.b!=k.d.c;)uG(I6(k),10).p+=w-n.e;kAn(n),BY(n.f),O_n(n,r,d)}else{for(aq(n.f,d),d.p=r,n.e=e.Math.max(n.e,r),a=new FV(ix(qgn(d).a.Kc(),new h));hDn(a);)(c=uG(N9(a),18)).c.i.c||c.c.i.k!=(VIn(),bbt)||(aq(n.f,c.c.i),c.c.i.p=r-1);n.c=r}else kAn(n),BY(n.f),r=0,hDn(new FV(ix(qgn(d).a.Kc(),new h)))?O_n(n,r=(w=Pyn(w=0,d))+2,d):(aq(n.f,d),d.p=0,n.e=e.Math.max(n.e,0),n.b=uG(Vq(n.d.b,0),30),n.c=0);for(0==n.f.b||kAn(n),n.d.a.c.length=0,v=new Zm,f=new Ww(n.d.b);f.a=48&&t<=57))throw hv(new CM(rZn((t$(),Nit))));for(i=t-48;r=48&&t<=57;)if((i=10*i+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(e=i,44==t){if(r>=n.j)throw hv(new CM(rZn((t$(),Dit))));if((t=zJ(n.i,r++))>=48&&t<=57){for(e=t-48;r=48&&t<=57;)if((e=10*e+t-48)<0)throw hv(new CM(rZn((t$(),Rit))));if(i>e)throw hv(new CM(rZn((t$(),xit))))}else e=-1}if(125!=t)throw hv(new CM(rZn((t$(),$it))));n.bm(r)?(QYn(),QYn(),c=new n8(9,c),n.d=r+1):(QYn(),QYn(),c=new n8(3,c),n.d=r),c.Om(i),c.Nm(e),EYn(n)}}return c}function iYn(n){var t,e,i;switch(e=uG(oIn(n,(GYn(),Hpt)),21),t=aN(klt),uG(oIn(n,(jYn(),rMt)),346)==(Own(),Ixt)&&gsn(t,ylt),oM(gK(oIn(n,eMt)))?Aq(t,(uIn(),Tlt),(VYn(),Iwt)):Aq(t,(uIn(),Elt),(VYn(),Iwt)),null!=oIn(n,(K7(),jNt))&&gsn(t,Mlt),(oM(gK(oIn(n,fMt)))||oM(gK(oIn(n,iMt))))&&wV(t,(uIn(),Plt),(VYn(),Ubt)),uG(oIn(n,Byt),88).g){case 2:case 3:case 4:wV(Aq(t,(uIn(),Tlt),(VYn(),qbt)),Plt,Gbt)}switch(e.Hc((r_n(),Zgt))&&wV(Aq(Aq(t,(uIn(),Tlt),(VYn(),Hbt)),Slt,_bt),Plt,Bbt),xA(oIn(n,yMt))!==xA((THn(),$jt))&&Aq(t,(uIn(),Elt),(VYn(),ywt)),e.Hc(apt)&&(Aq(t,(uIn(),Tlt),(VYn(),Pwt)),Aq(t,jlt,Ewt),Aq(t,Elt,Swt)),xA(oIn(n,vyt))!==xA((RIn(),zgt))&&xA(oIn(n,zyt))!==xA((_gn(),sxt))&&wV(t,(uIn(),Plt),(VYn(),rwt)),oM(gK(oIn(n,aMt)))&&Aq(t,(uIn(),Elt),(VYn(),iwt)),oM(gK(oIn(n,Ryt)))&&Aq(t,(uIn(),Elt),(VYn(),Dwt)),CRn(n)&&(i=(xA(oIn(n,rMt))===xA(Ixt)?uG(oIn(n,Oyt),299):uG(oIn(n,Ayt),299))==(ihn(),fpt)?(VYn(),jwt):(VYn(),Kwt),Aq(t,(uIn(),Slt),i)),uG(oIn(n,qTt),388).g){case 1:Aq(t,(uIn(),Slt),(VYn(),xwt));break;case 2:wV(Aq(Aq(t,(uIn(),Elt),(VYn(),xbt)),Slt,Rbt),Plt,Kbt)}return xA(oIn(n,Syt))!==xA((yvn(),Fjt))&&Aq(t,(uIn(),Elt),(VYn(),Rwt)),t}function rYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v;if(Pz(n.a,t)){if(cS(uG(cQ(n.a,t),49),e))return 1}else vJ(n.a,t,new ek);if(Pz(n.a,e)){if(cS(uG(cQ(n.a,e),49),t))return-1}else vJ(n.a,e,new ek);if(Pz(n.e,t)){if(cS(uG(cQ(n.e,t),49),e))return-1}else vJ(n.e,t,new ek);if(Pz(n.e,e)){if(cS(uG(cQ(n.a,e),49),t))return 1}else vJ(n.e,e,new ek);if(n.c==(yvn(),_jt)||!vR(t,(GYn(),imt))||!vR(e,(GYn(),imt))){for(f=null,s=new Ww(t.j);s.a(a=_Sn(n,e))?uHn(n,t,e):uHn(n,e,t),ra?1:0}return(i=uG(oIn(t,(GYn(),imt)),17).a)>(c=uG(oIn(e,imt),17).a)?uHn(n,t,e):uHn(n,e,t),ic?1:0}function cYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d;if(null==e)return null;if(n.a!=t.jk())throw hv(new vM(tet+t.xe()+eet));if(F$(t,469)){if(!(d=y_n(uG(t,685),e)))throw hv(new vM(iet+e+"' is not a valid enumerator of '"+t.xe()+"'"));return d}switch(tdn((gAn(),kBt),t).Nl()){case 2:e=yXn(e,!1);break;case 3:e=yXn(e,!0)}if(i=tdn(kBt,t).Jl())return i.jk().wi().ti(i,e);if(f=tdn(kBt,t).Ll()){for(d=new Zm,s=0,h=(u=Fln(e)).length;s1)for(b=new Zx((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a));b.e!=b.i.gc();)$Sn(b);for(d=C,C>k+v?d=k+v:Cy+w?g=y+w:Ik-v&&dy-w&&gC+P?T=C+P:kI+M?j=I+M:yC-P&&TI-M&&ji&&(f=i-1),(l=N+uRn(t,24)*V0n*h-h/2)<0?l=1:l>r&&(l=r-1),gj(),Scn(c=new ns,f),pcn(c,l),ttn((!o.a&&(o.a=new MD(eFt,o,5)),o.a),c)}function lYn(n){hP(n,new hCn(FT(DT(KT(RT(new bu,ant),"ELK Rectangle Packing"),"Algorithm for packing of unconnected boxes, i.e. graphs without edges. The given order of the boxes is always preserved and the main reading direction of the boxes is left to right. The algorithm is divided into two phases. One phase approximates the width in which the rectangles can be placed. The next phase places the rectangles in rows using the previously calculated width as bounding width and bundles rectangles with a similar height in blocks. A compaction step reduces the size of the drawing. Finally, the rectangles are expanded to fill their bounding box and eliminate empty unused spaces."),new _o))),U4(n,ant,R3n,1.3),U4(n,ant,d4n,(qx(),!1)),U4(n,ant,K3n,fAt),U4(n,ant,o4n,15),U4(n,ant,r9n,Jkn(WOt)),U4(n,ant,p4n,Jkn(eAt)),U4(n,ant,x4n,Jkn(rAt)),U4(n,ant,g4n,Jkn(cAt)),U4(n,ant,m4n,Jkn(tAt)),U4(n,ant,w4n,Jkn(aAt)),U4(n,ant,v4n,Jkn(lAt)),U4(n,ant,J7n,Jkn(pAt)),U4(n,ant,Y7n,Jkn(gAt)),U4(n,ant,Q7n,Jkn(vAt)),U4(n,ant,W7n,Jkn(mAt)),U4(n,ant,Z7n,Jkn(sAt)),U4(n,ant,nnt,Jkn(uAt)),U4(n,ant,tnt,Jkn(oAt)),U4(n,ant,ent,Jkn(dAt)),U4(n,ant,f4n,Jkn(YOt)),U4(n,ant,g9n,Jkn(ZOt)),U4(n,ant,V7n,Jkn(JOt)),U4(n,ant,X7n,Jkn(QOt)),U4(n,ant,z7n,Jkn(nAt)),U4(n,ant,q7n,Jkn(wAt))}function bYn(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(pXn(),j=n.e,w=n.d,r=n.a,0==j)switch(t){case 0:return"0";case 1:return N0n;case 2:return"0.00";case 3:return"0.000";case 4:return"0.0000";case 5:return"0.00000";case 6:return"0.000000";default:return(M=new WM).a+=t<0?"0E+":"0E",M.a+=-t,M.a}if(k=Inn(JHt,N1n,28,1+(v=10*w+1+7),15,1),e=v,1==w)if((o=r[0])<0){C=E3(o,L0n);do{d=C,C=bSn(C,10),k[--e]=48+pV($gn(d,Ngn(C,10)))&D1n}while(0!=dwn(C,0))}else{C=o;do{d=C,C=C/10|0,k[--e]=d-10*C+48&D1n}while(0!=C)}else{qGn(r,0,S=Inn(YHt,W1n,28,w,15,1),0,P=w);n:for(;;){for(T=0,s=P-1;s>=0;s--)p=JPn(Lgn(NV(T,32),E3(S[s],L0n))),S[s]=pV(p),T=pV($V(p,32));m=pV(T),g=e;do{k[--e]=48+m%10&D1n}while(0!=(m=m/10|0)&&0!=e);for(i=9-g+e,u=0;u0;u++)k[--e]=48;for(f=P-1;0==S[f];f--)if(0==f)break n;P=f+1}for(;48==k[e];)++e}if(b=j<0,a=v-e-t-1,0==t)return b&&(k[--e]=45),mvn(k,e,v-e);if(t>0&&a>=-6){if(a>=0){for(h=e+a,l=v-1;l>=h;l--)k[l+1]=k[l];return k[++h]=46,b&&(k[--e]=45),mvn(k,e,v-e+1)}for(f=2;f<1-a;f++)k[--e]=48;return k[--e]=46,k[--e]=48,b&&(k[--e]=45),mvn(k,e,v-e)}return E=e+1,c=v,y=new QM,b&&(y.a+="-"),c-E>=1?(jQ(y,k[e]),y.a+=".",y.a+=mvn(k,e+1,v-e-1)):y.a+=mvn(k,e,v-e),y.a+="E",a>0&&(y.a+="+"),y.a+=""+a,y.a}function wYn(n,t){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y;switch(n.c=t,n.g=new Ym,vP(),Apn(new Ad(new zy(n.c))),m=mK(VDn(n.c,(fIn(),dLt))),o=uG(VDn(n.c,pLt),324),k=uG(VDn(n.c,mLt),437),c=uG(VDn(n.c,hLt),490),v=uG(VDn(n.c,gLt),438),n.j=uM(pK(VDn(n.c,vLt))),a=n.a,o.g){case 0:a=n.a;break;case 1:a=n.b;break;case 2:a=n.i;break;case 3:a=n.e;break;case 4:a=n.f;break;default:throw hv(new vM(lnt+(null!=o.f?o.f:""+o.g)))}if(n.d=new i0(a,k,c),kfn(n.d,(rsn(),Oht),gK(VDn(n.c,lLt))),n.d.c=oM(gK(VDn(n.c,fLt))),0==wZ(n.c).i)return n.d;for(h=new DD(wZ(n.c));h.e!=h.i.gc();){for(l=(s=uG(Zkn(h),27)).g/2,f=s.f/2,y=new MO(s.i+l,s.j+f);Pz(n.g,y);)KR(y,(e.Math.random()-.5)*t4n,(e.Math.random()-.5)*t4n);w=uG(VDn(s,(XYn(),$$t)),140),d=new G0(y,new gY(y.a-l-n.j/2-w.b,y.b-f-n.j/2-w.d,s.g+n.j+(w.b+w.c),s.f+n.j+(w.d+w.a))),kD(n.d.i,d),vJ(n.g,y,new WO(d,s))}switch(v.g){case 0:if(null==m)n.d.d=uG(Vq(n.d.i,0),68);else for(p=new Ww(n.d.i);p.a0?S+1:1);for(a=new Ww(y.g);a.a0?S+1:1)}0==n.c[s]?aq(n.e,d):0==n.a[s]&&aq(n.f,d),++s}for(w=-1,b=1,f=new Zm,n.d=uG(oIn(t,(GYn(),dmt)),234);A>0;){for(;0!=n.e.b;)C=uG(tG(n.e),10),n.b[C.p]=w--,eUn(n,C),--A;for(;0!=n.f.b;)I=uG(tG(n.f),10),n.b[I.p]=b++,eUn(n,I),--A;if(A>0){for(l=j1n,m=new Ww(v);m.a=l&&(k>l&&(f.c.length=0,l=k),mv(f.c,d));h=n.sg(f),n.b[h.p]=b++,eUn(n,h),--A}}for(P=v.c.length+1,s=0;sn.b[O]&&(pqn(i,!0),kfn(t,Lpt,(qx(),!0)));n.a=null,n.c=null,n.b=null,BY(n.f),BY(n.e),e.Vg()}function pYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T;for(M=uG(Vrn((!n.a&&(n.a=new fz(oFt,n,6,6)),n.a),0),166),f=new Uk,y=new Ym,T=sGn(M),zAn(y.f,M,T),b=new Ym,r=new lS,d=Oz(Vcn(Uhn(cT(vat,1),EZn,20,0,[(!t.d&&(t.d=new f_(aFt,t,8,5)),t.d),(!t.e&&(t.e=new f_(aFt,t,7,4)),t.e)])));hDn(d);){if(w=uG(N9(d),74),1!=(!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i)throw hv(new vM(Ptt+(!n.a&&(n.a=new fz(oFt,n,6,6)),n.a).i));w!=n&&(s8(r,p=uG(Vrn((!w.a&&(w.a=new fz(oFt,w,6,6)),w.a),0),166),r.c.b,r.c),(g=uG(DA(FX(y.f,p)),13))||(g=sGn(p),zAn(y.f,p,g)),l=i?YF(new eN(uG(Vq(T,T.c.length-1),8)),uG(Vq(g,g.c.length-1),8)):YF(new eN((u3(0,T.c.length),uG(T.c[0],8))),(u3(0,g.c.length),uG(g.c[0],8))),zAn(b.f,p,l))}if(0!=r.b)for(m=uG(Vq(T,i?T.c.length-1:0),8),h=1;h1&&s8(f,m,f.c.b,f.c),yrn(c)));m=v}return f}function mYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S;for(e.Ug(o7n,1),S=uG(l8(JJ(new fX(null,new h3(t,16)),new wo),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),h=uG(l8(JJ(new fX(null,new h3(t,16)),new Lp(t)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),w=uG(l8(JJ(new fX(null,new h3(t,16)),new Ap(t)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[Iut]))),15),d=Inn(lPt,V9n,40,t.gc(),0,1),a=0;a=0&&E=0&&!d[b]){d[b]=r,h.gd(o),--o;break}if((b=E-l)=0&&!d[b]){d[b]=r,h.gd(o),--o;break}}for(w.jd(new go),u=d.length-1;u>=0;u--)d[u]||w.dc()||(d[u]=uG(w.Xb(0),40),w.gd(0));for(s=0;s=0;u--)aq(e,(u3(u,a.c.length),uG(a.c[u],8)));return e}function kYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(v=uM(pK(VDn(t,(lBn(),POt)))),b=uM(pK(VDn(t,EOt))),l=uM(pK(VDn(t,MOt))),Non((!t.a&&(t.a=new fz(bFt,t,10,11)),t.a)),p=oVn((!t.a&&(t.a=new fz(bFt,t,10,11)),t.a),v,n.b),g=0;gl&&uEn((u3(l,t.c.length),uG(t.c[l],186)),h),h=null;t.c.length>l&&0==(u3(l,t.c.length),uG(t.c[l],186)).a.c.length;)men(t,(u3(l,t.c.length),t.c[l]));if(!h){--a;continue}if(!oM(gK(uG(Vq(h.b,0),27).of((S_n(),nAt))))&&BUn(t,w,c,h,g,e,l,i)){d=!0;continue}if(g){if(b=w.b,f=h.f,!oM(gK(uG(Vq(h.b,0),27).of(nAt)))&&Ezn(t,w,c,h,e,l,i,r)){if(d=!0,b=n.j)return n.a=-1,void(n.c=1);if(t=zJ(n.i,n.d++),n.a=t,1!=n.b){switch(t){case 124:i=2;break;case 42:i=3;break;case 43:i=4;break;case 63:i=5;break;case 41:i=7;break;case 46:i=8;break;case 91:i=9;break;case 94:i=11;break;case 36:i=12;break;case 40:if(i=6,n.d>=n.j)break;if(63!=zJ(n.i,n.d))break;if(++n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));switch(t=zJ(n.i,n.d++)){case 58:i=13;break;case 61:i=14;break;case 33:i=15;break;case 91:i=19;break;case 62:i=18;break;case 60:if(n.d>=n.j)throw hv(new CM(rZn((t$(),iit))));if(61==(t=zJ(n.i,n.d++)))i=16;else{if(33!=t)throw hv(new CM(rZn((t$(),rit))));i=17}break;case 35:for(;n.d=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=zJ(n.i,n.d++);break;default:i=0}n.c=i}else{switch(t){case 92:if(i=10,n.d>=n.j)throw hv(new CM(rZn((t$(),eit))));n.a=zJ(n.i,n.d++);break;case 45:!(512&~n.e)&&n.df&&(f=d.e.a+d.f.a+b),l=f+u.f.a;break;case 4:f=g.b-b-u.f.b,d.e.b-b-u.f.bf&&(f=d.e.b+d.f.b+b),l=f+u.f.b}else if(d)switch(r.g){case 2:l=(f=d.e.a-b-u.f.a)+u.f.a;break;case 1:l=(f=d.e.a+d.f.a+b)+u.f.a;break;case 4:l=(f=d.e.b-b-u.f.b)+u.f.b;break;case 3:l=(f=d.e.b+d.f.b+b)+u.f.b}xA(oIn(t,uCt))===xA((Pln(),wPt))?(c=f,a=l,null!=(o=lln(JJ(new fX(null,new h3(n.a,16)),new GI(c,a)))).a?r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f:null!=(o=r==(xdn(),JDt)||r==nxt?lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Ep(c))):lln(JJ(Wrn(new fX(null,new h3(n.a,16))),new Sp(c)))).a&&(r==JDt||r==YDt?u.e.a=uM(pK((MK(null!=o.a),uG(o.a,42)).a)):u.e.b=uM(pK((MK(null!=o.a),uG(o.a,42)).a))),null!=o.a&&(h=Ten(n.a,(MK(null!=o.a),o.a),0))>0&&h!=uG(oIn(u,ACt),17).a&&(kfn(u,MPt,(qx(),!0)),kfn(u,ACt,xwn(h)))):r==(xdn(),JDt)||r==YDt?u.e.a=f:u.e.b=f}e.Vg()}}function PYn(n){var t,e,i,r,c,a,o,u;for(n.b=1,EYn(n),t=null,0==n.c&&94==n.a?(EYn(n),QYn(),QYn(),HFn(t=new K3(4),0,Vct),a=new K3(4)):(QYn(),QYn(),a=new K3(4)),r=!0;1!=(u=n.c);){if(0==u&&93==n.a&&!r){t&&(lWn(t,a),a=t);break}if(e=n.a,i=!1,10==u)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(a,yUn(e)),i=!0;break;case 105:case 73:case 99:case 67:TXn(a,yUn(e)),(e=-1)<0&&(i=!0);break;case 112:case 80:if(!(o=PNn(n,e)))throw hv(new CM(rZn((t$(),git))));TXn(a,o),i=!0;break;default:e=R_n(n)}else if(24==u&&!r){if(t&&(lWn(t,a),a=t),lWn(a,PYn(n)),0!=n.c||93!=n.a)throw hv(new CM(rZn((t$(),kit))));break}if(EYn(n),!i){if(0==u){if(91==e)throw hv(new CM(rZn((t$(),yit))));if(93==e)throw hv(new CM(rZn((t$(),Mit))));if(45==e&&!r&&93!=n.a)throw hv(new CM(rZn((t$(),Tit))))}if(0!=n.c||45!=n.a||45==e&&r)HFn(a,e,e);else{if(EYn(n),1==(u=n.c))throw hv(new CM(rZn((t$(),mit))));if(0==u&&93==n.a)HFn(a,e,e),HFn(a,45,45);else{if(0==u&&93==n.a||24==u)throw hv(new CM(rZn((t$(),Tit))));if(c=n.a,0==u){if(91==c)throw hv(new CM(rZn((t$(),yit))));if(93==c)throw hv(new CM(rZn((t$(),Mit))));if(45==c)throw hv(new CM(rZn((t$(),Tit))))}else 10==u&&(c=R_n(n));if(EYn(n),e>c)throw hv(new CM(rZn((t$(),Sit))));HFn(a,e,c)}}}r=!1}if(1==n.c)throw hv(new CM(rZn((t$(),mit))));return pxn(a),uVn(a),n.b=0,EYn(n),a}function CYn(n,t,e){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M;if(e.Ug("Coffman-Graham Layering",1),0!=t.a.c.length){for(M=uG(oIn(t,(jYn(),wMt)),17).a,u=0,a=0,b=new Ww(t.a);b.a=M||!cvn(m,i))&&(i=CJ(t,f)),a2(m,i),c=new FV(ix(qgn(m).a.Kc(),new h));hDn(c);)r=uG(N9(c),18),n.a[r.p]||(g=r.c.i,--n.e[g.p],0==n.e[g.p]&&kG(_Cn(w,g),D0n));for(s=f.c.length-1;s>=0;--s)kD(t.b,(u3(s,f.c.length),uG(f.c[s],30)));t.a.c.length=0,e.Vg()}else e.Vg()}function IYn(n,t){var e,i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k;k=!1;do{for(k=!1,c=t?new Lw(n.a.b).a.gc()-2:1;t?c>=0:cuG(oIn(g,imt),17).a)&&(v=!1);if(v){for(o=t?c+1:c-1,a=!1,m=!0,i=!1,s=Fkn(W6(n.a,xwn(o)),0);s.b!=s.d.c;)vR(u=uG(I6(s),10),imt)?u.p!=f.p&&(a|=t?uG(oIn(u,imt),17).auG(oIn(f,imt),17).a,m=!1):!a&&m&&u.k==(VIn(),bbt)&&(i=!0,(l=t?uG(N9(new FV(ix(qgn(u).a.Kc(),new h))),18).c.i:uG(N9(new FV(ix(Xgn(u).a.Kc(),new h))),18).d.i)==f&&(e=t?uG(N9(new FV(ix(Xgn(u).a.Kc(),new h))),18).d.i:uG(N9(new FV(ix(qgn(u).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,l),17).a:uG(ER(n.a,l),17).a-uG(ER(n.a,e),17).a)<=2&&(m=!1)));if(i&&m&&(e=t?uG(N9(new FV(ix(Xgn(f).a.Kc(),new h))),18).d.i:uG(N9(new FV(ix(qgn(f).a.Kc(),new h))),18).c.i,(t?uG(ER(n.a,e),17).a-uG(ER(n.a,f),17).a:uG(ER(n.a,f),17).a-uG(ER(n.a,e),17).a)<=2&&e.k==(VIn(),dbt)&&(m=!1)),a||m){for(d=SRn(n,f,t);0!=d.a.gc();)w=uG(d.a.ec().Kc().Pb(),10),d.a.Bc(w),Qon(d,SRn(n,w,t));--b,k=!0}}}}while(k)}function OYn(n){Hxn(n.c,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#decimal"])),Hxn(n.d,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#integer"])),Hxn(n.e,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#boolean"])),Hxn(n.f,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EBoolean",Bet,"EBoolean:Object"])),Hxn(n.i,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#byte"])),Hxn(n.g,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#hexBinary"])),Hxn(n.j,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EByte",Bet,"EByte:Object"])),Hxn(n.n,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EChar",Bet,"EChar:Object"])),Hxn(n.t,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#double"])),Hxn(n.u,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EDouble",Bet,"EDouble:Object"])),Hxn(n.F,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#float"])),Hxn(n.G,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EFloat",Bet,"EFloat:Object"])),Hxn(n.I,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#int"])),Hxn(n.J,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EInt",Bet,"EInt:Object"])),Hxn(n.N,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#long"])),Hxn(n.O,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"ELong",Bet,"ELong:Object"])),Hxn(n.Z,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#short"])),Hxn(n.$,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"EShort",Bet,"EShort:Object"])),Hxn(n._,Ert,Uhn(cT($ot,1),VZn,2,6,[Krt,"http://www.w3.org/2001/XMLSchema#string"]))}function AYn(n,t,e,i,r,c,a){var o,u,s,h,f,l,b,w;return l=uG(i.a,17).a,b=uG(i.b,17).a,f=n.b,w=n.c,o=0,h=0,t==(xdn(),JDt)||t==YDt?(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new mo),new Ya))),f.e.b+f.f.b/2>h?(s=++b,o=uM(pK(yx(WV(YJ(new fX(null,new h3(e.b,16)),new pO(r,s)),new Za))))):(u=++l,o=uM(pK(yx(QV(YJ(new fX(null,new h3(e.b,16)),new mO(r,u)),new no)))))):(h=$I(jdn(ZJ(YJ(new fX(null,new h3(e.b,16)),new ro),new Ja))),f.e.a+f.f.a/2>h?(s=++b,o=uM(pK(yx(WV(YJ(new fX(null,new h3(e.b,16)),new dO(r,s)),new to))))):(u=++l,o=uM(pK(yx(QV(YJ(new fX(null,new h3(e.b,16)),new gO(r,u)),new eo)))))),t==JDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),DPt))))-r,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,o)),cL(n.a,new MO(w.e.a+w.f.a+r+c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a+w.f.a,w.e.b+w.f.b/2))):t==YDt?(cL(n.a,new MO(uM(pK(oIn(f,(OQn(),$Pt))))+r,f.e.b+f.f.b/2)),cL(n.a,new MO(f.e.a+f.f.a+r,o)),cL(n.a,new MO(w.e.a-r-c,o)),cL(n.a,new MO(w.e.a-r-c,w.e.b+w.f.b/2)),cL(n.a,new MO(w.e.a,w.e.b+w.f.b/2))):t==nxt?(cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),DPt))))-r)),cL(n.a,new MO(o,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r+c)),cL(n.a,new MO(w.e.a+w.f.a/2,w.e.b+w.f.b+r))):(0==n.a.b||(uG(pR(n.a),8).b=uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a),cL(n.a,new MO(o,uM(pK(oIn(f,(OQn(),$Pt))))+r*uG(a.b,17).a)),cL(n.a,new MO(o,w.e.b-r*uG(a.a,17).a-c))),new WO(xwn(l),xwn(b))}function LYn(n){var t,e,i,r,c,a,o,u,s,h,f,l,b;if(a=!0,f=null,i=null,r=null,t=!1,b=HFt,s=null,c=null,(u=jkn(n,o=0,YFt,ZFt))=0&&m_(n.substr(o,2),"//")?(Knn(o+=2,u=jkn(n,o,n_t,t_t),n.length),i=n.substr(o,u-o),o=u):null==f||o!=n.length&&(s3(o,n.length),47==n.charCodeAt(o))||(a=!1,-1==(u=cx(n,$Cn(35),o))&&(u=n.length),Knn(o,u,n.length),i=n.substr(o,u-o),o=u);if(!e&&o0&&58==zJ(h,h.length-1)&&(r=h,o=u)),ouxn(c))&&(f=c);for(!f&&(u3(0,d.c.length),f=uG(d.c[0],185)),w=new Ww(t.b);w.al&&(P=0,C+=f+T,f=0),iUn(y,o,P,C),t=e.Math.max(t,P+M.a),f=e.Math.max(f,M.b),P+=M.a+T;for(k=new Ym,i=new Ym,E=new Ww(n);E.a=-1900?1:0,JA(n,e>=4?Uhn(cT($ot,1),VZn,2,6,[Q1n,J1n])[a]:Uhn(cT($ot,1),VZn,2,6,["BC","AD"])[a]);break;case 121:Kkn(n,e,i);break;case 77:nUn(n,e,i);break;case 107:Fen(n,0==(o=r.q.getHours())?24:o,e);break;case 83:PRn(n,e,r);break;case 69:u=i.q.getDay(),JA(n,5==e?Uhn(cT($ot,1),VZn,2,6,["S","M","T","W","T","F","S"])[u]:4==e?Uhn(cT($ot,1),VZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[u]:Uhn(cT($ot,1),VZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[u]);break;case 97:r.q.getHours()>=12&&r.q.getHours()<24?JA(n,Uhn(cT($ot,1),VZn,2,6,["AM","PM"])[1]):JA(n,Uhn(cT($ot,1),VZn,2,6,["AM","PM"])[0]);break;case 104:Fen(n,0==(s=r.q.getHours()%12)?12:s,e);break;case 75:Fen(n,r.q.getHours()%12,e);break;case 72:Fen(n,r.q.getHours(),e);break;case 99:h=i.q.getDay(),5==e?JA(n,Uhn(cT($ot,1),VZn,2,6,["S","M","T","W","T","F","S"])[h]):4==e?JA(n,Uhn(cT($ot,1),VZn,2,6,[Y1n,Z1n,n0n,t0n,e0n,i0n,r0n])[h]):3==e?JA(n,Uhn(cT($ot,1),VZn,2,6,["Sun","Mon","Tue","Wed","Thu","Fri","Sat"])[h]):Fen(n,h,1);break;case 76:f=i.q.getMonth(),5==e?JA(n,Uhn(cT($ot,1),VZn,2,6,["J","F","M","A","M","J","J","A","S","O","N","D"])[f]):4==e?JA(n,Uhn(cT($ot,1),VZn,2,6,[x1n,R1n,K1n,F1n,_1n,B1n,H1n,U1n,G1n,q1n,X1n,V1n])[f]):3==e?JA(n,Uhn(cT($ot,1),VZn,2,6,["Jan","Feb","Mar","Apr",_1n,"Jun","Jul","Aug","Sep","Oct","Nov","Dec"])[f]):Fen(n,f+1,e);break;case 81:l=i.q.getMonth()/3|0,JA(n,e<4?Uhn(cT($ot,1),VZn,2,6,["Q1","Q2","Q3","Q4"])[l]:Uhn(cT($ot,1),VZn,2,6,["1st quarter","2nd quarter","3rd quarter","4th quarter"])[l]);break;case 100:Fen(n,i.q.getDate(),e);break;case 109:Fen(n,r.q.getMinutes(),e);break;case 115:Fen(n,r.q.getSeconds(),e);break;case 122:JA(n,e<4?c.c[0]:c.c[1]);break;case 118:JA(n,c.b);break;case 90:JA(n,e<3?GLn(c):3==e?rNn(c):cNn(c.a));break;default:return!1}return!0}function FYn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C;if(iHn(t),u=uG(Vrn((!t.b&&(t.b=new f_(cFt,t,4,7)),t.b),0),84),h=uG(Vrn((!t.c&&(t.c=new f_(cFt,t,5,8)),t.c),0),84),o=lCn(u),s=lCn(h),a=0==(!t.a&&(t.a=new fz(oFt,t,6,6)),t.a).i?null:uG(Vrn((!t.a&&(t.a=new fz(oFt,t,6,6)),t.a),0),166),M=uG(cQ(n.a,o),10),S=uG(cQ(n.a,s),10),T=null,P=null,F$(u,193)&&(F$(y=uG(cQ(n.a,u),305),12)?T=uG(y,12):F$(y,10)&&(M=uG(y,10),T=uG(Vq(M.j,0),12))),F$(h,193)&&(F$(E=uG(cQ(n.a,h),305),12)?P=uG(E,12):F$(E,10)&&(S=uG(E,10),P=uG(Vq(S.j,0),12))),!M||!S)throw hv(new EM("The source or the target of edge "+t+" could not be found. This usually happens when an edge connects a node laid out by ELK Layered to a node in another level of hierarchy laid out by either another instance of ELK Layered or another layout algorithm alltogether. The former can be solved by setting the hierarchyHandling option to INCLUDE_CHILDREN."));for(Vsn(d=new UZ,t),kfn(d,(GYn(),rmt),t),kfn(d,(jYn(),bMt),null),b=uG(oIn(i,Hpt),21),M==S&&b.Fc((r_n(),opt)),T||(can(),k=Wjt,j=null,a&&sN(uG(oIn(M,JMt),101))&&($5(j=new MO(a.j,a.k),s0(t)),Q8(j,e),Ern(s,o)&&(k=zjt,JF(j,M.n))),T=LXn(M,j,k,i)),P||(can(),k=zjt,C=null,a&&sN(uG(oIn(S,JMt),101))&&($5(C=new MO(a.b,a.c),s0(t)),Q8(C,e)),P=LXn(S,C,k,HQ(S))),c2(d,T),u2(d,P),(T.e.c.length>1||T.g.c.length>1||P.e.c.length>1||P.g.c.length>1)&&b.Fc((r_n(),ept)),l=new DD((!t.n&&(t.n=new fz(lFt,t,1,7)),t.n));l.e!=l.i.gc();)if(!oM(gK(VDn(f=uG(Zkn(l),135),FMt)))&&f.a)switch(g=own(f),kD(d.b,g),uG(oIn(g,Xyt),278).g){case 1:case 2:b.Fc((r_n(),npt));break;case 0:b.Fc((r_n(),Ygt)),kfn(g,Xyt,(Zrn(),ixt))}if(c=uG(oIn(i,Kyt),322),p=uG(oIn(i,$Mt),323),r=c==(jan(),Ydt)||p==(pyn(),kjt),a&&0!=(!a.a&&(a.a=new MD(eFt,a,5)),a.a).i&&r){for(m=COn(a),w=new Uk,v=Fkn(m,0);v.b!=v.d.c;)aq(w,new eN(uG(I6(v),8)));kfn(d,cmt,w)}return d}function _Yn(n,t,e,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I;for(j=0,E=0,M=new Ym,k=uG(yx(WV(YJ(new fX(null,new h3(n.b,16)),new io),new fo)),17).a+1,T=Inn(YHt,W1n,28,k,15,1),d=Inn(YHt,W1n,28,k,15,1),w=0;w1)for(o=P+1;ou.b.e.b*(1-g)+u.c.e.b*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.b>m.b&&u.c.e.b>m.b)continue;if(b<=0&&C.bu.b.e.a*(1-g)+u.c.e.a*g));b++);if(y.gc()>0){if(C=0==u.a.b?D$(u.b.e):uG(pR(u.a),8),m=JF(D$(uG(y.Xb(y.gc()-1),40).e),uG(y.Xb(y.gc()-1),40).f),f=JF(D$(uG(y.Xb(0),40).e),uG(y.Xb(0),40).f),b>=y.gc()-1&&C.a>m.a&&u.c.e.a>m.a)continue;if(b<=0&&C.a=uM(pK(oIn(n,(OQn(),CPt))))&&++E):(l.f&&l.d.e.a<=uM(pK(oIn(n,(OQn(),PPt))))&&++j,l.g&&l.c.e.a+l.c.f.a>=uM(pK(oIn(n,(OQn(),SPt))))&&++E)}else 0==v?hNn(u):v<0&&(++T[P],++d[I],j=uG((S=AYn(u,t,n,new WO(xwn(j),xwn(E)),e,i,new WO(xwn(d[I]),xwn(T[P])))).a,17).a,E=uG(S.b,17).a)}function BYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m;if(i=t,u=e,n.b&&i.j==(KQn(),_Rt)&&u.j==(KQn(),_Rt)&&(m=i,i=u,u=m),Pz(n.a,i)){if(cS(uG(cQ(n.a,i),49),u))return 1}else vJ(n.a,i,new ek);if(Pz(n.a,u)){if(cS(uG(cQ(n.a,u),49),i))return-1}else vJ(n.a,u,new ek);if(Pz(n.d,i)){if(cS(uG(cQ(n.d,i),49),u))return-1}else vJ(n.d,i,new ek);if(Pz(n.d,u)){if(cS(uG(cQ(n.a,u),49),i))return 1}else vJ(n.d,u,new ek);if(i.j!=u.j)return-1==(p=bN(i.j,u.j))?hHn(n,u,i):hHn(n,i,u),p;if(0!=i.e.c.length&&0!=u.e.c.length){if(n.b&&0!=(p=Dbn(i,u)))return-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p;if((c=uG(Vq(i.e,0),18).c.i)==(h=uG(Vq(u.e,0),18).c.i))return(r=uG(oIn(uG(Vq(i.e,0),18),(GYn(),imt)),17).a)>(s=uG(oIn(uG(Vq(u.e,0),18),imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0;for(d=0,g=(w=n.c).length;d(s=uG(oIn(l,imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0):n.b&&0!=(p=Dbn(i,u))?(-1==p?hHn(n,u,i):1==p&&hHn(n,i,u),p):(a=0,f=0,vR(uG(Vq(i.g,0),18),imt)&&(a=uG(oIn(uG(Vq(i.g,0),18),imt),17).a),vR(uG(Vq(u.g,0),18),imt)&&(f=uG(oIn(uG(Vq(i.g,0),18),imt),17).a),o&&o==l?oM(gK(oIn(uG(Vq(i.g,0),18),pmt)))&&!oM(gK(oIn(uG(Vq(u.g,0),18),pmt)))?(hHn(n,i,u),1):!oM(gK(oIn(uG(Vq(i.g,0),18),pmt)))&&oM(gK(oIn(uG(Vq(u.g,0),18),pmt)))?(hHn(n,u,i),-1):(a>f?hHn(n,i,u):hHn(n,u,i),af?1:0):(n.f&&(n.f._b(o)&&(a=uG(n.f.xc(o),17).a),n.f._b(l)&&(f=uG(n.f.xc(l),17).a)),a>f?hHn(n,i,u):hHn(n,u,i),af?1:0))):0!=i.e.c.length&&0!=u.g.c.length?(hHn(n,i,u),1):0!=i.g.c.length&&0!=u.e.c.length?(hHn(n,u,i),-1):vR(i,(GYn(),imt))&&vR(u,imt)?((r=uG(oIn(i,imt),17).a)>(s=uG(oIn(u,imt),17).a)?hHn(n,i,u):hHn(n,u,i),rs?1:0):(hHn(n,u,i),-1)}function HYn(n){n.gb||(n.gb=!0,n.b=Nsn(n,0),zon(n.b,18),Won(n.b,19),n.a=Nsn(n,1),zon(n.a,1),Won(n.a,2),Won(n.a,3),Won(n.a,4),Won(n.a,5),n.o=Nsn(n,2),zon(n.o,8),zon(n.o,9),Won(n.o,10),Won(n.o,11),Won(n.o,12),Won(n.o,13),Won(n.o,14),Won(n.o,15),Won(n.o,16),Won(n.o,17),Won(n.o,18),Won(n.o,19),Won(n.o,20),Won(n.o,21),Won(n.o,22),Won(n.o,23),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),rrn(n.o),n.p=Nsn(n,3),zon(n.p,2),zon(n.p,3),zon(n.p,4),zon(n.p,5),Won(n.p,6),Won(n.p,7),rrn(n.p),rrn(n.p),n.q=Nsn(n,4),zon(n.q,8),n.v=Nsn(n,5),Won(n.v,9),rrn(n.v),rrn(n.v),rrn(n.v),n.w=Nsn(n,6),zon(n.w,2),zon(n.w,3),zon(n.w,4),Won(n.w,5),n.B=Nsn(n,7),Won(n.B,1),rrn(n.B),rrn(n.B),rrn(n.B),n.Q=Nsn(n,8),Won(n.Q,0),rrn(n.Q),n.R=Nsn(n,9),zon(n.R,1),n.S=Nsn(n,10),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),rrn(n.S),n.T=Nsn(n,11),Won(n.T,10),Won(n.T,11),Won(n.T,12),Won(n.T,13),Won(n.T,14),rrn(n.T),rrn(n.T),n.U=Nsn(n,12),zon(n.U,2),zon(n.U,3),Won(n.U,4),Won(n.U,5),Won(n.U,6),Won(n.U,7),rrn(n.U),n.V=Nsn(n,13),Won(n.V,10),n.W=Nsn(n,14),zon(n.W,18),zon(n.W,19),zon(n.W,20),Won(n.W,21),Won(n.W,22),Won(n.W,23),n.bb=Nsn(n,15),zon(n.bb,10),zon(n.bb,11),zon(n.bb,12),zon(n.bb,13),zon(n.bb,14),zon(n.bb,15),zon(n.bb,16),Won(n.bb,17),rrn(n.bb),rrn(n.bb),n.eb=Nsn(n,16),zon(n.eb,2),zon(n.eb,3),zon(n.eb,4),zon(n.eb,5),zon(n.eb,6),zon(n.eb,7),Won(n.eb,8),Won(n.eb,9),n.ab=Nsn(n,17),zon(n.ab,0),zon(n.ab,1),n.H=Nsn(n,18),Won(n.H,0),Won(n.H,1),Won(n.H,2),Won(n.H,3),Won(n.H,4),Won(n.H,5),rrn(n.H),n.db=Nsn(n,19),Won(n.db,2),n.c=$sn(n,20),n.d=$sn(n,21),n.e=$sn(n,22),n.f=$sn(n,23),n.i=$sn(n,24),n.g=$sn(n,25),n.j=$sn(n,26),n.k=$sn(n,27),n.n=$sn(n,28),n.r=$sn(n,29),n.s=$sn(n,30),n.t=$sn(n,31),n.u=$sn(n,32),n.fb=$sn(n,33),n.A=$sn(n,34),n.C=$sn(n,35),n.D=$sn(n,36),n.F=$sn(n,37),n.G=$sn(n,38),n.I=$sn(n,39),n.J=$sn(n,40),n.L=$sn(n,41),n.M=$sn(n,42),n.N=$sn(n,43),n.O=$sn(n,44),n.P=$sn(n,45),n.X=$sn(n,46),n.Y=$sn(n,47),n.Z=$sn(n,48),n.$=$sn(n,49),n._=$sn(n,50),n.cb=$sn(n,51),n.K=$sn(n,52))}function UYn(n,t,e){var i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E;for(a=new lS,v=uG(oIn(e,(jYn(),Byt)),88),d=0,Qon(a,(!t.a&&(t.a=new fz(bFt,t,10,11)),t.a));0!=a.b;)(xA(VDn(s=R0(h=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)),Syt))!==xA((yvn(),Fjt))||xA(VDn(s,Fyt))===xA((kvn(),lgt))||xA(VDn(s,Fyt))===xA((kvn(),hgt))||oM(gK(VDn(s,Cyt)))||xA(VDn(s,kyt))!==xA((Uvn(),tbt))||xA(VDn(s,yMt))===xA((THn(),Pjt))||xA(VDn(s,yMt))===xA((THn(),Cjt))||xA(VDn(s,MMt))===xA((MKn(),JTt))||xA(VDn(s,MMt))===xA((MKn(),ZTt)))&&!oM(gK(VDn(h,jyt)))&&Myn(h,(GYn(),imt),xwn(d++)),!oM(gK(VDn(h,FMt)))&&(l=0!=(!h.a&&(h.a=new fz(bFt,h,10,11)),h.a).i,w=oCn(h),b=xA(VDn(h,rMt))===xA((Own(),Ixt)),p=null,(E=!vnn(h,(XYn(),e$t))||L9(mK(VDn(h,e$t))))&&b&&(l||w)&&(kfn(p=PGn(h),Byt,v),vR(p,fTt)&&iM(new omn(uM(pK(oIn(p,fTt)))),p),0!=uG(VDn(h,DMt),181).gc()&&(f=p,kS(new fX(null,(!h.c&&(h.c=new fz(wFt,h,9,9)),new h3(h.c,16))),new Yd(f)),u_n(h,p))),k=e,(y=uG(cQ(n.a,R0(h)),10))&&(k=y.e),g=RJn(n,h,k),p&&(g.e=p,p.e=g,Qon(a,(!h.a&&(h.a=new fz(bFt,h,10,11)),h.a))));for(d=0,s8(a,t,a.c.b,a.c);0!=a.b;){for(u=new DD((!(c=uG(0==a.b?null:(MK(0!=a.b),Lrn(a,a.a.a)),27)).b&&(c.b=new fz(aFt,c,12,3)),c.b));u.e!=u.i.gc();)iHn(o=uG(Zkn(u),74)),(xA(VDn(t,Syt))!==xA((yvn(),Fjt))||xA(VDn(t,Fyt))===xA((kvn(),lgt))||xA(VDn(t,Fyt))===xA((kvn(),hgt))||oM(gK(VDn(t,Cyt)))||xA(VDn(t,kyt))!==xA((Uvn(),tbt))||xA(VDn(t,yMt))===xA((THn(),Pjt))||xA(VDn(t,yMt))===xA((THn(),Cjt))||xA(VDn(t,MMt))===xA((MKn(),JTt))||xA(VDn(t,MMt))===xA((MKn(),ZTt)))&&Myn(o,(GYn(),imt),xwn(d++)),T=lCn(uG(Vrn((!o.b&&(o.b=new f_(cFt,o,4,7)),o.b),0),84)),j=lCn(uG(Vrn((!o.c&&(o.c=new f_(cFt,o,5,8)),o.c),0),84)),oM(gK(VDn(o,FMt)))||oM(gK(VDn(T,FMt)))||oM(gK(VDn(j,FMt)))||(m=c,BNn(o)&&oM(gK(VDn(T,sMt)))&&oM(gK(VDn(o,hMt)))||Ern(j,T)?m=T:Ern(T,j)&&(m=j),k=e,(y=uG(cQ(n.a,m),10))&&(k=y.e),kfn(FYn(n,o,m,k),(GYn(),Ipt),SFn(n,o,t,e)));if(b=xA(VDn(c,rMt))===xA((Own(),Ixt)))for(r=new DD((!c.a&&(c.a=new fz(bFt,c,10,11)),c.a));r.e!=r.i.gc();)E=!vnn(i=uG(Zkn(r),27),(XYn(),e$t))||L9(mK(VDn(i,e$t))),M=xA(VDn(i,rMt))===xA(Ixt),E&&M&&s8(a,i,a.c.b,a.c)}}function GYn(){var n,t;GYn=E,rmt=new Cm(E4n),Ipt=new Cm("coordinateOrigin"),wmt=new Cm("processors"),Cpt=new uF("compoundNode",(qx(),!1)),qpt=new uF("insideConnections",!1),cmt=new Cm("originalBendpoints"),amt=new Cm("originalDummyNodePosition"),omt=new Cm("originalLabelEdge"),gmt=new Cm("representedLabels"),$pt=new Cm("endLabels"),Dpt=new Cm("endLabel.origin"),Qpt=new uF("labelSide",(Ajn(),Rxt)),emt=new uF("maxEdgeThickness",0),pmt=new uF("reversed",!1),dmt=new Cm(S4n),Zpt=new uF("longEdgeSource",null),nmt=new uF("longEdgeTarget",null),Ypt=new uF("longEdgeHasLabelDummies",!1),Jpt=new uF("longEdgeBeforeLabelDummy",!1),Npt=new uF("edgeConstraint",(Pfn(),kgt)),Vpt=new Cm("inLayerLayoutUnit"),Xpt=new uF("inLayerConstraint",(Zen(),gpt)),zpt=new uF("inLayerSuccessorConstraint",new Zm),Wpt=new uF("inLayerSuccessorConstraintBetweenNonDummies",!1),lmt=new Cm("portDummy"),Opt=new uF("crossingHint",xwn(0)),Hpt=new uF("graphProperties",new nB(t=uG(Mj(bpt),9),uG(MF(t,t.length),9),0)),Fpt=new uF("externalPortSide",(KQn(),FRt)),_pt=new uF("externalPortSize",new sj),Rpt=new Cm("externalPortReplacedDummies"),Kpt=new Cm("externalPortReplacedDummy"),xpt=new uF("externalPortConnections",new nB(n=uG(Mj(YRt),9),uG(MF(n,n.length),9),0)),bmt=new uF(i3n,0),jpt=new Cm("barycenterAssociates"),Pmt=new Cm("TopSideComments"),Ept=new Cm("BottomSideComments"),Ppt=new Cm("CommentConnectionPort"),Gpt=new uF("inputCollect",!1),hmt=new uF("outputCollect",!1),Lpt=new uF("cyclic",!1),Apt=new Cm("crossHierarchyMap"),Smt=new Cm("targetOffset"),new uF("splineLabelSize",new sj),kmt=new Cm("spacings"),fmt=new uF("partitionConstraint",!1),Spt=new Cm("breakingPoint.info"),jmt=new Cm("splines.survivingEdge"),Tmt=new Cm("splines.route.start"),ymt=new Cm("splines.edgeChain"),smt=new Cm("originalPortConstraints"),vmt=new Cm("selfLoopHolder"),Mmt=new Cm("splines.nsPortY"),imt=new Cm("modelOrder"),tmt=new Cm("longEdgeTargetNode"),Bpt=new uF(_6n,!1),mmt=new uF(_6n,!1),Upt=new Cm("layerConstraints.hiddenNodes"),umt=new Cm("layerConstraints.opposidePort"),Emt=new Cm("targetNode.modelOrder")}function qYn(n,t,i,r){var c,a,o,u,s,h,f,l,b,w,d;for(l=Fkn(n.b,0);l.b!=l.d.c;)if(!m_((f=uG(I6(l),40)).c,H9n))for(a=uG(l8(new fX(null,new h3(VNn(f,n),16)),ftn(new z,new V,new en,Uhn(cT(Rut,1),p1n,108,0,[(ybn(),Iut)]))),15),t==(xdn(),JDt)||t==YDt?a.jd(new oo):a.jd(new uo),d=a.gc(),c=0;c0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a+r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a,f.e.b+f.f.b*o))):t==YDt?(h=uM(pK(oIn(f,(OQn(),DPt)))),f.e.a-r>h?cL(uG(a.Xb(c),65).a,new MO(h-i,f.e.b+f.f.b*o)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(s-w)/(e.Math.abs(u-b)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(f.e.a-r/5.3,w>s?f.e.b+f.f.b*o-r/2:f.e.b+f.f.b*o+r/2))),cL(uG(a.Xb(c),65).a,new MO(f.e.a,f.e.b+f.f.b*o))):t==nxt?(h=uM(pK(oIn(f,(OQn(),$Pt)))),f.e.b+f.f.b+r0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b+r/5.3+f.f.b))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b+f.f.b))):(h=uM(pK(oIn(f,(OQn(),DPt)))),uln(uG(a.Xb(c),65),n)?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,uG(pR(uG(a.Xb(c),65).a),8).b)):f.e.b-r>h?cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,h-i)):uG(a.Xb(c),65).a.b>0&&(u=uG(pR(uG(a.Xb(c),65).a),8).a,b=f.e.a+f.f.a/2,s=uG(pR(uG(a.Xb(c),65).a),8).b,w=f.e.b+f.f.b/2,r>0&&e.Math.abs(u-b)/(e.Math.abs(s-w)/40)>50&&cL(uG(a.Xb(c),65).a,new MO(b>u?f.e.a+f.f.a*o-r/2:f.e.a+f.f.a*o+r/2,f.e.b-r/5.3))),cL(uG(a.Xb(c),65).a,new MO(f.e.a+f.f.a*o,f.e.b)))}function XYn(){var n,t;XYn=E,e$t=new Cm(znt),yDt=new Cm(Wnt),nMn(),i$t=new mL(X8n,r$t=CNt),new Jm,c$t=new mL(R3n,null),a$t=new Cm(Qnt),ZSn(),b$t=WX(ZNt,Uhn(cT(txt,1),p1n,298,0,[WNt])),l$t=new mL(r9n,b$t),w$t=new mL(q8n,(qx(),!1)),xdn(),d$t=new mL(W8n,g$t=ZDt),_gn(),k$t=new mL(m8n,y$t=fxt),j$t=new mL(Xnt,!1),Own(),E$t=new mL(b8n,S$t=Oxt),Q$t=new CN(12),W$t=new mL(K3n,Q$t),O$t=new mL(f4n,!1),A$t=new mL(g9n,!1),z$t=new mL(w4n,!1),$Pn(),sDt=new mL(l4n,hDt=sRt),mDt=new Cm(b9n),vDt=new Cm(a4n),kDt=new Cm(s4n),TDt=new Cm(h4n),N$t=new Uk,L$t=new mL(c9n,N$t),f$t=new mL(u9n,!1),P$t=new mL(s9n,!1),new Cm(Jnt),D$t=new Nk,$$t=new mL(w9n,D$t),V$t=new mL(U8n,!1),new Jm,MDt=new mL(Ynt,1),h$t=new Cm(Znt),s$t=new Cm(ntt),HDt=new mL(k4n,!1),new mL(ttt,!0),xwn(0),new mL(ett,xwn(100)),new mL(itt,!1),xwn(0),new mL(rtt,xwn(4e3)),xwn(0),new mL(ctt,xwn(400)),new mL(att,!1),new mL(ott,!1),new mL(utt,!0),new mL(stt,!1),qpn(),o$t=new mL(Vnt,u$t=TKt),jDt=new mL(A8n,10),EDt=new mL(L8n,10),SDt=new mL(D3n,20),PDt=new mL(N8n,10),CDt=new mL(u4n,2),IDt=new mL($8n,10),ADt=new mL(D8n,0),LDt=new mL(K8n,5),NDt=new mL(x8n,1),$Dt=new mL(R8n,1),DDt=new mL(o4n,20),xDt=new mL(F8n,10),FDt=new mL(_8n,10),ODt=new Cm(B8n),KDt=new qL,RDt=new mL(d9n,KDt),Z$t=new Cm(l9n),J$t=new mL(f9n,Y$t=!1),R$t=new CN(5),x$t=new mL(Q8n,R$t),zDn(),t=uG(Mj(eRt),9),F$t=new nB(t,uG(MF(t,t.length),9),0),K$t=new mL(m4n,F$t),zkn(),tDt=new mL(Z8n,eDt=Zxt),rDt=new Cm(n9n),cDt=new Cm(t9n),aDt=new Cm(e9n),iDt=new Cm(i9n),n=uG(Mj(sKt),9),B$t=new nB(n,uG(MF(n,n.length),9),0),_$t=new mL(p4n,B$t),X$t=ggn((aUn(),eKt)),q$t=new mL(g4n,X$t),G$t=new MO(0,0),U$t=new mL(x4n,G$t),H$t=new mL(d4n,!1),Zrn(),m$t=new mL(a9n,v$t=ixt),p$t=new mL(b4n,!1),new Cm(htt),xwn(1),new mL(ftt,null),oDt=new Cm(h9n),fDt=new Cm(o9n),KQn(),gDt=new mL(G8n,pDt=FRt),uDt=new Cm(H8n),eNn(),wDt=ggn(gRt),bDt=new mL(v4n,wDt),lDt=new mL(J8n,!1),dDt=new mL(Y8n,!0),new Jm,XDt=new mL(y4n,1),zDt=new mL(ltt,null),BDt=new mL(M4n,150),_Dt=new mL(T4n,1.414),UDt=new mL(j4n,null),GDt=new mL(btt,1),C$t=new mL(V8n,!1),I$t=new mL(z8n,!1),M$t=new mL(x3n,1),RCn(),new mL(wtt,T$t=mxt),nDt=!0,Iwn(),VDt=fKt,WDt=fKt,qDt=fKt}function VYn(){VYn=E,qbt=new CC("DIRECTION_PREPROCESSOR",0),Hbt=new CC("COMMENT_PREPROCESSOR",1),Xbt=new CC("EDGE_AND_LAYER_CONSTRAINT_EDGE_REVERSER",2),uwt=new CC("INTERACTIVE_EXTERNAL_PORT_POSITIONER",3),Pwt=new CC("PARTITION_PREPROCESSOR",4),lwt=new CC("LABEL_DUMMY_INSERTER",5),Nwt=new CC("SELF_LOOP_PREPROCESSOR",6),pwt=new CC("LAYER_CONSTRAINT_PREPROCESSOR",7),Ewt=new CC("PARTITION_MIDPROCESSOR",8),iwt=new CC("HIGH_DEGREE_NODE_LAYER_PROCESSOR",9),ywt=new CC("NODE_PROMOTION",10),gwt=new CC("LAYER_CONSTRAINT_POSTPROCESSOR",11),Swt=new CC("PARTITION_POSTPROCESSOR",12),Zbt=new CC("HIERARCHICAL_PORT_CONSTRAINT_PROCESSOR",13),Dwt=new CC("SEMI_INTERACTIVE_CROSSMIN_PROCESSOR",14),xbt=new CC("BREAKING_POINT_INSERTER",15),kwt=new CC("LONG_EDGE_SPLITTER",16),Iwt=new CC("PORT_SIDE_PROCESSOR",17),swt=new CC("INVERTED_PORT_PROCESSOR",18),Cwt=new CC("PORT_LIST_SORTER",19),Rwt=new CC("SORT_BY_INPUT_ORDER_OF_MODEL",20),Twt=new CC("NORTH_SOUTH_PORT_PREPROCESSOR",21),Rbt=new CC("BREAKING_POINT_PROCESSOR",22),jwt=new CC(p6n,23),Kwt=new CC(m6n,24),Awt=new CC("SELF_LOOP_PORT_RESTORER",25),xwt=new CC("SINGLE_EDGE_GRAPH_WRAPPER",26),hwt=new CC("IN_LAYER_CONSTRAINT_PROCESSOR",27),Qbt=new CC("END_NODE_PORT_LABEL_MANAGEMENT_PROCESSOR",28),fwt=new CC("LABEL_AND_NODE_SIZE_PROCESSOR",29),owt=new CC("INNERMOST_NODE_MARGIN_CALCULATOR",30),$wt=new CC("SELF_LOOP_ROUTER",31),_bt=new CC("COMMENT_NODE_MARGIN_CALCULATOR",32),zbt=new CC("END_LABEL_PREPROCESSOR",33),wwt=new CC("LABEL_DUMMY_SWITCHER",34),Fbt=new CC("CENTER_LABEL_MANAGEMENT_PROCESSOR",35),dwt=new CC("LABEL_SIDE_SELECTOR",36),cwt=new CC("HYPEREDGE_DUMMY_MERGER",37),nwt=new CC("HIERARCHICAL_PORT_DUMMY_SIZE_PROCESSOR",38),mwt=new CC("LAYER_SIZE_AND_GRAPH_HEIGHT_CALCULATOR",39),ewt=new CC("HIERARCHICAL_PORT_POSITION_PROCESSOR",40),Ubt=new CC("CONSTRAINTS_POSTPROCESSOR",41),Bbt=new CC("COMMENT_POSTPROCESSOR",42),awt=new CC("HYPERNODE_PROCESSOR",43),twt=new CC("HIERARCHICAL_PORT_ORTHOGONAL_EDGE_ROUTER",44),vwt=new CC("LONG_EDGE_JOINER",45),Lwt=new CC("SELF_LOOP_POSTPROCESSOR",46),Kbt=new CC("BREAKING_POINT_REMOVER",47),Mwt=new CC("NORTH_SOUTH_PORT_POSTPROCESSOR",48),rwt=new CC("HORIZONTAL_COMPACTOR",49),bwt=new CC("LABEL_DUMMY_REMOVER",50),Jbt=new CC("FINAL_SPLINE_BENDPOINTS_CALCULATOR",51),Wbt=new CC("END_LABEL_SORTER",52),Owt=new CC("REVERSED_EDGE_RESTORER",53),Vbt=new CC("END_LABEL_POSTPROCESSOR",54),Ybt=new CC("HIERARCHICAL_NODE_RESIZER",55),Gbt=new CC("DIRECTION_POSTPROCESSOR",56)}function zYn(){zYn=E,zin(),mvt=new mL(B6n,vvt=dgt),xvt=new mL(H6n,(qx(),!1)),Y6(),Bvt=new mL(U6n,Hvt=kpt),akt=new mL(G6n,!1),okt=new mL(q6n,!0),Dmt=new mL(X6n,!1),nin(),Skt=new mL(V6n,Pkt=Gjt),xwn(1),Dkt=new mL(z6n,xwn(7)),xkt=new mL(W6n,!1),Rvt=new mL(Q6n,!1),kvn(),gvt=new mL(J6n,pvt=sgt),MKn(),rkt=new mL(Y6n,ckt=rjt),Gpn(),zvt=new mL(Z6n,Wvt=Lmt),xwn(-1),Vvt=new mL(n5n,null),xwn(-1),Qvt=new mL(t5n,xwn(-1)),xwn(-1),Jvt=new mL(e5n,xwn(4)),xwn(-1),Zvt=new mL(i5n,xwn(2)),THn(),ekt=new mL(r5n,ikt=$jt),xwn(0),tkt=new mL(c5n,xwn(0)),qvt=new mL(a5n,xwn(vZn)),jan(),wvt=new mL(o5n,dvt=Zdt),Jmt=new mL(u5n,!1),avt=new mL(s5n,.1),lvt=new mL(h5n,!1),uvt=new mL(f5n,null),svt=new mL(l5n,null),xwn(-1),hvt=new mL(b5n,null),xwn(-1),fvt=new mL(w5n,xwn(-1)),xwn(0),Ymt=new mL(d5n,xwn(40)),ihn(),ivt=new mL(g5n,rvt=lpt),Zmt=new mL(p5n,nvt=hpt),pyn(),jkt=new mL(m5n,Ekt=vjt),wkt=new Cm(v5n),Wtn(),ukt=new mL(k5n,skt=Lgt),ESn(),fkt=new mL(y5n,lkt=Fgt),new Jm,pkt=new mL(M5n,.3),vkt=new Cm(T5n),Yyn(),kkt=new mL(j5n,ykt=djt),isn(),Svt=new mL(E5n,Pvt=nEt),Sln(),Cvt=new mL(S5n,Ivt=aEt),kbn(),Ovt=new mL(P5n,Avt=fEt),Nvt=new mL(C5n,.2),jvt=new mL(I5n,2),Akt=new mL(O5n,null),Nkt=new mL(A5n,10),Lkt=new mL(L5n,10),$kt=new mL(N5n,20),xwn(0),Ckt=new mL($5n,xwn(0)),xwn(0),Ikt=new mL(D5n,xwn(0)),xwn(0),Okt=new mL(x5n,xwn(0)),xmt=new mL(R5n,!1),RIn(),Fmt=new mL(K5n,_mt=zgt),H7(),Rmt=new mL(F5n,Kmt=Wdt),Fvt=new mL(_5n,!1),xwn(0),Kvt=new mL(B5n,xwn(16)),xwn(0),_vt=new mL(H5n,xwn(5)),Vhn(),ryt=new mL(U5n,cyt=kEt),Rkt=new mL(G5n,10),_kt=new mL(q5n,1),ran(),zkt=new mL(X5n,Wkt=cgt),Ukt=new Cm(V5n),Xkt=xwn(1),xwn(0),qkt=new mL(z5n,Xkt),ian(),syt=new mL(W5n,hyt=wEt),ayt=new Cm(Q5n),nyt=new mL(J5n,!0),Ykt=new mL(Y5n,2),eyt=new mL(Z5n,!0),tOn(),Mvt=new mL(n8n,Tvt=Cgt),vAn(),kvt=new mL(t8n,yvt=Hdt),yvn(),Wmt=new mL(e8n,Qmt=Fjt),zmt=new mL(i8n,!1),Vmt=new mL(r8n,!1),Uvn(),Bmt=new mL(c8n,Hmt=tbt),Cwn(),qmt=new mL(a8n,Xmt=ujt),Umt=new mL(o8n,0),Gmt=new mL(u8n,0),Gvt=fgt,Uvt=Ydt,Yvt=ijt,nkt=ijt,Xvt=YTt,Own(),ovt=Ixt,bvt=Zdt,cvt=Zdt,tvt=Zdt,evt=Ixt,dkt=Mjt,gkt=vjt,hkt=vjt,bkt=vjt,mkt=yjt,Tkt=Mjt,Mkt=Mjt,_gn(),Lvt=hxt,$vt=hxt,Dvt=fEt,Evt=sxt,Kkt=yEt,Fkt=vEt,Bkt=yEt,Hkt=vEt,Qkt=yEt,Jkt=vEt,Gkt=rgt,Vkt=cgt,fyt=yEt,lyt=vEt,oyt=yEt,uyt=vEt,tyt=vEt,Zkt=vEt,iyt=vEt}function WYn(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k,y,M,T,j,E,S,P,C,I,O,A,L,N,$,D,x,R,K,F,_,B,H,U,G,q,X,V,z,W,Q,J,Y,Z,nn,tn,en,rn,cn,an,on,un;for(Y=0,N=0,x=(O=t).length;N0&&(n.a[U.p]=Y++)}for(rn=0,$=0,R=(A=i).length;$0;){for(MK(V.b>0),X=0,u=new Ww((U=uG(V.a.Xb(V.c=--V.b),12)).e);u.a0&&(U.j==(KQn(),yRt)?(n.a[U.p]=rn,++rn):(n.a[U.p]=rn+K+_,++_))}rn+=_}for(q=new Ym,d=new XL,L=0,D=(I=t).length;Lh.b&&(h.b=z)):U.i.c==J&&(zh.c&&(h.c=z));for(Ntn(g,0,g.length,null),en=Inn(YHt,W1n,28,g.length,15,1),r=Inn(YHt,W1n,28,rn+1,15,1),m=0;m0;)j%2>0&&(c+=on[j+1]),++on[j=(j-1)/2|0];for(S=Inn(ZEt,EZn,374,2*g.length,0,1),y=0;y0&&(A1(O.f),0)){if(uG(VDn(g,UDt),280)==fKt)throw hv(new jM("Topdown Layout Providers should only be used on parallel nodes."));XA(A1(O.f)),null.Um(),vN(g,e.Math.max(g.g,null.Vm),e.Math.max(g.f,null.Vm))}else null!=VDn(g,zDt)&&(H=uG(VDn(g,zDt),347).Tg(g),vN(g,e.Math.max(g.g,H.a),e.Math.max(g.f,H.b)));if(D=uG(VDn(t,W$t),107),b=t.g-(D.b+D.c),l=t.f-(D.d+D.a),G.bh("Available Child Area: ("+b+"|"+l+")"),Myn(t,c$t,b/l),Mkn(t,c,r.eh(N)),uG(VDn(t,UDt),280)==bKt&&(zJn(t),vN(t,D.b+uM(pK(VDn(t,h$t)))+D.c,D.d+uM(pK(VDn(t,s$t)))+D.a)),G.bh("Executed layout algorithm: "+mK(VDn(t,e$t))+" on node "+t.k),uG(VDn(t,UDt),280)==fKt){if(b<0||l<0)throw hv(new jM("The size defined by the parent parallel node is too small for the space provided by the paddings of the child hierarchical node. "+t.k));for(vnn(t,h$t)||vnn(t,s$t)||zJn(t),d=uM(pK(VDn(t,h$t))),w=uM(pK(VDn(t,s$t))),G.bh("Desired Child Area: ("+d+"|"+w+")"),R=b/d,K=l/w,x=e.Math.min(R,e.Math.min(K,uM(pK(VDn(t,GDt))))),Myn(t,XDt,x),G.bh(t.k+" -- Local Scale Factor (X|Y): ("+R+"|"+K+")"),v=uG(VDn(t,l$t),21),a=0,o=0,x'?":m_(rit,n)?"'(?<' or '(? toIndex: ",s2n=", toIndex: ",h2n="Index: ",f2n=", Size: ",l2n="org.eclipse.elk.alg.common",b2n={50:1},w2n="org.eclipse.elk.alg.common.compaction",d2n="Scanline/EventHandler",g2n="org.eclipse.elk.alg.common.compaction.oned",p2n="CNode belongs to another CGroup.",m2n="ISpacingsHandler/1",v2n="The ",k2n=" instance has been finished already.",y2n="The direction ",M2n=" is not supported by the CGraph instance.",T2n="OneDimensionalCompactor",j2n="OneDimensionalCompactor/lambda$0$Type",E2n="Quadruplet",S2n="ScanlineConstraintCalculator",P2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler",C2n="ScanlineConstraintCalculator/ConstraintsScanlineHandler/lambda$0$Type",I2n="ScanlineConstraintCalculator/Timestamp",O2n="ScanlineConstraintCalculator/lambda$0$Type",A2n={178:1,46:1},L2n="org.eclipse.elk.alg.common.compaction.options",N2n="org.eclipse.elk.core.data",$2n="org.eclipse.elk.polyomino.traversalStrategy",D2n="org.eclipse.elk.polyomino.lowLevelSort",x2n="org.eclipse.elk.polyomino.highLevelSort",R2n="org.eclipse.elk.polyomino.fill",K2n={134:1},F2n="polyomino",_2n="org.eclipse.elk.alg.common.networksimplex",B2n={183:1,3:1,4:1},H2n="org.eclipse.elk.alg.common.nodespacing",U2n="org.eclipse.elk.alg.common.nodespacing.cellsystem",G2n="CENTER",q2n={217:1,336:1},X2n={3:1,4:1,5:1,603:1},V2n="LEFT",z2n="RIGHT",W2n="Vertical alignment cannot be null",Q2n="BOTTOM",J2n="org.eclipse.elk.alg.common.nodespacing.internal",Y2n="UNDEFINED",Z2n=.01,n3n="org.eclipse.elk.alg.common.nodespacing.internal.algorithm",t3n="LabelPlacer/lambda$0$Type",e3n="LabelPlacer/lambda$1$Type",i3n="portRatioOrPosition",r3n="org.eclipse.elk.alg.common.overlaps",c3n="DOWN",a3n="org.eclipse.elk.alg.common.polyomino",o3n="NORTH",u3n="EAST",s3n="SOUTH",h3n="WEST",f3n="org.eclipse.elk.alg.common.polyomino.structures",l3n="Direction",b3n="Grid is only of size ",w3n=". Requested point (",d3n=") is out of bounds.",g3n=" Given center based coordinates were (",p3n="org.eclipse.elk.graph.properties",m3n="IPropertyHolder",v3n={3:1,96:1,137:1},k3n="org.eclipse.elk.alg.common.spore",y3n="org.eclipse.elk.alg.common.utils",M3n={205:1},T3n="org.eclipse.elk.core",j3n="Connected Components Compaction",E3n="org.eclipse.elk.alg.disco",S3n="org.eclipse.elk.alg.disco.graph",P3n="org.eclipse.elk.alg.disco.options",C3n="CompactionStrategy",I3n="org.eclipse.elk.disco.componentCompaction.strategy",O3n="org.eclipse.elk.disco.componentCompaction.componentLayoutAlgorithm",A3n="org.eclipse.elk.disco.debug.discoGraph",L3n="org.eclipse.elk.disco.debug.discoPolys",N3n="componentCompaction",$3n="org.eclipse.elk.disco",D3n="org.eclipse.elk.spacing.componentComponent",x3n="org.eclipse.elk.edge.thickness",R3n="org.eclipse.elk.aspectRatio",K3n="org.eclipse.elk.padding",F3n="org.eclipse.elk.alg.disco.transform",_3n=1.5707963267948966,B3n=17976931348623157e292,H3n={3:1,4:1,5:1,198:1},U3n={3:1,6:1,4:1,5:1,100:1,115:1},G3n="org.eclipse.elk.alg.force",q3n="ComponentsProcessor",X3n="ComponentsProcessor/1",V3n="ElkGraphImporter/lambda$0$Type",z3n="org.eclipse.elk.alg.force.graph",W3n="Component Layout",Q3n="org.eclipse.elk.alg.force.model",J3n="org.eclipse.elk.force.model",Y3n="org.eclipse.elk.force.iterations",Z3n="org.eclipse.elk.force.repulsivePower",n4n="org.eclipse.elk.force.temperature",t4n=.001,e4n="org.eclipse.elk.force.repulsion",i4n="org.eclipse.elk.alg.force.options",r4n=1.600000023841858,c4n="org.eclipse.elk.force",a4n="org.eclipse.elk.priority",o4n="org.eclipse.elk.spacing.nodeNode",u4n="org.eclipse.elk.spacing.edgeLabel",s4n="org.eclipse.elk.randomSeed",h4n="org.eclipse.elk.separateConnectedComponents",f4n="org.eclipse.elk.interactive",l4n="org.eclipse.elk.portConstraints",b4n="org.eclipse.elk.edgeLabels.inline",w4n="org.eclipse.elk.omitNodeMicroLayout",d4n="org.eclipse.elk.nodeSize.fixedGraphSize",g4n="org.eclipse.elk.nodeSize.options",p4n="org.eclipse.elk.nodeSize.constraints",m4n="org.eclipse.elk.nodeLabels.placement",v4n="org.eclipse.elk.portLabels.placement",k4n="org.eclipse.elk.topdownLayout",y4n="org.eclipse.elk.topdown.scaleFactor",M4n="org.eclipse.elk.topdown.hierarchicalNodeWidth",T4n="org.eclipse.elk.topdown.hierarchicalNodeAspectRatio",j4n="org.eclipse.elk.topdown.nodeType",E4n="origin",S4n="random",P4n="boundingBox.upLeft",C4n="boundingBox.lowRight",I4n="org.eclipse.elk.stress.fixed",O4n="org.eclipse.elk.stress.desiredEdgeLength",A4n="org.eclipse.elk.stress.dimension",L4n="org.eclipse.elk.stress.epsilon",N4n="org.eclipse.elk.stress.iterationLimit",$4n="org.eclipse.elk.stress",D4n="ELK Stress",x4n="org.eclipse.elk.nodeSize.minimum",R4n="org.eclipse.elk.alg.force.stress",K4n="Layered layout",F4n="org.eclipse.elk.alg.layered",_4n="org.eclipse.elk.alg.layered.compaction.components",B4n="org.eclipse.elk.alg.layered.compaction.oned",H4n="org.eclipse.elk.alg.layered.compaction.oned.algs",U4n="org.eclipse.elk.alg.layered.compaction.recthull",G4n="org.eclipse.elk.alg.layered.components",q4n="NONE",X4n="MODEL_ORDER",V4n={3:1,6:1,4:1,9:1,5:1,126:1},z4n={3:1,6:1,4:1,5:1,150:1,100:1,115:1},W4n="org.eclipse.elk.alg.layered.compound",Q4n={47:1},J4n="org.eclipse.elk.alg.layered.graph",Y4n=" -> ",Z4n="Not supported by LGraph",n6n="Port side is undefined",t6n={3:1,6:1,4:1,5:1,483:1,150:1,100:1,115:1},e6n={3:1,6:1,4:1,5:1,150:1,199:1,210:1,100:1,115:1},i6n={3:1,6:1,4:1,5:1,150:1,2042:1,210:1,100:1,115:1},r6n="([{\"' \t\r\n",c6n=")]}\"' \t\r\n",a6n="The given string contains parts that cannot be parsed as numbers.",o6n="org.eclipse.elk.core.math",u6n={3:1,4:1,140:1,214:1,423:1},s6n={3:1,4:1,107:1,214:1,423:1},h6n="org.eclipse.elk.alg.layered.graph.transform",f6n="ElkGraphImporter",l6n="ElkGraphImporter/lambda$1$Type",b6n="ElkGraphImporter/lambda$2$Type",w6n="ElkGraphImporter/lambda$4$Type",d6n="org.eclipse.elk.alg.layered.intermediate",g6n="Node margin calculation",p6n="ONE_SIDED_GREEDY_SWITCH",m6n="TWO_SIDED_GREEDY_SWITCH",v6n="No implementation is available for the layout processor ",k6n="IntermediateProcessorStrategy",y6n="Node '",M6n="FIRST_SEPARATE",T6n="LAST_SEPARATE",j6n="Odd port side processing",E6n="org.eclipse.elk.alg.layered.intermediate.compaction",S6n="org.eclipse.elk.alg.layered.intermediate.greedyswitch",P6n="org.eclipse.elk.alg.layered.p3order.counting",C6n={230:1},I6n="org.eclipse.elk.alg.layered.intermediate.loops",O6n="org.eclipse.elk.alg.layered.intermediate.loops.ordering",A6n="org.eclipse.elk.alg.layered.intermediate.loops.routing",L6n="org.eclipse.elk.alg.layered.intermediate.preserveorder",N6n="org.eclipse.elk.alg.layered.intermediate.wrapping",$6n="org.eclipse.elk.alg.layered.options",D6n="INTERACTIVE",x6n="GREEDY",R6n="DEPTH_FIRST",K6n="EDGE_LENGTH",F6n="SELF_LOOPS",_6n="firstTryWithInitialOrder",B6n="org.eclipse.elk.layered.directionCongruency",H6n="org.eclipse.elk.layered.feedbackEdges",U6n="org.eclipse.elk.layered.interactiveReferencePoint",G6n="org.eclipse.elk.layered.mergeEdges",q6n="org.eclipse.elk.layered.mergeHierarchyEdges",X6n="org.eclipse.elk.layered.allowNonFlowPortsToSwitchSides",V6n="org.eclipse.elk.layered.portSortingStrategy",z6n="org.eclipse.elk.layered.thoroughness",W6n="org.eclipse.elk.layered.unnecessaryBendpoints",Q6n="org.eclipse.elk.layered.generatePositionAndLayerIds",J6n="org.eclipse.elk.layered.cycleBreaking.strategy",Y6n="org.eclipse.elk.layered.layering.strategy",Z6n="org.eclipse.elk.layered.layering.layerConstraint",n5n="org.eclipse.elk.layered.layering.layerChoiceConstraint",t5n="org.eclipse.elk.layered.layering.layerId",e5n="org.eclipse.elk.layered.layering.minWidth.upperBoundOnWidth",i5n="org.eclipse.elk.layered.layering.minWidth.upperLayerEstimationScalingFactor",r5n="org.eclipse.elk.layered.layering.nodePromotion.strategy",c5n="org.eclipse.elk.layered.layering.nodePromotion.maxIterations",a5n="org.eclipse.elk.layered.layering.coffmanGraham.layerBound",o5n="org.eclipse.elk.layered.crossingMinimization.strategy",u5n="org.eclipse.elk.layered.crossingMinimization.forceNodeModelOrder",s5n="org.eclipse.elk.layered.crossingMinimization.hierarchicalSweepiness",h5n="org.eclipse.elk.layered.crossingMinimization.semiInteractive",f5n="org.eclipse.elk.layered.crossingMinimization.inLayerPredOf",l5n="org.eclipse.elk.layered.crossingMinimization.inLayerSuccOf",b5n="org.eclipse.elk.layered.crossingMinimization.positionChoiceConstraint",w5n="org.eclipse.elk.layered.crossingMinimization.positionId",d5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.activationThreshold",g5n="org.eclipse.elk.layered.crossingMinimization.greedySwitch.type",p5n="org.eclipse.elk.layered.crossingMinimization.greedySwitchHierarchical.type",m5n="org.eclipse.elk.layered.nodePlacement.strategy",v5n="org.eclipse.elk.layered.nodePlacement.favorStraightEdges",k5n="org.eclipse.elk.layered.nodePlacement.bk.edgeStraightening",y5n="org.eclipse.elk.layered.nodePlacement.bk.fixedAlignment",M5n="org.eclipse.elk.layered.nodePlacement.linearSegments.deflectionDampening",T5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility",j5n="org.eclipse.elk.layered.nodePlacement.networkSimplex.nodeFlexibility.default",E5n="org.eclipse.elk.layered.edgeRouting.selfLoopDistribution",S5n="org.eclipse.elk.layered.edgeRouting.selfLoopOrdering",P5n="org.eclipse.elk.layered.edgeRouting.splines.mode",C5n="org.eclipse.elk.layered.edgeRouting.splines.sloppy.layerSpacingFactor",I5n="org.eclipse.elk.layered.edgeRouting.polyline.slopedEdgeZoneWidth",O5n="org.eclipse.elk.layered.spacing.baseValue",A5n="org.eclipse.elk.layered.spacing.edgeNodeBetweenLayers",L5n="org.eclipse.elk.layered.spacing.edgeEdgeBetweenLayers",N5n="org.eclipse.elk.layered.spacing.nodeNodeBetweenLayers",$5n="org.eclipse.elk.layered.priority.direction",D5n="org.eclipse.elk.layered.priority.shortness",x5n="org.eclipse.elk.layered.priority.straightness",R5n="org.eclipse.elk.layered.compaction.connectedComponents",K5n="org.eclipse.elk.layered.compaction.postCompaction.strategy",F5n="org.eclipse.elk.layered.compaction.postCompaction.constraints",_5n="org.eclipse.elk.layered.highDegreeNodes.treatment",B5n="org.eclipse.elk.layered.highDegreeNodes.threshold",H5n="org.eclipse.elk.layered.highDegreeNodes.treeHeight",U5n="org.eclipse.elk.layered.wrapping.strategy",G5n="org.eclipse.elk.layered.wrapping.additionalEdgeSpacing",q5n="org.eclipse.elk.layered.wrapping.correctionFactor",X5n="org.eclipse.elk.layered.wrapping.cutting.strategy",V5n="org.eclipse.elk.layered.wrapping.cutting.cuts",z5n="org.eclipse.elk.layered.wrapping.cutting.msd.freedom",W5n="org.eclipse.elk.layered.wrapping.validify.strategy",Q5n="org.eclipse.elk.layered.wrapping.validify.forbiddenIndices",J5n="org.eclipse.elk.layered.wrapping.multiEdge.improveCuts",Y5n="org.eclipse.elk.layered.wrapping.multiEdge.distancePenalty",Z5n="org.eclipse.elk.layered.wrapping.multiEdge.improveWrappedEdges",n8n="org.eclipse.elk.layered.edgeLabels.sideSelection",t8n="org.eclipse.elk.layered.edgeLabels.centerLabelPlacementStrategy",e8n="org.eclipse.elk.layered.considerModelOrder.strategy",i8n="org.eclipse.elk.layered.considerModelOrder.portModelOrder",r8n="org.eclipse.elk.layered.considerModelOrder.noModelOrder",c8n="org.eclipse.elk.layered.considerModelOrder.components",a8n="org.eclipse.elk.layered.considerModelOrder.longEdgeStrategy",o8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterNodeInfluence",u8n="org.eclipse.elk.layered.considerModelOrder.crossingCounterPortInfluence",s8n="layering",h8n="layering.minWidth",f8n="layering.nodePromotion",l8n="crossingMinimization",b8n="org.eclipse.elk.hierarchyHandling",w8n="crossingMinimization.greedySwitch",d8n="nodePlacement",g8n="nodePlacement.bk",p8n="edgeRouting",m8n="org.eclipse.elk.edgeRouting",v8n="spacing",k8n="priority",y8n="compaction",M8n="compaction.postCompaction",T8n="Specifies whether and how post-process compaction is applied.",j8n="highDegreeNodes",E8n="wrapping",S8n="wrapping.cutting",P8n="wrapping.validify",C8n="wrapping.multiEdge",I8n="edgeLabels",O8n="considerModelOrder",A8n="org.eclipse.elk.spacing.commentComment",L8n="org.eclipse.elk.spacing.commentNode",N8n="org.eclipse.elk.spacing.edgeEdge",$8n="org.eclipse.elk.spacing.edgeNode",D8n="org.eclipse.elk.spacing.labelLabel",x8n="org.eclipse.elk.spacing.labelPortHorizontal",R8n="org.eclipse.elk.spacing.labelPortVertical",K8n="org.eclipse.elk.spacing.labelNode",F8n="org.eclipse.elk.spacing.nodeSelfLoop",_8n="org.eclipse.elk.spacing.portPort",B8n="org.eclipse.elk.spacing.individual",H8n="org.eclipse.elk.port.borderOffset",U8n="org.eclipse.elk.noLayout",G8n="org.eclipse.elk.port.side",q8n="org.eclipse.elk.debugMode",X8n="org.eclipse.elk.alignment",V8n="org.eclipse.elk.insideSelfLoops.activate",z8n="org.eclipse.elk.insideSelfLoops.yo",W8n="org.eclipse.elk.direction",Q8n="org.eclipse.elk.nodeLabels.padding",J8n="org.eclipse.elk.portLabels.nextToPortIfPossible",Y8n="org.eclipse.elk.portLabels.treatAsGroup",Z8n="org.eclipse.elk.portAlignment.default",n9n="org.eclipse.elk.portAlignment.north",t9n="org.eclipse.elk.portAlignment.south",e9n="org.eclipse.elk.portAlignment.west",i9n="org.eclipse.elk.portAlignment.east",r9n="org.eclipse.elk.contentAlignment",c9n="org.eclipse.elk.junctionPoints",a9n="org.eclipse.elk.edgeLabels.placement",o9n="org.eclipse.elk.port.index",u9n="org.eclipse.elk.commentBox",s9n="org.eclipse.elk.hypernode",h9n="org.eclipse.elk.port.anchor",f9n="org.eclipse.elk.partitioning.activate",l9n="org.eclipse.elk.partitioning.partition",b9n="org.eclipse.elk.position",w9n="org.eclipse.elk.margins",d9n="org.eclipse.elk.spacing.portsSurrounding",g9n="org.eclipse.elk.interactiveLayout",p9n="org.eclipse.elk.core.util",m9n={3:1,4:1,5:1,601:1},v9n="NETWORK_SIMPLEX",k9n="SIMPLE",y9n={106:1,47:1},M9n="org.eclipse.elk.alg.layered.p1cycles",T9n="org.eclipse.elk.alg.layered.p2layers",j9n={413:1,230:1},E9n={846:1,3:1,4:1},S9n="org.eclipse.elk.alg.layered.p3order",P9n="org.eclipse.elk.alg.layered.p4nodes",C9n={3:1,4:1,5:1,854:1},I9n=1e-5,O9n="org.eclipse.elk.alg.layered.p4nodes.bk",A9n="org.eclipse.elk.alg.layered.p5edges",L9n="org.eclipse.elk.alg.layered.p5edges.orthogonal",N9n="org.eclipse.elk.alg.layered.p5edges.orthogonal.direction",$9n=1e-6,D9n="org.eclipse.elk.alg.layered.p5edges.splines",x9n=.09999999999999998,R9n=1e-8,K9n=4.71238898038469,F9n=3.141592653589793,_9n="org.eclipse.elk.alg.mrtree",B9n=.10000000149011612,H9n="SUPER_ROOT",U9n="org.eclipse.elk.alg.mrtree.graph",G9n=-17976931348623157e292,q9n="org.eclipse.elk.alg.mrtree.intermediate",X9n="Processor compute fanout",V9n={3:1,6:1,4:1,5:1,534:1,100:1,115:1},z9n="Set neighbors in level",W9n="org.eclipse.elk.alg.mrtree.options",Q9n="DESCENDANTS",J9n="org.eclipse.elk.mrtree.compaction",Y9n="org.eclipse.elk.mrtree.edgeEndTextureLength",Z9n="org.eclipse.elk.mrtree.treeLevel",n7n="org.eclipse.elk.mrtree.positionConstraint",t7n="org.eclipse.elk.mrtree.weighting",e7n="org.eclipse.elk.mrtree.edgeRoutingMode",i7n="org.eclipse.elk.mrtree.searchOrder",r7n="Position Constraint",c7n="org.eclipse.elk.mrtree",a7n="org.eclipse.elk.tree",o7n="Processor arrange level",u7n="org.eclipse.elk.alg.mrtree.p2order",s7n="org.eclipse.elk.alg.mrtree.p4route",h7n="org.eclipse.elk.alg.radial",f7n=6.283185307179586,l7n="Before",b7n=5e-324,w7n="After",d7n="org.eclipse.elk.alg.radial.intermediate",g7n="COMPACTION",p7n="org.eclipse.elk.alg.radial.intermediate.compaction",m7n={3:1,4:1,5:1,100:1},v7n="org.eclipse.elk.alg.radial.intermediate.optimization",k7n="No implementation is available for the layout option ",y7n="org.eclipse.elk.alg.radial.options",M7n="org.eclipse.elk.radial.centerOnRoot",T7n="org.eclipse.elk.radial.orderId",j7n="org.eclipse.elk.radial.radius",E7n="org.eclipse.elk.radial.rotate",S7n="org.eclipse.elk.radial.compactor",P7n="org.eclipse.elk.radial.compactionStepSize",C7n="org.eclipse.elk.radial.sorter",I7n="org.eclipse.elk.radial.wedgeCriteria",O7n="org.eclipse.elk.radial.optimizationCriteria",A7n="org.eclipse.elk.radial.rotation.targetAngle",L7n="org.eclipse.elk.radial.rotation.computeAdditionalWedgeSpace",N7n="org.eclipse.elk.radial.rotation.outgoingEdgeAngles",$7n="Compaction",D7n="rotation",x7n="org.eclipse.elk.radial",R7n="org.eclipse.elk.alg.radial.p1position.wedge",K7n="org.eclipse.elk.alg.radial.sorting",F7n=5.497787143782138,_7n=3.9269908169872414,B7n=2.356194490192345,H7n="org.eclipse.elk.alg.rectpacking",U7n="org.eclipse.elk.alg.rectpacking.intermediate",G7n="org.eclipse.elk.alg.rectpacking.options",q7n="org.eclipse.elk.rectpacking.trybox",X7n="org.eclipse.elk.rectpacking.currentPosition",V7n="org.eclipse.elk.rectpacking.desiredPosition",z7n="org.eclipse.elk.rectpacking.inNewRow",W7n="org.eclipse.elk.rectpacking.widthApproximation.strategy",Q7n="org.eclipse.elk.rectpacking.widthApproximation.targetWidth",J7n="org.eclipse.elk.rectpacking.widthApproximation.optimizationGoal",Y7n="org.eclipse.elk.rectpacking.widthApproximation.lastPlaceShift",Z7n="org.eclipse.elk.rectpacking.packing.strategy",nnt="org.eclipse.elk.rectpacking.packing.compaction.rowHeightReevaluation",tnt="org.eclipse.elk.rectpacking.packing.compaction.iterations",ent="org.eclipse.elk.rectpacking.whiteSpaceElimination.strategy",int="widthApproximation",rnt="Compaction Strategy",cnt="packing.compaction",ant="org.eclipse.elk.rectpacking",ont="org.eclipse.elk.alg.rectpacking.p1widthapproximation",unt="org.eclipse.elk.alg.rectpacking.p2packing",snt="No Compaction",hnt="org.eclipse.elk.alg.rectpacking.p3whitespaceelimination",fnt="org.eclipse.elk.alg.rectpacking.util",lnt="No implementation available for ",bnt="org.eclipse.elk.alg.spore",wnt="org.eclipse.elk.alg.spore.options",dnt="org.eclipse.elk.sporeCompaction",gnt="org.eclipse.elk.underlyingLayoutAlgorithm",pnt="org.eclipse.elk.processingOrder.treeConstruction",mnt="org.eclipse.elk.processingOrder.spanningTreeCostFunction",vnt="org.eclipse.elk.processingOrder.preferredRoot",knt="org.eclipse.elk.processingOrder.rootSelection",ynt="org.eclipse.elk.structure.structureExtractionStrategy",Mnt="org.eclipse.elk.compaction.compactionStrategy",Tnt="org.eclipse.elk.compaction.orthogonal",jnt="org.eclipse.elk.overlapRemoval.maxIterations",Ent="org.eclipse.elk.overlapRemoval.runScanline",Snt="processingOrder",Pnt="overlapRemoval",Cnt="org.eclipse.elk.sporeOverlap",Int="org.eclipse.elk.alg.spore.p1structure",Ont="org.eclipse.elk.alg.spore.p2processingorder",Ant="org.eclipse.elk.alg.spore.p3execution",Lnt="Topdown Layout",Nnt="Invalid index: ",$nt="org.eclipse.elk.core.alg",Dnt={341:1},xnt={295:1},Rnt="Make sure its type is registered with the ",Knt=" utility class.",Fnt="true",_nt="false",Bnt="Couldn't clone property '",Hnt=.05,Unt="org.eclipse.elk.core.options",Gnt=1.2999999523162842,qnt="org.eclipse.elk.box",Xnt="org.eclipse.elk.expandNodes",Vnt="org.eclipse.elk.box.packingMode",znt="org.eclipse.elk.algorithm",Wnt="org.eclipse.elk.resolvedAlgorithm",Qnt="org.eclipse.elk.bendPoints",Jnt="org.eclipse.elk.labelManager",Ynt="org.eclipse.elk.scaleFactor",Znt="org.eclipse.elk.childAreaWidth",ntt="org.eclipse.elk.childAreaHeight",ttt="org.eclipse.elk.animate",ett="org.eclipse.elk.animTimeFactor",itt="org.eclipse.elk.layoutAncestors",rtt="org.eclipse.elk.maxAnimTime",ctt="org.eclipse.elk.minAnimTime",att="org.eclipse.elk.progressBar",ott="org.eclipse.elk.validateGraph",utt="org.eclipse.elk.validateOptions",stt="org.eclipse.elk.zoomToFit",htt="org.eclipse.elk.font.name",ftt="org.eclipse.elk.font.size",ltt="org.eclipse.elk.topdown.sizeApproximator",btt="org.eclipse.elk.topdown.scaleCap",wtt="org.eclipse.elk.edge.type",dtt="partitioning",gtt="nodeLabels",ptt="portAlignment",mtt="nodeSize",vtt="port",ktt="portLabels",ytt="topdown",Mtt="insideSelfLoops",Ttt="org.eclipse.elk.fixed",jtt="org.eclipse.elk.random",Ett={3:1,34:1,22:1,347:1},Stt="port must have a parent node to calculate the port side",Ptt="The edge needs to have exactly one edge section. Found: ",Ctt="org.eclipse.elk.core.util.adapters",Itt="org.eclipse.emf.ecore",Ott="org.eclipse.elk.graph",Att="EMapPropertyHolder",Ltt="ElkBendPoint",Ntt="ElkGraphElement",$tt="ElkConnectableShape",Dtt="ElkEdge",xtt="ElkEdgeSection",Rtt="EModelElement",Ktt="ENamedElement",Ftt="ElkLabel",_tt="ElkNode",Btt="ElkPort",Htt={94:1,93:1},Utt="org.eclipse.emf.common.notify.impl",Gtt="The feature '",qtt="' is not a valid changeable feature",Xtt="Expecting null",Vtt="' is not a valid feature",ztt="The feature ID",Wtt=" is not a valid feature ID",Qtt=32768,Jtt={110:1,94:1,93:1,58:1,54:1,99:1},Ytt="org.eclipse.emf.ecore.impl",Ztt="org.eclipse.elk.graph.impl",net="Recursive containment not allowed for ",tet="The datatype '",eet="' is not a valid classifier",iet="The value '",ret={195:1,3:1,4:1},cet="The class '",aet="http://www.eclipse.org/elk/ElkGraph",oet="property",uet="value",set="source",het="properties",fet="identifier",bet="height",wet="width",det="parent",get="text",pet="children",met="hierarchical",vet="sources",ket="targets",yet="sections",Met="bendPoints",Tet="outgoingShape",jet="incomingShape",Eet="outgoingSections",Set="incomingSections",Pet="org.eclipse.emf.common.util",Cet="Severe implementation error in the Json to ElkGraph importer.",Iet="id",Oet="org.eclipse.elk.graph.json",Aet="Unhandled parameter types: ",Let="startPoint",Net="An edge must have at least one source and one target (edge id: '",$et="').",Det="Referenced edge section does not exist: ",xet=" (edge id: '",Ret="target",Ket="sourcePoint",Fet="targetPoint",_et="group",Bet="name",Het="connectableShape cannot be null",Uet="edge cannot be null",Get="Passed edge is not 'simple'.",qet="org.eclipse.elk.graph.util",Xet="The 'no duplicates' constraint is violated",Vet="targetIndex=",zet=", size=",Wet="sourceIndex=",Qet={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1},Jet={3:1,4:1,20:1,31:1,56:1,16:1,51:1,15:1,59:1,70:1,66:1,61:1,596:1},Yet="logging",Zet="measureExecutionTime",nit="parser.parse.1",tit="parser.parse.2",eit="parser.next.1",iit="parser.next.2",rit="parser.next.3",cit="parser.next.4",ait="parser.factor.1",oit="parser.factor.2",uit="parser.factor.3",sit="parser.factor.4",hit="parser.factor.5",fit="parser.factor.6",lit="parser.atom.1",bit="parser.atom.2",wit="parser.atom.3",dit="parser.atom.4",git="parser.atom.5",pit="parser.cc.1",mit="parser.cc.2",vit="parser.cc.3",kit="parser.cc.5",yit="parser.cc.6",Mit="parser.cc.7",Tit="parser.cc.8",jit="parser.ope.1",Eit="parser.ope.2",Sit="parser.ope.3",Pit="parser.descape.1",Cit="parser.descape.2",Iit="parser.descape.3",Oit="parser.descape.4",Ait="parser.descape.5",Lit="parser.process.1",Nit="parser.quantifier.1",$it="parser.quantifier.2",Dit="parser.quantifier.3",xit="parser.quantifier.4",Rit="parser.quantifier.5",Kit="org.eclipse.emf.common.notify",Fit={424:1,686:1},_it={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1},Bit={378:1,152:1},Hit="index=",Uit={3:1,4:1,5:1,129:1},Git={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,61:1},qit={3:1,6:1,4:1,5:1,198:1},Xit={3:1,4:1,5:1,173:1,379:1},Vit=";/?:@&=+$,",zit="invalid authority: ",Wit="EAnnotation",Qit="ETypedElement",Jit="EStructuralFeature",Yit="EAttribute",Zit="EClassifier",nrt="EEnumLiteral",trt="EGenericType",ert="EOperation",irt="EParameter",rrt="EReference",crt="ETypeParameter",art="org.eclipse.emf.ecore.util",ort={79:1},urt={3:1,20:1,16:1,15:1,61:1,597:1,79:1,71:1,97:1},srt="org.eclipse.emf.ecore.util.FeatureMap$Entry",hrt=8192,frt=2048,lrt="byte",brt="char",wrt="double",drt="float",grt="int",prt="long",mrt="short",vrt="java.lang.Object",krt={3:1,4:1,5:1,254:1},yrt={3:1,4:1,5:1,688:1},Mrt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,71:1},Trt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,71:1,97:1},jrt="mixed",Ert="http:///org/eclipse/emf/ecore/util/ExtendedMetaData",Srt="kind",Prt={3:1,4:1,5:1,689:1},Crt={3:1,4:1,20:1,31:1,56:1,16:1,15:1,70:1,61:1,79:1,71:1,97:1},Irt={20:1,31:1,56:1,16:1,15:1,61:1,71:1},Ort={51:1,128:1,287:1},Art={76:1,343:1},Lrt="The value of type '",Nrt="' must be of type '",$rt=1352,Drt="http://www.eclipse.org/emf/2002/Ecore",xrt=-32768,Rrt="constraints",Krt="baseType",Frt="getEStructuralFeature",_rt="getFeatureID",Brt="feature",Hrt="getOperationID",Urt="operation",Grt="defaultValue",qrt="eTypeParameters",Xrt="isInstance",Vrt="getEEnumLiteral",zrt="eContainingClass",Wrt={57:1},Qrt={3:1,4:1,5:1,124:1},Jrt="org.eclipse.emf.ecore.resource",Yrt={94:1,93:1,599:1,2034:1},Zrt="org.eclipse.emf.ecore.resource.impl",nct="unspecified",tct="simple",ect="attribute",ict="attributeWildcard",rct="element",cct="elementWildcard",act="collapse",oct="itemType",uct="namespace",sct="##targetNamespace",hct="whiteSpace",fct="wildcards",lct="http://www.eclipse.org/emf/2003/XMLType",bct="##any",wct="uninitialized",dct="The multiplicity constraint is violated",gct="org.eclipse.emf.ecore.xml.type",pct="ProcessingInstruction",mct="SimpleAnyType",vct="XMLTypeDocumentRoot",kct="org.eclipse.emf.ecore.xml.type.impl",yct="INF",Mct="processing",Tct="ENTITIES_._base",jct="minLength",Ect="ENTITY",Sct="NCName",Pct="IDREFS_._base",Cct="integer",Ict="token",Oct="pattern",Act="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*",Lct="\\i\\c*",Nct="[\\i-[:]][\\c-[:]]*",$ct="nonPositiveInteger",Dct="maxInclusive",xct="NMTOKEN",Rct="NMTOKENS_._base",Kct="nonNegativeInteger",Fct="minInclusive",_ct="normalizedString",Bct="unsignedByte",Hct="unsignedInt",Uct="18446744073709551615",Gct="unsignedShort",qct="processingInstruction",Xct="org.eclipse.emf.ecore.xml.type.internal",Vct=1114111,zct="Internal Error: shorthands: \\u",Wct="xml:isDigit",Qct="xml:isWord",Jct="xml:isSpace",Yct="xml:isNameChar",Zct="xml:isInitialNameChar",nat="09\u0660\u0669\u06f0\u06f9\u0966\u096f\u09e6\u09ef\u0a66\u0a6f\u0ae6\u0aef\u0b66\u0b6f\u0be7\u0bef\u0c66\u0c6f\u0ce6\u0cef\u0d66\u0d6f\u0e50\u0e59\u0ed0\u0ed9\u0f20\u0f29",tat="AZaz\xc0\xd6\xd8\xf6\xf8\u0131\u0134\u013e\u0141\u0148\u014a\u017e\u0180\u01c3\u01cd\u01f0\u01f4\u01f5\u01fa\u0217\u0250\u02a8\u02bb\u02c1\u0386\u0386\u0388\u038a\u038c\u038c\u038e\u03a1\u03a3\u03ce\u03d0\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de\u03e0\u03e0\u03e2\u03f3\u0401\u040c\u040e\u044f\u0451\u045c\u045e\u0481\u0490\u04c4\u04c7\u04c8\u04cb\u04cc\u04d0\u04eb\u04ee\u04f5\u04f8\u04f9\u0531\u0556\u0559\u0559\u0561\u0586\u05d0\u05ea\u05f0\u05f2\u0621\u063a\u0641\u064a\u0671\u06b7\u06ba\u06be\u06c0\u06ce\u06d0\u06d3\u06d5\u06d5\u06e5\u06e6\u0905\u0939\u093d\u093d\u0958\u0961\u0985\u098c\u098f\u0990\u0993\u09a8\u09aa\u09b0\u09b2\u09b2\u09b6\u09b9\u09dc\u09dd\u09df\u09e1\u09f0\u09f1\u0a05\u0a0a\u0a0f\u0a10\u0a13\u0a28\u0a2a\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59\u0a5c\u0a5e\u0a5e\u0a72\u0a74\u0a85\u0a8b\u0a8d\u0a8d\u0a8f\u0a91\u0a93\u0aa8\u0aaa\u0ab0\u0ab2\u0ab3\u0ab5\u0ab9\u0abd\u0abd\u0ae0\u0ae0\u0b05\u0b0c\u0b0f\u0b10\u0b13\u0b28\u0b2a\u0b30\u0b32\u0b33\u0b36\u0b39\u0b3d\u0b3d\u0b5c\u0b5d\u0b5f\u0b61\u0b85\u0b8a\u0b8e\u0b90\u0b92\u0b95\u0b99\u0b9a\u0b9c\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8\u0baa\u0bae\u0bb5\u0bb7\u0bb9\u0c05\u0c0c\u0c0e\u0c10\u0c12\u0c28\u0c2a\u0c33\u0c35\u0c39\u0c60\u0c61\u0c85\u0c8c\u0c8e\u0c90\u0c92\u0ca8\u0caa\u0cb3\u0cb5\u0cb9\u0cde\u0cde\u0ce0\u0ce1\u0d05\u0d0c\u0d0e\u0d10\u0d12\u0d28\u0d2a\u0d39\u0d60\u0d61\u0e01\u0e2e\u0e30\u0e30\u0e32\u0e33\u0e40\u0e45\u0e81\u0e82\u0e84\u0e84\u0e87\u0e88\u0e8a\u0e8a\u0e8d\u0e8d\u0e94\u0e97\u0e99\u0e9f\u0ea1\u0ea3\u0ea5\u0ea5\u0ea7\u0ea7\u0eaa\u0eab\u0ead\u0eae\u0eb0\u0eb0\u0eb2\u0eb3\u0ebd\u0ebd\u0ec0\u0ec4\u0f40\u0f47\u0f49\u0f69\u10a0\u10c5\u10d0\u10f6\u1100\u1100\u1102\u1103\u1105\u1107\u1109\u1109\u110b\u110c\u110e\u1112\u113c\u113c\u113e\u113e\u1140\u1140\u114c\u114c\u114e\u114e\u1150\u1150\u1154\u1155\u1159\u1159\u115f\u1161\u1163\u1163\u1165\u1165\u1167\u1167\u1169\u1169\u116d\u116e\u1172\u1173\u1175\u1175\u119e\u119e\u11a8\u11a8\u11ab\u11ab\u11ae\u11af\u11b7\u11b8\u11ba\u11ba\u11bc\u11c2\u11eb\u11eb\u11f0\u11f0\u11f9\u11f9\u1e00\u1e9b\u1ea0\u1ef9\u1f00\u1f15\u1f18\u1f1d\u1f20\u1f45\u1f48\u1f4d\u1f50\u1f57\u1f59\u1f59\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f7d\u1f80\u1fb4\u1fb6\u1fbc\u1fbe\u1fbe\u1fc2\u1fc4\u1fc6\u1fcc\u1fd0\u1fd3\u1fd6\u1fdb\u1fe0\u1fec\u1ff2\u1ff4\u1ff6\u1ffc\u2126\u2126\u212a\u212b\u212e\u212e\u2180\u2182\u3007\u3007\u3021\u3029\u3041\u3094\u30a1\u30fa\u3105\u312c\u4e00\u9fa5\uac00\ud7a3",eat="Private Use",iat="ASSIGNED",rat="\0\x7f\x80\xff\u0100\u017f\u0180\u024f\u0250\u02af\u02b0\u02ff\u0300\u036f\u0370\u03ff\u0400\u04ff\u0530\u058f\u0590\u05ff\u0600\u06ff\u0700\u074f\u0780\u07bf\u0900\u097f\u0980\u09ff\u0a00\u0a7f\u0a80\u0aff\u0b00\u0b7f\u0b80\u0bff\u0c00\u0c7f\u0c80\u0cff\u0d00\u0d7f\u0d80\u0dff\u0e00\u0e7f\u0e80\u0eff\u0f00\u0fff\u1000\u109f\u10a0\u10ff\u1100\u11ff\u1200\u137f\u13a0\u13ff\u1400\u167f\u1680\u169f\u16a0\u16ff\u1780\u17ff\u1800\u18af\u1e00\u1eff\u1f00\u1fff\u2000\u206f\u2070\u209f\u20a0\u20cf\u20d0\u20ff\u2100\u214f\u2150\u218f\u2190\u21ff\u2200\u22ff\u2300\u23ff\u2400\u243f\u2440\u245f\u2460\u24ff\u2500\u257f\u2580\u259f\u25a0\u25ff\u2600\u26ff\u2700\u27bf\u2800\u28ff\u2e80\u2eff\u2f00\u2fdf\u2ff0\u2fff\u3000\u303f\u3040\u309f\u30a0\u30ff\u3100\u312f\u3130\u318f\u3190\u319f\u31a0\u31bf\u3200\u32ff\u3300\u33ff\u3400\u4db5\u4e00\u9fff\ua000\ua48f\ua490\ua4cf\uac00\ud7a3\ue000\uf8ff\uf900\ufaff\ufb00\ufb4f\ufb50\ufdff\ufe20\ufe2f\ufe30\ufe4f\ufe50\ufe6f\ufe70\ufefe\ufeff\ufeff\uff00\uffef",cat="UNASSIGNED",aat={3:1,122:1},oat="org.eclipse.emf.ecore.xml.type.util",uat={3:1,4:1,5:1,381:1},sat="org.eclipse.xtext.xbase.lib",hat="Cannot add elements to a Range",fat="Cannot set elements in a Range",lat="Cannot remove elements from a Range",bat="user.agent";e.goog=e.goog||{},e.goog.global=e.goog.global||e,sZn={},sDn(1,null,{},r),uZn.Fb=function(n){return SL(this,n)},uZn.Gb=function(){return this.Rm},uZn.Hb=function(){return xx(this)},uZn.Ib=function(){return Ij(Tbn(this))+"@"+(Hon(this)>>>0).toString(16)},uZn.equals=function(n){return this.Fb(n)},uZn.hashCode=function(){return this.Hb()},uZn.toString=function(){return this.Ib()},sDn(297,1,{297:1,2124:1},Ifn),uZn.ve=function(n){var t;return(t=new Ifn).i=4,t.c=n>1?B0(this,n-1):this,t},uZn.we=function(){return vK(this),this.b},uZn.xe=function(){return Ij(this)},uZn.ye=function(){return vK(this),this.k},uZn.ze=function(){return!!(4&this.i)},uZn.Ae=function(){return!!(1&this.i)},uZn.Ib=function(){return crn(this)},uZn.i=0;var wat,dat=VW(kZn,"Object",1),gat=VW(kZn,"Class",297);sDn(2096,1,yZn),VW(MZn,"Optional",2096),sDn(1191,2096,yZn,c),uZn.Fb=function(n){return n===this},uZn.Hb=function(){return 2040732332},uZn.Ib=function(){return"Optional.absent()"},uZn.Jb=function(n){return WW(n),gy(),wat},VW(MZn,"Absent",1191),sDn(636,1,{},FM),VW(MZn,"Joiner",636);var pat=Iq(MZn,"Predicate");sDn(589,1,{178:1,589:1,3:1,46:1},Hl),uZn.Mb=function(n){return Wfn(this,n)},uZn.Lb=function(n){return Wfn(this,n)},uZn.Fb=function(n){var t;return!!F$(n,589)&&(t=uG(n,589),PDn(this.a,t.a))},uZn.Hb=function(){return Zfn(this.a)+306654252},uZn.Ib=function(){return eAn(this.a)},VW(MZn,"Predicates/AndPredicate",589),sDn(419,2096,{419:1,3:1},Ul),uZn.Fb=function(n){var t;return!!F$(n,419)&&(t=uG(n,419),udn(this.a,t.a))},uZn.Hb=function(){return 1502476572+Hon(this.a)},uZn.Ib=function(){return CZn+this.a+")"},uZn.Jb=function(n){return new Ul(bZ(n.Kb(this.a),"the Function passed to Optional.transform() must not return null."))},VW(MZn,"Present",419),sDn(204,1,OZn),uZn.Nb=function(n){Sz(this,n)},uZn.Qb=function(){_M()},VW(AZn,"UnmodifiableIterator",204),sDn(2076,204,LZn),uZn.Qb=function(){_M()},uZn.Rb=function(n){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},VW(AZn,"UnmodifiableListIterator",2076),sDn(399,2076,LZn),uZn.Ob=function(){return this.c0},uZn.Pb=function(){if(this.c>=this.d)throw hv(new Bv);return this.Xb(this.c++)},uZn.Tb=function(){return this.c},uZn.Ub=function(){if(this.c<=0)throw hv(new Bv);return this.Xb(--this.c)},uZn.Vb=function(){return this.c-1},uZn.c=0,uZn.d=0,VW(AZn,"AbstractIndexedListIterator",399),sDn(713,204,OZn),uZn.Ob=function(){return oon(this)},uZn.Pb=function(){return yen(this)},uZn.e=1,VW(AZn,"AbstractIterator",713),sDn(2084,1,{229:1}),uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.Fb=function(n){return Aln(this,n)},uZn.Hb=function(){return Hon(this.Zb())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return kV(this)},uZn.Ib=function(){return cpn(this.Zb())},VW(AZn,"AbstractMultimap",2084),sDn(742,2084,NZn),uZn.$b=function(){ban(this)},uZn._b=function(n){return jj(this,n)},uZn.ac=function(){return new OE(this,this.c)},uZn.ic=function(n){return this.hc()},uZn.bc=function(){return new RD(this,this.c)},uZn.jc=function(){return this.mc(this.hc())},uZn.kc=function(){return new My(this)},uZn.lc=function(){return ICn(this.c.vc().Nc(),new o,64,this.d)},uZn.cc=function(n){return Y9(this,n)},uZn.fc=function(n){return twn(this,n)},uZn.gc=function(){return this.d},uZn.mc=function(n){return hZ(),new qw(n)},uZn.nc=function(){return new yy(this)},uZn.oc=function(){return ICn(this.c.Cc().Nc(),new a,64,this.d)},uZn.pc=function(n,t){return new A7(this,n,t,null)},uZn.d=0,VW(AZn,"AbstractMapBasedMultimap",742),sDn(1696,742,NZn),uZn.hc=function(){return new R7(this.a)},uZn.jc=function(){return hZ(),hZ(),Vot},uZn.cc=function(n){return uG(Y9(this,n),15)},uZn.fc=function(n){return uG(twn(this,n),15)},uZn.Zb=function(){return nZ(this)},uZn.Fb=function(n){return Aln(this,n)},uZn.qc=function(n){return uG(Y9(this,n),15)},uZn.rc=function(n){return uG(twn(this,n),15)},uZn.mc=function(n){return SZ(uG(n,15))},uZn.pc=function(n,t){return S6(this,n,uG(t,15),null)},VW(AZn,"AbstractListMultimap",1696),sDn(748,1,$Zn),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return this.c.Ob()||this.e.Ob()},uZn.Pb=function(){var n;return this.e.Ob()||(n=uG(this.c.Pb(),44),this.b=n.ld(),this.a=uG(n.md(),16),this.e=this.a.Kc()),this.sc(this.b,this.e.Pb())},uZn.Qb=function(){this.e.Qb(),uG(nJ(this.a),16).dc()&&this.c.Qb(),--this.d.d},VW(AZn,"AbstractMapBasedMultimap/Itr",748),sDn(1129,748,$Zn,yy),uZn.sc=function(n,t){return t},VW(AZn,"AbstractMapBasedMultimap/1",1129),sDn(1130,1,{},a),uZn.Kb=function(n){return uG(n,16).Nc()},VW(AZn,"AbstractMapBasedMultimap/1methodref$spliterator$Type",1130),sDn(1131,748,$Zn,My),uZn.sc=function(n,t){return new FE(n,t)},VW(AZn,"AbstractMapBasedMultimap/2",1131);var mat=Iq(DZn,"Map");sDn(2065,1,xZn),uZn.wc=function(n){Yun(this,n)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.$b=function(){this.vc().$b()},uZn.tc=function(n){return sTn(this,n)},uZn._b=function(n){return!!TPn(this,n,!1)},uZn.uc=function(n){var t,e;for(t=this.vc().Kc();t.Ob();)if(e=uG(t.Pb(),44).md(),xA(n)===xA(e)||null!=n&&udn(n,e))return!0;return!1},uZn.Fb=function(n){var t,e,i;if(n===this)return!0;if(!F$(n,85))return!1;if(i=uG(n,85),this.gc()!=i.gc())return!1;for(e=i.vc().Kc();e.Ob();)if(t=uG(e.Pb(),44),!this.tc(t))return!1;return!0},uZn.xc=function(n){return DA(TPn(this,n,!1))},uZn.Hb=function(){return tfn(this.vc())},uZn.dc=function(){return 0==this.gc()},uZn.ec=function(){return new Lw(this)},uZn.zc=function(n,t){throw hv(new TM("Put not supported on this map"))},uZn.Ac=function(n){xun(this,n)},uZn.Bc=function(n){return DA(TPn(this,n,!0))},uZn.gc=function(){return this.vc().gc()},uZn.Ib=function(){return KPn(this)},uZn.Cc=function(){return new Fw(this)},VW(DZn,"AbstractMap",2065),sDn(2085,2065,xZn),uZn.bc=function(){return new zE(this)},uZn.vc=function(){return vV(this)},uZn.ec=function(){return this.g||(this.g=this.bc())},uZn.Cc=function(){return this.i||(this.i=new VE(this))},VW(AZn,"Maps/ViewCachingAbstractMap",2085),sDn(402,2085,xZn,OE),uZn.xc=function(n){return srn(this,n)},uZn.Bc=function(n){return abn(this,n)},uZn.$b=function(){this.d==this.e.c?this.e.$b():Hq(new Gq(this))},uZn._b=function(n){return Uwn(this.d,n)},uZn.Ec=function(){return new Gl(this)},uZn.Dc=function(){return this.Ec()},uZn.Fb=function(n){return this===n||udn(this.d,n)},uZn.Hb=function(){return Hon(this.d)},uZn.ec=function(){return this.e.ec()},uZn.gc=function(){return this.d.gc()},uZn.Ib=function(){return cpn(this.d)},VW(AZn,"AbstractMapBasedMultimap/AsMap",402);var vat=Iq(kZn,"Iterable");sDn(31,1,RZn),uZn.Jc=function(n){V8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){throw hv(new TM("Add not supported on this collection"))},uZn.Gc=function(n){return Qon(this,n)},uZn.$b=function(){oY(this)},uZn.Hc=function(n){return Wpn(this,n,!1)},uZn.Ic=function(n){return yhn(this,n)},uZn.dc=function(){return 0==this.gc()},uZn.Mc=function(n){return Wpn(this,n,!0)},uZn.Pc=function(){return SV(this)},uZn.Qc=function(n){return oTn(this,n)},uZn.Ib=function(){return vIn(this)},VW(DZn,"AbstractCollection",31);var kat=Iq(DZn,"Set");sDn(KZn,31,FZn),uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return Fvn(this,n)},uZn.Hb=function(){return tfn(this)},VW(DZn,"AbstractSet",KZn),sDn(2068,KZn,FZn),VW(AZn,"Sets/ImprovedAbstractSet",2068),sDn(2069,2068,FZn),uZn.$b=function(){this.Rc().$b()},uZn.Hc=function(n){return Amn(this,n)},uZn.dc=function(){return this.Rc().dc()},uZn.Mc=function(n){var t;return!(!this.Hc(n)||!F$(n,44))&&(t=uG(n,44),this.Rc().ec().Mc(t.ld()))},uZn.gc=function(){return this.Rc().gc()},VW(AZn,"Maps/EntrySet",2069),sDn(1127,2069,FZn,Gl),uZn.Hc=function(n){return Gwn(this.a.d.vc(),n)},uZn.Kc=function(){return new Gq(this.a)},uZn.Rc=function(){return this.a},uZn.Mc=function(n){var t;return!!Gwn(this.a.d.vc(),n)&&(t=uG(nJ(uG(n,44)),44),H9(this.a.e,t.ld()),!0)},uZn.Nc=function(){return JU(this.a.d.vc().Nc(),new ql(this.a))},VW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries",1127),sDn(1128,1,{},ql),uZn.Kb=function(n){return O9(this.a,uG(n,44))},VW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapEntries/0methodref$wrapEntry$Type",1128),sDn(746,1,$Zn,Gq),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){var n;return n=uG(this.b.Pb(),44),this.a=uG(n.md(),16),O9(this.c,n)},uZn.Ob=function(){return this.b.Ob()},uZn.Qb=function(){IB(!!this.a),this.b.Qb(),this.c.e.d-=this.a.gc(),this.a.$b(),this.a=null},VW(AZn,"AbstractMapBasedMultimap/AsMap/AsMapIterator",746),sDn(542,2068,FZn,zE),uZn.$b=function(){this.b.$b()},uZn.Hc=function(n){return this.b._b(n)},uZn.Jc=function(n){WW(n),this.b.wc(new db(n))},uZn.dc=function(){return this.b.dc()},uZn.Kc=function(){return new Ny(this.b.vc().Kc())},uZn.Mc=function(n){return!!this.b._b(n)&&(this.b.Bc(n),!0)},uZn.gc=function(){return this.b.gc()},VW(AZn,"Maps/KeySet",542),sDn(327,542,FZn,RD),uZn.$b=function(){Hq(new AE(this,this.b.vc().Kc()))},uZn.Ic=function(n){return this.b.ec().Ic(n)},uZn.Fb=function(n){return this===n||udn(this.b.ec(),n)},uZn.Hb=function(){return Hon(this.b.ec())},uZn.Kc=function(){return new AE(this,this.b.vc().Kc())},uZn.Mc=function(n){var t,e;return e=0,(t=uG(this.b.Bc(n),16))&&(e=t.gc(),t.$b(),this.a.d-=e),e>0},uZn.Nc=function(){return this.b.ec().Nc()},VW(AZn,"AbstractMapBasedMultimap/KeySet",327),sDn(747,1,$Zn,AE),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return this.c.Ob()},uZn.Pb=function(){return this.a=uG(this.c.Pb(),44),this.a.ld()},uZn.Qb=function(){var n;IB(!!this.a),n=uG(this.a.md(),16),this.c.Qb(),this.b.a.d-=n.gc(),n.$b(),this.a=null},VW(AZn,"AbstractMapBasedMultimap/KeySet/1",747),sDn(503,402,{85:1,133:1},NK),uZn.bc=function(){return this.Sc()},uZn.ec=function(){return this.Uc()},uZn.Sc=function(){return new yE(this.c,this.Wc())},uZn.Tc=function(){return this.Wc().Tc()},uZn.Uc=function(){return this.b||(this.b=this.Sc())},uZn.Vc=function(){return this.Wc().Vc()},uZn.Wc=function(){return uG(this.d,133)},VW(AZn,"AbstractMapBasedMultimap/SortedAsMap",503),sDn(446,503,_Zn,$K),uZn.bc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.Sc=function(){return new ME(this.a,uG(uG(this.d,133),139))},uZn.ec=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Uc=function(){return uG(this.b||(this.b=new ME(this.a,uG(uG(this.d,133),139))),277)},uZn.Wc=function(){return uG(uG(this.d,133),139)},uZn.Xc=function(n){return uG(uG(this.d,133),139).Xc(n)},uZn.Yc=function(n){return uG(uG(this.d,133),139).Yc(n)},uZn.Zc=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).Zc(n,t))},uZn.$c=function(n){return uG(uG(this.d,133),139).$c(n)},uZn._c=function(n){return uG(uG(this.d,133),139)._c(n)},uZn.ad=function(n,t){return new $K(this.a,uG(uG(this.d,133),139).ad(n,t))},VW(AZn,"AbstractMapBasedMultimap/NavigableAsMap",446),sDn(502,327,BZn,yE),uZn.Nc=function(){return this.b.ec().Nc()},VW(AZn,"AbstractMapBasedMultimap/SortedKeySet",502),sDn(401,502,HZn,ME),VW(AZn,"AbstractMapBasedMultimap/NavigableKeySet",401),sDn(551,31,RZn,A7),uZn.Fc=function(n){var t,e;return bpn(this),e=this.d.dc(),(t=this.d.Fc(n))&&(++this.f.d,e&&mF(this)),t},uZn.Gc=function(n){var t,e,i;return!n.dc()&&(bpn(this),i=this.d.gc(),(t=this.d.Gc(n))&&(e=this.d.gc(),this.f.d+=e-i,0==i&&mF(this)),t)},uZn.$b=function(){var n;bpn(this),0!=(n=this.d.gc())&&(this.d.$b(),this.f.d-=n,DX(this))},uZn.Hc=function(n){return bpn(this),this.d.Hc(n)},uZn.Ic=function(n){return bpn(this),this.d.Ic(n)},uZn.Fb=function(n){return n===this||(bpn(this),udn(this.d,n))},uZn.Hb=function(){return bpn(this),Hon(this.d)},uZn.Kc=function(){return bpn(this),new WU(this)},uZn.Mc=function(n){var t;return bpn(this),(t=this.d.Mc(n))&&(--this.f.d,DX(this)),t},uZn.gc=function(){return qA(this)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.Ib=function(){return bpn(this),cpn(this.d)},VW(AZn,"AbstractMapBasedMultimap/WrappedCollection",551);var yat=Iq(DZn,"List");sDn(744,551,{20:1,31:1,16:1,15:1},qV),uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return bpn(this),this.d.Nc()},uZn.bd=function(n,t){var e;bpn(this),e=this.d.dc(),uG(this.d,15).bd(n,t),++this.a.d,e&&mF(this)},uZn.cd=function(n,t){var e,i,r;return!t.dc()&&(bpn(this),r=this.d.gc(),(e=uG(this.d,15).cd(n,t))&&(i=this.d.gc(),this.a.d+=i-r,0==r&&mF(this)),e)},uZn.Xb=function(n){return bpn(this),uG(this.d,15).Xb(n)},uZn.dd=function(n){return bpn(this),uG(this.d,15).dd(n)},uZn.ed=function(){return bpn(this),new JN(this)},uZn.fd=function(n){return bpn(this),new UY(this,n)},uZn.gd=function(n){var t;return bpn(this),t=uG(this.d,15).gd(n),--this.a.d,DX(this),t},uZn.hd=function(n,t){return bpn(this),uG(this.d,15).hd(n,t)},uZn.kd=function(n,t){return bpn(this),S6(this.a,this.e,uG(this.d,15).kd(n,t),this.b?this.b:this)},VW(AZn,"AbstractMapBasedMultimap/WrappedList",744),sDn(1126,744,{20:1,31:1,16:1,15:1,59:1},Yx),VW(AZn,"AbstractMapBasedMultimap/RandomAccessWrappedList",1126),sDn(628,1,$Zn,WU),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return FY(this),this.b.Ob()},uZn.Pb=function(){return FY(this),this.b.Pb()},uZn.Qb=function(){VD(this)},VW(AZn,"AbstractMapBasedMultimap/WrappedCollection/WrappedIterator",628),sDn(745,628,UZn,JN,UY),uZn.Qb=function(){VD(this)},uZn.Rb=function(n){var t;t=0==qA(this.a),(FY(this),uG(this.b,128)).Rb(n),++this.a.a.d,t&&mF(this.a)},uZn.Sb=function(){return(FY(this),uG(this.b,128)).Sb()},uZn.Tb=function(){return(FY(this),uG(this.b,128)).Tb()},uZn.Ub=function(){return(FY(this),uG(this.b,128)).Ub()},uZn.Vb=function(){return(FY(this),uG(this.b,128)).Vb()},uZn.Wb=function(n){(FY(this),uG(this.b,128)).Wb(n)},VW(AZn,"AbstractMapBasedMultimap/WrappedList/WrappedListIterator",745),sDn(743,551,BZn,AK),uZn.Nc=function(){return bpn(this),this.d.Nc()},VW(AZn,"AbstractMapBasedMultimap/WrappedSortedSet",743),sDn(1125,743,HZn,TN),VW(AZn,"AbstractMapBasedMultimap/WrappedNavigableSet",1125),sDn(1124,551,FZn,LK),uZn.Nc=function(){return bpn(this),this.d.Nc()},VW(AZn,"AbstractMapBasedMultimap/WrappedSet",1124),sDn(1133,1,{},o),uZn.Kb=function(n){return P7(uG(n,44))},VW(AZn,"AbstractMapBasedMultimap/lambda$1$Type",1133),sDn(1132,1,{},Wl),uZn.Kb=function(n){return new FE(this.a,n)},VW(AZn,"AbstractMapBasedMultimap/lambda$2$Type",1132);var Mat,Tat,jat,Eat,Sat=Iq(DZn,"Map/Entry");sDn(358,1,GZn),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),xQ(this.ld(),t.ld())&&xQ(this.md(),t.md()))},uZn.Hb=function(){var n,t;return n=this.ld(),t=this.md(),(null==n?0:Hon(n))^(null==t?0:Hon(t))},uZn.nd=function(n){throw hv(new Kv)},uZn.Ib=function(){return this.ld()+"="+this.md()},VW(AZn,qZn,358),sDn(2086,31,RZn),uZn.$b=function(){this.od().$b()},uZn.Hc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),E4(this.od(),t.ld(),t.md()))},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),S4(this.od(),t.ld(),t.md()))},uZn.gc=function(){return this.od().d},VW(AZn,"Multimaps/Entries",2086),sDn(749,2086,RZn,Ql),uZn.Kc=function(){return this.a.kc()},uZn.od=function(){return this.a},uZn.Nc=function(){return this.a.lc()},VW(AZn,"AbstractMultimap/Entries",749),sDn(750,749,FZn,Ty),uZn.Nc=function(){return this.a.lc()},uZn.Fb=function(n){return OOn(this,n)},uZn.Hb=function(){return Jon(this)},VW(AZn,"AbstractMultimap/EntrySet",750),sDn(751,31,RZn,Jl),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return qln(this.a,n)},uZn.Kc=function(){return this.a.nc()},uZn.gc=function(){return this.a.d},uZn.Nc=function(){return this.a.oc()},VW(AZn,"AbstractMultimap/Values",751),sDn(2087,31,{849:1,20:1,31:1,16:1}),uZn.Jc=function(n){WW(n),uY(this).Jc(new yb(n))},uZn.Nc=function(){var n;return ICn(n=uY(this).Nc(),new d,64|1296&n.yd(),this.a.d)},uZn.Fc=function(n){return HM(),!0},uZn.Gc=function(n){return WW(this),WW(n),F$(n,552)?z4(uG(n,849)):!n.dc()&&cin(this,n.Kc())},uZn.Hc=function(n){var t;return((t=uG(Xwn(nZ(this.a),n),16))?t.gc():0)>0},uZn.Fb=function(n){return nxn(this,n)},uZn.Hb=function(){return Hon(uY(this))},uZn.dc=function(){return uY(this).dc()},uZn.Mc=function(n){return bNn(this,n,1)>0},uZn.Ib=function(){return cpn(uY(this))},VW(AZn,"AbstractMultiset",2087),sDn(2089,2068,FZn),uZn.$b=function(){ban(this.a.a)},uZn.Hc=function(n){var t;return!(!F$(n,504)||(t=uG(n,425),uG(t.a.md(),16).gc()<=0||S2(this.a,t.a.ld())!=uG(t.a.md(),16).gc()))},uZn.Mc=function(n){var t,e,i;return!(!F$(n,504)||(t=(e=uG(n,425)).a.ld(),0==(i=uG(e.a.md(),16).gc())))&&wNn(this.a,t,i)},VW(AZn,"Multisets/EntrySet",2089),sDn(1139,2089,FZn,Yl),uZn.Kc=function(){return new Dy(vV(nZ(this.a.a)).Kc())},uZn.gc=function(){return nZ(this.a.a).gc()},VW(AZn,"AbstractMultiset/EntrySet",1139),sDn(627,742,NZn),uZn.hc=function(){return this.pd()},uZn.jc=function(){return this.qd()},uZn.cc=function(n){return this.rd(n)},uZn.fc=function(n){return this.sd(n)},uZn.Zb=function(){return this.f||(this.f=this.ac())},uZn.qd=function(){return hZ(),hZ(),Wot},uZn.Fb=function(n){return Aln(this,n)},uZn.rd=function(n){return uG(Y9(this,n),21)},uZn.sd=function(n){return uG(twn(this,n),21)},uZn.mc=function(n){return hZ(),new nT(uG(n,21))},uZn.pc=function(n,t){return new LK(this,n,uG(t,21))},VW(AZn,"AbstractSetMultimap",627),sDn(1723,627,NZn),uZn.hc=function(){return new Hj(this.b)},uZn.pd=function(){return new Hj(this.b)},uZn.jc=function(){return UQ(new Hj(this.b))},uZn.qd=function(){return UQ(new Hj(this.b))},uZn.cc=function(n){return uG(uG(Y9(this,n),21),87)},uZn.rd=function(n){return uG(uG(Y9(this,n),21),87)},uZn.fc=function(n){return uG(uG(twn(this,n),21),87)},uZn.sd=function(n){return uG(uG(twn(this,n),21),87)},uZn.mc=function(n){return F$(n,277)?UQ(uG(n,277)):(hZ(),new mx(uG(n,87)))},uZn.Zb=function(){return this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c))},uZn.pc=function(n,t){return F$(t,277)?new TN(this,n,uG(t,277)):new AK(this,n,uG(t,87))},VW(AZn,"AbstractSortedSetMultimap",1723),sDn(1724,1723,NZn),uZn.Zb=function(){return uG(uG(this.f||(this.f=F$(this.c,139)?new $K(this,uG(this.c,139)):F$(this.c,133)?new NK(this,uG(this.c,133)):new OE(this,this.c)),133),139)},uZn.ec=function(){return uG(uG(this.i||(this.i=F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)),87),277)},uZn.bc=function(){return F$(this.c,139)?new ME(this,uG(this.c,139)):F$(this.c,133)?new yE(this,uG(this.c,133)):new RD(this,this.c)},VW(AZn,"AbstractSortedKeySortedSetMultimap",1724),sDn(2109,1,{2046:1}),uZn.Fb=function(n){return fSn(this,n)},uZn.Hb=function(){return tfn(this.g||(this.g=new nb(this)))},uZn.Ib=function(){return KPn(this.f||(this.f=new zD(this)))},VW(AZn,"AbstractTable",2109),sDn(679,KZn,FZn,nb),uZn.$b=function(){UM()},uZn.Hc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&Gwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.Kc=function(){return CZ(this.a)},uZn.Mc=function(n){var t,e;return!!F$(n,479)&&(t=uG(n,697),!!(e=uG(Xwn(BW(this.a),GA(t.c.e,t.b)),85))&&qwn(e.vc(),new FE(GA(t.c.c,t.a),I7(t.c,t.b,t.a))))},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return u6(this.a)},VW(AZn,"AbstractTable/CellSet",679),sDn(2025,31,RZn,tb),uZn.$b=function(){UM()},uZn.Hc=function(n){return QPn(this.a,n)},uZn.Kc=function(){return IZ(this.a)},uZn.gc=function(){return $q(this.a)},uZn.Nc=function(){return y4(this.a)},VW(AZn,"AbstractTable/Values",2025),sDn(1697,1696,NZn),VW(AZn,"ArrayListMultimapGwtSerializationDependencies",1697),sDn(520,1697,NZn,rT,L2),uZn.hc=function(){return new R7(this.a)},uZn.a=0,VW(AZn,"ArrayListMultimap",520),sDn(678,2109,{678:1,2046:1,3:1},f$n),VW(AZn,"ArrayTable",678),sDn(2021,399,LZn,WD),uZn.Xb=function(n){return new Ofn(this.a,n)},VW(AZn,"ArrayTable/1",2021),sDn(2022,1,{},Xl),uZn.td=function(n){return new Ofn(this.a,n)},VW(AZn,"ArrayTable/1methodref$getCell$Type",2022),sDn(2110,1,{697:1}),uZn.Fb=function(n){var t;return n===this||!!F$(n,479)&&(t=uG(n,697),xQ(GA(this.c.e,this.b),GA(t.c.e,t.b))&&xQ(GA(this.c.c,this.a),GA(t.c.c,t.a))&&xQ(I7(this.c,this.b,this.a),I7(t.c,t.b,t.a)))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[GA(this.c.e,this.b),GA(this.c.c,this.a),I7(this.c,this.b,this.a)]))},uZn.Ib=function(){return"("+GA(this.c.e,this.b)+","+GA(this.c.c,this.a)+")="+I7(this.c,this.b,this.a)},VW(AZn,"Tables/AbstractCell",2110),sDn(479,2110,{479:1,697:1},Ofn),uZn.a=0,uZn.b=0,uZn.d=0,VW(AZn,"ArrayTable/2",479),sDn(2024,1,{},Vl),uZn.td=function(n){return Qtn(this.a,n)},VW(AZn,"ArrayTable/2methodref$getValue$Type",2024),sDn(2023,399,LZn,QD),uZn.Xb=function(n){return Qtn(this.a,n)},VW(AZn,"ArrayTable/3",2023),sDn(2077,2065,xZn),uZn.$b=function(){Hq(this.kc())},uZn.vc=function(){return new wb(this)},uZn.lc=function(){return new MY(this.kc(),this.gc())},VW(AZn,"Maps/IteratorBasedAbstractMap",2077),sDn(842,2077,xZn),uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return Ej(this.c,n)},uZn.kc=function(){return new JD(this,this.c.b.c.gc())},uZn.lc=function(){return Dq(this.c.b.c.gc(),16,new zl(this))},uZn.xc=function(n){var t;return(t=uG(W_(this.c,n),17))?this.vd(t.a):null},uZn.dc=function(){return this.c.b.c.dc()},uZn.ec=function(){return TV(this.c)},uZn.zc=function(n,t){var e;if(!(e=uG(W_(this.c,n),17)))throw hv(new vM(this.ud()+" "+n+" not in "+TV(this.c)));return this.wd(e.a,t)},uZn.Bc=function(n){throw hv(new Kv)},uZn.gc=function(){return this.c.b.c.gc()},VW(AZn,"ArrayTable/ArrayMap",842),sDn(2020,1,{},zl),uZn.td=function(n){return qW(this.a,n)},VW(AZn,"ArrayTable/ArrayMap/0methodref$getEntry$Type",2020),sDn(2018,358,GZn,TE),uZn.ld=function(){return uR(this.a,this.b)},uZn.md=function(){return this.a.vd(this.b)},uZn.nd=function(n){return this.a.wd(this.b,n)},uZn.b=0,VW(AZn,"ArrayTable/ArrayMap/1",2018),sDn(2019,399,LZn,JD),uZn.Xb=function(n){return qW(this.a,n)},VW(AZn,"ArrayTable/ArrayMap/2",2019),sDn(2017,842,xZn,yz),uZn.ud=function(){return"Column"},uZn.vd=function(n){return I7(this.b,this.a,n)},uZn.wd=function(n,t){return Hhn(this.b,this.a,n,t)},uZn.a=0,VW(AZn,"ArrayTable/Row",2017),sDn(843,842,xZn,zD),uZn.vd=function(n){return new yz(this.a,n)},uZn.zc=function(n,t){return uG(t,85),GM()},uZn.wd=function(n,t){return uG(t,85),qM()},uZn.ud=function(){return"Row"},VW(AZn,"ArrayTable/RowMap",843),sDn(1157,1,WZn,jE),uZn.Ad=function(n){return!!(-262&this.a.yd()&n)},uZn.yd=function(){return-262&this.a.yd()},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Nb(new SE(n,this.b))},uZn.Bd=function(n){return this.a.Bd(new EE(n,this.b))},VW(AZn,"CollectSpliterators/1",1157),sDn(1158,1,QZn,EE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},VW(AZn,"CollectSpliterators/1/lambda$0$Type",1158),sDn(1159,1,QZn,SE),uZn.Cd=function(n){this.a.Cd(this.b.Kb(n))},VW(AZn,"CollectSpliterators/1/lambda$1$Type",1159),sDn(1154,1,WZn,x_),uZn.Ad=function(n){return!!((16464|this.b)&n)},uZn.yd=function(){return 16464|this.b},uZn.zd=function(){return this.a.zd()},uZn.Nb=function(n){this.a.Qe(new CE(n,this.c))},uZn.Bd=function(n){return this.a.Re(new PE(n,this.c))},uZn.b=0,VW(AZn,"CollectSpliterators/1WithCharacteristics",1154),sDn(1155,1,JZn,PE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},VW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$0$Type",1155),sDn(1156,1,JZn,CE),uZn.Dd=function(n){this.a.Cd(this.b.td(n))},VW(AZn,"CollectSpliterators/1WithCharacteristics/lambda$1$Type",1156),sDn(1150,1,WZn),uZn.Ad=function(n){return 0!=(this.a&n)},uZn.yd=function(){return this.a},uZn.zd=function(){return this.e&&(this.b=g$(this.b,this.e.zd())),g$(this.b,0)},uZn.Nb=function(n){this.e&&(this.e.Nb(n),this.e=null),this.c.Nb(new IE(this,n)),this.b=0},uZn.Bd=function(n){for(;;){if(this.e&&this.e.Bd(n))return HA(this.b,YZn)&&(this.b=$gn(this.b,1)),!0;if(this.e=null,!this.c.Bd(new eb(this)))return!1}},uZn.a=0,uZn.b=0,VW(AZn,"CollectSpliterators/FlatMapSpliterator",1150),sDn(1152,1,QZn,eb),uZn.Cd=function(n){M_(this.a,n)},VW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$0$Type",1152),sDn(1153,1,QZn,IE),uZn.Cd=function(n){fY(this.a,this.b,n)},VW(AZn,"CollectSpliterators/FlatMapSpliterator/lambda$1$Type",1153),sDn(1151,1150,WZn,T6),VW(AZn,"CollectSpliterators/FlatMapSpliteratorOfObject",1151),sDn(253,1,ZZn),uZn.Fd=function(n){return this.Ed(uG(n,253))},uZn.Ed=function(n){var t;return n==(my(),Tat)?1:n==(py(),Mat)?-1:(qG(),0!=(t=Dun(this.a,n.a))?t:F$(this,526)==F$(n,526)?0:F$(this,526)?1:-1)},uZn.Id=function(){return this.a},uZn.Fb=function(n){return pTn(this,n)},VW(AZn,"Cut",253),sDn(1823,253,ZZn,ky),uZn.Ed=function(n){return n==this?0:1},uZn.Gd=function(n){throw hv(new Av)},uZn.Hd=function(n){n.a+="+\u221e)"},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!1},uZn.Ib=function(){return"+\u221e"},VW(AZn,"Cut/AboveAll",1823),sDn(526,253,{253:1,526:1,3:1,34:1},bx),uZn.Gd=function(n){QA((n.a+="(",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),93)},uZn.Hb=function(){return~Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<0},uZn.Ib=function(){return"/"+this.a+"\\"},VW(AZn,"Cut/AboveValue",526),sDn(1822,253,ZZn,vy),uZn.Ed=function(n){return n==this?0:-1},uZn.Gd=function(n){n.a+="(-\u221e"},uZn.Hd=function(n){throw hv(new Av)},uZn.Id=function(){throw hv(new kM(n1n))},uZn.Hb=function(){return bS(),Avn(this)},uZn.Jd=function(n){return!0},uZn.Ib=function(){return"-\u221e"},VW(AZn,"Cut/BelowAll",1822),sDn(1824,253,ZZn,wx),uZn.Gd=function(n){QA((n.a+="[",n),this.a)},uZn.Hd=function(n){jQ(QA(n,this.a),41)},uZn.Hb=function(){return Hon(this.a)},uZn.Jd=function(n){return qG(),Dun(this.a,n)<=0},uZn.Ib=function(){return"\\"+this.a+"/"},VW(AZn,"Cut/BelowValue",1824),sDn(547,1,t1n),uZn.Jc=function(n){V8(this,n)},uZn.Ib=function(){return rgn(uG(bZ(this,"use Optional.orNull() instead of Optional.or(null)"),20).Kc())},VW(AZn,"FluentIterable",547),sDn(442,547,t1n,iN),uZn.Kc=function(){return new FV(ix(this.a.Kc(),new h))},VW(AZn,"FluentIterable/2",442),sDn(1059,547,t1n,rN),uZn.Kc=function(){return Oz(this)},VW(AZn,"FluentIterable/3",1059),sDn(724,399,LZn,YD),uZn.Xb=function(n){return this.a[n].Kc()},VW(AZn,"FluentIterable/3/1",724),sDn(2070,1,{}),uZn.Ib=function(){return cpn(this.Kd().b)},VW(AZn,"ForwardingObject",2070),sDn(2071,2070,e1n),uZn.Kd=function(){return this.Ld()},uZn.Jc=function(n){V8(this,n)},uZn.Lc=function(){return this.Oc()},uZn.Nc=function(){return new h3(this,0)},uZn.Oc=function(){return new fX(null,this.Nc())},uZn.Fc=function(n){return this.Ld(),Rj()},uZn.Gc=function(n){return this.Ld(),Kj()},uZn.$b=function(){this.Ld(),Fj()},uZn.Hc=function(n){return this.Ld().Hc(n)},uZn.Ic=function(n){return this.Ld().Ic(n)},uZn.dc=function(){return this.Ld().b.dc()},uZn.Kc=function(){return this.Ld().Kc()},uZn.Mc=function(n){return this.Ld(),_j()},uZn.gc=function(){return this.Ld().b.gc()},uZn.Pc=function(){return this.Ld().Pc()},uZn.Qc=function(n){return this.Ld().Qc(n)},VW(AZn,"ForwardingCollection",2071),sDn(2078,31,i1n),uZn.Kc=function(){return this.Od()},uZn.Fc=function(n){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.Md=function(){return this.c||(this.c=this.Nd())},uZn.$b=function(){throw hv(new Kv)},uZn.Hc=function(n){return null!=n&&Wpn(this,n,!1)},uZn.Nd=function(){switch(this.gc()){case 0:return ZW(),ZW(),jat;case 1:return ZW(),new Uq(WW(this.Od().Pb()));default:return new Tz(this,this.Pc())}},uZn.Mc=function(n){throw hv(new Kv)},VW(AZn,"ImmutableCollection",2078),sDn(727,2078,i1n,jv),uZn.Kc=function(){return jtn(this.a.Kc())},uZn.Hc=function(n){return null!=n&&this.a.Hc(n)},uZn.Ic=function(n){return this.a.Ic(n)},uZn.dc=function(){return this.a.dc()},uZn.Od=function(){return jtn(this.a.Kc())},uZn.gc=function(){return this.a.gc()},uZn.Pc=function(){return this.a.Pc()},uZn.Qc=function(n){return this.a.Qc(n)},uZn.Ib=function(){return cpn(this.a)},VW(AZn,"ForwardingImmutableCollection",727),sDn(307,2078,r1n),uZn.Kc=function(){return this.Od()},uZn.ed=function(){return this.Pd(0)},uZn.fd=function(n){return this.Pd(n)},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.kd=function(n,t){return this.Qd(n,t)},uZn.bd=function(n,t){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Md=function(){return this},uZn.Fb=function(n){return RDn(this,n)},uZn.Hb=function(){return Xsn(this)},uZn.dd=function(n){return null==n?-1:uTn(this,n)},uZn.Od=function(){return this.Pd(0)},uZn.Pd=function(n){return oR(this,n)},uZn.gd=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},uZn.Qd=function(n,t){return Dwn(new C2(new qE(this),n,t))},VW(AZn,"ImmutableList",307),sDn(2105,307,r1n),uZn.Kc=function(){return jtn(this.Rd().Kc())},uZn.kd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Hc=function(n){return null!=n&&this.Rd().Hc(n)},uZn.Ic=function(n){return this.Rd().Ic(n)},uZn.Fb=function(n){return udn(this.Rd(),n)},uZn.Xb=function(n){return GA(this,n)},uZn.Hb=function(){return Hon(this.Rd())},uZn.dd=function(n){return this.Rd().dd(n)},uZn.dc=function(){return this.Rd().dc()},uZn.Od=function(){return jtn(this.Rd().Kc())},uZn.gc=function(){return this.Rd().gc()},uZn.Qd=function(n,t){return Dwn(this.Rd().kd(n,t))},uZn.Pc=function(){return this.Rd().Qc(Inn(dat,EZn,1,this.Rd().gc(),5,1))},uZn.Qc=function(n){return this.Rd().Qc(n)},uZn.Ib=function(){return cpn(this.Rd())},VW(AZn,"ForwardingImmutableList",2105),sDn(729,1,a1n),uZn.vc=function(){return MV(this)},uZn.wc=function(n){Yun(this,n)},uZn.ec=function(){return TV(this)},uZn.yc=function(n,t,e){return Jgn(this,n,t,e)},uZn.Cc=function(){return this.Vd()},uZn.$b=function(){throw hv(new Kv)},uZn._b=function(n){return null!=this.xc(n)},uZn.uc=function(n){return this.Vd().Hc(n)},uZn.Td=function(){return new Ev(this)},uZn.Ud=function(){return new Sv(this)},uZn.Fb=function(n){return Wln(this,n)},uZn.Hb=function(){return MV(this).Hb()},uZn.dc=function(){return 0==this.gc()},uZn.zc=function(n,t){return BM()},uZn.Bc=function(n){throw hv(new Kv)},uZn.Ib=function(){return QIn(this)},uZn.Vd=function(){return this.e?this.e:this.e=this.Ud()},uZn.c=null,uZn.d=null,uZn.e=null,VW(AZn,"ImmutableMap",729),sDn(730,729,a1n),uZn._b=function(n){return Ej(this,n)},uZn.uc=function(n){return iS(this.b,n)},uZn.Sd=function(){return $wn(new Zl(this))},uZn.Td=function(){return $wn(SJ(this.b))},uZn.Ud=function(){return sB(),new jv(jJ(this.b))},uZn.Fb=function(n){return rS(this.b,n)},uZn.xc=function(n){return W_(this,n)},uZn.Hb=function(){return Hon(this.b.c)},uZn.dc=function(){return this.b.c.dc()},uZn.gc=function(){return this.b.c.gc()},uZn.Ib=function(){return cpn(this.b.c)},VW(AZn,"ForwardingImmutableMap",730),sDn(2072,2071,o1n),uZn.Kd=function(){return this.Wd()},uZn.Ld=function(){return this.Wd()},uZn.Nc=function(){return new h3(this,1)},uZn.Fb=function(n){return n===this||this.Wd().Fb(n)},uZn.Hb=function(){return this.Wd().Hb()},VW(AZn,"ForwardingSet",2072),sDn(1085,2072,o1n,Zl),uZn.Kd=function(){return EJ(this.a.b)},uZn.Ld=function(){return EJ(this.a.b)},uZn.Hc=function(n){if(F$(n,44)&&null==uG(n,44).ld())return!1;try{return eS(EJ(this.a.b),n)}catch(t){if(F$(t=Ehn(t),212))return!1;throw hv(t)}},uZn.Wd=function(){return EJ(this.a.b)},uZn.Qc=function(n){var t;return t=YZ(EJ(this.a.b),n),EJ(this.a.b).b.gc()=0?"+":"")+(i/60|0),t=FL(e.Math.abs(i)%60),(cIn(),nut)[this.q.getDay()]+" "+tut[this.q.getMonth()]+" "+FL(this.q.getDate())+" "+FL(this.q.getHours())+":"+FL(this.q.getMinutes())+":"+FL(this.q.getSeconds())+" GMT"+n+t+" "+this.q.getFullYear()};var Xat,Vat,zat,Wat,Qat,Jat,Yat,Zat,not,tot,eot,iot=VW(DZn,"Date",206);sDn(2015,206,s0n,DEn),uZn.a=!1,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=0,uZn.g=!1,uZn.i=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,uZn.p=0,VW("com.google.gwt.i18n.shared.impl","DateRecord",2015),sDn(2064,1,{}),uZn.pe=function(){return null},uZn.qe=function(){return null},uZn.re=function(){return null},uZn.se=function(){return null},uZn.te=function(){return null},VW(h0n,"JSONValue",2064),sDn(221,2064,{221:1},Ib,Eb),uZn.Fb=function(n){return!!F$(n,221)&&j3(this.a,uG(n,221).a)},uZn.oe=function(){return uv},uZn.Hb=function(){return OZ(this.a)},uZn.pe=function(){return this},uZn.Ib=function(){var n,t,e;for(e=new lx("["),t=0,n=this.a.length;t0&&(e.a+=","),QA(e,uin(this,t));return e.a+="]",e.a},VW(h0n,"JSONArray",221),sDn(493,2064,{493:1},Sb),uZn.oe=function(){return sv},uZn.qe=function(){return this},uZn.Ib=function(){return qx(),""+this.a},uZn.a=!1,VW(h0n,"JSONBoolean",493),sDn(997,63,S1n,Fy),VW(h0n,"JSONException",997),sDn(1036,2064,{},T),uZn.oe=function(){return fv},uZn.Ib=function(){return IZn},VW(h0n,"JSONNull",1036),sDn(263,2064,{263:1},Pb),uZn.Fb=function(n){return!!F$(n,263)&&this.a==uG(n,263).a},uZn.oe=function(){return av},uZn.Hb=function(){return OL(this.a)},uZn.re=function(){return this},uZn.Ib=function(){return this.a+""},uZn.a=0,VW(h0n,"JSONNumber",263),sDn(190,2064,{190:1},_y,Cb),uZn.Fb=function(n){return!!F$(n,190)&&j3(this.a,uG(n,190).a)},uZn.oe=function(){return ov},uZn.Hb=function(){return OZ(this.a)},uZn.se=function(){return this},uZn.Ib=function(){var n,t,e,i,r,c;for(c=new lx("{"),n=!0,i=0,r=(e=Yon(this,Inn($ot,VZn,2,0,6,1))).length;i=0?":"+this.c:"")+")"},uZn.c=0;var jot=VW(kZn,"StackTraceElement",319);bZn={3:1,484:1,34:1,2:1};var Eot,Sot,Pot,Cot,Iot,Oot,Aot,Lot,Not,$ot=VW(kZn,C1n,2);sDn(111,427,{484:1},VM,zM,fx),VW(kZn,"StringBuffer",111),sDn(104,427,{484:1},WM,QM,lx),VW(kZn,"StringBuilder",104),sDn(702,77,v0n,JM),VW(kZn,"StringIndexOutOfBoundsException",702),sDn(2145,1,{}),sDn(48,63,{3:1,103:1,63:1,82:1,48:1},Kv,TM),VW(kZn,"UnsupportedOperationException",48),sDn(247,242,{3:1,34:1,242:1,247:1},Edn,Wj),uZn.Fd=function(n){return $Gn(this,uG(n,247))},uZn.ue=function(){return YIn(wVn(this))},uZn.Fb=function(n){var t;return this===n||!!F$(n,247)&&(t=uG(n,247),this.e==t.e&&0==$Gn(this,t))},uZn.Hb=function(){var n;return 0!=this.b?this.b:this.a<54?(n=Bsn(this.f),this.b=pV(E3(n,-1)),this.b=33*this.b+pV(E3($V(n,32),-1)),this.b=17*this.b+t0(this.e),this.b):(this.b=17*cwn(this.c)+t0(this.e),this.b)},uZn.Ib=function(){return wVn(this)},uZn.a=0,uZn.b=0,uZn.d=0,uZn.e=0,uZn.f=0;var Dot,xot,Rot,Kot,Fot,_ot,Bot=VW("java.math","BigDecimal",247);sDn(92,242,{3:1,34:1,242:1,92:1},Z5,x3,zz,nkn,PN),uZn.Fd=function(n){return Pvn(this,uG(n,92))},uZn.ue=function(){return YIn(bYn(this,0))},uZn.Fb=function(n){return Cpn(this,n)},uZn.Hb=function(){return cwn(this)},uZn.Ib=function(){return bYn(this,0)},uZn.b=-2,uZn.c=0,uZn.d=0,uZn.e=0;var Hot,Uot,Got,qot,Xot=VW("java.math","BigInteger",92);sDn(498,2065,xZn),uZn.$b=function(){$z(this)},uZn._b=function(n){return Pz(this,n)},uZn.uc=function(n){return Qln(this,n,this.i)||Qln(this,n,this.f)},uZn.vc=function(){return new Nw(this)},uZn.xc=function(n){return cQ(this,n)},uZn.zc=function(n,t){return vJ(this,n,t)},uZn.Bc=function(n){return u7(this,n)},uZn.gc=function(){return oS(this)},uZn.g=0,VW(DZn,"AbstractHashMap",498),sDn(267,KZn,FZn,Nw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return Q4(this,n)},uZn.Kc=function(){return new bsn(this.a)},uZn.Mc=function(n){var t;return!!Q4(this,n)&&(t=uG(n,44).ld(),this.a.Bc(t),!0)},uZn.gc=function(){return this.a.gc()},VW(DZn,"AbstractHashMap/EntrySet",267),sDn(268,1,$Zn,bsn),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return von(this)},uZn.Ob=function(){return this.b},uZn.Qb=function(){Oen(this)},uZn.b=!1,uZn.d=0,VW(DZn,"AbstractHashMap/EntrySetIterator",268),sDn(426,1,$Zn,Jw),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return AP(this)},uZn.Pb=function(){return _Y(this)},uZn.Qb=function(){LQ(this)},uZn.b=0,uZn.c=-1,VW(DZn,"AbstractList/IteratorImpl",426),sDn(98,426,UZn,N4),uZn.Qb=function(){LQ(this)},uZn.Rb=function(n){pF(this,n)},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Ub=function(){return MK(this.b>0),this.a.Xb(this.c=--this.b)},uZn.Vb=function(){return this.b-1},uZn.Wb=function(n){TK(-1!=this.c),this.a.hd(this.c,n)},VW(DZn,"AbstractList/ListIteratorImpl",98),sDn(244,56,m1n,C2),uZn.bd=function(n,t){o3(n,this.b),this.c.bd(this.a+n,t),++this.b},uZn.Xb=function(n){return u3(n,this.b),this.c.Xb(this.a+n)},uZn.gd=function(n){var t;return u3(n,this.b),t=this.c.gd(this.a+n),--this.b,t},uZn.hd=function(n,t){return u3(n,this.b),this.c.hd(this.a+n,t)},uZn.gc=function(){return this.b},uZn.a=0,uZn.b=0,VW(DZn,"AbstractList/SubList",244),sDn(266,KZn,FZn,Lw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return new Kw(this.a.vc().Kc())},uZn.Mc=function(n){return!!this.a._b(n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},VW(DZn,"AbstractMap/1",266),sDn(541,1,$Zn,Kw),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).ld()},uZn.Qb=function(){this.a.Qb()},VW(DZn,"AbstractMap/1/1",541),sDn(231,31,RZn,Fw),uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a.uc(n)},uZn.Kc=function(){return new _w(this.a.vc().Kc())},uZn.gc=function(){return this.a.gc()},VW(DZn,"AbstractMap/2",231),sDn(301,1,$Zn,_w),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return this.a.Ob()},uZn.Pb=function(){return uG(this.a.Pb(),44).md()},uZn.Qb=function(){this.a.Qb()},VW(DZn,"AbstractMap/2/1",301),sDn(494,1,{494:1,44:1}),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.d,t.ld())&&OJ(this.e,t.md()))},uZn.ld=function(){return this.d},uZn.md=function(){return this.e},uZn.Hb=function(){return zN(this.d)^zN(this.e)},uZn.nd=function(n){return wF(this,n)},uZn.Ib=function(){return this.d+"="+this.e},VW(DZn,"AbstractMap/AbstractEntry",494),sDn(397,494,{494:1,397:1,44:1},zP),VW(DZn,"AbstractMap/SimpleEntry",397),sDn(2082,1,$0n),uZn.Fb=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),OJ(this.ld(),t.ld())&&OJ(this.md(),t.md()))},uZn.Hb=function(){return zN(this.ld())^zN(this.md())},uZn.Ib=function(){return this.ld()+"="+this.md()},VW(DZn,qZn,2082),sDn(2090,2065,_Zn),uZn.Xc=function(n){return Sj(this.Ee(n))},uZn.tc=function(n){return I9(this,n)},uZn._b=function(n){return dF(this,n)},uZn.vc=function(){return new Uw(this)},uZn.Tc=function(){return Dz(this.Ge())},uZn.Yc=function(n){return Sj(this.He(n))},uZn.xc=function(n){var t;return t=n,DA(this.Fe(t))},uZn.$c=function(n){return Sj(this.Ie(n))},uZn.ec=function(){return new Bw(this)},uZn.Vc=function(){return Dz(this.Je())},uZn._c=function(n){return Sj(this.Ke(n))},VW(DZn,"AbstractNavigableMap",2090),sDn(629,KZn,FZn,Uw),uZn.Hc=function(n){return F$(n,44)&&I9(this.b,uG(n,44))},uZn.Kc=function(){return this.b.De()},uZn.Mc=function(n){var t;return!!F$(n,44)&&(t=uG(n,44),this.b.Le(t))},uZn.gc=function(){return this.b.gc()},VW(DZn,"AbstractNavigableMap/EntrySet",629),sDn(1146,KZn,HZn,Bw),uZn.Nc=function(){return new GP(this)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return dF(this.a,n)},uZn.Kc=function(){return new Hw(this.a.vc().b.De())},uZn.Mc=function(n){return!!dF(this.a,n)&&(this.a.Bc(n),!0)},uZn.gc=function(){return this.a.gc()},VW(DZn,"AbstractNavigableMap/NavigableKeySet",1146),sDn(1147,1,$Zn,Hw),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return AP(this.a.a)},uZn.Pb=function(){return kR(this.a).ld()},uZn.Qb=function(){rB(this.a)},VW(DZn,"AbstractNavigableMap/NavigableKeySet/1",1147),sDn(2103,31,RZn),uZn.Fc=function(n){return kG(_Cn(this,n),D0n),!0},uZn.Gc=function(n){return tJ(n),vG(n!=this,"Can't add a queue to itself"),Qon(this,n)},uZn.$b=function(){for(;null!=hin(this););},VW(DZn,"AbstractQueue",2103),sDn(310,31,{4:1,20:1,31:1,16:1},ND,$4),uZn.Fc=function(n){return O6(this,n),!0},uZn.$b=function(){q5(this)},uZn.Hc=function(n){return Chn(new XJ(this),n)},uZn.dc=function(){return LM(this)},uZn.Kc=function(){return new XJ(this)},uZn.Mc=function(n){return m0(new XJ(this),n)},uZn.gc=function(){return this.c-this.b&this.a.length-1},uZn.Nc=function(){return new h3(this,272)},uZn.Qc=function(n){var t;return t=this.c-this.b&this.a.length-1,n.lengtht&&uQ(n,t,null),n},uZn.b=0,uZn.c=0,VW(DZn,"ArrayDeque",310),sDn(459,1,$Zn,XJ),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return this.a!=this.b},uZn.Pb=function(){return rwn(this)},uZn.Qb=function(){lan(this)},uZn.a=0,uZn.b=0,uZn.c=-1,VW(DZn,"ArrayDeque/IteratorImpl",459),sDn(13,56,x0n,Zm,R7,Z_),uZn.bd=function(n,t){GX(this,n,t)},uZn.Fc=function(n){return kD(this,n)},uZn.cd=function(n,t){return Cbn(this,n,t)},uZn.Gc=function(n){return Ohn(this,n)},uZn.$b=function(){Xv(this.c,0)},uZn.Hc=function(n){return-1!=Ten(this,n,0)},uZn.Jc=function(n){Prn(this,n)},uZn.Xb=function(n){return Vq(this,n)},uZn.dd=function(n){return Ten(this,n,0)},uZn.dc=function(){return 0==this.c.length},uZn.Kc=function(){return new Ww(this)},uZn.gd=function(n){return i7(this,n)},uZn.Mc=function(n){return men(this,n)},uZn.ce=function(n,t){P2(this,n,t)},uZn.hd=function(n,t){return Y8(this,n,t)},uZn.gc=function(){return this.c.length},uZn.jd=function(n){f$(this,n)},uZn.Pc=function(){return tq(this.c)},uZn.Qc=function(n){return Ekn(this,n)};var Vot,zot,Wot,Qot,Jot,Yot,Zot,nut,tut,eut=VW(DZn,"ArrayList",13);sDn(7,1,$Zn,Ww),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return l$(this)},uZn.Pb=function(){return N3(this)},uZn.Qb=function(){tW(this)},uZn.a=0,uZn.b=-1,VW(DZn,"ArrayList/1",7),sDn(2112,e.Function,{},P),uZn.Me=function(n,t){return ugn(n,t)},sDn(151,56,R0n,IM),uZn.Hc=function(n){return-1!=gan(this,n)},uZn.Jc=function(n){var t,e,i,r;for(tJ(n),i=0,r=(e=this.a).length;i0)throw hv(new vM(Y0n+n+" greater than "+this.e));return this.f.Te()?G1(this.c,this.b,this.a,n,t):N2(this.c,n,t)},uZn.zc=function(n,t){if(!ljn(this.c,this.f,n,this.b,this.a,this.e,this.d))throw hv(new vM(n+" outside the range "+this.b+" to "+this.e));return xfn(this.c,n,t)},uZn.Bc=function(n){var t;return t=n,ljn(this.c,this.f,t,this.b,this.a,this.e,this.d)?z1(this.c,t):null},uZn.Le=function(n){return $Q(this,n.ld())&&Lnn(this.c,n)},uZn.gc=function(){var n,t,e;if(!((t=this.f.Te()?this.a?Zmn(this.c,this.b,!0):Zmn(this.c,this.b,!1):Ytn(this.c))&&$Q(this,t.d)&&t))return 0;for(n=0,e=new dun(this.c,this.f,this.b,this.a,this.e,this.d);AP(e.a);e.b=uG(_Y(e.a),44))++n;return n},uZn.ad=function(n,t){if(this.f.Te()&&this.c.a.Ne(n,this.b)<0)throw hv(new vM(Y0n+n+Z0n+this.b));return this.f.Ue()?G1(this.c,n,t,this.e,this.d):$2(this.c,n,t)},uZn.a=!1,uZn.d=!1,VW(DZn,"TreeMap/SubMap",631),sDn(304,22,n2n,qP),uZn.Te=function(){return!1},uZn.Ue=function(){return!1};var Mut,Tut=_cn(DZn,"TreeMap/SubMapType",304,Oat,K6,hB);sDn(1143,304,n2n,SN),uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/1",1143,Tut,null,null),sDn(1144,304,n2n,P$),uZn.Te=function(){return!0},uZn.Ue=function(){return!0},_cn(DZn,"TreeMap/SubMapType/2",1144,Tut,null,null),sDn(1145,304,n2n,EN),uZn.Te=function(){return!0},_cn(DZn,"TreeMap/SubMapType/3",1145,Tut,null,null),sDn(157,KZn,{3:1,20:1,31:1,16:1,277:1,21:1,87:1,157:1},rk,Hj,od),uZn.Nc=function(){return new GP(this)},uZn.Fc=function(n){return _z(this,n)},uZn.$b=function(){this.a.$b()},uZn.Hc=function(n){return this.a._b(n)},uZn.Kc=function(){return this.a.ec().Kc()},uZn.Mc=function(n){return sD(this,n)},uZn.gc=function(){return this.a.gc()};var jut=VW(DZn,"TreeSet",157);sDn(1082,1,{},ud),uZn.Ve=function(n,t){return _K(this.a,n,t)},VW(t2n,"BinaryOperator/lambda$0$Type",1082),sDn(1083,1,{},sd),uZn.Ve=function(n,t){return BK(this.a,n,t)},VW(t2n,"BinaryOperator/lambda$1$Type",1083),sDn(952,1,{},H),uZn.Kb=function(n){return n},VW(t2n,"Function/lambda$0$Type",952),sDn(395,1,y1n,hd),uZn.Mb=function(n){return!this.a.Mb(n)},VW(t2n,"Predicate/lambda$2$Type",395),sDn(581,1,{581:1});var Eut,Sut,Put=VW(e2n,"Handler",581);sDn(2107,1,yZn),uZn.xe=function(){return"DUMMY"},uZn.Ib=function(){return this.xe()},VW(e2n,"Level",2107),sDn(1706,2107,yZn,U),uZn.xe=function(){return"INFO"},VW(e2n,"Level/LevelInfo",1706),sDn(1843,1,{},ik),VW(e2n,"LogManager",1843),sDn(1896,1,yZn,iB),uZn.b=null,VW(e2n,"LogRecord",1896),sDn(525,1,{525:1},e9),uZn.e=!1;var Cut,Iut,Out,Aut=!1,Lut=!1,Nut=!1,$ut=!1,Dut=!1;VW(e2n,"Logger",525),sDn(835,581,{581:1},G),VW(e2n,"SimpleConsoleLogHandler",835),sDn(108,22,{3:1,34:1,22:1,108:1},XP);var xut,Rut=_cn(c2n,"Collector/Characteristics",108,Oat,D2,fB);sDn(758,1,{},Wz),VW(c2n,"CollectorImpl",758),sDn(1074,1,{},q),uZn.Ve=function(n,t){return idn(uG(n,213),uG(t,213))},VW(c2n,"Collectors/10methodref$merge$Type",1074),sDn(1075,1,{},X),uZn.Kb=function(n){return R4(uG(n,213))},VW(c2n,"Collectors/11methodref$toString$Type",1075),sDn(1076,1,{},fd),uZn.Kb=function(n){return qx(),!!IL(n)},VW(c2n,"Collectors/12methodref$test$Type",1076),sDn(144,1,{},V),uZn.Yd=function(n,t){uG(n,16).Fc(t)},VW(c2n,"Collectors/20methodref$add$Type",144),sDn(146,1,{},z),uZn.Xe=function(){return new Zm},VW(c2n,"Collectors/21methodref$ctor$Type",146),sDn(359,1,{},W),uZn.Xe=function(){return new ek},VW(c2n,"Collectors/23methodref$ctor$Type",359),sDn(360,1,{},Q),uZn.Yd=function(n,t){Fz(uG(n,49),t)},VW(c2n,"Collectors/24methodref$add$Type",360),sDn(1069,1,{},J),uZn.Ve=function(n,t){return IS(uG(n,15),uG(t,16))},VW(c2n,"Collectors/4methodref$addAll$Type",1069),sDn(1073,1,{},Y),uZn.Yd=function(n,t){o7(uG(n,213),uG(t,484))},VW(c2n,"Collectors/9methodref$add$Type",1073),sDn(1072,1,{},fG),uZn.Xe=function(){return new Ysn(this.a,this.b,this.c)},VW(c2n,"Collectors/lambda$15$Type",1072),sDn(1077,1,{},Z),uZn.Xe=function(){var n;return Akn(n=new u8,(qx(),!1),new Zm),Akn(n,!0,new Zm),n},VW(c2n,"Collectors/lambda$22$Type",1077),sDn(1078,1,{},ld),uZn.Xe=function(){return Uhn(cT(dat,1),EZn,1,5,[this.a])},VW(c2n,"Collectors/lambda$25$Type",1078),sDn(1079,1,{},bd),uZn.Yd=function(n,t){Yq(this.a,Kcn(n))},VW(c2n,"Collectors/lambda$26$Type",1079),sDn(1080,1,{},wd),uZn.Ve=function(n,t){return sz(this.a,Kcn(n),Kcn(t))},VW(c2n,"Collectors/lambda$27$Type",1080),sDn(1081,1,{},nn),uZn.Kb=function(n){return Kcn(n)[0]},VW(c2n,"Collectors/lambda$28$Type",1081),sDn(728,1,{},tn),uZn.Ve=function(n,t){return nX(n,t)},VW(c2n,"Collectors/lambda$4$Type",728),sDn(145,1,{},en),uZn.Ve=function(n,t){return ES(uG(n,16),uG(t,16))},VW(c2n,"Collectors/lambda$42$Type",145),sDn(361,1,{},rn),uZn.Ve=function(n,t){return SS(uG(n,49),uG(t,49))},VW(c2n,"Collectors/lambda$50$Type",361),sDn(362,1,{},cn),uZn.Kb=function(n){return uG(n,49)},VW(c2n,"Collectors/lambda$51$Type",362),sDn(1068,1,{},dd),uZn.Yd=function(n,t){vln(this.a,uG(n,85),t)},VW(c2n,"Collectors/lambda$7$Type",1068),sDn(1070,1,{},an),uZn.Ve=function(n,t){return Ahn(uG(n,85),uG(t,85),new J)},VW(c2n,"Collectors/lambda$8$Type",1070),sDn(1071,1,{},gd),uZn.Kb=function(n){return Vgn(this.a,uG(n,85))},VW(c2n,"Collectors/lambda$9$Type",1071),sDn(550,1,{}),uZn.$e=function(){qQ(this)},uZn.d=!1,VW(c2n,"TerminatableStream",550),sDn(827,550,a2n,IK),uZn.$e=function(){qQ(this)},VW(c2n,"DoubleStreamImpl",827),sDn(1847,736,WZn,lG),uZn.Re=function(n){return FMn(this,uG(n,189))},uZn.a=null,VW(c2n,"DoubleStreamImpl/2",1847),sDn(1848,1,_0n,pd),uZn.Pe=function(n){$N(this.a,n)},VW(c2n,"DoubleStreamImpl/2/lambda$0$Type",1848),sDn(1845,1,_0n,md),uZn.Pe=function(n){NN(this.a,n)},VW(c2n,"DoubleStreamImpl/lambda$0$Type",1845),sDn(1846,1,_0n,vd),uZn.Pe=function(n){Mmn(this.a,n)},VW(c2n,"DoubleStreamImpl/lambda$2$Type",1846),sDn(1397,735,WZn,i9),uZn.Re=function(n){return e6(this,uG(n,202))},uZn.a=0,uZn.b=0,uZn.c=0,VW(c2n,"IntStream/5",1397),sDn(806,550,a2n,OK),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),this.a},VW(c2n,"IntStreamImpl",806),sDn(807,550,a2n,mS),uZn.$e=function(){qQ(this)},uZn._e=function(){return GQ(this),BD(),dut},VW(c2n,"IntStreamImpl/Empty",807),sDn(1687,1,JZn,kd),uZn.Dd=function(n){msn(this.a,n)},VW(c2n,"IntStreamImpl/lambda$4$Type",1687);var Kut,Fut=Iq(c2n,"Stream");sDn(26,550,{533:1,687:1,848:1},fX),uZn.$e=function(){qQ(this)},VW(c2n,"StreamImpl",26),sDn(1102,500,WZn,D_),uZn.Bd=function(n){for(;Ttn(this);){if(this.a.Bd(n))return!0;qQ(this.b),this.b=null,this.a=null}return!1},VW(c2n,"StreamImpl/1",1102),sDn(1103,1,QZn,yd),uZn.Cd=function(n){mG(this.a,uG(n,848))},VW(c2n,"StreamImpl/1/lambda$0$Type",1103),sDn(1104,1,y1n,Md),uZn.Mb=function(n){return Fz(this.a,n)},VW(c2n,"StreamImpl/1methodref$add$Type",1104),sDn(1105,500,WZn,QY),uZn.Bd=function(n){var t;return this.a||(t=new Zm,this.b.a.Nb(new Td(t)),hZ(),f$(t,this.c),this.a=new h3(t,16)),urn(this.a,n)},uZn.a=null,VW(c2n,"StreamImpl/5",1105),sDn(1106,1,QZn,Td),uZn.Cd=function(n){kD(this.a,n)},VW(c2n,"StreamImpl/5/2methodref$add$Type",1106),sDn(737,500,WZn,ien),uZn.Bd=function(n){for(this.b=!1;!this.b&&this.c.Bd(new WP(this,n)););return this.b},uZn.b=!1,VW(c2n,"StreamImpl/FilterSpliterator",737),sDn(1096,1,QZn,WP),uZn.Cd=function(n){XV(this.a,this.b,n)},VW(c2n,"StreamImpl/FilterSpliterator/lambda$0$Type",1096),sDn(1091,736,WZn,s7),uZn.Re=function(n){return v_(this,uG(n,189))},VW(c2n,"StreamImpl/MapToDoubleSpliterator",1091),sDn(1095,1,QZn,QP),uZn.Cd=function(n){vC(this.a,this.b,n)},VW(c2n,"StreamImpl/MapToDoubleSpliterator/lambda$0$Type",1095),sDn(1090,735,WZn,h7),uZn.Re=function(n){return k_(this,uG(n,202))},VW(c2n,"StreamImpl/MapToIntSpliterator",1090),sDn(1094,1,QZn,JP),uZn.Cd=function(n){kC(this.a,this.b,n)},VW(c2n,"StreamImpl/MapToIntSpliterator/lambda$0$Type",1094),sDn(734,500,WZn,f7),uZn.Bd=function(n){return y_(this,n)},VW(c2n,"StreamImpl/MapToObjSpliterator",734),sDn(1093,1,QZn,YP),uZn.Cd=function(n){yC(this.a,this.b,n)},VW(c2n,"StreamImpl/MapToObjSpliterator/lambda$0$Type",1093),sDn(1092,500,WZn,Fan),uZn.Bd=function(n){for(;NP(this.b,0);){if(!this.a.Bd(new on))return!1;this.b=$gn(this.b,1)}return this.a.Bd(n)},uZn.b=0,VW(c2n,"StreamImpl/SkipSpliterator",1092),sDn(1097,1,QZn,on),uZn.Cd=function(n){},VW(c2n,"StreamImpl/SkipSpliterator/lambda$0$Type",1097),sDn(626,1,QZn,un),uZn.Cd=function(n){Ob(this,n)},VW(c2n,"StreamImpl/ValueConsumer",626),sDn(1098,1,QZn,sn),uZn.Cd=function(n){vS()},VW(c2n,"StreamImpl/lambda$0$Type",1098),sDn(1099,1,QZn,hn),uZn.Cd=function(n){vS()},VW(c2n,"StreamImpl/lambda$1$Type",1099),sDn(1100,1,{},jd),uZn.Ve=function(n,t){return FB(this.a,n,t)},VW(c2n,"StreamImpl/lambda$4$Type",1100),sDn(1101,1,QZn,nC),uZn.Cd=function(n){kF(this.b,this.a,n)},VW(c2n,"StreamImpl/lambda$5$Type",1101),sDn(1107,1,QZn,Ed),uZn.Cd=function(n){Usn(this.a,uG(n,380))},VW(c2n,"TerminatableStream/lambda$0$Type",1107),sDn(2142,1,{}),sDn(2014,1,{},fn),VW("javaemul.internal","ConsoleLogger",2014);var _ut=0;sDn(2134,1,{}),sDn(1830,1,QZn,ln),uZn.Cd=function(n){uG(n,317)},VW(l2n,"BowyerWatsonTriangulation/lambda$0$Type",1830),sDn(1831,1,QZn,Pd),uZn.Cd=function(n){Qon(this.a,uG(n,317).e)},VW(l2n,"BowyerWatsonTriangulation/lambda$1$Type",1831),sDn(1832,1,QZn,bn),uZn.Cd=function(n){uG(n,177)},VW(l2n,"BowyerWatsonTriangulation/lambda$2$Type",1832),sDn(1827,1,b2n,Cd),uZn.Ne=function(n,t){return S5(this.a,uG(n,177),uG(t,177))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(l2n,"NaiveMinST/lambda$0$Type",1827),sDn(449,1,{},Sd),VW(l2n,"NodeMicroLayout",449),sDn(177,1,{177:1},ZP),uZn.Fb=function(n){var t;return!!F$(n,177)&&(t=uG(n,177),OJ(this.a,t.a)&&OJ(this.b,t.b)||OJ(this.a,t.b)&&OJ(this.b,t.a))},uZn.Hb=function(){return zN(this.a)+zN(this.b)};var But=VW(l2n,"TEdge",177);sDn(317,1,{317:1},gqn),uZn.Fb=function(n){var t;return!!F$(n,317)&&Den(this,(t=uG(n,317)).a)&&Den(this,t.b)&&Den(this,t.c)},uZn.Hb=function(){return zN(this.a)+zN(this.b)+zN(this.c)},VW(l2n,"TTriangle",317),sDn(225,1,{225:1},C$),VW(l2n,"Tree",225),sDn(1218,1,{},q0),VW(w2n,"Scanline",1218);var Hut=Iq(w2n,d2n);sDn(1758,1,{},Qin),VW(g2n,"CGraph",1758),sDn(316,1,{316:1},z0),uZn.b=0,uZn.c=0,uZn.d=0,uZn.g=0,uZn.i=0,uZn.k=T0n,VW(g2n,"CGroup",316),sDn(830,1,{},fk),VW(g2n,"CGroup/CGroupBuilder",830),sDn(60,1,{60:1},NF),uZn.Ib=function(){return this.j?mK(this.j.Kb(this)):(vK(Vut),Vut.o+"@"+(xx(this)>>>0).toString(16))},uZn.f=0,uZn.i=T0n;var Uut,Gut,qut,Xut,Vut=VW(g2n,"CNode",60);sDn(829,1,{},lk),VW(g2n,"CNode/CNodeBuilder",829),sDn(1590,1,{},wn),uZn.ff=function(n,t){return 0},uZn.gf=function(n,t){return 0},VW(g2n,m2n,1590),sDn(1853,1,{},dn),uZn.cf=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g;for(h=M0n,r=new Ww(n.a.b);r.ae.d.c||e.d.c==r.d.c&&e.d.b0?n+this.n.d+this.n.a:0},uZn.kf=function(){var n,t,i,r,c;if(c=0,this.e)this.b?c=this.b.a:this.a[1][1]&&(c=this.a[1][1].kf());else if(this.g)c=ypn(this,wEn(this,null,!0));else for(Yrn(),i=0,r=(t=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i0?c+this.n.b+this.n.c:0},uZn.lf=function(){var n,t,e,i,r;if(this.g)for(n=wEn(this,null,!1),Yrn(),i=0,r=(e=Uhn(cT(Ist,1),p1n,237,0,[jst,Est,Sst])).length;i0&&(r[0]+=this.d,i-=r[0]),r[2]>0&&(r[2]+=this.d,i-=r[2]),this.c.a=e.Math.max(0,i),this.c.d=t.d+n.d+(this.c.a-i)/2,r[1]=e.Math.max(r[1],i),J9(this,Est,t.d+n.d+r[0]-(r[1]-i)/2,r)},uZn.b=null,uZn.d=0,uZn.e=!1,uZn.f=!1,uZn.g=!1;var Ost,Ast,Lst,Nst=0,$st=0;VW(U2n,"GridContainerCell",1538),sDn(471,22,{3:1,34:1,22:1,471:1},aC);var Dst,xst=_cn(U2n,"HorizontalLabelAlignment",471,Oat,R2,gB);sDn(314,217,{217:1,314:1},a0,Yin,c1),uZn.jf=function(){return iq(this)},uZn.kf=function(){return rq(this)},uZn.a=0,uZn.c=!1;var Rst,Kst,Fst,_st=VW(U2n,"LabelCell",314);sDn(252,336,{217:1,336:1,252:1},tkn),uZn.jf=function(){return dNn(this)},uZn.kf=function(){return gNn(this)},uZn.lf=function(){YGn(this)},uZn.mf=function(){rqn(this)},uZn.b=0,uZn.c=0,uZn.d=!1,VW(U2n,"StripContainerCell",252),sDn(1691,1,y1n,Mn),uZn.Mb=function(n){return $M(uG(n,217))},VW(U2n,"StripContainerCell/lambda$0$Type",1691),sDn(1692,1,{},Tn),uZn.Ye=function(n){return uG(n,217).kf()},VW(U2n,"StripContainerCell/lambda$1$Type",1692),sDn(1693,1,y1n,jn),uZn.Mb=function(n){return DM(uG(n,217))},VW(U2n,"StripContainerCell/lambda$2$Type",1693),sDn(1694,1,{},En),uZn.Ye=function(n){return uG(n,217).jf()},VW(U2n,"StripContainerCell/lambda$3$Type",1694),sDn(472,22,{3:1,34:1,22:1,472:1},oC);var Bst,Hst,Ust,Gst,qst,Xst,Vst,zst,Wst,Qst,Jst,Yst,Zst,nht,tht,eht,iht,rht,cht,aht,oht,uht,sht,hht=_cn(U2n,"VerticalLabelAlignment",472,Oat,x2,pB);sDn(800,1,{},EQn),uZn.c=0,uZn.d=0,uZn.k=0,uZn.s=0,uZn.t=0,uZn.v=!1,uZn.w=0,uZn.D=!1,uZn.F=!1,VW(J2n,"NodeContext",800),sDn(1536,1,b2n,Sn),uZn.Ne=function(n,t){return UL(uG(n,64),uG(t,64))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(J2n,"NodeContext/0methodref$comparePortSides$Type",1536),sDn(1537,1,b2n,Pn),uZn.Ne=function(n,t){return ACn(uG(n,117),uG(t,117))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(J2n,"NodeContext/1methodref$comparePortContexts$Type",1537),sDn(164,22,{3:1,34:1,22:1,164:1},pun);var fht,lht,bht,wht,dht,ght,pht,mht=_cn(J2n,"NodeLabelLocation",164,Oat,Nkn,mB);sDn(117,1,{117:1},v$n),uZn.a=!1,VW(J2n,"PortContext",117),sDn(1541,1,QZn,Cn),uZn.Cd=function(n){eE(uG(n,314))},VW(n3n,t3n,1541),sDn(1542,1,y1n,In),uZn.Mb=function(n){return!!uG(n,117).c},VW(n3n,e3n,1542),sDn(1543,1,QZn,On),uZn.Cd=function(n){eE(uG(n,117).c)},VW(n3n,"LabelPlacer/lambda$2$Type",1543),sDn(1540,1,QZn,An),uZn.Cd=function(n){zK(),wv(uG(n,117))},VW(n3n,"NodeLabelAndSizeUtilities/lambda$0$Type",1540),sDn(801,1,QZn,DB),uZn.Cd=function(n){aP(this.b,this.c,this.a,uG(n,187))},uZn.a=!1,uZn.c=!1,VW(n3n,"NodeLabelCellCreator/lambda$0$Type",801),sDn(1539,1,QZn,Ld),uZn.Cd=function(n){zv(this.a,uG(n,187))},VW(n3n,"PortContextCreator/lambda$0$Type",1539),sDn(1902,1,{},Ln),VW(r3n,"GreedyRectangleStripOverlapRemover",1902),sDn(1903,1,b2n,Nn),uZn.Ne=function(n,t){return Cx(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(r3n,"GreedyRectangleStripOverlapRemover/0methodref$compareByYCoordinate$Type",1903),sDn(1849,1,{},pk),uZn.a=5,uZn.e=0,VW(r3n,"RectangleStripOverlapRemover",1849),sDn(1850,1,b2n,$n),uZn.Ne=function(n,t){return Ix(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(r3n,"RectangleStripOverlapRemover/0methodref$compareLeftRectangleBorders$Type",1850),sDn(1852,1,b2n,Dn),uZn.Ne=function(n,t){return fW(uG(n,226),uG(t,226))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(r3n,"RectangleStripOverlapRemover/1methodref$compareRightRectangleBorders$Type",1852),sDn(417,22,{3:1,34:1,22:1,417:1},uC);var vht,kht,yht,Mht,Tht,jht=_cn(r3n,"RectangleStripOverlapRemover/OverlapRemovalDirection",417,Oat,B6,vB);sDn(226,1,{226:1},ZX),VW(r3n,"RectangleStripOverlapRemover/RectangleNode",226),sDn(1851,1,QZn,Nd),uZn.Cd=function(n){lTn(this.a,uG(n,226))},VW(r3n,"RectangleStripOverlapRemover/lambda$1$Type",1851),sDn(1323,1,b2n,xn),uZn.Ne=function(n,t){return hVn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator",1323),sDn(1326,1,{},Rn),uZn.Kb=function(n){return uG(n,334).a},VW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$0$Type",1326),sDn(1327,1,y1n,Kn),uZn.Mb=function(n){return uG(n,332).a},VW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$1$Type",1327),sDn(1328,1,y1n,Fn),uZn.Mb=function(n){return uG(n,332).a},VW(a3n,"PolyominoCompactor/CornerCasesGreaterThanRestComparator/lambda$2$Type",1328),sDn(1321,1,b2n,_n),uZn.Ne=function(n,t){return JBn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator",1321),sDn(1324,1,{},Bn),uZn.Kb=function(n){return uG(n,334).a},VW(a3n,"PolyominoCompactor/MinNumOfExtensionDirectionsComparator/lambda$0$Type",1324),sDn(781,1,b2n,Hn),uZn.Ne=function(n,t){return lhn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/MinNumOfExtensionsComparator",781),sDn(1319,1,b2n,Un),uZn.Ne=function(n,t){return ron(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/MinPerimeterComparator",1319),sDn(1320,1,b2n,Gn),uZn.Ne=function(n,t){return Byn(uG(n,330),uG(t,330))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/MinPerimeterComparatorWithShape",1320),sDn(1322,1,b2n,qn),uZn.Ne=function(n,t){return XHn(uG(n,176),uG(t,176))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator",1322),sDn(1325,1,{},Xn),uZn.Kb=function(n){return uG(n,334).a},VW(a3n,"PolyominoCompactor/SingleExtensionSideGreaterThanRestComparator/lambda$0$Type",1325),sDn(782,1,{},sC),uZn.Ve=function(n,t){return d6(this,uG(n,42),uG(t,176))},VW(a3n,"SuccessorCombination",782),sDn(649,1,{},Vn),uZn.Ve=function(n,t){var e;return KNn((e=uG(n,42),uG(t,176),e))},VW(a3n,"SuccessorJitter",649),sDn(648,1,{},zn),uZn.Ve=function(n,t){var e;return cFn((e=uG(n,42),uG(t,176),e))},VW(a3n,"SuccessorLineByLine",648),sDn(573,1,{},Wn),uZn.Ve=function(n,t){var e;return txn((e=uG(n,42),uG(t,176),e))},VW(a3n,"SuccessorManhattan",573),sDn(1344,1,{},Qn),uZn.Ve=function(n,t){var e;return lKn((e=uG(n,42),uG(t,176),e))},VW(a3n,"SuccessorMaxNormWindingInMathPosSense",1344),sDn(409,1,{},$d),uZn.Ve=function(n,t){return Hz(this,n,t)},uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=!1,VW(a3n,"SuccessorQuadrantsGeneric",409),sDn(1345,1,{},Jn),uZn.Kb=function(n){return uG(n,334).a},VW(a3n,"SuccessorQuadrantsGeneric/lambda$0$Type",1345),sDn(332,22,{3:1,34:1,22:1,332:1},hC),uZn.a=!1;var Eht,Sht=_cn(f3n,l3n,332,Oat,F6,kB);sDn(1317,1,{}),uZn.Ib=function(){var n,t,e,i,r,c;for(e=" ",n=xwn(0),r=0;r=0?"b"+n+"["+X8(this.a)+"]":"b["+X8(this.a)+"]":"b_"+xx(this)},VW(z3n,"FBendpoint",250),sDn(290,137,{3:1,290:1,96:1,137:1},$F),uZn.Ib=function(){return X8(this)},VW(z3n,"FEdge",290),sDn(235,137,{3:1,235:1,96:1,137:1},d7);var uft,sft,hft,fft,lft,bft,wft,dft,gft,pft,mft=VW(z3n,"FGraph",235);sDn(454,309,{3:1,454:1,309:1,96:1,137:1},A5),uZn.Ib=function(){return null==this.b||0==this.b.length?"l["+X8(this.a)+"]":"l_"+this.b},VW(z3n,"FLabel",454),sDn(153,309,{3:1,153:1,309:1,96:1,137:1},E$),uZn.Ib=function(){return V3(this)},uZn.a=0,VW(z3n,"FNode",153),sDn(2100,1,{}),uZn.vf=function(n){pGn(this,n)},uZn.wf=function(){ITn(this)},uZn.d=0,VW(Q3n,"AbstractForceModel",2100),sDn(641,2100,{641:1},lsn),uZn.uf=function(n,t){var i,r,c,a;return qVn(this.f,n,t),c=YF(D$(t.d),n.d),a=e.Math.sqrt(c.a*c.a+c.b*c.b),r=e.Math.max(0,a-NQ(n.e)/2-NQ(t.e)/2),vD(c,((i=zNn(this.e,n,t))>0?-iW(r,this.c)*i:TR(r,this.b)*uG(oIn(n,(rGn(),$ft)),17).a)/a),c},uZn.vf=function(n){pGn(this,n),this.a=uG(oIn(n,(rGn(),Tft)),17).a,this.c=uM(pK(oIn(n,_ft))),this.b=uM(pK(oIn(n,xft)))},uZn.xf=function(n){return n0&&(a-=aM(r,this.a)*i),vD(c,a*this.b/o),c},uZn.vf=function(n){var t,i,r,c,a,o,u;for(pGn(this,n),this.b=uM(pK(oIn(n,(rGn(),Bft)))),this.c=this.b/uG(oIn(n,Tft),17).a,r=n.e.c.length,a=0,c=0,u=new Ww(n.e);u.a0},uZn.a=0,uZn.b=0,uZn.c=0,VW(Q3n,"FruchtermanReingoldModel",642),sDn(860,1,K2n,Gf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,J3n),""),"Force Model"),"Determines the model for force calculation."),hft),(lAn(),gNt)),mlt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Y3n),""),"Iterations"),"The number of iterations on the force model."),xwn(300)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Z3n),""),"Repulsive Power"),"Determines how many bend points are added to the edge; such bend points are regarded as repelling particles in the force model"),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,n4n),""),"FR Temperature"),"The temperature is used as a scaling factor for particle displacements."),t4n),dNt),fot),ggn(hNt)))),H4(n,n4n,J3n,dft),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,e4n),""),"Eades Repulsion"),"Factor for repulsive forces in Eades' model."),5),dNt),fot),ggn(hNt)))),H4(n,e4n,J3n,lft),vJn((new qf,n))},VW(i4n,"ForceMetaDataProvider",860),sDn(432,22,{3:1,34:1,22:1,432:1},wC);var vft,kft,yft,Mft,Tft,jft,Eft,Sft,Pft,Cft,Ift,Oft,Aft,Lft,Nft,$ft,Dft,xft,Rft,Kft,Fft,_ft,Bft,Hft,Uft,Gft,qft,Xft,Vft,zft,Wft,Qft,Jft,Yft,Zft,nlt,tlt,elt,ilt,rlt,clt,alt,olt,ult,slt,hlt,flt,llt,blt,wlt,dlt,glt,plt,mlt=_cn(i4n,"ForceModelStrategy",432,Oat,h1,TB);sDn($1n,1,K2n,qf),uZn.hf=function(n){vJn(n)},VW(i4n,"ForceOptions",$1n),sDn(1001,1,{},mt),uZn.sf=function(){return new hk},uZn.tf=function(n){},VW(i4n,"ForceOptions/ForceFactory",1001),sDn(861,1,K2n,Xf),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,I4n),""),"Fixed Position"),"Prevent that the node is moved by the layout algorithm."),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),sNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,O4n),""),"Desired Edge Length"),"Either specified for parent nodes or for individual edges, where the latter takes higher precedence."),100),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,A4n),""),"Layout Dimension"),"Dimensions that are permitted to be altered during layout."),Zft),gNt),Clt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,L4n),""),"Stress Epsilon"),"Termination criterion for the iterative process."),t4n),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,N4n),""),"Iteration Limit"),"Maximum number of performed iterations. Takes higher precedence than 'epsilon'."),xwn(vZn)),mNt),dot),ggn(hNt)))),sWn((new Vf,n))},VW(i4n,"StressMetaDataProvider",861),sDn(1004,1,K2n,Vf),uZn.hf=function(n){sWn(n)},VW(i4n,"StressOptions",1004),sDn(1005,1,{},gt),uZn.sf=function(){return new DF},uZn.tf=function(n){},VW(i4n,"StressOptions/StressFactory",1005),sDn(1110,205,M3n,DF),uZn.rf=function(n,t){var e,i,r,c;for(t.Ug(D4n,1),oM(gK(VDn(n,(Bjn(),olt))))?oM(gK(VDn(n,blt)))||J1(new Sd((vP(),new zy(n)))):Zxn(new hk,n,t.eh(1)),i=yfn(n),c=(e=tqn(this.a,i)).Kc();c.Ob();)(r=uG(c.Pb(),235)).e.c.length<=1||(rVn(this.b,r),QDn(this.b),Prn(r.d,new pt));YJn(i=lJn(e)),t.Vg()},VW(R4n,"StressLayoutProvider",1110),sDn(1111,1,QZn,pt),uZn.Cd=function(n){Yqn(uG(n,454))},VW(R4n,"StressLayoutProvider/lambda$0$Type",1111),sDn(1002,1,{},qv),uZn.c=0,uZn.e=0,uZn.g=0,VW(R4n,"StressMajorization",1002),sDn(391,22,{3:1,34:1,22:1,391:1},dC);var vlt,klt,ylt,Mlt,Tlt,jlt,Elt,Slt,Plt,Clt=_cn(R4n,"StressMajorization/Dimension",391,Oat,F2,jB);sDn(1003,1,b2n,Fd),uZn.Ne=function(n,t){return j_(this.a,uG(n,153),uG(t,153))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(R4n,"StressMajorization/lambda$0$Type",1003),sDn(1192,1,{},i4),VW(F4n,"ElkLayered",1192),sDn(1193,1,QZn,_d),uZn.Cd=function(n){OLn(this.a,uG(n,36))},VW(F4n,"ElkLayered/lambda$0$Type",1193),sDn(1194,1,QZn,Bd),uZn.Cd=function(n){E_(this.a,uG(n,36))},VW(F4n,"ElkLayered/lambda$1$Type",1194),sDn(1281,1,{},V$),VW(F4n,"GraphConfigurator",1281),sDn(770,1,QZn,Hd),uZn.Cd=function(n){XIn(this.a,uG(n,10))},VW(F4n,"GraphConfigurator/lambda$0$Type",770),sDn(771,1,{},dt),uZn.Kb=function(n){return FEn(),new fX(null,new h3(uG(n,30).a,16))},VW(F4n,"GraphConfigurator/lambda$1$Type",771),sDn(772,1,QZn,Ud),uZn.Cd=function(n){XIn(this.a,uG(n,10))},VW(F4n,"GraphConfigurator/lambda$2$Type",772),sDn(1109,205,M3n,mk),uZn.rf=function(n,t){var e;e=vXn(new kk,n),xA(VDn(n,(jYn(),rMt)))===xA((Own(),Ixt))?Tgn(this.a,e,t):BDn(this.a,e,t),t.$g()||NQn(new zf,e)},VW(F4n,"LayeredLayoutProvider",1109),sDn(367,22,{3:1,34:1,22:1,367:1},gC);var Ilt,Olt,Alt,Llt=_cn(F4n,"LayeredPhases",367,Oat,u9,EB);sDn(1717,1,{},$an),uZn.i=0,VW(_4n,"ComponentsToCGraphTransformer",1717),sDn(1718,1,{},wt),uZn.yf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.min(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},VW(_4n,"ComponentsToCGraphTransformer/1",1718),sDn(86,1,{86:1}),uZn.i=0,uZn.k=!0,uZn.o=T0n;var Nlt,$lt,Dlt,xlt=VW(B4n,"CNode",86);sDn(470,86,{470:1,86:1},Jx,Yvn),uZn.Ib=function(){return""},VW(_4n,"ComponentsToCGraphTransformer/CRectNode",470),sDn(1688,1,{},vt),VW(_4n,"OneDimensionalComponentsCompaction",1688),sDn(1689,1,{},kt),uZn.Kb=function(n){return w2(uG(n,42))},uZn.Fb=function(n){return this===n},VW(_4n,"OneDimensionalComponentsCompaction/lambda$0$Type",1689),sDn(1690,1,{},yt),uZn.Kb=function(n){return xgn(uG(n,42))},uZn.Fb=function(n){return this===n},VW(_4n,"OneDimensionalComponentsCompaction/lambda$1$Type",1690),sDn(1720,1,{},wQ),VW(B4n,"CGraph",1720),sDn(194,1,{194:1},Zvn),uZn.b=0,uZn.c=0,uZn.e=0,uZn.g=!0,uZn.i=T0n,VW(B4n,"CGroup",194),sDn(1719,1,{},Mt),uZn.yf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},uZn.zf=function(n,t){return e.Math.max(null!=n.a?uM(n.a):n.c.i,null!=t.a?uM(t.a):t.c.i)},VW(B4n,m2n,1719),sDn(1721,1,{},i$n),uZn.d=!1;var Rlt=VW(B4n,T2n,1721);sDn(1722,1,{},Tt),uZn.Kb=function(n){return GS(),qx(),0!=uG(uG(n,42).a,86).d.e},uZn.Fb=function(n){return this===n},VW(B4n,j2n,1722),sDn(833,1,{},cX),uZn.a=!1,uZn.b=!1,uZn.c=!1,uZn.d=!1,VW(B4n,E2n,833),sDn(1898,1,{},nV),VW(H4n,S2n,1898);var Klt=Iq(U4n,d2n);sDn(1899,1,{382:1},FZ),uZn.bf=function(n){DFn(this,uG(n,476))},VW(H4n,P2n,1899),sDn(z1n,1,b2n,jt),uZn.Ne=function(n,t){return rY(uG(n,86),uG(t,86))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(H4n,C2n,z1n),sDn(476,1,{476:1},KC),uZn.a=!1,VW(H4n,I2n,476),sDn(1901,1,b2n,Et),uZn.Ne=function(n,t){return KEn(uG(n,476),uG(t,476))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(H4n,O2n,1901),sDn(148,1,{148:1},FC,wG),uZn.Fb=function(n){var t;return null!=n&&Ult==Tbn(n)&&(t=uG(n,148),OJ(this.c,t.c)&&OJ(this.d,t.d))},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.c,this.d]))},uZn.Ib=function(){return"("+this.c+TZn+this.d+(this.a?"cx":"")+this.b+")"},uZn.a=!0,uZn.c=0,uZn.d=0;var Flt,_lt,Blt,Hlt,Ult=VW(U4n,"Point",148);sDn(416,22,{3:1,34:1,22:1,416:1},jC);var Glt,qlt,Xlt,Vlt,zlt,Wlt,Qlt,Jlt,Ylt,Zlt,nbt,tbt,ebt=_cn(U4n,"Point/Quadrant",416,Oat,H6,SB);sDn(1708,1,{},dk),uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,uZn.f=null,VW(U4n,"RectilinearConvexHull",1708),sDn(583,1,{382:1},cyn),uZn.bf=function(n){Itn(this,uG(n,148))},uZn.b=0,VW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler",583),sDn(1710,1,b2n,St),uZn.Ne=function(n,t){return cY(pK(n),pK(t))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/MaximalElementsEventHandler/lambda$0$Type",1710),sDn(1709,1,{382:1},Jin),uZn.bf=function(n){pKn(this,uG(n,148))},uZn.a=0,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,VW(U4n,"RectilinearConvexHull/RectangleEventHandler",1709),sDn(1711,1,b2n,Pt),uZn.Ne=function(n,t){return H3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/lambda$0$Type",1711),sDn(1712,1,b2n,At),uZn.Ne=function(n,t){return U3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/lambda$1$Type",1712),sDn(1713,1,b2n,Lt),uZn.Ne=function(n,t){return B3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/lambda$2$Type",1713),sDn(1714,1,b2n,Ot),uZn.Ne=function(n,t){return G3(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/lambda$3$Type",1714),sDn(1715,1,b2n,Nt),uZn.Ne=function(n,t){return sIn(uG(n,148),uG(t,148))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(U4n,"RectilinearConvexHull/lambda$4$Type",1715),sDn(1716,1,{},X0),VW(U4n,"Scanline",1716),sDn(2104,1,{}),VW(G4n,"AbstractGraphPlacer",2104),sDn(335,1,{335:1},DR),uZn.Ff=function(n){return!!this.Gf(n)&&(UNn(this.b,uG(oIn(n,(GYn(),xpt)),21),n),!0)},uZn.Gf=function(n){var t,e,i;for(t=uG(oIn(n,(GYn(),xpt)),21),i=uG(Y9(Jlt,t),21).Kc();i.Ob();)if(e=uG(i.Pb(),21),!uG(Y9(this.b,e),15).dc())return!1;return!0},VW(G4n,"ComponentGroup",335),sDn(779,2104,{},gk),uZn.Hf=function(n){var t;for(t=new Ww(this.a);t.ai&&(f=0,l+=u+r,u=0),tHn(a,f+(s=a.c).a,l+s.b),dL(s),c=e.Math.max(c,f+h.a),u=e.Math.max(u,h.b),f+=h.a+r;t.f.a=c,t.f.b=l+u},uZn.Jf=function(n,t){var e,i,r,c,a;if(xA(oIn(t,(jYn(),kyt)))===xA((Uvn(),tbt))){for(i=n.Kc();i.Ob();){for(a=0,c=new Ww((e=uG(i.Pb(),36)).a);c.ai&&!uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))||s&&uG(oIn(s,(GYn(),xpt)),21).Hc((KQn(),kRt))||uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),_Rt)))&&(b=l,w+=u+r,u=0),h=a.c,uG(oIn(a,(GYn(),xpt)),21).Hc((KQn(),yRt))&&(b=c+r),tHn(a,b+h.a,w+h.b),c=e.Math.max(c,b+f.a),uG(oIn(a,xpt),21).Hc(KRt)&&(l=e.Math.max(l,b+f.a+r)),dL(h),u=e.Math.max(u,f.b),b+=f.a+r,s=a;t.f.a=c,t.f.b=w+u},uZn.Jf=function(n,t){},VW(G4n,"ModelOrderRowGraphPlacer",1313),sDn(1311,1,b2n,xt),uZn.Ne=function(n,t){return Wsn(uG(n,36),uG(t,36))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(G4n,"SimpleRowGraphPlacer/1",1311),sDn(1280,1,A2n,Rt),uZn.Lb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){var t;return!!(t=uG(oIn(uG(n,249).b,(jYn(),bMt)),75))&&0!=t.b},VW(W4n,"CompoundGraphPostprocessor/1",1280),sDn(1279,1,Q4n,yk),uZn.Kf=function(n,t){Vyn(this,uG(n,36),t)},VW(W4n,"CompoundGraphPreprocessor",1279),sDn(453,1,{453:1},Sdn),uZn.c=!1,VW(W4n,"CompoundGraphPreprocessor/ExternalPort",453),sDn(249,1,{249:1},$B),uZn.Ib=function(){return MR(this.c)+":"+MNn(this.b)},VW(W4n,"CrossHierarchyEdge",249),sDn(777,1,b2n,Gd),uZn.Ne=function(n,t){return Njn(this,uG(n,249),uG(t,249))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(W4n,"CrossHierarchyEdgeComparator",777),sDn(305,137,{3:1,305:1,96:1,137:1}),uZn.p=0,VW(J4n,"LGraphElement",305),sDn(18,305,{3:1,18:1,305:1,96:1,137:1},UZ),uZn.Ib=function(){return MNn(this)};var obt=VW(J4n,"LEdge",18);sDn(36,305,{3:1,20:1,36:1,305:1,96:1,137:1},Dan),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new Ww(this.b)},uZn.Ib=function(){return 0==this.b.c.length?"G-unlayered"+vIn(this.a):0==this.a.c.length?"G-layered"+vIn(this.b):"G[layerless"+vIn(this.a)+", layers"+vIn(this.b)+"]"};var ubt,sbt=VW(J4n,"LGraph",36);sDn(666,1,{}),uZn.Lf=function(){return this.e.n},uZn.of=function(n){return oIn(this.e,n)},uZn.Mf=function(){return this.e.o},uZn.Nf=function(){return this.e.p},uZn.pf=function(n){return vR(this.e,n)},uZn.Of=function(n){this.e.n.a=n.a,this.e.n.b=n.b},uZn.Pf=function(n){this.e.o.a=n.a,this.e.o.b=n.b},uZn.Qf=function(n){this.e.p=n},VW(J4n,"LGraphAdapters/AbstractLShapeAdapter",666),sDn(474,1,{853:1},qd),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=iR(this.a.b.c.length),t=new Ww(this.a.b);t.a0&&Hbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(r> ",n),njn(e)),JA(QA((n.a+="[",n),e.i),"]")),n.a},uZn.c=!0,uZn.d=!1;var Pbt,Cbt,Ibt,Obt,Abt=VW(J4n,"LPort",12);sDn(408,1,t1n,Vd),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new zd(new Ww(this.a.e))},VW(J4n,"LPort/1",408),sDn(1309,1,$Zn,zd),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).c},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},VW(J4n,"LPort/1/1",1309),sDn(369,1,t1n,Wd),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new Qd(new Ww(this.a.g))},VW(J4n,"LPort/2",369),sDn(776,1,$Zn,Qd),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return uG(N3(this.a),18).d},uZn.Ob=function(){return l$(this.a)},uZn.Qb=function(){tW(this.a)},VW(J4n,"LPort/2/1",776),sDn(1302,1,t1n,LC),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new w7(this)},VW(J4n,"LPort/CombineIter",1302),sDn(208,1,$Zn,w7),uZn.Nb=function(n){Sz(this,n)},uZn.Qb=function(){xj()},uZn.Ob=function(){return Dx(this)},uZn.Pb=function(){return l$(this.a)?N3(this.a):N3(this.b)},VW(J4n,"LPort/CombineIter/1",208),sDn(1303,1,A2n,Bt),uZn.Lb=function(n){return YV(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).g.c.length},VW(J4n,"LPort/lambda$0$Type",1303),sDn(1304,1,A2n,Ht),uZn.Lb=function(n){return ZV(n)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),0!=uG(n,12).e.c.length},VW(J4n,"LPort/lambda$1$Type",1304),sDn(1305,1,A2n,Ut),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),yRt)},VW(J4n,"LPort/lambda$2$Type",1305),sDn(1306,1,A2n,Gt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),kRt)},VW(J4n,"LPort/lambda$3$Type",1306),sDn(1307,1,A2n,qt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),KRt)},VW(J4n,"LPort/lambda$4$Type",1307),sDn(1308,1,A2n,Xt),uZn.Lb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return Lun(),uG(n,12).j==(KQn(),_Rt)},VW(J4n,"LPort/lambda$5$Type",1308),sDn(30,305,{3:1,20:1,305:1,30:1,96:1,137:1},bQ),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new Ww(this.a)},uZn.Ib=function(){return"L_"+Ten(this.b.b,this,0)+vIn(this.a)},VW(J4n,"Layer",30),sDn(1330,1,{},kk),VW(h6n,f6n,1330),sDn(1334,1,{},Vt),uZn.Kb=function(n){return lCn(uG(n,84))},VW(h6n,"ElkGraphImporter/0methodref$connectableShapeToNode$Type",1334),sDn(1337,1,{},zt),uZn.Kb=function(n){return lCn(uG(n,84))},VW(h6n,"ElkGraphImporter/1methodref$connectableShapeToNode$Type",1337),sDn(1331,1,QZn,Jd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},VW(h6n,V3n,1331),sDn(1332,1,QZn,Yd),uZn.Cd=function(n){y$n(this.a,uG(n,123))},VW(h6n,l6n,1332),sDn(1333,1,{},Wt),uZn.Kb=function(n){return new fX(null,new h3(KJ(uG(n,74)),16))},VW(h6n,b6n,1333),sDn(1335,1,y1n,Zd),uZn.Mb=function(n){return DN(this.a,uG(n,27))},VW(h6n,w6n,1335),sDn(1336,1,{},Qt),uZn.Kb=function(n){return new fX(null,new h3(FJ(uG(n,74)),16))},VW(h6n,"ElkGraphImporter/lambda$5$Type",1336),sDn(1338,1,y1n,ng),uZn.Mb=function(n){return xN(this.a,uG(n,27))},VW(h6n,"ElkGraphImporter/lambda$7$Type",1338),sDn(1339,1,y1n,Jt),uZn.Mb=function(n){return XY(uG(n,74))},VW(h6n,"ElkGraphImporter/lambda$8$Type",1339),sDn(1297,1,{},zf),VW(h6n,"ElkGraphLayoutTransferrer",1297),sDn(1298,1,y1n,tg),uZn.Mb=function(n){return IF(this.a,uG(n,18))},VW(h6n,"ElkGraphLayoutTransferrer/lambda$0$Type",1298),sDn(1299,1,QZn,eg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},VW(h6n,"ElkGraphLayoutTransferrer/lambda$1$Type",1299),sDn(1300,1,y1n,ig),uZn.Mb=function(n){return KK(this.a,uG(n,18))},VW(h6n,"ElkGraphLayoutTransferrer/lambda$2$Type",1300),sDn(1301,1,QZn,rg),uZn.Cd=function(n){WS(),kD(this.a,uG(n,18))},VW(h6n,"ElkGraphLayoutTransferrer/lambda$3$Type",1301),sDn(819,1,{},xF),VW(d6n,"BiLinkedHashMultiMap",819),sDn(1550,1,Q4n,Yt),uZn.Kf=function(n,t){Bon(uG(n,36),t)},VW(d6n,"CommentNodeMarginCalculator",1550),sDn(1551,1,{},Zt),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"CommentNodeMarginCalculator/lambda$0$Type",1551),sDn(1552,1,QZn,ne),uZn.Cd=function(n){bXn(uG(n,10))},VW(d6n,"CommentNodeMarginCalculator/lambda$1$Type",1552),sDn(1553,1,Q4n,te),uZn.Kf=function(n,t){WFn(uG(n,36),t)},VW(d6n,"CommentPostprocessor",1553),sDn(1554,1,Q4n,ee),uZn.Kf=function(n,t){kQn(uG(n,36),t)},VW(d6n,"CommentPreprocessor",1554),sDn(1555,1,Q4n,ie),uZn.Kf=function(n,t){KKn(uG(n,36),t)},VW(d6n,"ConstraintsPostprocessor",1555),sDn(1556,1,Q4n,re),uZn.Kf=function(n,t){Csn(uG(n,36),t)},VW(d6n,"EdgeAndLayerConstraintEdgeReverser",1556),sDn(1557,1,Q4n,ce),uZn.Kf=function(n,t){amn(uG(n,36),t)},VW(d6n,"EndLabelPostprocessor",1557),sDn(1558,1,{},ae),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"EndLabelPostprocessor/lambda$0$Type",1558),sDn(1559,1,y1n,oe),uZn.Mb=function(n){return q8(uG(n,10))},VW(d6n,"EndLabelPostprocessor/lambda$1$Type",1559),sDn(1560,1,QZn,ue),uZn.Cd=function(n){_En(uG(n,10))},VW(d6n,"EndLabelPostprocessor/lambda$2$Type",1560),sDn(1561,1,Q4n,se),uZn.Kf=function(n,t){AAn(uG(n,36),t)},VW(d6n,"EndLabelPreprocessor",1561),sDn(1562,1,{},he),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"EndLabelPreprocessor/lambda$0$Type",1562),sDn(1563,1,QZn,NB),uZn.Cd=function(n){oP(this.a,this.b,this.c,uG(n,10))},uZn.a=0,uZn.b=0,uZn.c=!1,VW(d6n,"EndLabelPreprocessor/lambda$1$Type",1563),sDn(1564,1,y1n,fe),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},VW(d6n,"EndLabelPreprocessor/lambda$2$Type",1564),sDn(1565,1,QZn,cg),uZn.Cd=function(n){aq(this.a,uG(n,72))},VW(d6n,"EndLabelPreprocessor/lambda$3$Type",1565),sDn(1566,1,y1n,le),uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},VW(d6n,"EndLabelPreprocessor/lambda$4$Type",1566),sDn(1567,1,QZn,ag),uZn.Cd=function(n){aq(this.a,uG(n,72))},VW(d6n,"EndLabelPreprocessor/lambda$5$Type",1567),sDn(1615,1,Q4n,_f),uZn.Kf=function(n,t){Ddn(uG(n,36),t)},VW(d6n,"EndLabelSorter",1615),sDn(1616,1,b2n,be),uZn.Ne=function(n,t){return okn(uG(n,466),uG(t,466))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"EndLabelSorter/1",1616),sDn(466,1,{466:1},oZ),VW(d6n,"EndLabelSorter/LabelGroup",466),sDn(1617,1,{},we),uZn.Kb=function(n){return zS(),new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"EndLabelSorter/lambda$0$Type",1617),sDn(1618,1,y1n,de),uZn.Mb=function(n){return zS(),uG(n,10).k==(VIn(),dbt)},VW(d6n,"EndLabelSorter/lambda$1$Type",1618),sDn(1619,1,QZn,ge),uZn.Cd=function(n){zIn(uG(n,10))},VW(d6n,"EndLabelSorter/lambda$2$Type",1619),sDn(1620,1,y1n,pe),uZn.Mb=function(n){return zS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),rxt))},VW(d6n,"EndLabelSorter/lambda$3$Type",1620),sDn(1621,1,y1n,me),uZn.Mb=function(n){return zS(),xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),cxt))},VW(d6n,"EndLabelSorter/lambda$4$Type",1621),sDn(1568,1,Q4n,ve),uZn.Kf=function(n,t){GXn(this,uG(n,36))},uZn.b=0,uZn.c=0,VW(d6n,"FinalSplineBendpointsCalculator",1568),sDn(1569,1,{},ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"FinalSplineBendpointsCalculator/lambda$0$Type",1569),sDn(1570,1,{},ye),uZn.Kb=function(n){return new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(d6n,"FinalSplineBendpointsCalculator/lambda$1$Type",1570),sDn(1571,1,y1n,Me),uZn.Mb=function(n){return!v9(uG(n,18))},VW(d6n,"FinalSplineBendpointsCalculator/lambda$2$Type",1571),sDn(1572,1,y1n,Te),uZn.Mb=function(n){return vR(uG(n,18),(GYn(),Tmt))},VW(d6n,"FinalSplineBendpointsCalculator/lambda$3$Type",1572),sDn(1573,1,QZn,og),uZn.Cd=function(n){YHn(this.a,uG(n,131))},VW(d6n,"FinalSplineBendpointsCalculator/lambda$4$Type",1573),sDn(1574,1,QZn,je),uZn.Cd=function(n){_An(uG(n,18).a)},VW(d6n,"FinalSplineBendpointsCalculator/lambda$5$Type",1574),sDn(803,1,Q4n,ug),uZn.Kf=function(n,t){fzn(this,uG(n,36),t)},VW(d6n,"GraphTransformer",803),sDn(517,22,{3:1,34:1,22:1,517:1},PC);var Lbt,Nbt,$bt,Dbt=_cn(d6n,"GraphTransformer/Mode",517,Oat,f1,VH);sDn(1575,1,Q4n,Ee),uZn.Kf=function(n,t){wRn(uG(n,36),t)},VW(d6n,"HierarchicalNodeResizingProcessor",1575),sDn(1576,1,Q4n,Se),uZn.Kf=function(n,t){don(uG(n,36),t)},VW(d6n,"HierarchicalPortConstraintProcessor",1576),sDn(1577,1,b2n,Pe),uZn.Ne=function(n,t){return wyn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"HierarchicalPortConstraintProcessor/NodeComparator",1577),sDn(1578,1,Q4n,Ce),uZn.Kf=function(n,t){HGn(uG(n,36),t)},VW(d6n,"HierarchicalPortDummySizeProcessor",1578),sDn(1579,1,Q4n,Ie),uZn.Kf=function(n,t){V_n(this,uG(n,36),t)},uZn.a=0,VW(d6n,"HierarchicalPortOrthogonalEdgeRouter",1579),sDn(1580,1,b2n,Oe),uZn.Ne=function(n,t){return Ox(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"HierarchicalPortOrthogonalEdgeRouter/1",1580),sDn(1581,1,b2n,Ae),uZn.Ne=function(n,t){return Dtn(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"HierarchicalPortOrthogonalEdgeRouter/2",1581),sDn(1582,1,Q4n,Le),uZn.Kf=function(n,t){tIn(uG(n,36),t)},VW(d6n,"HierarchicalPortPositionProcessor",1582),sDn(1583,1,Q4n,Wf),uZn.Kf=function(n,t){SJn(this,uG(n,36))},uZn.a=0,uZn.c=0,VW(d6n,"HighDegreeNodeLayeringProcessor",1583),sDn(580,1,{580:1},Ne),uZn.b=-1,uZn.d=-1,VW(d6n,"HighDegreeNodeLayeringProcessor/HighDegreeNodeInformation",580),sDn(1584,1,{},$e),uZn.Kb=function(n){return HB(),qgn(uG(n,10))},uZn.Fb=function(n){return this===n},VW(d6n,"HighDegreeNodeLayeringProcessor/lambda$0$Type",1584),sDn(1585,1,{},De),uZn.Kb=function(n){return HB(),Xgn(uG(n,10))},uZn.Fb=function(n){return this===n},VW(d6n,"HighDegreeNodeLayeringProcessor/lambda$1$Type",1585),sDn(1591,1,Q4n,xe),uZn.Kf=function(n,t){TGn(this,uG(n,36),t)},VW(d6n,"HyperedgeDummyMerger",1591),sDn(804,1,{},xB),uZn.a=!1,uZn.b=!1,uZn.c=!1,VW(d6n,"HyperedgeDummyMerger/MergeState",804),sDn(1592,1,{},Re),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"HyperedgeDummyMerger/lambda$0$Type",1592),sDn(1593,1,{},Ke),uZn.Kb=function(n){return new fX(null,new h3(uG(n,10).j,16))},VW(d6n,"HyperedgeDummyMerger/lambda$1$Type",1593),sDn(1594,1,QZn,Fe),uZn.Cd=function(n){uG(n,12).p=-1},VW(d6n,"HyperedgeDummyMerger/lambda$2$Type",1594),sDn(1595,1,Q4n,_e),uZn.Kf=function(n,t){kGn(uG(n,36),t)},VW(d6n,"HypernodesProcessor",1595),sDn(1596,1,Q4n,Be),uZn.Kf=function(n,t){_Gn(uG(n,36),t)},VW(d6n,"InLayerConstraintProcessor",1596),sDn(1597,1,Q4n,He),uZn.Kf=function(n,t){Nun(uG(n,36),t)},VW(d6n,"InnermostNodeMarginCalculator",1597),sDn(1598,1,Q4n,Ue),uZn.Kf=function(n,t){gQn(this,uG(n,36))},uZn.a=T0n,uZn.b=T0n,uZn.c=M0n,uZn.d=M0n;var xbt,Rbt,Kbt,Fbt,_bt,Bbt,Hbt,Ubt,Gbt,qbt,Xbt,Vbt,zbt,Wbt,Qbt,Jbt,Ybt,Zbt,nwt,twt,ewt,iwt,rwt,cwt,awt,owt,uwt,swt,hwt,fwt,lwt,bwt,wwt,dwt,gwt,pwt,mwt,vwt,kwt,ywt,Mwt,Twt,jwt,Ewt,Swt,Pwt,Cwt,Iwt,Owt,Awt,Lwt,Nwt,$wt,Dwt,xwt,Rwt,Kwt,Fwt=VW(d6n,"InteractiveExternalPortPositioner",1598);sDn(1599,1,{},Ge),uZn.Kb=function(n){return uG(n,18).d.i},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$0$Type",1599),sDn(1600,1,{},sg),uZn.Kb=function(n){return Lx(this.a,pK(n))},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$1$Type",1600),sDn(1601,1,{},qe),uZn.Kb=function(n){return uG(n,18).c.i},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$2$Type",1601),sDn(1602,1,{},hg),uZn.Kb=function(n){return Nx(this.a,pK(n))},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$3$Type",1602),sDn(1603,1,{},fg),uZn.Kb=function(n){return XF(this.a,pK(n))},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$4$Type",1603),sDn(1604,1,{},lg),uZn.Kb=function(n){return VF(this.a,pK(n))},uZn.Fb=function(n){return this===n},VW(d6n,"InteractiveExternalPortPositioner/lambda$5$Type",1604),sDn(81,22,{3:1,34:1,22:1,81:1,196:1},CC),uZn.dg=function(){switch(this.g){case 15:return new fc;case 22:return new lc;case 47:return new dc;case 28:case 35:return new ei;case 32:return new Yt;case 42:return new te;case 1:return new ee;case 41:return new ie;case 56:return new ug((Aun(),Obt));case 0:return new ug((Aun(),Ibt));case 2:return new re;case 54:return new ce;case 33:return new se;case 51:return new ve;case 55:return new Ee;case 13:return new Se;case 38:return new Ce;case 44:return new Ie;case 40:return new Le;case 9:return new Wf;case 49:return new Ux;case 37:return new xe;case 43:return new _e;case 27:return new Be;case 30:return new He;case 3:return new Ue;case 18:return new Ve;case 29:return new ze;case 5:return new Qf;case 50:return new Xe;case 34:return new Jf;case 36:return new ii;case 52:return new _f;case 11:return new ri;case 7:return new Yf;case 39:return new ci;case 45:return new ai;case 16:return new oi;case 10:return new RI;case 48:return new fi;case 21:return new li;case 23:return new Vy((ean(),BEt));case 8:return new wi;case 12:return new gi;case 4:return new pi;case 19:return new rl;case 17:return new Pi;case 53:return new Ci;case 6:return new Bi;case 25:return new jk;case 46:return new $i;case 31:return new _F;case 14:return new Wi;case 26:return new Mc;case 20:return new nr;case 24:return new Vy((ean(),HEt));default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var _wt,Bwt,Hwt,Uwt,Gwt,qwt,Xwt,Vwt,zwt=_cn(d6n,k6n,81,Oat,bKn,XB);sDn(1605,1,Q4n,Ve),uZn.Kf=function(n,t){bQn(uG(n,36),t)},VW(d6n,"InvertedPortProcessor",1605),sDn(1606,1,Q4n,ze),uZn.Kf=function(n,t){DHn(uG(n,36),t)},VW(d6n,"LabelAndNodeSizeProcessor",1606),sDn(1607,1,y1n,We),uZn.Mb=function(n){return uG(n,10).k==(VIn(),dbt)},VW(d6n,"LabelAndNodeSizeProcessor/lambda$0$Type",1607),sDn(1608,1,y1n,Qe),uZn.Mb=function(n){return uG(n,10).k==(VIn(),lbt)},VW(d6n,"LabelAndNodeSizeProcessor/lambda$1$Type",1608),sDn(1609,1,QZn,KB),uZn.Cd=function(n){uP(this.b,this.a,this.c,uG(n,10))},uZn.a=!1,uZn.c=!1,VW(d6n,"LabelAndNodeSizeProcessor/lambda$2$Type",1609),sDn(1610,1,Q4n,Qf),uZn.Kf=function(n,t){EWn(uG(n,36),t)},VW(d6n,"LabelDummyInserter",1610),sDn(1611,1,A2n,Je),uZn.Lb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return xA(oIn(uG(n,72),(jYn(),Xyt)))===xA((Zrn(),ixt))},VW(d6n,"LabelDummyInserter/1",1611),sDn(1612,1,Q4n,Xe),uZn.Kf=function(n,t){eWn(uG(n,36),t)},VW(d6n,"LabelDummyRemover",1612),sDn(1613,1,y1n,Ye),uZn.Mb=function(n){return oM(gK(oIn(uG(n,72),(jYn(),qyt))))},VW(d6n,"LabelDummyRemover/lambda$0$Type",1613),sDn(1378,1,Q4n,Jf),uZn.Kf=function(n,t){Uzn(this,uG(n,36),t)},uZn.a=null,VW(d6n,"LabelDummySwitcher",1378),sDn(293,1,{293:1},oHn),uZn.c=0,uZn.d=null,uZn.f=0,VW(d6n,"LabelDummySwitcher/LabelDummyInfo",293),sDn(1379,1,{},Ze),uZn.Kb=function(n){return Pun(),new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"LabelDummySwitcher/lambda$0$Type",1379),sDn(1380,1,y1n,ni),uZn.Mb=function(n){return Pun(),uG(n,10).k==(VIn(),bbt)},VW(d6n,"LabelDummySwitcher/lambda$1$Type",1380),sDn(1381,1,{},bg),uZn.Kb=function(n){return FK(this.a,uG(n,10))},VW(d6n,"LabelDummySwitcher/lambda$2$Type",1381),sDn(1382,1,QZn,wg),uZn.Cd=function(n){gQ(this.a,uG(n,293))},VW(d6n,"LabelDummySwitcher/lambda$3$Type",1382),sDn(1383,1,b2n,ti),uZn.Ne=function(n,t){return nz(uG(n,293),uG(t,293))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"LabelDummySwitcher/lambda$4$Type",1383),sDn(802,1,Q4n,ei),uZn.Kf=function(n,t){Dnn(uG(n,36),t)},VW(d6n,"LabelManagementProcessor",802),sDn(1614,1,Q4n,ii),uZn.Kf=function(n,t){jFn(uG(n,36),t)},VW(d6n,"LabelSideSelector",1614),sDn(1622,1,Q4n,ri),uZn.Kf=function(n,t){yqn(uG(n,36),t)},VW(d6n,"LayerConstraintPostprocessor",1622),sDn(1623,1,Q4n,Yf),uZn.Kf=function(n,t){vDn(uG(n,36),t)},VW(d6n,"LayerConstraintPreprocessor",1623),sDn(371,22,{3:1,34:1,22:1,371:1},IC);var Wwt,Qwt,Jwt,Ywt,Zwt,ndt,tdt,edt,idt,rdt,cdt,adt=_cn(d6n,"LayerConstraintPreprocessor/HiddenNodeConnections",371,Oat,G6,VB);sDn(1624,1,Q4n,ci),uZn.Kf=function(n,t){VVn(uG(n,36),t)},VW(d6n,"LayerSizeAndGraphHeightCalculator",1624),sDn(1625,1,Q4n,ai),uZn.Kf=function(n,t){dRn(uG(n,36),t)},VW(d6n,"LongEdgeJoiner",1625),sDn(1626,1,Q4n,oi),uZn.Kf=function(n,t){lVn(uG(n,36),t)},VW(d6n,"LongEdgeSplitter",1626),sDn(1627,1,Q4n,RI),uZn.Kf=function(n,t){zWn(this,uG(n,36),t)},uZn.e=0,uZn.f=0,uZn.j=0,uZn.k=0,uZn.n=0,uZn.o=0,VW(d6n,"NodePromotion",1627),sDn(1628,1,b2n,ui),uZn.Ne=function(n,t){return $ln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"NodePromotion/1",1628),sDn(1629,1,b2n,si),uZn.Ne=function(n,t){return Dln(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"NodePromotion/2",1629),sDn(1630,1,{},hi),uZn.Kb=function(n){return uG(n,42),UB(),qx(),!0},uZn.Fb=function(n){return this===n},VW(d6n,"NodePromotion/lambda$0$Type",1630),sDn(1631,1,{},mg),uZn.Kb=function(n){return P0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,VW(d6n,"NodePromotion/lambda$1$Type",1631),sDn(1632,1,{},vg),uZn.Kb=function(n){return S0(this.a,uG(n,42))},uZn.Fb=function(n){return this===n},uZn.a=0,VW(d6n,"NodePromotion/lambda$2$Type",1632),sDn(1633,1,Q4n,fi),uZn.Kf=function(n,t){wJn(uG(n,36),t)},VW(d6n,"NorthSouthPortPostprocessor",1633),sDn(1634,1,Q4n,li),uZn.Kf=function(n,t){FQn(uG(n,36),t)},VW(d6n,"NorthSouthPortPreprocessor",1634),sDn(1635,1,b2n,bi),uZn.Ne=function(n,t){return Qsn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"NorthSouthPortPreprocessor/lambda$0$Type",1635),sDn(1636,1,Q4n,wi),uZn.Kf=function(n,t){HUn(uG(n,36),t)},VW(d6n,"PartitionMidprocessor",1636),sDn(1637,1,y1n,di),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},VW(d6n,"PartitionMidprocessor/lambda$0$Type",1637),sDn(1638,1,QZn,kg),uZn.Cd=function(n){VY(this.a,uG(n,10))},VW(d6n,"PartitionMidprocessor/lambda$1$Type",1638),sDn(1639,1,Q4n,gi),uZn.Kf=function(n,t){JRn(uG(n,36),t)},VW(d6n,"PartitionPostprocessor",1639),sDn(1640,1,Q4n,pi),uZn.Kf=function(n,t){M$n(uG(n,36),t)},VW(d6n,"PartitionPreprocessor",1640),sDn(1641,1,y1n,mi),uZn.Mb=function(n){return vR(uG(n,10),(jYn(),UMt))},VW(d6n,"PartitionPreprocessor/lambda$0$Type",1641),sDn(1642,1,{},vi),uZn.Kb=function(n){return new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(d6n,"PartitionPreprocessor/lambda$1$Type",1642),sDn(1643,1,y1n,ki),uZn.Mb=function(n){return pkn(uG(n,18))},VW(d6n,"PartitionPreprocessor/lambda$2$Type",1643),sDn(1644,1,QZn,yi),uZn.Cd=function(n){rfn(uG(n,18))},VW(d6n,"PartitionPreprocessor/lambda$3$Type",1644),sDn(1645,1,Q4n,rl),uZn.Kf=function(n,t){bUn(uG(n,36),t)},VW(d6n,"PortListSorter",1645),sDn(1648,1,b2n,Mi),uZn.Ne=function(n,t){return Q5(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"PortListSorter/lambda$0$Type",1648),sDn(1650,1,b2n,Ti),uZn.Ne=function(n,t){return hGn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"PortListSorter/lambda$1$Type",1650),sDn(1646,1,{},ji),uZn.Kb=function(n){return Cln(),uG(n,12).e},VW(d6n,"PortListSorter/lambda$2$Type",1646),sDn(1647,1,{},Ei),uZn.Kb=function(n){return Cln(),uG(n,12).g},VW(d6n,"PortListSorter/lambda$3$Type",1647),sDn(1649,1,b2n,Si),uZn.Ne=function(n,t){return bjn(uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"PortListSorter/lambda$4$Type",1649),sDn(1651,1,Q4n,Pi),uZn.Kf=function(n,t){FDn(uG(n,36),t)},VW(d6n,"PortSideProcessor",1651),sDn(1652,1,Q4n,Ci),uZn.Kf=function(n,t){SBn(uG(n,36),t)},VW(d6n,"ReversedEdgeRestorer",1652),sDn(1657,1,Q4n,jk),uZn.Kf=function(n,t){kTn(this,uG(n,36),t)},VW(d6n,"SelfLoopPortRestorer",1657),sDn(1658,1,{},Ii),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"SelfLoopPortRestorer/lambda$0$Type",1658),sDn(1659,1,y1n,Oi),uZn.Mb=function(n){return uG(n,10).k==(VIn(),dbt)},VW(d6n,"SelfLoopPortRestorer/lambda$1$Type",1659),sDn(1660,1,y1n,Ai),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},VW(d6n,"SelfLoopPortRestorer/lambda$2$Type",1660),sDn(1661,1,{},Li),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},VW(d6n,"SelfLoopPortRestorer/lambda$3$Type",1661),sDn(1662,1,QZn,gg),uZn.Cd=function(n){gOn(this.a,uG(n,337))},VW(d6n,"SelfLoopPortRestorer/lambda$4$Type",1662),sDn(805,1,QZn,Ni),uZn.Cd=function(n){BOn(uG(n,105))},VW(d6n,"SelfLoopPortRestorer/lambda$5$Type",805),sDn(1663,1,Q4n,$i),uZn.Kf=function(n,t){oyn(uG(n,36),t)},VW(d6n,"SelfLoopPostProcessor",1663),sDn(1664,1,{},Di),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"SelfLoopPostProcessor/lambda$0$Type",1664),sDn(1665,1,y1n,xi),uZn.Mb=function(n){return uG(n,10).k==(VIn(),dbt)},VW(d6n,"SelfLoopPostProcessor/lambda$1$Type",1665),sDn(1666,1,y1n,Ri),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},VW(d6n,"SelfLoopPostProcessor/lambda$2$Type",1666),sDn(1667,1,QZn,Ki),uZn.Cd=function(n){gSn(uG(n,10))},VW(d6n,"SelfLoopPostProcessor/lambda$3$Type",1667),sDn(1668,1,{},Fi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},VW(d6n,"SelfLoopPostProcessor/lambda$4$Type",1668),sDn(1669,1,QZn,dg),uZn.Cd=function(n){z6(this.a,uG(n,340))},VW(d6n,"SelfLoopPostProcessor/lambda$5$Type",1669),sDn(1670,1,y1n,_i),uZn.Mb=function(n){return!!uG(n,105).i},VW(d6n,"SelfLoopPostProcessor/lambda$6$Type",1670),sDn(1671,1,QZn,pg),uZn.Cd=function(n){eM(this.a,uG(n,105))},VW(d6n,"SelfLoopPostProcessor/lambda$7$Type",1671),sDn(1653,1,Q4n,Bi),uZn.Kf=function(n,t){Fxn(uG(n,36),t)},VW(d6n,"SelfLoopPreProcessor",1653),sDn(1654,1,{},Hi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,105).f,1))},VW(d6n,"SelfLoopPreProcessor/lambda$0$Type",1654),sDn(1655,1,{},Ui),uZn.Kb=function(n){return uG(n,340).a},VW(d6n,"SelfLoopPreProcessor/lambda$1$Type",1655),sDn(1656,1,QZn,Gi),uZn.Cd=function(n){v$(uG(n,18))},VW(d6n,"SelfLoopPreProcessor/lambda$2$Type",1656),sDn(1672,1,Q4n,_F),uZn.Kf=function(n,t){xIn(this,uG(n,36),t)},VW(d6n,"SelfLoopRouter",1672),sDn(1673,1,{},qi),uZn.Kb=function(n){return new fX(null,new h3(uG(n,30).a,16))},VW(d6n,"SelfLoopRouter/lambda$0$Type",1673),sDn(1674,1,y1n,Xi),uZn.Mb=function(n){return uG(n,10).k==(VIn(),dbt)},VW(d6n,"SelfLoopRouter/lambda$1$Type",1674),sDn(1675,1,y1n,Vi),uZn.Mb=function(n){return vR(uG(n,10),(GYn(),vmt))},VW(d6n,"SelfLoopRouter/lambda$2$Type",1675),sDn(1676,1,{},zi),uZn.Kb=function(n){return uG(oIn(uG(n,10),(GYn(),vmt)),337)},VW(d6n,"SelfLoopRouter/lambda$3$Type",1676),sDn(1677,1,QZn,OC),uZn.Cd=function(n){lY(this.a,this.b,uG(n,337))},VW(d6n,"SelfLoopRouter/lambda$4$Type",1677),sDn(1678,1,Q4n,Wi),uZn.Kf=function(n,t){tFn(uG(n,36),t)},VW(d6n,"SemiInteractiveCrossMinProcessor",1678),sDn(1679,1,y1n,Qi),uZn.Mb=function(n){return uG(n,10).k==(VIn(),dbt)},VW(d6n,"SemiInteractiveCrossMinProcessor/lambda$0$Type",1679),sDn(1680,1,y1n,Ji),uZn.Mb=function(n){return MX(uG(n,10))._b((jYn(),rTt))},VW(d6n,"SemiInteractiveCrossMinProcessor/lambda$1$Type",1680),sDn(1681,1,b2n,Yi),uZn.Ne=function(n,t){return Eon(uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(d6n,"SemiInteractiveCrossMinProcessor/lambda$2$Type",1681),sDn(1682,1,{},Zi),uZn.Ve=function(n,t){return zY(uG(n,10),uG(t,10))},VW(d6n,"SemiInteractiveCrossMinProcessor/lambda$3$Type",1682),sDn(1684,1,Q4n,nr),uZn.Kf=function(n,t){MXn(uG(n,36),t)},VW(d6n,"SortByInputModelProcessor",1684),sDn(1685,1,y1n,tr),uZn.Mb=function(n){return 0!=uG(n,12).g.c.length},VW(d6n,"SortByInputModelProcessor/lambda$0$Type",1685),sDn(1686,1,QZn,yg),uZn.Cd=function(n){ZOn(this.a,uG(n,12))},VW(d6n,"SortByInputModelProcessor/lambda$1$Type",1686),sDn(1759,817,{},Kon),uZn.df=function(n){var t,e,i,r;switch(this.c=n,this.a.g){case 2:t=new Zm,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new dr),new BC(this,t)),QAn(this,new ir),Prn(t,new rr),t.c.length=0,kS(JJ(new fX(null,new h3(this.c.a.b,16)),new cr),new Tg(t)),QAn(this,new ar),Prn(t,new or),t.c.length=0,e=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new jg(this))),new ur),kS(new fX(null,new h3(this.c.a.a,16)),new NC(e,t)),QAn(this,new hr),Prn(t,new fr),t.c.length=0;break;case 3:i=new Zm,QAn(this,new er),r=w$(Tun(ZJ(new fX(null,new h3(this.c.a.b,16)),new Mg(this))),new sr),kS(JJ(new fX(null,new h3(this.c.a.b,16)),new lr),new DC(r,i)),QAn(this,new br),Prn(i,new wr),i.c.length=0;break;default:throw hv(new Hv)}},uZn.b=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation",1759),sDn(1760,1,A2n,er),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$0$Type",1760),sDn(1761,1,{},Mg),uZn.Ye=function(n){return $Ln(this.a,uG(n,60))},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$1$Type",1761),sDn(1769,1,M1n,AC),uZn.de=function(){TEn(this.a,this.b,-1)},uZn.b=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$10$Type",1769),sDn(1771,1,A2n,ir),uZn.Lb=function(n){return F$(uG(n,60).g,154)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,154)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$11$Type",1771),sDn(1772,1,QZn,rr),uZn.Cd=function(n){uG(n,380).de()},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$12$Type",1772),sDn(1773,1,y1n,cr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$13$Type",1773),sDn(1775,1,QZn,Tg),uZn.Cd=function(n){tpn(this.a,uG(n,60))},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$14$Type",1775),sDn(1774,1,M1n,xC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$15$Type",1774),sDn(1776,1,A2n,ar),uZn.Lb=function(n){return F$(uG(n,60).g,10)},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return F$(uG(n,60).g,10)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$16$Type",1776),sDn(1777,1,QZn,or),uZn.Cd=function(n){uG(n,380).de()},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$17$Type",1777),sDn(1778,1,{},jg),uZn.Ye=function(n){return DLn(this.a,uG(n,60))},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$18$Type",1778),sDn(1779,1,{},ur),uZn.We=function(){return 0},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$19$Type",1779),sDn(1762,1,{},sr),uZn.We=function(){return 0},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$2$Type",1762),sDn(1781,1,QZn,NC),uZn.Cd=function(n){uV(this.a,this.b,uG(n,316))},uZn.a=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$20$Type",1781),sDn(1780,1,M1n,$C),uZn.de=function(){HDn(this.a,this.b,-1)},uZn.b=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$21$Type",1780),sDn(1782,1,A2n,hr),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$22$Type",1782),sDn(1783,1,QZn,fr),uZn.Cd=function(n){uG(n,380).de()},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$23$Type",1783),sDn(1763,1,y1n,lr),uZn.Mb=function(n){return F$(uG(n,60).g,10)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$3$Type",1763),sDn(1765,1,QZn,DC),uZn.Cd=function(n){sV(this.a,this.b,uG(n,60))},uZn.a=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$4$Type",1765),sDn(1764,1,M1n,RC),uZn.de=function(){TEn(this.b,this.a,-1)},uZn.a=0,VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$5$Type",1764),sDn(1766,1,A2n,br),uZn.Lb=function(n){return uG(n,60),!0},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return uG(n,60),!0},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$6$Type",1766),sDn(1767,1,QZn,wr),uZn.Cd=function(n){uG(n,380).de()},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$7$Type",1767),sDn(1768,1,y1n,dr),uZn.Mb=function(n){return F$(uG(n,60).g,154)},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$8$Type",1768),sDn(1770,1,QZn,BC),uZn.Cd=function(n){mrn(this.a,this.b,uG(n,60))},VW(E6n,"EdgeAwareScanlineConstraintCalculation/lambda$9$Type",1770),sDn(1586,1,Q4n,Ux),uZn.Kf=function(n,t){yVn(this,uG(n,36),t)},VW(E6n,"HorizontalGraphCompactor",1586),sDn(1587,1,{},Eg),uZn.ff=function(n,t){var e,i;return $en(n,t)?0:(e=V4(n),i=V4(t),e&&e.k==(VIn(),lbt)||i&&i.k==(VIn(),lbt)?0:_x(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(VIn(),wbt),i?i.k:(VIn(),wbt)))},uZn.gf=function(n,t){var e,i;return $en(n,t)?1:(e=V4(n),i=V4(t),Bx(uG(oIn(this.a.a,(GYn(),kmt)),312),e?e.k:(VIn(),wbt),i?i.k:(VIn(),wbt)))},VW(E6n,"HorizontalGraphCompactor/1",1587),sDn(1588,1,{},gr),uZn.ef=function(n,t){return JS(),0==n.a.i},VW(E6n,"HorizontalGraphCompactor/lambda$0$Type",1588),sDn(1589,1,{},Sg),uZn.ef=function(n,t){return ZY(this.a,n,t)},VW(E6n,"HorizontalGraphCompactor/lambda$1$Type",1589),sDn(1730,1,{},Sen),VW(E6n,"LGraphToCGraphTransformer",1730),sDn(1738,1,y1n,pr),uZn.Mb=function(n){return null!=n},VW(E6n,"LGraphToCGraphTransformer/0methodref$nonNull$Type",1738),sDn(1731,1,{},mr),uZn.Kb=function(n){return GB(),cpn(oIn(uG(uG(n,60).g,10),(GYn(),rmt)))},VW(E6n,"LGraphToCGraphTransformer/lambda$0$Type",1731),sDn(1732,1,{},vr),uZn.Kb=function(n){return GB(),_wn(uG(uG(n,60).g,154))},VW(E6n,"LGraphToCGraphTransformer/lambda$1$Type",1732),sDn(1741,1,y1n,kr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,10)},VW(E6n,"LGraphToCGraphTransformer/lambda$10$Type",1741),sDn(1742,1,QZn,yr),uZn.Cd=function(n){jZ(uG(n,60))},VW(E6n,"LGraphToCGraphTransformer/lambda$11$Type",1742),sDn(1743,1,y1n,Mr),uZn.Mb=function(n){return GB(),F$(uG(n,60).g,154)},VW(E6n,"LGraphToCGraphTransformer/lambda$12$Type",1743),sDn(1747,1,QZn,Tr),uZn.Cd=function(n){Fwn(uG(n,60))},VW(E6n,"LGraphToCGraphTransformer/lambda$13$Type",1747),sDn(1744,1,QZn,Pg),uZn.Cd=function(n){WL(this.a,uG(n,8))},uZn.a=0,VW(E6n,"LGraphToCGraphTransformer/lambda$14$Type",1744),sDn(1745,1,QZn,Cg),uZn.Cd=function(n){JL(this.a,uG(n,116))},uZn.a=0,VW(E6n,"LGraphToCGraphTransformer/lambda$15$Type",1745),sDn(1746,1,QZn,Ig),uZn.Cd=function(n){QL(this.a,uG(n,8))},uZn.a=0,VW(E6n,"LGraphToCGraphTransformer/lambda$16$Type",1746),sDn(1748,1,{},jr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(E6n,"LGraphToCGraphTransformer/lambda$17$Type",1748),sDn(1749,1,y1n,Er),uZn.Mb=function(n){return GB(),v9(uG(n,18))},VW(E6n,"LGraphToCGraphTransformer/lambda$18$Type",1749),sDn(1750,1,QZn,Og),uZn.Cd=function(n){fin(this.a,uG(n,18))},VW(E6n,"LGraphToCGraphTransformer/lambda$19$Type",1750),sDn(1734,1,QZn,Ag),uZn.Cd=function(n){Q3(this.a,uG(n,154))},VW(E6n,"LGraphToCGraphTransformer/lambda$2$Type",1734),sDn(1751,1,{},Sr),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},VW(E6n,"LGraphToCGraphTransformer/lambda$20$Type",1751),sDn(1752,1,{},Pr),uZn.Kb=function(n){return GB(),new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(E6n,"LGraphToCGraphTransformer/lambda$21$Type",1752),sDn(1753,1,{},Cr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},VW(E6n,"LGraphToCGraphTransformer/lambda$22$Type",1753),sDn(1754,1,y1n,Ir),uZn.Mb=function(n){return Hx(uG(n,15))},VW(E6n,"LGraphToCGraphTransformer/lambda$23$Type",1754),sDn(1755,1,QZn,Lg),uZn.Cd=function(n){pLn(this.a,uG(n,15))},VW(E6n,"LGraphToCGraphTransformer/lambda$24$Type",1755),sDn(1733,1,QZn,HC),uZn.Cd=function(n){P5(this.a,this.b,uG(n,154))},VW(E6n,"LGraphToCGraphTransformer/lambda$3$Type",1733),sDn(1735,1,{},Or),uZn.Kb=function(n){return GB(),new fX(null,new h3(uG(n,30).a,16))},VW(E6n,"LGraphToCGraphTransformer/lambda$4$Type",1735),sDn(1736,1,{},Ar),uZn.Kb=function(n){return GB(),new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(E6n,"LGraphToCGraphTransformer/lambda$5$Type",1736),sDn(1737,1,{},Lr),uZn.Kb=function(n){return GB(),uG(oIn(uG(n,18),(GYn(),Tmt)),15)},VW(E6n,"LGraphToCGraphTransformer/lambda$6$Type",1737),sDn(1739,1,QZn,Ng),uZn.Cd=function(n){xLn(this.a,uG(n,15))},VW(E6n,"LGraphToCGraphTransformer/lambda$8$Type",1739),sDn(1740,1,QZn,UC),uZn.Cd=function(n){k$(this.a,this.b,uG(n,154))},VW(E6n,"LGraphToCGraphTransformer/lambda$9$Type",1740),sDn(1729,1,{},Nr),uZn.cf=function(n){var t,e,i,r,c;for(this.a=n,this.d=new ak,this.c=Inn(Tst,EZn,125,this.a.a.a.c.length,0,1),this.b=0,e=new Ww(this.a.a.a);e.a=g&&(kD(a,xwn(f)),v=e.Math.max(v,k[f-1]-l),u+=d,p+=k[f-1]-p,l=k[f-1],d=s[f]),d=e.Math.max(d,s[f]),++f;u+=d}(w=e.Math.min(1/v,1/t.b/u))>r&&(r=w,i=a)}return i},uZn.pg=function(){return!1},VW(N6n,"MSDCutIndexHeuristic",816),sDn(1683,1,Q4n,Mc),uZn.Kf=function(n,t){Cqn(uG(n,36),t)},VW(N6n,"SingleEdgeGraphWrapper",1683),sDn(232,22,{3:1,34:1,22:1,232:1},QC);var Vdt,zdt,Wdt,Qdt=_cn($6n,"CenterEdgeLabelPlacementStrategy",232,Oat,Vnn,JB);sDn(431,22,{3:1,34:1,22:1,431:1},WC);var Jdt,Ydt,Zdt,ngt,tgt=_cn($6n,"ConstraintCalculationStrategy",431,Oat,w1,YB);sDn(322,22,{3:1,34:1,22:1,322:1,188:1,196:1},JC),uZn.dg=function(){return ZLn(this)},uZn.qg=function(){return ZLn(this)};var egt,igt,rgt,cgt,agt=_cn($6n,"CrossingMinimizationStrategy",322,Oat,B2,ZB);sDn(351,22,{3:1,34:1,22:1,351:1},YC);var ogt,ugt,sgt,hgt,fgt,lgt,bgt=_cn($6n,"CuttingStrategy",351,Oat,H2,nH);sDn(348,22,{3:1,34:1,22:1,348:1,188:1,196:1},ZC),uZn.dg=function(){return ODn(this)},uZn.qg=function(){return ODn(this)};var wgt,dgt,ggt,pgt=_cn($6n,"CycleBreakingStrategy",348,Oat,h9,tH);sDn(428,22,{3:1,34:1,22:1,428:1},nI);var mgt,vgt,kgt,ygt,Mgt=_cn($6n,"DirectionCongruency",428,Oat,b1,eH);sDn(460,22,{3:1,34:1,22:1,460:1},tI);var Tgt,jgt,Egt,Sgt,Pgt,Cgt,Igt,Ogt=_cn($6n,"EdgeConstraint",460,Oat,U2,sH);sDn(283,22,{3:1,34:1,22:1,283:1},eI);var Agt,Lgt,Ngt,$gt=_cn($6n,"EdgeLabelSideSelection",283,Oat,Gnn,hH);sDn(488,22,{3:1,34:1,22:1,488:1},iI);var Dgt,xgt,Rgt,Kgt,Fgt,_gt,Bgt,Hgt=_cn($6n,"EdgeStraighteningStrategy",488,Oat,y1,fH);sDn(281,22,{3:1,34:1,22:1,281:1},rI);var Ugt,Ggt,qgt,Xgt,Vgt,zgt,Wgt,Qgt=_cn($6n,"FixedAlignment",281,Oat,qnn,uH);sDn(282,22,{3:1,34:1,22:1,282:1},cI);var Jgt,Ygt,Zgt,npt,tpt,ept,ipt,rpt,cpt,apt,opt,upt=_cn($6n,"GraphCompactionStrategy",282,Oat,Xnn,iH);sDn(259,22,{3:1,34:1,22:1,259:1},aI);var spt,hpt,fpt,lpt,bpt=_cn($6n,"GraphProperties",259,Oat,oun,rH);sDn(299,22,{3:1,34:1,22:1,299:1},oI);var wpt,dpt,gpt,ppt,mpt=_cn($6n,"GreedySwitchType",299,Oat,G2,cH);sDn(311,22,{3:1,34:1,22:1,311:1},uI);var vpt,kpt,ypt,Mpt=_cn($6n,"InLayerConstraint",311,Oat,q2,aH);sDn(429,22,{3:1,34:1,22:1,429:1},sI);var Tpt,jpt,Ept,Spt,Ppt,Cpt,Ipt,Opt,Apt,Lpt,Npt,$pt,Dpt,xpt,Rpt,Kpt,Fpt,_pt,Bpt,Hpt,Upt,Gpt,qpt,Xpt,Vpt,zpt,Wpt,Qpt,Jpt,Ypt,Zpt,nmt,tmt,emt,imt,rmt,cmt,amt,omt,umt,smt,hmt,fmt,lmt,bmt,wmt,dmt,gmt,pmt,mmt,vmt,kmt,ymt,Mmt,Tmt,jmt,Emt,Smt,Pmt,Cmt,Imt,Omt,Amt,Lmt,Nmt=_cn($6n,"InteractiveReferencePoint",429,Oat,l1,oH);sDn(171,22,{3:1,34:1,22:1,171:1},hI);var $mt,Dmt,xmt,Rmt,Kmt,Fmt,_mt,Bmt,Hmt,Umt,Gmt,qmt,Xmt,Vmt,zmt,Wmt,Qmt,Jmt,Ymt,Zmt,nvt,tvt,evt,ivt,rvt,cvt,avt,ovt,uvt,svt,hvt,fvt,lvt,bvt,wvt,dvt,gvt,pvt,mvt,vvt,kvt,yvt,Mvt,Tvt,jvt,Evt,Svt,Pvt,Cvt,Ivt,Ovt,Avt,Lvt,Nvt,$vt,Dvt,xvt,Rvt,Kvt,Fvt,_vt,Bvt,Hvt,Uvt,Gvt,qvt,Xvt,Vvt,zvt,Wvt,Qvt,Jvt,Yvt,Zvt,nkt,tkt,ekt,ikt,rkt,ckt,akt,okt,ukt,skt,hkt,fkt,lkt,bkt,wkt,dkt,gkt,pkt,mkt,vkt,kkt,ykt,Mkt,Tkt,jkt,Ekt,Skt,Pkt,Ckt,Ikt,Okt,Akt,Lkt,Nkt,$kt,Dkt,xkt,Rkt,Kkt,Fkt,_kt,Bkt,Hkt,Ukt,Gkt,qkt,Xkt,Vkt,zkt,Wkt,Qkt,Jkt,Ykt,Zkt,nyt,tyt,eyt,iyt,ryt,cyt,ayt,oyt,uyt,syt,hyt,fyt,lyt,byt,wyt,dyt,gyt,pyt,myt,vyt,kyt,yyt,Myt,Tyt,jyt,Eyt,Syt,Pyt,Cyt,Iyt,Oyt,Ayt,Lyt,Nyt,$yt,Dyt,xyt,Ryt,Kyt,Fyt,_yt,Byt,Hyt,Uyt,Gyt,qyt,Xyt,Vyt,zyt,Wyt,Qyt,Jyt,Yyt,Zyt,nMt,tMt,eMt,iMt,rMt,cMt,aMt,oMt,uMt,sMt,hMt,fMt,lMt,bMt,wMt,dMt,gMt,pMt,mMt,vMt,kMt,yMt,MMt,TMt,jMt,EMt,SMt,PMt,CMt,IMt,OMt,AMt,LMt,NMt,$Mt,DMt,xMt,RMt,KMt,FMt,_Mt,BMt,HMt,UMt,GMt,qMt,XMt,VMt,zMt,WMt,QMt,JMt,YMt,ZMt,nTt,tTt,eTt,iTt,rTt,cTt,aTt,oTt,uTt,sTt,hTt,fTt,lTt,bTt,wTt,dTt,gTt,pTt,mTt,vTt,kTt,yTt,MTt,TTt,jTt,ETt,STt,PTt,CTt,ITt,OTt,ATt,LTt,NTt,$Tt,DTt,xTt,RTt,KTt,FTt,_Tt,BTt,HTt,UTt,GTt,qTt,XTt,VTt,zTt,WTt,QTt,JTt,YTt,ZTt,njt,tjt,ejt,ijt,rjt,cjt,ajt=_cn($6n,"LayerConstraint",171,Oat,l9,lH);sDn(859,1,K2n,fl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,B6n),""),"Direction Congruency"),"Specifies how drawings of the same graph with different layout directions compare to each other: either a natural reading direction is preserved or the drawings are rotated versions of each other."),vvt),(lAn(),gNt)),Mgt),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,H6n),""),"Feedback Edges"),"Whether feedback edges should be highlighted by routing around the nodes."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,U6n),""),"Interactive Reference Point"),"Determines which point of a node is considered by interactive layout phases."),Hvt),gNt),Nmt),ggn(hNt)))),H4(n,U6n,J6n,Gvt),H4(n,U6n,o5n,Uvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,G6n),""),"Merge Edges"),"Edges that have no ports are merged so they touch the connected nodes at the same points. When this option is disabled, one port is created for each edge directly connected to a node. When it is enabled, all such incoming edges share an input port, and all outgoing edges share an output port."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,q6n),""),"Merge Hierarchy-Crossing Edges"),"If hierarchical layout is active, hierarchy-crossing edges use as few hierarchical ports as possible. They are broken by the algorithm, with hierarchical ports inserted as required. Usually, one such port is created for each edge at each hierarchy crossing point. With this option set to true, we try to create as few hierarchical ports as possible in the process. In particular, all edges that form a hyperedge can share a port."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(zT(JT(QT(YT(qT(GT(WT(XT(VT(new xu,X6n),""),"Allow Non-Flow Ports To Switch Sides"),"Specifies whether non-flow ports may switch sides if their node's port constraints are either FIXED_SIDE or FIXED_ORDER. A non-flow port is a port on a side that is not part of the currently configured layout flow. For instance, given a left-to-right layout direction, north and south ports would be considered non-flow ports. Further note that the underlying criterium whether to switch sides or not solely relies on the minimization of edge crossings. Hence, edge length and other aesthetics criteria are not addressed."),!1),wNt),cot),ggn(fNt)),Uhn(cT($ot,1),VZn,2,6,["org.eclipse.elk.layered.northOrSouthPort"])))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,V6n),""),"Port Sorting Strategy"),"Only relevant for nodes with FIXED_SIDE port constraints. Determines the way a node's ports are distributed on the sides of a node if their order is not prescribed. The option is set on parent nodes."),Pkt),gNt),Jjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,z6n),""),"Thoroughness"),"How much effort should be spent to produce a nice layout."),xwn(7)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,W6n),""),"Add Unnecessary Bendpoints"),"Adds bend points even if an edge does not change direction. If true, each long edge dummy will contribute a bend point to its edges and hierarchy-crossing edges will always get a bend point where they cross hierarchy boundaries. By default, bend points are only added where an edge changes direction."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Q6n),""),"Generate Position and Layer IDs"),"If enabled position id and layer id are generated, which are usually only used internally when setting the interactiveLayout option. This option should be specified on the root node."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,J6n),"cycleBreaking"),"Cycle Breaking Strategy"),"Strategy for cycle breaking. Cycle breaking looks for cycles in the graph and determines which edges to reverse to break the cycles. Reversed edges will end up pointing to the opposite direction of regular edges (that is, reversed edges will point left if edges usually point right)."),pvt),gNt),pgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Y6n),s8n),"Node Layering Strategy"),"Strategy for node layering."),ckt),gNt),fjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Z6n),s8n),"Layer Constraint"),"Determines a constraint on the placement of the node regarding the layering."),Wvt),gNt),ajt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,n5n),s8n),"Layer Choice Constraint"),"Allows to set a constraint regarding the layer placement of a node. Let i be the value of teh constraint. Assumed the drawing has n layers and i < n. If set to i, it expresses that the node should be placed in i-th layer. Should i>=n be true then the node is placed in the last layer of the drawing. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,t5n),s8n),"Layer ID"),"Layer identifier that was calculated by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,e5n),h8n),"Upper Bound On Width [MinWidth Layerer]"),"Defines a loose upper bound on the width of the MinWidth layerer. If set to '-1' multiple values are tested and the best result is selected."),xwn(4)),mNt),dot),ggn(hNt)))),H4(n,e5n,Y6n,Yvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,i5n),h8n),"Upper Layer Estimation Scaling Factor [MinWidth Layerer]"),"Multiplied with Upper Bound On Width for defining an upper bound on the width of layers which haven't been determined yet, but whose maximum width had been (roughly) estimated by the MinWidth algorithm. Compensates for too high estimations. If set to '-1' multiple values are tested and the best result is selected."),xwn(2)),mNt),dot),ggn(hNt)))),H4(n,i5n,Y6n,nkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,r5n),f8n),"Node Promotion Strategy"),"Reduces number of dummy nodes after layering phase (if possible)."),ikt),gNt),Hjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,c5n),f8n),"Max Node Promotion Iterations"),"Limits the number of iterations for node promotion."),xwn(0)),mNt),dot),ggn(hNt)))),H4(n,c5n,r5n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,a5n),"layering.coffmanGraham"),"Layer Bound"),"The maximum number of nodes allowed per layer."),xwn(vZn)),mNt),dot),ggn(hNt)))),H4(n,a5n,Y6n,Xvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,o5n),l8n),"Crossing Minimization Strategy"),"Strategy for crossing minimization."),dvt),gNt),agt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,u5n),l8n),"Force Node Model Order"),"The node order given by the model does not change to produce a better layout. E.g. if node A is before node B in the model this is not changed during crossing minimization. This assumes that the node model order is already respected before crossing minimization. This can be achieved by setting considerModelOrder.strategy to NODES_AND_EDGES."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,s5n),l8n),"Hierarchical Sweepiness"),"How likely it is to use cross-hierarchy (1) vs bottom-up (-1)."),.1),dNt),fot),ggn(hNt)))),H4(n,s5n,b8n,ovt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,h5n),l8n),"Semi-Interactive Crossing Minimization"),"Preserves the order of nodes within a layer but still minimizes crossings between edges connecting long edge dummies. Derives the desired order from positions specified by the 'org.eclipse.elk.position' layout option. Requires a crossing minimization strategy that is able to process 'in-layer' constraints."),!1),wNt),cot),ggn(hNt)))),H4(n,h5n,o5n,bvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,f5n),l8n),"In Layer Predecessor of"),"Allows to set a constraint which specifies of which node the current node is the predecessor. If set to 's' then the node is the predecessor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,l5n),l8n),"In Layer Successor of"),"Allows to set a constraint which specifies of which node the current node is the successor. If set to 's' then the node is the successor of 's' and is in the same layer"),null),kNt),$ot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,b5n),l8n),"Position Choice Constraint"),"Allows to set a constraint regarding the position placement of a node in a layer. Assumed the layer in which the node placed includes n other nodes and i < n. If set to i, it expresses that the node should be placed at the i-th position. Should i>=n be true then the node is placed at the last position in the layer. Note that this option is not part of any of ELK Layered's default configurations but is only evaluated as part of the `InteractiveLayeredGraphVisitor`, which must be applied manually or used via the `DiagramLayoutEngine."),null),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,w5n),l8n),"Position ID"),"Position within a layer that was determined by ELK Layered for a node. This is only generated if interactiveLayot or generatePositionAndLayerIds is set."),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,d5n),w8n),"Greedy Switch Activation Threshold"),"By default it is decided automatically if the greedy switch is activated or not. The decision is based on whether the size of the input graph (without dummy nodes) is smaller than the value of this option. A '0' enforces the activation."),xwn(40)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,g5n),w8n),"Greedy Switch Crossing Minimization"),"Greedy Switch strategy for crossing minimization. The greedy switch heuristic is executed after the regular crossing minimization as a post-processor. Note that if 'hierarchyHandling' is set to 'INCLUDE_CHILDREN', the 'greedySwitchHierarchical.type' option must be used."),rvt),gNt),mpt),ggn(hNt)))),H4(n,g5n,o5n,cvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,p5n),"crossingMinimization.greedySwitchHierarchical"),"Greedy Switch Crossing Minimization (hierarchical)"),"Activates the greedy switch heuristic in case hierarchical layout is used. The differences to the non-hierarchical case (see 'greedySwitch.type') are: 1) greedy switch is inactive by default, 3) only the option value set on the node at which hierarchical layout starts is relevant, and 2) if it's activated by the user, it properly addresses hierarchy-crossing edges."),nvt),gNt),mpt),ggn(hNt)))),H4(n,p5n,o5n,tvt),H4(n,p5n,b8n,evt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,m5n),d8n),"Node Placement Strategy"),"Strategy for node placement."),Ekt),gNt),xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,v5n),d8n),"Favor Straight Edges Over Balancing"),"Favor straight edges over a balanced node placement. The default behavior is determined automatically based on the used 'edgeRouting'. For an orthogonal style it is set to true, for all other styles to false."),wNt),cot),ggn(hNt)))),H4(n,v5n,m5n,dkt),H4(n,v5n,m5n,gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,k5n),g8n),"BK Edge Straightening"),"Specifies whether the Brandes Koepf node placer tries to increase the number of straight edges at the expense of diagram size. There is a subtle difference to the 'favorStraightEdges' option, which decides whether a balanced placement of the nodes is desired, or not. In bk terms this means combining the four alignments into a single balanced one, or not. This option on the other hand tries to straighten additional edges during the creation of each of the four alignments."),skt),gNt),Hgt),ggn(hNt)))),H4(n,k5n,m5n,hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,y5n),g8n),"BK Fixed Alignment"),"Tells the BK node placer to use a certain alignment (out of its four) instead of the one producing the smallest height, or the combination of all four."),lkt),gNt),Qgt),ggn(hNt)))),H4(n,y5n,m5n,bkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,M5n),"nodePlacement.linearSegments"),"Linear Segments Deflection Dampening"),"Dampens the movement of nodes to keep the diagram from getting too large."),.3),dNt),fot),ggn(hNt)))),H4(n,M5n,m5n,mkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,T5n),"nodePlacement.networkSimplex"),"Node Flexibility"),"Aims at shorter and straighter edges. Two configurations are possible: (a) allow ports to move freely on the side they are assigned to (the order is always defined beforehand), (b) additionally allow to enlarge a node wherever it helps. If this option is not configured for a node, the 'nodeFlexibility.default' value is used, which is specified for the node's parent."),gNt),jjt),ggn(sNt)))),H4(n,T5n,m5n,Tkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,j5n),"nodePlacement.networkSimplex.nodeFlexibility"),"Node Flexibility Default"),"Default value of the 'nodeFlexibility' option for the children of a hierarchical node."),ykt),gNt),jjt),ggn(hNt)))),H4(n,j5n,m5n,Mkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,E5n),p8n),"Self-Loop Distribution"),"Alter the distribution of the loops around the node. It only takes effect for PortConstraints.FREE."),Pvt),gNt),oEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,S5n),p8n),"Self-Loop Ordering"),"Alter the ordering of the loops they can either be stacked or sequenced. It only takes effect for PortConstraints.FREE."),Ivt),gNt),lEt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,P5n),"edgeRouting.splines"),"Spline Routing Mode"),"Specifies the way control points are assembled for each individual edge. CONSERVATIVE ensures that edges are properly routed around the nodes but feels rather orthogonal at times. SLOPPY uses fewer control points to obtain curvier edge routes but may result in edges overlapping nodes."),Avt),gNt),pEt),ggn(hNt)))),H4(n,P5n,m8n,Lvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,C5n),"edgeRouting.splines.sloppy"),"Sloppy Spline Layer Spacing Factor"),"Spacing factor for routing area between layers when using sloppy spline routing."),.2),dNt),fot),ggn(hNt)))),H4(n,C5n,m8n,$vt),H4(n,C5n,P5n,Dvt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,I5n),"edgeRouting.polyline"),"Sloped Edge Zone Width"),"Width of the strip to the left and to the right of each layer where the polyline edge router is allowed to refrain from ensuring that edges are routed horizontally. This prevents awkward bend points for nodes that extent almost to the edge of their layer."),2),dNt),fot),ggn(hNt)))),H4(n,I5n,m8n,Evt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,O5n),v8n),"Spacing Base Value"),"An optional base value for all other layout options of the 'spacing' group. It can be used to conveniently alter the overall 'spaciousness' of the drawing. Whenever an explicit value is set for the other layout options, this base value will have no effect. The base value is not inherited, i.e. it must be set for each hierarchical node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,A5n),v8n),"Edge Node Between Layers Spacing"),"The spacing to be preserved between nodes and edges that are routed next to the node's layer. For the spacing between nodes and edges that cross the node's layer 'spacing.edgeNode' is used."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,L5n),v8n),"Edge Edge Between Layer Spacing"),"Spacing to be preserved between pairs of edges that are routed between the same pair of layers. Note that 'spacing.edgeEdge' is used for the spacing between pairs of edges crossing the same layer."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,N5n),v8n),"Node Node Between Layers Spacing"),"The spacing to be preserved between any pair of nodes of two adjacent layers. Note that 'spacing.nodeNode' is used for the spacing between nodes within the layer itself."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,$5n),k8n),"Direction Priority"),"Defines how important it is to have a certain edge point into the direction of the overall layout. This option is evaluated during the cycle breaking phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,D5n),k8n),"Shortness Priority"),"Defines how important it is to keep an edge as short as possible. This option is evaluated during the layering phase."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,x5n),k8n),"Straightness Priority"),"Defines how important it is to keep an edge straight, i.e. aligned with one of the two axes. This option is evaluated during node placement."),xwn(0)),mNt),dot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,R5n),y8n),j3n),"Tries to further compact components (disconnected sub-graphs)."),!1),wNt),cot),ggn(hNt)))),H4(n,R5n,h4n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,K5n),M8n),"Post Compaction Strategy"),T8n),_mt),gNt),upt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,F5n),M8n),"Post Compaction Constraint Calculation"),T8n),Kmt),gNt),tgt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,_5n),j8n),"High Degree Node Treatment"),"Makes room around high degree nodes to place leafs and trees."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,B5n),j8n),"High Degree Node Threshold"),"Whether a node is considered to have a high degree."),xwn(16)),mNt),dot),ggn(hNt)))),H4(n,B5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,H5n),j8n),"High Degree Node Maximum Tree Height"),"Maximum height of a subtree connected to a high degree node to be moved to separate layers."),xwn(5)),mNt),dot),ggn(hNt)))),H4(n,H5n,_5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,U5n),E8n),"Graph Wrapping Strategy"),"For certain graphs and certain prescribed drawing areas it may be desirable to split the laid out graph into chunks that are placed side by side. The edges that connect different chunks are 'wrapped' around from the end of one chunk to the start of the other chunk. The points between the chunks are referred to as 'cuts'."),cyt),gNt),xEt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,G5n),E8n),"Additional Wrapped Edges Spacing"),"To visually separate edges that are wrapped from regularly routed edges an additional spacing value can be specified in form of this layout option. The spacing is added to the regular edgeNode spacing."),10),dNt),fot),ggn(hNt)))),H4(n,G5n,U5n,Kkt),H4(n,G5n,U5n,Fkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,q5n),E8n),"Correction Factor for Wrapping"),"At times and for certain types of graphs the executed wrapping may produce results that are consistently biased in the same fashion: either wrapping to often or to rarely. This factor can be used to correct the bias. Internally, it is simply multiplied with the 'aspect ratio' layout option."),1),dNt),fot),ggn(hNt)))),H4(n,q5n,U5n,Bkt),H4(n,q5n,U5n,Hkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,X5n),S8n),"Cutting Strategy"),"The strategy by which the layer indexes are determined at which the layering crumbles into chunks."),Wkt),gNt),bgt),ggn(hNt)))),H4(n,X5n,U5n,Qkt),H4(n,X5n,U5n,Jkt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,V5n),S8n),"Manually Specified Cuts"),"Allows the user to specify her own cuts for a certain graph."),vNt),yat),ggn(hNt)))),H4(n,V5n,X5n,Gkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,z5n),"wrapping.cutting.msd"),"MSD Freedom"),"The MSD cutting strategy starts with an initial guess on the number of chunks the graph should be split into. The freedom specifies how much the strategy may deviate from this guess. E.g. if an initial number of 3 is computed, a freedom of 1 allows 2, 3, and 4 cuts."),Xkt),mNt),dot),ggn(hNt)))),H4(n,z5n,X5n,Vkt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,W5n),P8n),"Validification Strategy"),"When wrapping graphs, one can specify indices that are not allowed as split points. The validification strategy makes sure every computed split point is allowed."),hyt),gNt),MEt),ggn(hNt)))),H4(n,W5n,U5n,fyt),H4(n,W5n,U5n,lyt),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,Q5n),P8n),"Valid Indices for Wrapping"),null),vNt),yat),ggn(hNt)))),H4(n,Q5n,U5n,oyt),H4(n,Q5n,U5n,uyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,J5n),C8n),"Improve Cuts"),"For general graphs it is important that not too many edges wrap backwards. Thus a compromise between evenly-distributed cuts and the total number of cut edges is sought."),!0),wNt),cot),ggn(hNt)))),H4(n,J5n,U5n,tyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Y5n),C8n),"Distance Penalty When Improving Cuts"),null),2),dNt),fot),ggn(hNt)))),H4(n,Y5n,U5n,Zkt),H4(n,Y5n,J5n,!0),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Z5n),C8n),"Improve Wrapped Edges"),"The initial wrapping is performed in a very simple way. As a consequence, edges that wrap from one chunk to another may be unnecessarily long. Activating this option tries to shorten such edges."),!0),wNt),cot),ggn(hNt)))),H4(n,Z5n,U5n,iyt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,n8n),I8n),"Edge Label Side Selection"),"Method to decide on edge label sides."),Tvt),gNt),$gt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,t8n),I8n),"Edge Center Label Placement Strategy"),"Determines in which layer center labels of long edges should be placed."),yvt),gNt),Qdt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,e8n),O8n),"Consider Model Order"),"Preserves the order of nodes and edges in the model file if this does not lead to additional edge crossings. Depending on the strategy this is not always possible since the node and edge order might be conflicting."),Qmt),gNt),Xjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,i8n),O8n),"Consider Port Order"),"If disabled the port order of output ports is derived from the edge order and input ports are ordered by their incoming connections. If enabled all ports are ordered by the port model order."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,r8n),O8n),"No Model Order"),"Set on a node to not set a model order for this node even though it is a real node."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,c8n),O8n),"Consider Model Order for Components"),"If set to NONE the usual ordering strategy (by cumulative node priority and size of nodes) is used. INSIDE_PORT_SIDES orders the components with external ports only inside the groups with the same port side. FORCE_MODEL_ORDER enforces the mode order on components. This option might produce bad alignments and sub optimal drawings in terms of used area since the ordering should be respected."),Hmt),gNt),abt),ggn(hNt)))),H4(n,c8n,h4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,a8n),O8n),"Long Edge Ordering Strategy"),"Indicates whether long edges are sorted under, over, or equal to nodes that have no connection to a previous layer in a left-to-right or right-to-left layout. Under and over changes to right and left in a vertical layout."),Xmt),gNt),pjt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,o8n),O8n),"Crossing Counter Node Order Influence"),"Indicates with what percentage (1 for 100%) violations of the node model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal node order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,o8n,e8n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,u8n),O8n),"Crossing Counter Port Order Influence"),"Indicates with what percentage (1 for 100%) violations of the port model order are weighted against the crossings e.g. a value of 0.5 means two model order violations are as important as on edge crossing. This allows some edge crossings in favor of preserving the model order. It is advised to set this value to a very small positive value (e.g. 0.001) to have minimal crossing and a optimal port order. Defaults to no influence (0)."),0),dNt),fot),ggn(hNt)))),H4(n,u8n,e8n,null),eZn((new ll,n))},VW($6n,"LayeredMetaDataProvider",859),sDn(998,1,K2n,ll),uZn.hf=function(n){eZn(n)},VW($6n,"LayeredOptions",998),sDn(999,1,{},Tc),uZn.sf=function(){return new mk},uZn.tf=function(n){},VW($6n,"LayeredOptions/LayeredFactory",999),sDn(1391,1,{}),uZn.a=0,VW(p9n,"ElkSpacings/AbstractSpacingsBuilder",1391),sDn(792,1391,{},omn),VW($6n,"LayeredSpacings/LayeredSpacingsBuilder",792),sDn(265,22,{3:1,34:1,22:1,265:1,188:1,196:1},fI),uZn.dg=function(){return J_n(this)},uZn.qg=function(){return J_n(this)};var ojt,ujt,sjt,hjt,fjt=_cn($6n,"LayeringStrategy",265,Oat,tan,bH);sDn(390,22,{3:1,34:1,22:1,390:1},lI);var ljt,bjt,wjt,djt,gjt,pjt=_cn($6n,"LongEdgeOrderingStrategy",390,Oat,X2,wH);sDn(203,22,{3:1,34:1,22:1,203:1},bI);var mjt,vjt,kjt,yjt,Mjt,Tjt,jjt=_cn($6n,"NodeFlexibility",203,Oat,q6,dH);sDn(323,22,{3:1,34:1,22:1,323:1,188:1,196:1},wI),uZn.dg=function(){return IDn(this)},uZn.qg=function(){return IDn(this)};var Ejt,Sjt,Pjt,Cjt,Ijt,Ojt,Ajt,Ljt,Njt,$jt,Djt,xjt=_cn($6n,"NodePlacementStrategy",323,Oat,f9,gH);sDn(243,22,{3:1,34:1,22:1,243:1},dI);var Rjt,Kjt,Fjt,_jt,Bjt,Hjt=_cn($6n,"NodePromotionStrategy",243,Oat,uun,pH);sDn(284,22,{3:1,34:1,22:1,284:1},gI);var Ujt,Gjt,qjt,Xjt=_cn($6n,"OrderingStrategy",284,Oat,X6,mH);sDn(430,22,{3:1,34:1,22:1,430:1},pI);var Vjt,zjt,Wjt,Qjt,Jjt=_cn($6n,"PortSortingStrategy",430,Oat,d1,vH);sDn(463,22,{3:1,34:1,22:1,463:1},mI);var Yjt,Zjt,nEt,tEt,eEt=_cn($6n,"PortType",463,Oat,V2,kH);sDn(387,22,{3:1,34:1,22:1,387:1},vI);var iEt,rEt,cEt,aEt,oEt=_cn($6n,"SelfLoopDistributionStrategy",387,Oat,z2,yH);sDn(349,22,{3:1,34:1,22:1,349:1},kI);var uEt,sEt,hEt,fEt,lEt=_cn($6n,"SelfLoopOrderingStrategy",349,Oat,W2,MH);sDn(312,1,{312:1},Czn),VW($6n,"Spacings",312),sDn(350,22,{3:1,34:1,22:1,350:1},yI);var bEt,wEt,dEt,gEt,pEt=_cn($6n,"SplineRoutingMode",350,Oat,Q2,TH);sDn(352,22,{3:1,34:1,22:1,352:1},MI);var mEt,vEt,kEt,yEt,MEt=_cn($6n,"ValidifyStrategy",352,Oat,J2,jH);sDn(388,22,{3:1,34:1,22:1,388:1},TI);var TEt,jEt,EEt,SEt,PEt,CEt,IEt,OEt,AEt,LEt,NEt,$Et,DEt,xEt=_cn($6n,"WrappingStrategy",388,Oat,Y2,EH);sDn(1398,1,y9n,il),uZn.rg=function(n){return uG(n,36),jEt},uZn.Kf=function(n,t){pVn(this,uG(n,36),t)},VW(M9n,"DepthFirstCycleBreaker",1398),sDn(793,1,y9n,eV),uZn.rg=function(n){return uG(n,36),EEt},uZn.Kf=function(n,t){gYn(this,uG(n,36),t)},uZn.sg=function(n){return uG(Vq(n,iMn(this.d,n.c.length)),10)},VW(M9n,"GreedyCycleBreaker",793),sDn(1401,793,y9n,tL),uZn.sg=function(n){var t,e,i,r;for(r=null,t=vZn,i=new Ww(n);i.a1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,uG(this,669)):(hZ(),f$(n,this.d)),xsn(this.e,n))},uZn.lg=function(n,t,e,i){var r,c,a,o,u,s,h;for(t!=vX(e,n.length)&&(c=n[t-(e?1:-1)],v7(this.f,c,e?(can(),Wjt):(can(),zjt))),r=n[t][0],h=!i||r.k==(VIn(),lbt),s=n7(n[t]),this.vg(s,h,!1,e),a=0,u=new Ww(s);u.a"),n0?j0(this.a,n[t-1],n[t]):!e&&t1&&(oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),(jYn(),Cyt))))?Axn(n,this.d,this):(hZ(),f$(n,this.d)),oM(gK(oIn(HQ((u3(0,n.c.length),uG(n.c[0],10))),Cyt)))||xsn(this.e,n))},VW(S9n,"ModelOrderBarycenterHeuristic",669),sDn(1866,1,b2n,Zg),uZn.Ne=function(n,t){return TOn(this.a,uG(n,10),uG(t,10))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(S9n,"ModelOrderBarycenterHeuristic/lambda$0$Type",1866),sDn(1423,1,y9n,wl),uZn.rg=function(n){var t;return uG(n,36),Aq(t=aN(XEt),(uIn(),Elt),(VYn(),Cwt)),t},uZn.Kf=function(n,t){jY((uG(n,36),t))},VW(S9n,"NoCrossingMinimizer",1423),sDn(809,413,j9n,rj),uZn.tg=function(n,t,e){var i,r,c,a,o,u,s,h,f,l,b;switch(f=this.g,e.g){case 1:for(r=0,c=0,h=new Ww(n.j);h.a1&&(r.j==(KQn(),kRt)?this.b[n]=!0:r.j==_Rt&&n>0&&(this.b[n-1]=!0))},uZn.f=0,VW(P6n,"AllCrossingsCounter",1861),sDn(595,1,{},Don),uZn.b=0,uZn.d=0,VW(P6n,"BinaryIndexedTree",595),sDn(532,1,{},R_),VW(P6n,"CrossingsCounter",532),sDn(1950,1,b2n,np),uZn.Ne=function(n,t){return wX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P6n,"CrossingsCounter/lambda$0$Type",1950),sDn(1951,1,b2n,tp),uZn.Ne=function(n,t){return dX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P6n,"CrossingsCounter/lambda$1$Type",1951),sDn(1952,1,b2n,ep),uZn.Ne=function(n,t){return gX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P6n,"CrossingsCounter/lambda$2$Type",1952),sDn(1953,1,b2n,ip),uZn.Ne=function(n,t){return pX(this.a,uG(n,12),uG(t,12))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P6n,"CrossingsCounter/lambda$3$Type",1953),sDn(1954,1,QZn,rp),uZn.Cd=function(n){cen(this.a,uG(n,12))},VW(P6n,"CrossingsCounter/lambda$4$Type",1954),sDn(1955,1,y1n,cp),uZn.Mb=function(n){return NI(this.a,uG(n,12))},VW(P6n,"CrossingsCounter/lambda$5$Type",1955),sDn(1956,1,QZn,ap),uZn.Cd=function(n){MA(this,n)},VW(P6n,"CrossingsCounter/lambda$6$Type",1956),sDn(1957,1,QZn,EI),uZn.Cd=function(n){var t;PU(),A6(this.b,(t=this.a,uG(n,12),t))},VW(P6n,"CrossingsCounter/lambda$7$Type",1957),sDn(839,1,A2n,Nc),uZn.Lb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return PU(),vR(uG(n,12),(GYn(),lmt))},VW(P6n,"CrossingsCounter/lambda$8$Type",839),sDn(1949,1,{},op),VW(P6n,"HyperedgeCrossingsCounter",1949),sDn(478,1,{34:1,478:1},BF),uZn.Fd=function(n){return _vn(this,uG(n,478))},uZn.b=0,uZn.c=0,uZn.e=0,uZn.f=0;var QEt=VW(P6n,"HyperedgeCrossingsCounter/Hyperedge",478);sDn(374,1,{34:1,374:1},bY),uZn.Fd=function(n){return exn(this,uG(n,374))},uZn.b=0,uZn.c=0;var JEt,YEt,ZEt=VW(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner",374);sDn(531,22,{3:1,34:1,22:1,531:1},SI);var nSt,tSt,eSt,iSt,rSt,cSt=_cn(P6n,"HyperedgeCrossingsCounter/HyperedgeCorner/Type",531,Oat,g1,PH);sDn(1425,1,y9n,dl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?tSt:null},uZn.Kf=function(n,t){HEn(this,uG(n,36),t)},VW(P9n,"InteractiveNodePlacer",1425),sDn(1426,1,y9n,gl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?eSt:null},uZn.Kf=function(n,t){XMn(this,uG(n,36),t)},VW(P9n,"LinearSegmentsNodePlacer",1426),sDn(261,1,{34:1,261:1},Tk),uZn.Fd=function(n){return CT(this,uG(n,261))},uZn.Fb=function(n){var t;return!!F$(n,261)&&(t=uG(n,261),this.b==t.b)},uZn.Hb=function(){return this.b},uZn.Ib=function(){return"ls"+vIn(this.e)},uZn.a=0,uZn.b=0,uZn.c=-1,uZn.d=-1,uZn.g=0;var aSt,oSt=VW(P9n,"LinearSegmentsNodePlacer/LinearSegment",261);sDn(1428,1,y9n,iV),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?aSt:null},uZn.Kf=function(n,t){WJn(this,uG(n,36),t)},uZn.b=0,uZn.g=0,VW(P9n,"NetworkSimplexPlacer",1428),sDn(1447,1,b2n,$c),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P9n,"NetworkSimplexPlacer/0methodref$compare$Type",1447),sDn(1449,1,b2n,Dc),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(P9n,"NetworkSimplexPlacer/1methodref$compare$Type",1449),sDn(655,1,{655:1},PI);var uSt=VW(P9n,"NetworkSimplexPlacer/EdgeRep",655);sDn(412,1,{412:1},wY),uZn.b=!1;var sSt,hSt,fSt,lSt=VW(P9n,"NetworkSimplexPlacer/NodeRep",412);sDn(515,13,{3:1,4:1,20:1,31:1,56:1,13:1,16:1,15:1,59:1,515:1},Ck),VW(P9n,"NetworkSimplexPlacer/Path",515),sDn(1429,1,{},xc),uZn.Kb=function(n){return uG(n,18).d.i.k},VW(P9n,"NetworkSimplexPlacer/Path/lambda$0$Type",1429),sDn(1430,1,y1n,Rc),uZn.Mb=function(n){return uG(n,273)==(VIn(),wbt)},VW(P9n,"NetworkSimplexPlacer/Path/lambda$1$Type",1430),sDn(1431,1,{},Kc),uZn.Kb=function(n){return uG(n,18).d.i},VW(P9n,"NetworkSimplexPlacer/Path/lambda$2$Type",1431),sDn(1432,1,y1n,up),uZn.Mb=function(n){return VK(Imn(uG(n,10)))},VW(P9n,"NetworkSimplexPlacer/Path/lambda$3$Type",1432),sDn(1433,1,y1n,Fc),uZn.Mb=function(n){return mq(uG(n,12))},VW(P9n,"NetworkSimplexPlacer/lambda$0$Type",1433),sDn(1434,1,QZn,CI),uZn.Cd=function(n){M$(this.a,this.b,uG(n,12))},VW(P9n,"NetworkSimplexPlacer/lambda$1$Type",1434),sDn(1443,1,QZn,sp),uZn.Cd=function(n){FLn(this.a,uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$10$Type",1443),sDn(1444,1,{},_c),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},VW(P9n,"NetworkSimplexPlacer/lambda$11$Type",1444),sDn(1445,1,QZn,hp),uZn.Cd=function(n){D_n(this.a,uG(n,10))},VW(P9n,"NetworkSimplexPlacer/lambda$12$Type",1445),sDn(1446,1,{},Bc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},VW(P9n,"NetworkSimplexPlacer/lambda$13$Type",1446),sDn(1448,1,{},Hc),uZn.Kb=function(n){return n2(),xwn(uG(n,125).e)},VW(P9n,"NetworkSimplexPlacer/lambda$15$Type",1448),sDn(1450,1,y1n,Uc),uZn.Mb=function(n){return n2(),uG(n,412).c.k==(VIn(),dbt)},VW(P9n,"NetworkSimplexPlacer/lambda$17$Type",1450),sDn(1451,1,y1n,Gc),uZn.Mb=function(n){return n2(),uG(n,412).c.j.c.length>1},VW(P9n,"NetworkSimplexPlacer/lambda$18$Type",1451),sDn(1452,1,QZn,dY),uZn.Cd=function(n){Dpn(this.c,this.b,this.d,this.a,uG(n,412))},uZn.c=0,uZn.d=0,VW(P9n,"NetworkSimplexPlacer/lambda$19$Type",1452),sDn(1435,1,{},qc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},VW(P9n,"NetworkSimplexPlacer/lambda$2$Type",1435),sDn(1453,1,QZn,fp),uZn.Cd=function(n){j$(this.a,uG(n,12))},uZn.a=0,VW(P9n,"NetworkSimplexPlacer/lambda$20$Type",1453),sDn(1454,1,{},Xc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},VW(P9n,"NetworkSimplexPlacer/lambda$21$Type",1454),sDn(1455,1,QZn,lp),uZn.Cd=function(n){uD(this.a,uG(n,10))},VW(P9n,"NetworkSimplexPlacer/lambda$22$Type",1455),sDn(1456,1,y1n,Vc),uZn.Mb=function(n){return VK(n)},VW(P9n,"NetworkSimplexPlacer/lambda$23$Type",1456),sDn(1457,1,{},zc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},VW(P9n,"NetworkSimplexPlacer/lambda$24$Type",1457),sDn(1458,1,y1n,bp),uZn.Mb=function(n){return RL(this.a,uG(n,10))},VW(P9n,"NetworkSimplexPlacer/lambda$25$Type",1458),sDn(1459,1,QZn,II),uZn.Cd=function(n){$On(this.a,this.b,uG(n,10))},VW(P9n,"NetworkSimplexPlacer/lambda$26$Type",1459),sDn(1460,1,y1n,Wc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$27$Type",1460),sDn(1461,1,y1n,Qc),uZn.Mb=function(n){return n2(),!v9(uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$28$Type",1461),sDn(1462,1,{},wp),uZn.Ve=function(n,t){return T$(this.a,uG(n,30),uG(t,30))},VW(P9n,"NetworkSimplexPlacer/lambda$29$Type",1462),sDn(1436,1,{},Jc),uZn.Kb=function(n){return n2(),new fX(null,new LW(new FV(ix(Xgn(uG(n,10)).a.Kc(),new h))))},VW(P9n,"NetworkSimplexPlacer/lambda$3$Type",1436),sDn(1437,1,y1n,Yc),uZn.Mb=function(n){return n2(),h6(uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$4$Type",1437),sDn(1438,1,QZn,dp),uZn.Cd=function(n){vqn(this.a,uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$5$Type",1438),sDn(1439,1,{},Zc),uZn.Kb=function(n){return n2(),new fX(null,new h3(uG(n,30).a,16))},VW(P9n,"NetworkSimplexPlacer/lambda$6$Type",1439),sDn(1440,1,y1n,na),uZn.Mb=function(n){return n2(),uG(n,10).k==(VIn(),dbt)},VW(P9n,"NetworkSimplexPlacer/lambda$7$Type",1440),sDn(1441,1,{},ta),uZn.Kb=function(n){return n2(),new fX(null,new LW(new FV(ix(Ggn(uG(n,10)).a.Kc(),new h))))},VW(P9n,"NetworkSimplexPlacer/lambda$8$Type",1441),sDn(1442,1,y1n,ea),uZn.Mb=function(n){return n2(),pq(uG(n,18))},VW(P9n,"NetworkSimplexPlacer/lambda$9$Type",1442),sDn(1424,1,y9n,pl),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?sSt:null},uZn.Kf=function(n,t){RXn(uG(n,36),t)},VW(P9n,"SimpleNodePlacer",1424),sDn(185,1,{185:1},zHn),uZn.Ib=function(){var n;return n="",this.c==(b0(),fSt)?n+=z2n:this.c==hSt&&(n+=V2n),this.o==(w0(),wSt)?n+=c3n:this.o==dSt?n+="UP":n+="BALANCED",n},VW(O9n,"BKAlignedLayout",185),sDn(523,22,{3:1,34:1,22:1,523:1},OI);var bSt,wSt,dSt,gSt=_cn(O9n,"BKAlignedLayout/HDirection",523,Oat,m1,CH);sDn(522,22,{3:1,34:1,22:1,522:1},AI);var pSt,mSt,vSt,kSt,ySt,MSt,TSt,jSt,ESt,SSt,PSt,CSt,ISt,OSt,ASt,LSt,NSt,$St,DSt,xSt=_cn(O9n,"BKAlignedLayout/VDirection",522,Oat,v1,IH);sDn(1699,1,{},LI),VW(O9n,"BKAligner",1699),sDn(1702,1,{},xjn),VW(O9n,"BKCompactor",1702),sDn(663,1,{663:1},ia),uZn.a=0,VW(O9n,"BKCompactor/ClassEdge",663),sDn(467,1,{467:1},Ek),uZn.a=null,uZn.b=0,VW(O9n,"BKCompactor/ClassNode",467),sDn(1427,1,y9n,FI),uZn.rg=function(n){return uG(oIn(uG(n,36),(GYn(),Hpt)),21).Hc((r_n(),tpt))?mSt:null},uZn.Kf=function(n,t){$Yn(this,uG(n,36),t)},uZn.d=!1,VW(O9n,"BKNodePlacer",1427),sDn(1700,1,{},ra),uZn.d=0,VW(O9n,"NeighborhoodInformation",1700),sDn(1701,1,b2n,gp),uZn.Ne=function(n,t){return vrn(this,uG(n,42),uG(t,42))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(O9n,"NeighborhoodInformation/NeighborComparator",1701),sDn(823,1,{}),VW(O9n,"ThresholdStrategy",823),sDn(1825,823,{},Sk),uZn.wg=function(n,t,e){return this.a.o==(w0(),dSt)?M0n:T0n},uZn.xg=function(){},VW(O9n,"ThresholdStrategy/NullThresholdStrategy",1825),sDn(587,1,{587:1},_I),uZn.c=!1,uZn.d=!1,VW(O9n,"ThresholdStrategy/Postprocessable",587),sDn(1826,823,{},Pk),uZn.wg=function(n,t,e){var i,r,c;return r=t==e,i=this.a.a[e.p]==t,r||i?(c=n,this.a.c,b0(),r&&(c=FXn(this,t,!0)),!isNaN(c)&&!isFinite(c)&&i&&(c=FXn(this,e,!1)),c):n},uZn.xg=function(){for(var n,t,e;0!=this.d.b;)(t=wGn(this,e=uG(H1(this.d),587))).a&&(n=t.a,(oM(this.a.f[this.a.g[e.b.p].p])||v9(n)||n.c.i.c!=n.d.i.c)&&(ixn(this,e)||zL(this.e,e)));for(;0!=this.e.a.c.length;)ixn(this,uG(obn(this.e),587))},VW(O9n,"ThresholdStrategy/SimpleThresholdStrategy",1826),sDn(645,1,{645:1,188:1,196:1},ca),uZn.dg=function(){return Fsn(this)},uZn.qg=function(){return Fsn(this)},VW(A9n,"EdgeRouterFactory",645),sDn(1485,1,y9n,ml),uZn.rg=function(n){return RFn(uG(n,36))},uZn.Kf=function(n,t){WXn(uG(n,36),t)},VW(A9n,"OrthogonalEdgeRouter",1485),sDn(1478,1,y9n,KI),uZn.rg=function(n){return oSn(uG(n,36))},uZn.Kf=function(n,t){XQn(this,uG(n,36),t)},VW(A9n,"PolylineEdgeRouter",1478),sDn(1479,1,A2n,oa),uZn.Lb=function(n){return shn(uG(n,10))},uZn.Fb=function(n){return this===n},uZn.Mb=function(n){return shn(uG(n,10))},VW(A9n,"PolylineEdgeRouter/1",1479),sDn(1872,1,y1n,ua),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},VW(L9n,"HyperEdgeCycleDetector/lambda$0$Type",1872),sDn(1873,1,{},sa),uZn.Ze=function(n){return uG(n,132).d},VW(L9n,"HyperEdgeCycleDetector/lambda$1$Type",1873),sDn(1874,1,y1n,ha),uZn.Mb=function(n){return uG(n,132).c==(_7(),$St)},VW(L9n,"HyperEdgeCycleDetector/lambda$2$Type",1874),sDn(1875,1,{},fa),uZn.Ze=function(n){return uG(n,132).d},VW(L9n,"HyperEdgeCycleDetector/lambda$3$Type",1875),sDn(1876,1,{},la),uZn.Ze=function(n){return uG(n,132).d},VW(L9n,"HyperEdgeCycleDetector/lambda$4$Type",1876),sDn(1877,1,{},aa),uZn.Ze=function(n){return uG(n,132).d},VW(L9n,"HyperEdgeCycleDetector/lambda$5$Type",1877),sDn(118,1,{34:1,118:1},nhn),uZn.Fd=function(n){return IT(this,uG(n,118))},uZn.Fb=function(n){var t;return!!F$(n,118)&&(t=uG(n,118),this.g==t.g)},uZn.Hb=function(){return this.g},uZn.Ib=function(){var n,t,e,i;for(n=new lx("{"),i=new Ww(this.n);i.a"+this.b+" ("+yR(this.c)+")"},uZn.d=0,VW(L9n,"HyperEdgeSegmentDependency",132),sDn(528,22,{3:1,34:1,22:1,528:1},qI);var RSt,KSt,FSt,_St,BSt,HSt,USt,GSt,qSt=_cn(L9n,"HyperEdgeSegmentDependency/DependencyType",528,Oat,k1,OH);sDn(1878,1,{},pp),VW(L9n,"HyperEdgeSegmentSplitter",1878),sDn(1879,1,{},hj),uZn.a=0,uZn.b=0,VW(L9n,"HyperEdgeSegmentSplitter/AreaRating",1879),sDn(339,1,{339:1},OU),uZn.a=0,uZn.b=0,uZn.c=0,VW(L9n,"HyperEdgeSegmentSplitter/FreeArea",339),sDn(1880,1,b2n,ba),uZn.Ne=function(n,t){return C_(uG(n,118),uG(t,118))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(L9n,"HyperEdgeSegmentSplitter/lambda$0$Type",1880),sDn(1881,1,QZn,pY),uZn.Cd=function(n){I5(this.a,this.d,this.c,this.b,uG(n,118))},uZn.b=0,VW(L9n,"HyperEdgeSegmentSplitter/lambda$1$Type",1881),sDn(1882,1,{},wa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},VW(L9n,"HyperEdgeSegmentSplitter/lambda$2$Type",1882),sDn(1883,1,{},da),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},VW(L9n,"HyperEdgeSegmentSplitter/lambda$3$Type",1883),sDn(1884,1,{},ga),uZn.Ye=function(n){return uM(pK(n))},VW(L9n,"HyperEdgeSegmentSplitter/lambda$4$Type",1884),sDn(664,1,{},NW),uZn.a=0,uZn.b=0,uZn.c=0,VW(L9n,"OrthogonalRoutingGenerator",664),sDn(1703,1,{},pa),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).e,16))},VW(L9n,"OrthogonalRoutingGenerator/lambda$0$Type",1703),sDn(1704,1,{},ma),uZn.Kb=function(n){return new fX(null,new h3(uG(n,118).j,16))},VW(L9n,"OrthogonalRoutingGenerator/lambda$1$Type",1704),sDn(670,1,{}),VW(N9n,"BaseRoutingDirectionStrategy",670),sDn(1870,670,{},Rk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),zUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),zUn(this,o,c,r,!1),c=b,r=new MO(w,a=t+b.o*i),aq(o.a,r),zUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),zUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),KRt},uZn.Bg=function(){return KQn(),yRt},VW(N9n,"NorthToSouthRoutingStrategy",1870),sDn(1871,670,{},Kk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t-n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(l,a=f),aq(o.a,r),zUn(this,o,c,r,!1),(b=n.r)&&(r=new MO(w=uM(pK(hyn(b.e,0))),a),aq(o.a,r),zUn(this,o,c,r,!1),c=b,r=new MO(w,a=t-b.o*i),aq(o.a,r),zUn(this,o,c,r,!1)),r=new MO(g,a),aq(o.a,r),zUn(this,o,c,r,!1)))},uZn.zg=function(n){return n.i.n.a+n.n.a+n.a.a},uZn.Ag=function(){return KQn(),yRt},uZn.Bg=function(){return KQn(),KRt},VW(N9n,"SouthToNorthRoutingStrategy",1871),sDn(1869,670,{},Fk),uZn.yg=function(n,t,i){var r,c,a,o,u,s,h,f,l,b,w,d,g;if(!n.r||n.q)for(f=t+n.o*i,h=new Ww(n.n);h.at4n&&(c=n,r=new MO(a=f,l),aq(o.a,r),zUn(this,o,c,r,!0),(b=n.r)&&(r=new MO(a,w=uM(pK(hyn(b.e,0)))),aq(o.a,r),zUn(this,o,c,r,!0),c=b,r=new MO(a=t+b.o*i,w),aq(o.a,r),zUn(this,o,c,r,!0)),r=new MO(a,g),aq(o.a,r),zUn(this,o,c,r,!0)))},uZn.zg=function(n){return n.i.n.b+n.n.b+n.a.b},uZn.Ag=function(){return KQn(),kRt},uZn.Bg=function(){return KQn(),_Rt},VW(N9n,"WestToEastRoutingStrategy",1869),sDn(828,1,{},jqn),uZn.Ib=function(){return vIn(this.a)},uZn.b=0,uZn.c=!1,uZn.d=!1,uZn.f=0,VW(D9n,"NubSpline",828),sDn(418,1,{418:1},pFn,R1),VW(D9n,"NubSpline/PolarCP",418),sDn(1480,1,y9n,VTn),uZn.rg=function(n){return HPn(uG(n,36))},uZn.Kf=function(n,t){EJn(this,uG(n,36),t)},VW(D9n,"SplineEdgeRouter",1480),sDn(274,1,{274:1},O7),uZn.Ib=function(){return this.a+" ->("+this.c+") "+this.b},uZn.c=0,VW(D9n,"SplineEdgeRouter/Dependency",274),sDn(465,22,{3:1,34:1,22:1,465:1},XI);var XSt,VSt,zSt,WSt,QSt,JSt=_cn(D9n,"SplineEdgeRouter/SideToProcess",465,Oat,S1,AH);sDn(1481,1,y1n,va),uZn.Mb=function(n){return uFn(),!uG(n,131).o},VW(D9n,"SplineEdgeRouter/lambda$0$Type",1481),sDn(1482,1,{},ka),uZn.Ze=function(n){return uFn(),uG(n,131).v+1},VW(D9n,"SplineEdgeRouter/lambda$1$Type",1482),sDn(1483,1,QZn,BI),uZn.Cd=function(n){yq(this.a,this.b,uG(n,42))},VW(D9n,"SplineEdgeRouter/lambda$2$Type",1483),sDn(1484,1,QZn,HI),uZn.Cd=function(n){Mq(this.a,this.b,uG(n,42))},VW(D9n,"SplineEdgeRouter/lambda$3$Type",1484),sDn(131,1,{34:1,131:1},UAn,IVn),uZn.Fd=function(n){return NT(this,uG(n,131))},uZn.b=0,uZn.e=!1,uZn.f=0,uZn.g=0,uZn.j=!1,uZn.k=!1,uZn.n=0,uZn.o=!1,uZn.p=!1,uZn.q=!1,uZn.s=0,uZn.u=0,uZn.v=0,uZn.F=0,VW(D9n,"SplineSegment",131),sDn(468,1,{468:1},ya),uZn.a=0,uZn.b=!1,uZn.c=!1,uZn.d=!1,uZn.e=!1,uZn.f=0,VW(D9n,"SplineSegment/EdgeInformation",468),sDn(1198,1,{},Ma),VW(_9n,q3n,1198),sDn(1199,1,b2n,Ta),uZn.Ne=function(n,t){return yNn(uG(n,121),uG(t,121))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(_9n,X3n,1199),sDn(1197,1,{},Gj),VW(_9n,"MrTree",1197),sDn(405,22,{3:1,34:1,22:1,405:1,188:1,196:1},VI),uZn.dg=function(){return TNn(this)},uZn.qg=function(){return TNn(this)};var YSt,ZSt=_cn(_9n,"TreeLayoutPhases",405,Oat,i5,LH);sDn(1112,205,M3n,FF),uZn.rf=function(n,t){var e,i,r,c,a,o,u;for(oM(gK(VDn(n,(QGn(),gCt))))||J1(new Sd((vP(),new zy(n)))),(c=t.eh(B9n)).Ug("build tGraph",1),Vsn(o=new L7,n),kfn(o,(OQn(),RPt),n),jUn(n,o,u=new Ym),eGn(n,o,u),a=o,c.Vg(),(c=t.eh(B9n)).Ug("Split graph",1),r=AUn(this.a,a),c.Vg(),i=new Ww(r);i.a"+z3(this.c):"e_"+Hon(this)},VW(U9n,"TEdge",65),sDn(121,137,{3:1,121:1,96:1,137:1},L7),uZn.Ib=function(){var n,t,e,i,r;for(r=null,i=Fkn(this.b,0);i.b!=i.d.c;)r+=(null==(e=uG(I6(i),40)).c||0==e.c.length?"n_"+e.g:"n_"+e.c)+"\n";for(t=Fkn(this.a,0);t.b!=t.d.c;)r+=((n=uG(I6(t),65)).b&&n.c?z3(n.b)+"->"+z3(n.c):"e_"+Hon(n))+"\n";return r};var nPt=VW(U9n,"TGraph",121);sDn(643,508,{3:1,508:1,643:1,96:1,137:1}),VW(U9n,"TShape",643),sDn(40,643,{3:1,508:1,40:1,643:1,96:1,137:1},wln),uZn.Ib=function(){return z3(this)};var tPt,ePt,iPt,rPt,cPt,aPt,oPt,uPt,sPt,hPt,fPt,lPt=VW(U9n,"TNode",40);sDn(236,1,t1n,Mp),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return new Tp(Fkn(this.a.d,0))},VW(U9n,"TNode/2",236),sDn(329,1,$Zn,Tp),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return uG(I6(this.a),65).c},uZn.Ob=function(){return Jj(this.a)},uZn.Qb=function(){yrn(this.a)},VW(U9n,"TNode/2/1",329),sDn(1923,1,Q4n,Oa),uZn.Kf=function(n,t){SYn(this,uG(n,121),t)},VW(q9n,"CompactionProcessor",1923),sDn(1924,1,b2n,jp),uZn.Ne=function(n,t){return ksn(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$0$Type",1924),sDn(1925,1,y1n,GI),uZn.Mb=function(n){return xZ(this.b,this.a,uG(n,42))},uZn.a=0,uZn.b=0,VW(q9n,"CompactionProcessor/lambda$1$Type",1925),sDn(1934,1,b2n,Aa),uZn.Ne=function(n,t){return vW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$10$Type",1934),sDn(1935,1,b2n,La),uZn.Ne=function(n,t){return Kx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$11$Type",1935),sDn(1936,1,b2n,Na),uZn.Ne=function(n,t){return kW(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$12$Type",1936),sDn(1926,1,y1n,Ep),uZn.Mb=function(n){return hD(this.a,uG(n,42))},uZn.a=0,VW(q9n,"CompactionProcessor/lambda$2$Type",1926),sDn(1927,1,y1n,Sp),uZn.Mb=function(n){return fD(this.a,uG(n,42))},uZn.a=0,VW(q9n,"CompactionProcessor/lambda$3$Type",1927),sDn(1928,1,y1n,$a),uZn.Mb=function(n){return-1==uG(n,40).c.indexOf(H9n)},VW(q9n,"CompactionProcessor/lambda$4$Type",1928),sDn(1929,1,{},Pp),uZn.Kb=function(n){return a6(this.a,uG(n,40))},uZn.a=0,VW(q9n,"CompactionProcessor/lambda$5$Type",1929),sDn(1930,1,{},Cp),uZn.Kb=function(n){return ren(this.a,uG(n,40))},uZn.a=0,VW(q9n,"CompactionProcessor/lambda$6$Type",1930),sDn(1931,1,b2n,Ip),uZn.Ne=function(n,t){return G9(this.a,uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$7$Type",1931),sDn(1932,1,b2n,Op),uZn.Ne=function(n,t){return q9(this.a,uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$8$Type",1932),sDn(1933,1,b2n,Da),uZn.Ne=function(n,t){return Fx(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(q9n,"CompactionProcessor/lambda$9$Type",1933),sDn(1921,1,Q4n,xa),uZn.Kf=function(n,t){cBn(uG(n,121),t)},VW(q9n,"DirectionProcessor",1921),sDn(1913,1,Q4n,KF),uZn.Kf=function(n,t){JUn(this,uG(n,121),t)},VW(q9n,"FanProcessor",1913),sDn(1937,1,Q4n,Ra),uZn.Kf=function(n,t){N_n(uG(n,121),t)},VW(q9n,"GraphBoundsProcessor",1937),sDn(1938,1,{},Ka),uZn.Ye=function(n){return uG(n,40).e.a},VW(q9n,"GraphBoundsProcessor/lambda$0$Type",1938),sDn(1939,1,{},Fa),uZn.Ye=function(n){return uG(n,40).e.b},VW(q9n,"GraphBoundsProcessor/lambda$1$Type",1939),sDn(1940,1,{},_a),uZn.Ye=function(n){return lP(uG(n,40))},VW(q9n,"GraphBoundsProcessor/lambda$2$Type",1940),sDn(1941,1,{},Ba),uZn.Ye=function(n){return fP(uG(n,40))},VW(q9n,"GraphBoundsProcessor/lambda$3$Type",1941),sDn(262,22,{3:1,34:1,22:1,262:1,196:1},zI),uZn.dg=function(){switch(this.g){case 0:return new sy;case 1:return new KF;case 2:return new uy;case 3:return new Xa;case 4:return new Ua;case 8:return new Ha;case 5:return new xa;case 6:return new za;case 7:return new Oa;case 9:return new Ra;case 10:return new Wa;default:throw hv(new vM(v6n+(null!=this.f?this.f:""+this.g)))}};var bPt,wPt,dPt,gPt,pPt=_cn(q9n,k6n,262,Oat,usn,NH);sDn(1920,1,Q4n,Ha),uZn.Kf=function(n,t){xQn(uG(n,121),t)},VW(q9n,"LevelCoordinatesProcessor",1920),sDn(1918,1,Q4n,Ua),uZn.Kf=function(n,t){ZRn(this,uG(n,121),t)},uZn.a=0,VW(q9n,"LevelHeightProcessor",1918),sDn(1919,1,t1n,Ga),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},VW(q9n,"LevelHeightProcessor/1",1919),sDn(1914,1,Q4n,uy),uZn.Kf=function(n,t){g_n(this,uG(n,121),t)},VW(q9n,"LevelProcessor",1914),sDn(1915,1,y1n,qa),uZn.Mb=function(n){return oM(gK(oIn(uG(n,40),(OQn(),UPt))))},VW(q9n,"LevelProcessor/lambda$0$Type",1915),sDn(1916,1,Q4n,Xa),uZn.Kf=function(n,t){DAn(this,uG(n,121),t)},uZn.a=0,VW(q9n,"NeighborsProcessor",1916),sDn(1917,1,t1n,Va),uZn.Jc=function(n){V8(this,n)},uZn.Kc=function(){return hZ(),wS(),Qot},VW(q9n,"NeighborsProcessor/1",1917),sDn(1922,1,Q4n,za),uZn.Kf=function(n,t){QUn(this,uG(n,121),t)},uZn.a=0,VW(q9n,"NodePositionProcessor",1922),sDn(1912,1,Q4n,sy),uZn.Kf=function(n,t){EVn(this,uG(n,121),t)},VW(q9n,"RootProcessor",1912),sDn(1942,1,Q4n,Wa),uZn.Kf=function(n,t){Wyn(uG(n,121),t)},VW(q9n,"Untreeifyer",1942),sDn(392,22,{3:1,34:1,22:1,392:1},WI);var mPt,vPt,kPt,yPt,MPt,TPt,jPt,EPt,SPt,PPt,CPt,IPt,OPt,APt,LPt,NPt,$Pt,DPt,xPt,RPt,KPt,FPt,_Pt,BPt,HPt,UPt,GPt,qPt,XPt,VPt,zPt,WPt,QPt,JPt,YPt,ZPt,nCt,tCt,eCt,iCt,rCt,cCt,aCt,oCt,uCt,sCt,hCt,fCt,lCt,bCt,wCt,dCt,gCt,pCt,mCt,vCt,kCt,yCt,MCt,TCt,jCt,ECt,SCt,PCt,CCt,ICt,OCt,ACt,LCt,NCt,$Ct,DCt,xCt,RCt=_cn(W9n,"EdgeRoutingMode",392,Oat,t3,$H);sDn(862,1,K2n,vl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,J9n),""),r7n),"Turns on Tree compaction which decreases the size of the whole tree by placing nodes of multiple levels in one large level"),(qx(),!1)),(lAn(),wNt)),cot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Y9n),""),"Edge End Texture Length"),"Should be set to the length of the texture at the end of an edge. This value can be used to improve the Edge Routing."),7),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Z9n),""),"Tree Level"),"The index for the tree level the node is in"),xwn(0)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,n7n),""),r7n),"When set to a positive number this option will force the algorithm to place the node to the specified position within the trees layer if weighting is set to constraint"),xwn(-1)),mNt),dot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,t7n),""),"Weighting of Nodes"),"Which weighting to use when computing a node order."),tCt),gNt),BCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,e7n),""),"Edge Routing Mode"),"Chooses an Edge Routing algorithm."),WPt),gNt),RCt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,i7n),""),"Search Order"),"Which search order to use when computing a spanning tree."),YPt),gNt),QCt),ggn(hNt)))),yJn((new Ml,n))},VW(W9n,"MrTreeMetaDataProvider",862),sDn(1006,1,K2n,Ml),uZn.hf=function(n){yJn(n)},VW(W9n,"MrTreeOptions",1006),sDn(1007,1,{},Qa),uZn.sf=function(){return new FF},uZn.tf=function(n){},VW(W9n,"MrTreeOptions/MrtreeFactory",1007),sDn(353,22,{3:1,34:1,22:1,353:1},QI);var KCt,FCt,_Ct,BCt=_cn(W9n,"OrderWeighting",353,Oat,r5,DH);sDn(433,22,{3:1,34:1,22:1,433:1},JI);var HCt,UCt,GCt,qCt,XCt,VCt,zCt,WCt,QCt=_cn(W9n,"TreeifyingOrder",433,Oat,j1,xH);sDn(1486,1,y9n,Tl),uZn.rg=function(n){return uG(n,121),UCt},uZn.Kf=function(n,t){$un(this,uG(n,121),t)},VW("org.eclipse.elk.alg.mrtree.p1treeify","DFSTreeifyer",1486),sDn(1487,1,y9n,jl),uZn.rg=function(n){return uG(n,121),GCt},uZn.Kf=function(n,t){E_n(this,uG(n,121),t)},VW(u7n,"NodeOrderer",1487),sDn(1494,1,{},lo),uZn.td=function(n){return Nq(n)},VW(u7n,"NodeOrderer/0methodref$lambda$6$Type",1494),sDn(1488,1,y1n,bo),uZn.Mb=function(n){return ncn(),oM(gK(oIn(uG(n,40),(OQn(),UPt))))},VW(u7n,"NodeOrderer/lambda$0$Type",1488),sDn(1489,1,y1n,wo),uZn.Mb=function(n){return ncn(),uG(oIn(uG(n,40),(QGn(),kCt)),17).a<0},VW(u7n,"NodeOrderer/lambda$1$Type",1489),sDn(1490,1,y1n,Lp),uZn.Mb=function(n){return _an(this.a,uG(n,40))},VW(u7n,"NodeOrderer/lambda$2$Type",1490),sDn(1491,1,y1n,Ap),uZn.Mb=function(n){return f6(this.a,uG(n,40))},VW(u7n,"NodeOrderer/lambda$3$Type",1491),sDn(1492,1,b2n,go),uZn.Ne=function(n,t){return frn(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(u7n,"NodeOrderer/lambda$4$Type",1492),sDn(1493,1,y1n,po),uZn.Mb=function(n){return ncn(),0!=uG(oIn(uG(n,40),(OQn(),EPt)),17).a},VW(u7n,"NodeOrderer/lambda$5$Type",1493),sDn(1495,1,y9n,yl),uZn.rg=function(n){return uG(n,121),qCt},uZn.Kf=function(n,t){cUn(this,uG(n,121),t)},uZn.b=0,VW("org.eclipse.elk.alg.mrtree.p3place","NodePlacer",1495),sDn(1496,1,y9n,kl),uZn.rg=function(n){return uG(n,121),XCt},uZn.Kf=function(n,t){gHn(uG(n,121),t)},VW(s7n,"EdgeRouter",1496),sDn(1498,1,b2n,fo),uZn.Ne=function(n,t){return d$(uG(n,17).a,uG(t,17).a)},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/0methodref$compare$Type",1498),sDn(1503,1,{},Ya),uZn.Ye=function(n){return uM(pK(n))},VW(s7n,"EdgeRouter/1methodref$doubleValue$Type",1503),sDn(1505,1,b2n,Za),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/2methodref$compare$Type",1505),sDn(1507,1,b2n,no),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/3methodref$compare$Type",1507),sDn(1509,1,{},Ja),uZn.Ye=function(n){return uM(pK(n))},VW(s7n,"EdgeRouter/4methodref$doubleValue$Type",1509),sDn(1511,1,b2n,to),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/5methodref$compare$Type",1511),sDn(1513,1,b2n,eo),uZn.Ne=function(n,t){return ugn(uM(pK(n)),uM(pK(t)))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/6methodref$compare$Type",1513),sDn(1497,1,{},io),uZn.Kb=function(n){return tcn(),uG(oIn(uG(n,40),(QGn(),ACt)),17)},VW(s7n,"EdgeRouter/lambda$0$Type",1497),sDn(1508,1,{},ro),uZn.Kb=function(n){return CR(uG(n,40))},VW(s7n,"EdgeRouter/lambda$11$Type",1508),sDn(1510,1,{},dO),uZn.Kb=function(n){return vq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,VW(s7n,"EdgeRouter/lambda$13$Type",1510),sDn(1512,1,{},gO),uZn.Kb=function(n){return IR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,VW(s7n,"EdgeRouter/lambda$15$Type",1512),sDn(1514,1,b2n,co),uZn.Ne=function(n,t){return Gkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$17$Type",1514),sDn(1515,1,b2n,ao),uZn.Ne=function(n,t){return qkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$18$Type",1515),sDn(1516,1,b2n,oo),uZn.Ne=function(n,t){return Vkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$19$Type",1516),sDn(1499,1,y1n,Np),uZn.Mb=function(n){return n0(this.a,uG(n,40))},uZn.a=0,VW(s7n,"EdgeRouter/lambda$2$Type",1499),sDn(1517,1,b2n,uo),uZn.Ne=function(n,t){return Xkn(uG(n,65),uG(t,65))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$20$Type",1517),sDn(1500,1,b2n,so),uZn.Ne=function(n,t){return TG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$3$Type",1500),sDn(1501,1,b2n,ho),uZn.Ne=function(n,t){return jG(uG(n,40),uG(t,40))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"EdgeRouter/lambda$4$Type",1501),sDn(1502,1,{},mo),uZn.Kb=function(n){return OR(uG(n,40))},VW(s7n,"EdgeRouter/lambda$5$Type",1502),sDn(1504,1,{},pO),uZn.Kb=function(n){return kq(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,VW(s7n,"EdgeRouter/lambda$7$Type",1504),sDn(1506,1,{},mO),uZn.Kb=function(n){return AR(this.b,this.a,uG(n,40))},uZn.a=0,uZn.b=0,VW(s7n,"EdgeRouter/lambda$9$Type",1506),sDn(675,1,{675:1},wTn),uZn.e=0,uZn.f=!1,uZn.g=!1,VW(s7n,"MultiLevelEdgeNodeNodeGap",675),sDn(1943,1,b2n,vo),uZn.Ne=function(n,t){return l2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$0$Type",1943),sDn(1944,1,b2n,ko),uZn.Ne=function(n,t){return b2(uG(n,240),uG(t,240))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(s7n,"MultiLevelEdgeNodeNodeGap/lambda$1$Type",1944),sDn(501,22,{3:1,34:1,22:1,501:1,188:1,196:1},YI),uZn.dg=function(){return Fpn(this)},uZn.qg=function(){return Fpn(this)};var JCt,YCt,ZCt,nIt,tIt,eIt,iIt=_cn(h7n,"RadialLayoutPhases",501,Oat,p1,RH);sDn(1113,205,M3n,Uj),uZn.rf=function(n,t){var e,i,r,c;if(e=_Kn(this,n),t.Ug("Radial layout",e.c.length),oM(gK(VDn(n,(jOn(),RIt))))||J1(new Sd((vP(),new zy(n)))),c=XPn(n),Myn(n,(SK(),VCt),c),!c)throw hv(new vM("The given graph is not a tree!"));for(0==(i=uM(pK(VDn(n,HIt))))&&(i=tNn(n)),Myn(n,HIt,i),r=new Ww(_Kn(this,n));r.a=3)for(v=uG(Vrn(p,0),27),k=uG(Vrn(p,1),27),r=0;r+2=v.f+k.f+u||k.f>=m.f+v.f+u){y=!0;break}++r}else y=!0;if(!y){for(h=p.i,c=new DD(p);c.e!=c.i.gc();)Myn(uG(Zkn(c),27),(XYn(),vDt),xwn(h)),--h;return XGn(n,new fy),void t.Vg()}for(_J(this.a),Jz(this.a,(Jmn(),oOt),uG(VDn(n,mAt),188)),Jz(this.a,uOt,uG(VDn(n,sAt),188)),Jz(this.a,sOt,uG(VDn(n,dAt),188)),ZL(this.a,(Aq(T=new wJ,oOt,(Zyn(),wOt)),Aq(T,uOt,bOt),oM(gK(VDn(n,YOt)))&&Aq(T,oOt,lOt),T)),o=1/(i=QVn(this.a,n)).c.length,l=new Ww(i);l.a0&&Qbn((s3(t-1,n.length),n.charCodeAt(t-1)),c6n);)--t;if(e>=t)throw hv(new vM("The given string does not contain any numbers."));if(2!=(i=WGn((Knn(e,t,n.length),n.substr(e,t-e)),",|;|\r|\n")).length)throw hv(new vM("Exactly two numbers are expected, "+i.length+" were found."));try{this.a=YIn(KAn(i[0])),this.b=YIn(KAn(i[1]))}catch(r){throw F$(r=Ehn(r),130)?hv(new vM(a6n+r)):hv(r)}},uZn.Ib=function(){return"("+this.a+","+this.b+")"},uZn.a=0,uZn.b=0;var PNt=VW(o6n,"KVector",8);sDn(75,67,{3:1,4:1,20:1,31:1,56:1,16:1,67:1,15:1,75:1,423:1},Uk,tj,UR),uZn.Pc=function(){return ibn(this)},uZn.cg=function(n){var t,e,i,r,c;e=WGn(n,",|;|\\(|\\)|\\[|\\]|\\{|\\}| |\t|\n"),BY(this);try{for(t=0,r=0,i=0,c=0;t0&&(r%2==0?i=YIn(e[t]):c=YIn(e[t]),r>0&&r%2!=0&&aq(this,new MO(i,c)),++r),++t}catch(a){throw F$(a=Ehn(a),130)?hv(new vM("The given string does not match the expected format for vectors."+a)):hv(a)}},uZn.Ib=function(){var n,t,e;for(n=new lx("("),t=Fkn(this,0);t.b!=t.d.c;)JA(n,(e=uG(I6(t),8)).a+","+e.b),t.b!=t.d.c&&(n.a+="; ");return(n.a+=")",n).a};var CNt,INt,ONt,ANt,LNt,NNt,$Nt=VW(o6n,"KVectorChain",75);sDn(255,22,{3:1,34:1,22:1,255:1},TO);var DNt,xNt,RNt,KNt,FNt,_Nt,BNt,HNt,UNt,GNt,qNt,XNt,VNt,zNt,WNt,QNt,JNt,YNt,ZNt,n$t=_cn(Unt,"Alignment",255,Oat,Ynn,oU);sDn(991,1,K2n,$l),uZn.hf=function(n){YUn(n)},VW(Unt,"BoxLayouterOptions",991),sDn(992,1,{},Ru),uZn.sf=function(){return new _u},uZn.tf=function(n){},VW(Unt,"BoxLayouterOptions/BoxFactory",992),sDn(298,22,{3:1,34:1,22:1,298:1},SO);var t$t,e$t,i$t,r$t,c$t,a$t,o$t,u$t,s$t,h$t,f$t,l$t,b$t,w$t,d$t,g$t,p$t,m$t,v$t,k$t,y$t,M$t,T$t,j$t,E$t,S$t,P$t,C$t,I$t,O$t,A$t,L$t,N$t,$$t,D$t,x$t,R$t,K$t,F$t,_$t,B$t,H$t,U$t,G$t,q$t,X$t,V$t,z$t,W$t,Q$t,J$t,Y$t,Z$t,nDt,tDt,eDt,iDt,rDt,cDt,aDt,oDt,uDt,sDt,hDt,fDt,lDt,bDt,wDt,dDt,gDt,pDt,mDt,vDt,kDt,yDt,MDt,TDt,jDt,EDt,SDt,PDt,CDt,IDt,ODt,ADt,LDt,NDt,$Dt,DDt,xDt,RDt,KDt,FDt,_Dt,BDt,HDt,UDt,GDt,qDt,XDt,VDt,zDt,WDt,QDt,JDt,YDt,ZDt,nxt,txt=_cn(Unt,"ContentAlignment",298,Oat,Znn,uU);sDn(699,1,K2n,Dl),uZn.hf=function(n){Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,znt),""),"Layout Algorithm"),"Select a specific layout algorithm."),(lAn(),kNt)),$ot),ggn((Rkn(),hNt))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,Wnt),""),"Resolved Layout Algorithm"),"Meta data associated with the selected algorithm."),vNt),aNt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,X8n),""),"Alignment"),"Alignment of the selected node relative to other nodes; the exact meaning depends on the used algorithm."),r$t),gNt),n$t),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,R3n),""),"Aspect Ratio"),"The desired aspect ratio of the drawing, that is the quotient of width by height."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,Qnt),""),"Bend Points"),"A fixed list of bend points for the edge. This is used by the 'Fixed Layout' algorithm to specify a pre-defined routing for an edge. The vector chain must include the source point, any bend points, and the target point, so it must have at least two points."),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,r9n),""),"Content Alignment"),"Specifies how the content of a node are aligned. Each node can individually control the alignment of its contents. I.e. if a node should be aligned top left in its parent node, the parent node should specify that option."),b$t),pNt),txt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,q8n),""),"Debug Mode"),"Whether additional debug information shall be generated."),(qx(),!1)),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,W8n),""),l3n),"Overall direction of edges: horizontal (right / left) or vertical (down / up)."),g$t),gNt),axt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,m8n),""),"Edge Routing"),"What kind of edge routing style should be applied for the content of a parent node. Algorithms may also set this option to single edges in order to mark them as splines. The bend point list of edges with this option set to SPLINES must be interpreted as control points for a piecewise cubic spline."),y$t),gNt),kxt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Xnt),""),"Expand Nodes"),"If active, nodes are expanded to fill the area of their parent."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,b8n),""),"Hierarchy Handling"),"Determines whether separate layout runs are triggered for different compound nodes in a hierarchical graph. Setting a node's hierarchy handling to `INCLUDE_CHILDREN` will lay out that node and all of its descendants in a single layout run, until a descendant is encountered which has its hierarchy handling set to `SEPARATE_CHILDREN`. In general, `SEPARATE_CHILDREN` will ensure that a new layout run is triggered for a node with that setting. Including multiple levels of hierarchy in a single layout run may allow cross-hierarchical edges to be laid out properly. If the root node is set to `INHERIT` (or not set at all), the default behavior is `SEPARATE_CHILDREN`."),S$t),gNt),Kxt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,K3n),""),"Padding"),"The padding to be left to a parent element's border when placing child elements. This can also serve as an output option of a layout algorithm if node size calculation is setup appropriately."),Q$t),vNt),Sbt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,f4n),""),"Interactive"),"Whether the algorithm should be run in interactive mode for the content of a parent node. What this means exactly depends on how the specific algorithm interprets this option. Usually in the interactive mode algorithms try to modify the current layout as little as possible."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,g9n),""),"interactive Layout"),"Whether the graph should be changeable interactively and by setting constraints"),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,w4n),""),"Omit Node Micro Layout"),"Node micro layout comprises the computation of node dimensions (if requested), the placement of ports and their labels, and the placement of node labels. The functionality is implemented independent of any specific layout algorithm and shouldn't have any negative impact on the layout algorithm's performance itself. Yet, if any unforeseen behavior occurs, this option allows to deactivate the micro layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,l4n),""),"Port Constraints"),"Defines constraints of the position of the ports of a node."),hDt),gNt),mRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,b9n),""),"Position"),"The position of a node, port, or label. This is used by the 'Fixed Layout' algorithm to specify a pre-defined position."),vNt),PNt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,a4n),""),"Priority"),"Defines the priority of an object; its meaning depends on the specific layout algorithm and the context where it is used."),mNt),dot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,s4n),""),"Randomization Seed"),"Seed used for pseudo-random number generators to control the layout algorithm. If the value is 0, the seed shall be determined pseudo-randomly (e.g. from the system time)."),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,h4n),""),"Separate Connected Components"),"Whether each connected component should be processed separately."),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,c9n),""),"Junction Points"),"This option is not used as option, but as output of the layout algorithms. It is attached to edges and determines the points where junction symbols should be drawn in order to represent hyperedges with orthogonal routing. Whether such points are computed depends on the chosen layout algorithm and edge routing style. The points are put into the vector chain with no specific order."),N$t),vNt),$Nt),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,u9n),""),"Comment Box"),"Whether the node should be regarded as a comment box instead of a regular node. In that case its placement should be similar to how labels are handled. Any edges incident to a comment box specify to which graph elements the comment is related."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,s9n),""),"Hypernode"),"Whether the node should be handled as a hypernode."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,Jnt),""),"Label Manager"),"Label managers can shorten labels upon a layout algorithm's request."),vNt),cUt),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,w9n),""),"Margins"),"Margins define additional space around the actual bounds of a graph element. For instance, ports or labels being placed on the outside of a node's border might introduce such a margin. The margin is used to guarantee non-overlap of other graph elements with those ports or labels."),D$t),vNt),hbt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,U8n),""),"No Layout"),"No layout is done for the associated element. This is used to mark parts of a diagram to avoid their inclusion in the layout graph, or to mark parts of the layout graph to prevent layout engines from processing them. If you wish to exclude the contents of a compound node from automatic layout, while the node itself is still considered on its own layer, use the 'Fixed Layout' algorithm for that node."),!1),wNt),cot),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Ynt),""),"Scale Factor"),"The scaling factor to be applied to the corresponding node in recursive layout. It causes the corresponding node's size to be adjusted, and its ports and labels to be sized and placed accordingly after the layout of that node has been determined (and before the node itself and its siblings are arranged). The scaling is not reverted afterwards, so the resulting layout graph contains the adjusted size and position data. This option is currently not supported if 'Layout Hierarchy' is set."),1),dNt),fot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,Znt),""),"Child Area Width"),"The width of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,ntt),""),"Child Area Height"),"The height of the area occupied by the laid out children of a node."),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,k4n),""),Lnt),"Turns topdown layout on and off. If this option is enabled, hierarchical layout will be computed first for the root node and then for its children recursively. Layouts are then scaled down to fit the area provided by their parents. Graphs must follow a certain structure for topdown layout to work properly. {@link TopdownNodeTypes.PARALLEL_NODE} nodes must have children of type {@link TopdownNodeTypes.HIERARCHICAL_NODE} and must define {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} for their children. Furthermore they need to be laid out using an algorithm that is a {@link TopdownLayoutProvider}. Hierarchical nodes can also be parents of other hierarchical nodes and can optionally use a {@link TopdownSizeApproximator} to dynamically set sizes during topdown layout. In this case {@link topdown.hierarchicalNodeWidth} and {@link topdown.hierarchicalNodeAspectRatio} should be set on the node itself rather than the parent. The values are then used by the size approximator as base values. Hierarchical nodes require the layout option {@link nodeSize.fixedGraphSize} to be true to prevent the algorithm used there from resizing the hierarchical node. This option is not supported if 'Hierarchy Handling' is set to 'INCLUDE_CHILDREN'"),!1),wNt),cot),ggn(hNt)))),H4(n,k4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,ttt),""),"Animate"),"Whether the shift from the old layout to the new computed layout shall be animated."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,ett),""),"Animation Time Factor"),"Factor for computation of animation time. The higher the value, the longer the animation time. If the value is 0, the resulting time is always equal to the minimum defined by 'Minimal Animation Time'."),xwn(100)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,itt),""),"Layout Ancestors"),"Whether the hierarchy levels on the path from the selected element to the root of the diagram shall be included in the layout process."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,rtt),""),"Maximal Animation Time"),"The maximal time for animations, in milliseconds."),xwn(4e3)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,ctt),""),"Minimal Animation Time"),"The minimal time for animations, in milliseconds."),xwn(400)),mNt),dot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,att),""),"Progress Bar"),"Whether a progress bar shall be displayed during layout computations."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,ott),""),"Validate Graph"),"Whether the graph shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,utt),""),"Validate Options"),"Whether layout options shall be validated before any layout algorithm is applied. If this option is enabled and at least one error is found, the layout process is aborted and a message is shown to the user."),!0),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,stt),""),"Zoom to Fit"),"Whether the zoom level shall be set to view the whole diagram after layout."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Vnt),"box"),"Box Layout Mode"),"Configures the packing mode used by the {@link BoxLayoutProvider}. If SIMPLE is not required (neither priorities are used nor the interactive mode), GROUP_DEC can improve the packing and decrease the area. GROUP_MIXED and GROUP_INC may, in very specific scenarios, work better."),u$t),gNt),SKt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,A8n),v8n),"Comment Comment Spacing"),"Spacing to be preserved between a comment box and other comment boxes connected to the same node. The space left between comment boxes of different nodes is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,L8n),v8n),"Comment Node Spacing"),"Spacing to be preserved between a node and its connected comment boxes. The space left between a node and the comments of another node is controlled by the node-node spacing."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,D3n),v8n),"Components Spacing"),"Spacing to be preserved between pairs of connected components. This option is only relevant if 'separateConnectedComponents' is activated."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,N8n),v8n),"Edge Spacing"),"Spacing to be preserved between any two edges. Note that while this can somewhat easily be satisfied for the segments of orthogonally drawn edges, it is harder for general polylines or splines."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,u4n),v8n),"Edge Label Spacing"),"The minimal distance to be preserved between a label and the edge it is associated with. Note that the placement of a label is influenced by the 'edgelabels.placement' option."),2),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,$8n),v8n),"Edge Node Spacing"),"Spacing to be preserved between nodes and edges."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,D8n),v8n),"Label Spacing"),"Determines the amount of space to be left between two labels of the same graph element."),0),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,K8n),v8n),"Label Node Spacing"),"Spacing to be preserved between labels and the border of node they are associated with. Note that the placement of a label is influenced by the 'nodelabels.placement' option."),5),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,x8n),v8n),"Horizontal spacing between Label and Port"),"Horizontal spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,R8n),v8n),"Vertical spacing between Label and Port"),"Vertical spacing to be preserved between labels and the ports they are associated with. Note that the placement of a label is influenced by the 'portlabels.placement' option."),1),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,o4n),v8n),"Node Spacing"),"The minimal distance to be preserved between each two nodes."),20),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,F8n),v8n),"Node Self Loop Spacing"),"Spacing to be preserved between a node and its self loops."),10),dNt),fot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,_8n),v8n),"Port Spacing"),"Spacing between pairs of ports of the same node."),10),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,B8n),v8n),"Individual Spacing"),"Allows to specify individual spacing values for graph elements that shall be different from the value specified for the element's parent."),vNt),AKt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[oNt,fNt,uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,d9n),v8n),"Additional Port Space"),"Additional space around the sets of ports on each node side. For each side of a node, this option can reserve additional space before and after the ports on each side. For example, a top spacing of 20 makes sure that the first port on the western and eastern side is 20 units away from the northern border."),KDt),vNt),hbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,l9n),dtt),"Layout Partition"),"Partition to which the node belongs. This requires Layout Partitioning to be active. Nodes with lower partition IDs will appear to the left of nodes with higher partition IDs (assuming a left-to-right layout direction)."),mNt),dot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,l9n,f9n,nDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,f9n),dtt),"Layout Partitioning"),"Whether to activate partitioned layout. This will allow to group nodes through the Layout Partition option. a pair of nodes with different partition indices is then placed such that the node with lower index is placed to the left of the other node (with left-to-right layout direction). Depending on the layout algorithm, this may only be guaranteed to work if all nodes have a layout partition configured, or at least if edges that cross partitions are not part of a partition-crossing cycle."),Y$t),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Q8n),gtt),"Node Label Padding"),"Define padding for node labels that are placed inside of a node."),R$t),vNt),Sbt),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,m4n),gtt),"Node Label Placement"),"Hints for where node labels are to be placed; if empty, the node label's position is not modified."),F$t),pNt),eRt),WX(sNt,Uhn(cT(MNt,1),p1n,170,0,[uNt]))))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Z8n),ptt),"Port Alignment"),"Defines the default port distribution for a node. May be overridden for each side individually."),eDt),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,n9n),ptt),"Port Alignment (North)"),"Defines how ports on the northern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,t9n),ptt),"Port Alignment (South)"),"Defines how ports on the southern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,e9n),ptt),"Port Alignment (West)"),"Defines how ports on the western side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,i9n),ptt),"Port Alignment (East)"),"Defines how ports on the eastern side are placed, overriding the node's general port alignment."),gNt),hRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,p4n),mtt),"Node Size Constraints"),"What should be taken into account when calculating a node's size. Empty size constraints specify that a node's size is already fixed and should not be changed."),B$t),pNt),sKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,g4n),mtt),"Node Size Options"),"Options modifying the behavior of the size constraints set on a node. Each member of the set specifies something that should be taken into account when calculating node sizes. The empty set corresponds to no further modifications."),X$t),pNt),wKt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,x4n),mtt),"Node Size Minimum"),"The minimal size to which a node can be reduced."),G$t),vNt),PNt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,d4n),mtt),"Fixed Graph Size"),"By default, the fixed layout provider will enlarge a graph until it is large enough to contain its children. If this option is set, it won't do so."),!1),wNt),cot),ggn(hNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,a9n),I8n),"Edge Label Placement"),"Gives a hint on where to put edge labels."),v$t),gNt),lxt),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,b4n),I8n),"Inline Edge Labels"),"If true, an edge label is placed directly on its edge. May only apply to center edge labels. This kind of label placement is only advisable if the label's rendering is such that it is not crossed by its edge and thus stays legible."),!1),wNt),cot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,htt),"font"),"Font Name"),"Font name used for a label."),kNt),$ot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,ftt),"font"),"Font Size"),"Font size used for a label."),mNt),dot),ggn(uNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,h9n),vtt),"Port Anchor Offset"),"The offset to the port position where connections shall be attached."),vNt),PNt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,o9n),vtt),"Port Index"),"The index of a port in the fixed order around a node. The order is assumed as clockwise, starting with the leftmost port on the top side. This option must be set if 'Port Constraints' is set to FIXED_ORDER and no specific positions are given for the ports. Additionally, the option 'Port Side' must be defined in this case."),mNt),dot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,G8n),vtt),"Port Side"),"The side of a node on which a port is situated. This option must be set if 'Port Constraints' is set to FIXED_SIDE or FIXED_ORDER and no specific positions are given for the ports."),pDt),gNt),YRt),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(GT(WT(XT(VT(new xu,H8n),vtt),"Port Border Offset"),"The offset of ports on the node border. With a positive offset the port is moved outside of the node, while with a negative offset the port is moved towards the inside. An offset of 0 means that the port is placed directly on the node border, i.e. if the port side is north, the port's south border touches the nodes's north border; if the port side is east, the port's west border touches the nodes's east border; if the port side is south, the port's north border touches the node's south border; if the port side is west, the port's east border touches the node's west border."),dNt),fot),ggn(fNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,v4n),ktt),"Port Label Placement"),"Decides on a placement method for port labels; if empty, the node label's position is not modified."),wDt),pNt),BRt),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,J8n),ktt),"Port Labels Next to Port"),"Use 'portLabels.placement': NEXT_TO_PORT_OF_POSSIBLE."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,Y8n),ktt),"Treat Port Labels as Group"),"If this option is true (default), the labels of a port will be treated as a group when it comes to centering them next to their port. If this option is false, only the first label will be centered next to the port, with the others being placed below. This only applies to labels of eastern and western ports and will have no effect if labels are not placed next to their port."),!0),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,y4n),ytt),"Topdown Scale Factor"),"The scaling factor to be applied to the nodes laid out within the node in recursive topdown layout. The difference to 'Scale Factor' is that the node itself is not scaled. This value has to be set on hierarchical nodes."),1),dNt),fot),ggn(hNt)))),H4(n,y4n,j4n,VDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,ltt),ytt),"Topdown Size Approximator"),"The size approximator to be used to set sizes of hierarchical nodes during topdown layout. The default value is null, which results in nodes keeping whatever size is defined for them e.g. through parent parallel node or by manually setting the size."),null),gNt),jKt),ggn(sNt)))),H4(n,ltt,j4n,WDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,M4n),ytt),"Topdown Hierarchical Node Width"),"The fixed size of a hierarchical node when using topdown layout. If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),150),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,M4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,T4n),ytt),"Topdown Hierarchical Node Aspect Ratio"),"The fixed aspect ratio of a hierarchical node when using topdown layout. Default is 1/sqrt(2). If this value is set on a parallel node it applies to its children, when set on a hierarchical node it applies to the node itself."),1.414),dNt),fot),WX(hNt,Uhn(cT(MNt,1),p1n,170,0,[sNt]))))),H4(n,T4n,j4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,j4n),ytt),"Topdown Node Type"),"The different node types used for topdown layout. If the node type is set to {@link TopdownNodeTypes.PARALLEL_NODE} the algorithm must be set to a {@link TopdownLayoutProvider} such as {@link TopdownPacking}. The {@link nodeSize.fixedGraphSize} option is technically only required for hierarchical nodes."),null),gNt),mKt),ggn(sNt)))),H4(n,j4n,d4n,null),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,btt),ytt),"Topdown Scale Cap"),"Determines the upper limit for the topdown scale factor. The default value is 1.0 which ensures that nested children never end up appearing larger than their parents in terms of unit sizes such as the font size. If the limit is larger, nodes will fully utilize the available space, but it is counteriniuitive for inner nodes to have a larger scale than outer nodes."),1),dNt),fot),ggn(hNt)))),H4(n,btt,j4n,qDt),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,V8n),Mtt),"Activate Inside Self Loops"),"Whether this node allows to route self loops inside of it instead of around it. If set to true, this will make the node a compound node if it isn't already, and will require the layout algorithm to support compound nodes with hierarchical ports."),!1),wNt),cot),ggn(sNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,z8n),Mtt),"Inside Self Loop"),"Whether a self loop should be routed inside a node instead of around that node."),!1),wNt),cot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,x3n),"edge"),"Edge Thickness"),"The thickness of an edge. This is a hint on the line width used to draw an edge, possibly requiring more space to be reserved for it."),1),dNt),fot),ggn(oNt)))),Zgn(n,new tAn(JT(QT(YT(qT(GT(WT(XT(VT(new xu,wtt),"edge"),"Edge Type"),"The type of an edge. This is usually used for UML class diagrams, where associations must be handled differently from generalizations."),T$t),gNt),Lxt),ggn(oNt)))),sP(n,new I2(BT(UT(HT(new du,S0n),"Layered"),'The layer-based method was introduced by Sugiyama, Tagawa and Toda in 1981. It emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers, which are sometimes called "hierarchies", and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.'))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.orthogonal"),"Orthogonal"),'Orthogonal methods that follow the "topology-shape-metrics" approach by Batini, Nardelli and Tamassia \'86. The first phase determines the topology of the drawing by applying a planarization technique, which results in a planar representation of the graph. The orthogonal shape is computed in the second phase, which aims at minimizing the number of edge bends, and is called orthogonalization. The third phase leads to concrete coordinates for nodes and edge bend points by applying a compaction method, thus defining the metrics.'))),sP(n,new I2(BT(UT(HT(new du,c4n),"Force"),"Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces. The first successful method of this kind was proposed by Eades in 1984."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.circle"),"Circle"),"Circular layout algorithms emphasize cycles or biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent OPTIONS of the graph."))),sP(n,new I2(BT(UT(HT(new du,a7n),"Tree"),"Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type."))),sP(n,new I2(BT(UT(HT(new du,"org.eclipse.elk.planar"),"Planar"),"Algorithms that require a planar or upward planar graph. Most of these algorithms are theoretically interesting, but not practically usable."))),sP(n,new I2(BT(UT(HT(new du,x7n),"Radial"),"Radial layout algorithms usually position the nodes of the graph on concentric circles."))),kHn((new xl,n)),YUn((new $l,n)),A_n((new Rl,n))},VW(Unt,"CoreOptions",699),sDn(88,22,{3:1,34:1,22:1,88:1},PO);var ext,ixt,rxt,cxt,axt=_cn(Unt,l3n,88,Oat,H8,sU);sDn(278,22,{3:1,34:1,22:1,278:1},CO);var oxt,uxt,sxt,hxt,fxt,lxt=_cn(Unt,"EdgeLabelPlacement",278,Oat,y3,hU);sDn(223,22,{3:1,34:1,22:1,223:1},IO);var bxt,wxt,dxt,gxt,pxt,mxt,vxt,kxt=_cn(Unt,"EdgeRouting",223,Oat,u5,fU);sDn(321,22,{3:1,34:1,22:1,321:1},OO);var yxt,Mxt,Txt,jxt,Ext,Sxt,Pxt,Cxt,Ixt,Oxt,Axt,Lxt=_cn(Unt,"EdgeType",321,Oat,Jnn,lU);sDn(989,1,K2n,xl),uZn.hf=function(n){kHn(n)},VW(Unt,"FixedLayouterOptions",989),sDn(990,1,{},Ku),uZn.sf=function(){return new Wu},uZn.tf=function(n){},VW(Unt,"FixedLayouterOptions/FixedFactory",990),sDn(346,22,{3:1,34:1,22:1,346:1},AO);var Nxt,$xt,Dxt,xxt,Rxt,Kxt=_cn(Unt,"HierarchyHandling",346,Oat,v3,bU);sDn(291,22,{3:1,34:1,22:1,291:1},LO);var Fxt,_xt,Bxt,Hxt,Uxt,Gxt,qxt,Xxt,Vxt,zxt,Wxt=_cn(Unt,"LabelSide",291,Oat,o5,wU);sDn(95,22,{3:1,34:1,22:1,95:1},NO);var Qxt,Jxt,Yxt,Zxt,nRt,tRt,eRt=_cn(Unt,"NodeLabelPlacement",95,Oat,bcn,dU);sDn(256,22,{3:1,34:1,22:1,256:1},$O);var iRt,rRt,cRt,aRt,oRt,uRt,sRt,hRt=_cn(Unt,"PortAlignment",256,Oat,p9,gU);sDn(101,22,{3:1,34:1,22:1,101:1},DO);var fRt,lRt,bRt,wRt,dRt,gRt,pRt,mRt=_cn(Unt,"PortConstraints",101,Oat,Qnn,pU);sDn(279,22,{3:1,34:1,22:1,279:1},xO);var vRt,kRt,yRt,MRt,TRt,jRt,ERt,SRt,PRt,CRt,IRt,ORt,ARt,LRt,NRt,$Rt,DRt,xRt,RRt,KRt,FRt,_Rt,BRt=_cn(Unt,"PortLabelPlacement",279,Oat,Wnn,mU);sDn(64,22,{3:1,34:1,22:1,64:1},RO);var HRt,URt,GRt,qRt,XRt,VRt,zRt,WRt,QRt,JRt,YRt=_cn(Unt,"PortSide",64,Oat,U8,vU);sDn(993,1,K2n,Rl),uZn.hf=function(n){A_n(n)},VW(Unt,"RandomLayouterOptions",993),sDn(994,1,{},Fu),uZn.sf=function(){return new Xu},uZn.tf=function(n){},VW(Unt,"RandomLayouterOptions/RandomFactory",994),sDn(386,22,{3:1,34:1,22:1,386:1},KO);var ZRt,nKt,tKt,eKt,iKt,rKt,cKt,aKt,oKt,uKt,sKt=_cn(Unt,"SizeConstraint",386,Oat,a5,kU);sDn(264,22,{3:1,34:1,22:1,264:1},FO);var hKt,fKt,lKt,bKt,wKt=_cn(Unt,"SizeOptions",264,Oat,Man,yU);sDn(280,22,{3:1,34:1,22:1,280:1},_O);var dKt,gKt,pKt,mKt=_cn(Unt,"TopdownNodeTypes",280,Oat,M3,MU);sDn(347,22,Ett);var vKt,kKt,yKt,MKt,TKt,jKt=_cn(Unt,"TopdownSizeApproximator",347,Oat,I1,jU);sDn(987,347,Ett,Pq),uZn.Tg=function(n){return sMn(n)},_cn(Unt,"TopdownSizeApproximator/1",987,jKt,null,null),sDn(988,347,Ett,gz),uZn.Tg=function(n){var t,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p,m,v,k;for(t=uG(VDn(n,(XYn(),yDt)),143),gj(),aKn(p=new Bk,n),m=new Ym,a=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));a.e!=a.i.gc();)r=uG(Zkn(a),27),GRn(b=new Bk,p),aKn(b,r),k=sMn(r),vN(b,e.Math.max(r.g,k.a),e.Math.max(r.f,k.b)),zAn(m.f,r,b);for(c=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));c.e!=c.i.gc();)for(s=new DD((!(r=uG(Zkn(c),27)).e&&(r.e=new f_(aFt,r,7,4)),r.e));s.e!=s.i.gc();)u=uG(Zkn(s),74),d=uG(DA(FX(m.f,r)),27),g=uG(cQ(m,Vrn((!u.c&&(u.c=new f_(cFt,u,5,8)),u.c),0)),27),ttn((!(w=new es).b&&(w.b=new f_(cFt,w,4,7)),w.b),d),ttn((!w.c&&(w.c=new f_(cFt,w,5,8)),w.c),g),ARn(w,R0(d)),aKn(w,u);h=uG(A1(t.f),205);try{h.rf(p,new Zu),WQ(t.f,h)}catch(y){throw F$(y=Ehn(y),103),hv(y)}return vnn(p,h$t)||vnn(p,s$t)||zJn(p),o=uM(pK(VDn(p,h$t)))/uM(pK(VDn(p,s$t))),i=uM(pK(VDn(p,BDt)))*e.Math.sqrt((!p.a&&(p.a=new fz(bFt,p,10,11)),p.a).i),l=(v=uG(VDn(p,W$t),107)).b+v.c+1,f=v.d+v.a+1,new MO(e.Math.max(l,i),e.Math.max(f,i/o))},_cn(Unt,"TopdownSizeApproximator/2",988,jKt,null,null),sDn(344,1,{871:1},fy),uZn.Ug=function(n,t){return dCn(this,n,t)},uZn.Vg=function(){POn(this)},uZn.Wg=function(){return this.q},uZn.Xg=function(){return this.f?SZ(this.f):null},uZn.Yg=function(){return SZ(this.a)},uZn.Zg=function(){return this.p},uZn.$g=function(){return!1},uZn._g=function(){return this.n},uZn.ah=function(){return null!=this.p&&!this.b},uZn.bh=function(n){var t;this.n&&(t=n,kD(this.f,t))},uZn.dh=function(n,t){var e,i;this.n&&n&&n4(this,(i=oUn(e=new DW,n),_Wn(e),i),(Eln(),CKt))},uZn.eh=function(n){var t;return this.b?null:(t=irn(this,this.g),aq(this.a,t),t.i=this,this.d=n,t)},uZn.fh=function(n){n>0&&!this.b&&Ban(this,n)},uZn.b=!1,uZn.c=0,uZn.d=-1,uZn.e=null,uZn.f=null,uZn.g=-1,uZn.j=!1,uZn.k=!1,uZn.n=!1,uZn.o=0,uZn.q=0,uZn.r=0,VW(p9n,"BasicProgressMonitor",344),sDn(717,205,M3n,_u),uZn.rf=function(n,t){XGn(n,t)},VW(p9n,"BoxLayoutProvider",717),sDn(983,1,b2n,qp),uZn.Ne=function(n,t){return tKn(this,uG(n,27),uG(t,27))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},uZn.a=!1,VW(p9n,"BoxLayoutProvider/1",983),sDn(163,1,{163:1},Jrn,nK),uZn.Ib=function(){return this.c?VBn(this.c):vIn(this.b)},VW(p9n,"BoxLayoutProvider/Group",163),sDn(320,22,{3:1,34:1,22:1,320:1},HO);var EKt,SKt=_cn(p9n,"BoxLayoutProvider/PackingMode",320,Oat,s5,EU);sDn(984,1,b2n,Bu),uZn.Ne=function(n,t){return rZ(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(p9n,"BoxLayoutProvider/lambda$0$Type",984),sDn(985,1,b2n,Hu),uZn.Ne=function(n,t){return GY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(p9n,"BoxLayoutProvider/lambda$1$Type",985),sDn(986,1,b2n,Uu),uZn.Ne=function(n,t){return qY(uG(n,163),uG(t,163))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(p9n,"BoxLayoutProvider/lambda$2$Type",986),sDn(1384,1,{845:1},Gu),uZn.Mg=function(n,t){return ZS(),!F$(t,167)||Zj((Whn(),uG(n,167)),t)},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$0$Type",1384),sDn(1385,1,QZn,Xp),uZn.Cd=function(n){hbn(this.a,uG(n,149))},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$1$Type",1385),sDn(1386,1,QZn,Vu),uZn.Cd=function(n){uG(n,96),ZS()},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$2$Type",1386),sDn(1390,1,QZn,Vp),uZn.Cd=function(n){_on(this.a,uG(n,96))},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$3$Type",1390),sDn(1388,1,y1n,UO),uZn.Mb=function(n){return oln(this.a,this.b,uG(n,149))},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$4$Type",1388),sDn(1387,1,y1n,GO),uZn.Mb=function(n){return PR(this.a,this.b,uG(n,845))},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$5$Type",1387),sDn(1389,1,QZn,qO),uZn.Cd=function(n){iz(this.a,this.b,uG(n,149))},VW(p9n,"ElkSpacings/AbstractSpacingsBuilder/lambda$6$Type",1389),sDn(947,1,{},zu),uZn.Kb=function(n){return oN(n)},uZn.Fb=function(n){return this===n},VW(p9n,"ElkUtil/lambda$0$Type",947),sDn(948,1,QZn,XO),uZn.Cd=function(n){JNn(this.a,this.b,uG(n,74))},uZn.a=0,uZn.b=0,VW(p9n,"ElkUtil/lambda$1$Type",948),sDn(949,1,QZn,VO),uZn.Cd=function(n){tM(this.a,this.b,uG(n,166))},uZn.a=0,uZn.b=0,VW(p9n,"ElkUtil/lambda$2$Type",949),sDn(950,1,QZn,zO),uZn.Cd=function(n){UN(this.a,this.b,uG(n,135))},uZn.a=0,uZn.b=0,VW(p9n,"ElkUtil/lambda$3$Type",950),sDn(951,1,QZn,zp),uZn.Cd=function(n){Lq(this.a,uG(n,377))},VW(p9n,"ElkUtil/lambda$4$Type",951),sDn(325,1,{34:1,325:1},Jm),uZn.Fd=function(n){return wD(this,uG(n,242))},uZn.Fb=function(n){var t;return!!F$(n,325)&&(t=uG(n,325),this.a==t.a)},uZn.Hb=function(){return t0(this.a)},uZn.Ib=function(){return this.a+" (exclusive)"},uZn.a=0,VW(p9n,"ExclusiveBounds/ExclusiveLowerBound",325),sDn(1119,205,M3n,Wu),uZn.rf=function(n,t){var i,r,c,a,o,u,s,f,l,b,w,d,g,p,m,v,k,y,M,T,j;for(t.Ug("Fixed Layout",1),a=uG(VDn(n,(XYn(),k$t)),223),b=0,w=0,m=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));m.e!=m.i.gc();){for(g=uG(Zkn(m),27),(j=uG(VDn(g,(Iln(),Cxt)),8))&&(kN(g,j.a,j.b),uG(VDn(g,Txt),181).Hc((Qmn(),zRt))&&(d=uG(VDn(g,Ext),8)).a>0&&d.b>0&&ZQn(g,d.a,d.b,!0,!0)),b=e.Math.max(b,g.i+g.g),w=e.Math.max(w,g.j+g.f),f=new DD((!g.n&&(g.n=new fz(lFt,g,1,7)),g.n));f.e!=f.i.gc();)u=uG(Zkn(f),135),(j=uG(VDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,g.i+u.i+u.g),w=e.Math.max(w,g.j+u.j+u.f);for(y=new DD((!g.c&&(g.c=new fz(wFt,g,9,9)),g.c));y.e!=y.i.gc();)for(k=uG(Zkn(y),123),(j=uG(VDn(k,Cxt),8))&&kN(k,j.a,j.b),M=g.i+k.i,T=g.j+k.j,b=e.Math.max(b,M+k.g),w=e.Math.max(w,T+k.f),s=new DD((!k.n&&(k.n=new fz(lFt,k,1,7)),k.n));s.e!=s.i.gc();)u=uG(Zkn(s),135),(j=uG(VDn(u,Cxt),8))&&kN(u,j.a,j.b),b=e.Math.max(b,M+u.i+u.g),w=e.Math.max(w,T+u.j+u.f);for(c=new FV(ix(eRn(g).a.Kc(),new h));hDn(c);)l=iJn(i=uG(N9(c),74)),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b);for(r=new FV(ix(tRn(g).a.Kc(),new h));hDn(r);)R0(bIn(i=uG(N9(r),74)))!=n&&(l=iJn(i),b=e.Math.max(b,l.a),w=e.Math.max(w,l.b))}if(a==(_gn(),uxt))for(p=new DD((!n.a&&(n.a=new fz(bFt,n,10,11)),n.a));p.e!=p.i.gc();)for(r=new FV(ix(eRn(g=uG(Zkn(p),27)).a.Kc(),new h));hDn(r);)0==(o=bGn(i=uG(N9(r),74))).b?Myn(i,L$t,null):Myn(i,L$t,o);oM(gK(VDn(n,(Iln(),jxt))))||ZQn(n,b+(v=uG(VDn(n,Sxt),107)).b+v.c,w+v.d+v.a,!0,!0),t.Vg()},VW(p9n,"FixedLayoutProvider",1119),sDn(385,137,{3:1,423:1,385:1,96:1,137:1},Qu,qen),uZn.cg=function(n){var t,e,i,r,c,a,o;if(n)try{for(a=WGn(n,";,;"),r=0,c=(i=a).length;r>16&D1n|n^(e&D1n)<<16},uZn.Kc=function(){return new Wp(this)},uZn.Ib=function(){return null==this.a&&null==this.b?"pair(null,null)":null==this.a?"pair(null,"+cpn(this.b)+")":null==this.b?"pair("+cpn(this.a)+",null)":"pair("+cpn(this.a)+","+cpn(this.b)+")"},VW(p9n,"Pair",42),sDn(995,1,$Zn,Wp),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return!this.c&&(!this.b&&null!=this.a.a||null!=this.a.b)},uZn.Pb=function(){if(!this.c&&!this.b&&null!=this.a.a)return this.b=!0,this.a.a;if(!this.c&&null!=this.a.b)return this.c=!0,this.a.b;throw hv(new Bv)},uZn.Qb=function(){throw this.c&&null!=this.a.b?this.a.b=null:this.b&&null!=this.a.a&&(this.a.a=null),hv(new xv)},uZn.b=!1,uZn.c=!1,VW(p9n,"Pair/1",995),sDn(455,1,{455:1},vY),uZn.Fb=function(n){return OJ(this.a,uG(n,455).a)&&OJ(this.c,uG(n,455).c)&&OJ(this.d,uG(n,455).d)&&OJ(this.b,uG(n,455).b)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.c,this.d,this.b]))},uZn.Ib=function(){return"("+this.a+TZn+this.c+TZn+this.d+TZn+this.b+")"},VW(p9n,"Quadruple",455),sDn(1108,205,M3n,Xu),uZn.rf=function(n,t){var e;t.Ug("Random Layout",1),0!=(!n.a&&(n.a=new fz(bFt,n,10,11)),n.a).i?(vQn(n,(e=uG(VDn(n,(Wmn(),XRt)),17))&&0!=e.a?new v8(e.a):new Upn,sM(pK(VDn(n,URt))),sM(pK(VDn(n,VRt))),uG(VDn(n,GRt),107)),t.Vg()):t.Vg()},VW(p9n,"RandomLayoutProvider",1108),sDn(240,1,{240:1},LU),uZn.Fb=function(n){return OJ(this.a,uG(n,240).a)&&OJ(this.b,uG(n,240).b)&&OJ(this.c,uG(n,240).c)},uZn.Hb=function(){return Obn(Uhn(cT(dat,1),EZn,1,5,[this.a,this.b,this.c]))},uZn.Ib=function(){return"("+this.a+TZn+this.b+TZn+this.c+")"},VW(p9n,"Triple",240),sDn(562,1,{}),uZn.Lf=function(){return new MO(this.f.i,this.f.j)},uZn.of=function(n){return QZ(n,(XYn(),uDt))?VDn(this.f,$Kt):VDn(this.f,n)},uZn.Mf=function(){return new MO(this.f.g,this.f.f)},uZn.Nf=function(){return this.g},uZn.pf=function(n){return vnn(this.f,n)},uZn.Of=function(n){ycn(this.f,n.a),Mcn(this.f,n.b)},uZn.Pf=function(n){kcn(this.f,n.a),vcn(this.f,n.b)},uZn.Qf=function(n){this.g=n},uZn.g=0,VW(Ctt,"ElkGraphAdapters/AbstractElkGraphElementAdapter",562),sDn(563,1,{853:1},Qp),uZn.Rf=function(){var n,t;if(!this.b)for(this.b=o6(xJ(this.a).i),t=new DD(xJ(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),135),kD(this.b,new Wy(n));return this.b},uZn.b=null,VW(Ctt,"ElkGraphAdapters/ElkEdgeAdapter",563),sDn(289,562,{},zy),uZn.Sf=function(){return FTn(this)},uZn.a=null,VW(Ctt,"ElkGraphAdapters/ElkGraphAdapter",289),sDn(640,562,{187:1},Wy),VW(Ctt,"ElkGraphAdapters/ElkLabelAdapter",640),sDn(639,562,{695:1},Wx),uZn.Rf=function(){return RTn(this)},uZn.Vf=function(){var n;return!(n=uG(VDn(this.f,(XYn(),$$t)),140))&&(n=new Nk),n},uZn.Xf=function(){return KTn(this)},uZn.Zf=function(n){var t;t=new VU(n),Myn(this.f,(XYn(),$$t),t)},uZn.$f=function(n){Myn(this.f,(XYn(),W$t),new zU(n))},uZn.Tf=function(){return this.d},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=new Zm,t=new FV(ix(tRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=new Zm,t=new FV(ix(eRn(uG(this.f,27)).a.Kc(),new h));hDn(t);)n=uG(N9(t),74),kD(this.c,new Qp(n));return this.c},uZn.Yf=function(){return 0!=wZ(uG(this.f,27)).i||oM(gK(uG(this.f,27).of((XYn(),C$t))))},uZn._f=function(){Xen(this,(vP(),NKt))},uZn.a=null,uZn.b=null,uZn.c=null,uZn.d=null,uZn.e=null,VW(Ctt,"ElkGraphAdapters/ElkNodeAdapter",639),sDn(1284,562,{852:1},Jp),uZn.Rf=function(){return rjn(this)},uZn.Uf=function(){var n,t;if(!this.a)for(this.a=iR(uG(this.f,123).hh().i),t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.a,new Qp(n));return this.a},uZn.Wf=function(){var n,t;if(!this.c)for(this.c=iR(uG(this.f,123).ih().i),t=new DD(uG(this.f,123).ih());t.e!=t.i.gc();)n=uG(Zkn(t),74),kD(this.c,new Qp(n));return this.c},uZn.ag=function(){return uG(uG(this.f,123).of((XYn(),gDt)),64)},uZn.bg=function(){var n,t,e,i,r,c,a;for(i=h0(uG(this.f,123)),e=new DD(uG(this.f,123).ih());e.e!=e.i.gc();)for(a=new DD((!(n=uG(Zkn(e),74)).c&&(n.c=new f_(cFt,n,5,8)),n.c));a.e!=a.i.gc();){if(Ern(lCn(c=uG(Zkn(a),84)),i))return!0;if(lCn(c)==i&&oM(gK(VDn(n,(XYn(),I$t)))))return!0}for(t=new DD(uG(this.f,123).hh());t.e!=t.i.gc();)for(r=new DD((!(n=uG(Zkn(t),74)).b&&(n.b=new f_(cFt,n,4,7)),n.b));r.e!=r.i.gc();)if(Ern(lCn(uG(Zkn(r),84)),i))return!0;return!1},uZn.a=null,uZn.b=null,uZn.c=null,VW(Ctt,"ElkGraphAdapters/ElkPortAdapter",1284),sDn(1285,1,b2n,qu),uZn.Ne=function(n,t){return XBn(uG(n,123),uG(t,123))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(Ctt,"ElkGraphAdapters/PortComparator",1285);var xKt,RKt,KKt,FKt,_Kt,BKt,HKt,UKt,GKt,qKt,XKt,VKt,zKt,WKt,QKt,JKt,YKt,ZKt,nFt=Iq(Itt,"EObject"),tFt=Iq(Ott,Att),eFt=Iq(Ott,Ltt),iFt=Iq(Ott,Ntt),rFt=Iq(Ott,"ElkShape"),cFt=Iq(Ott,$tt),aFt=Iq(Ott,Dtt),oFt=Iq(Ott,xtt),uFt=Iq(Itt,Rtt),sFt=Iq(Itt,"EFactory"),hFt=Iq(Itt,Ktt),fFt=Iq(Itt,"EPackage"),lFt=Iq(Ott,Ftt),bFt=Iq(Ott,_tt),wFt=Iq(Ott,Btt);sDn(93,1,Htt),uZn.th=function(){return this.uh(),null},uZn.uh=function(){return null},uZn.vh=function(){return this.uh(),!1},uZn.wh=function(){return!1},uZn.xh=function(n){Msn(this,n)},VW(Utt,"BasicNotifierImpl",93),sDn(99,93,Jtt),uZn.Yh=function(){return uN(this)},uZn.yh=function(n,t){return n},uZn.zh=function(){throw hv(new Kv)},uZn.Ah=function(n){var t;return t=lMn(uG(ern(this.Dh(),this.Fh()),19)),this.Ph().Th(this,t.n,t.f,n)},uZn.Bh=function(n,t){throw hv(new Kv)},uZn.Ch=function(n,t,e){return $Un(this,n,t,e)},uZn.Dh=function(){var n;return this.zh()&&(n=this.zh().Nk())?n:this.ii()},uZn.Eh=function(){return J$n(this)},uZn.Fh=function(){throw hv(new Kv)},uZn.Gh=function(){var n,t;return!(t=this.$h().Ok())&&this.zh().Tk((jP(),t=null==(n=$1(eqn(this.Dh())))?tBt:new Vx(this,n))),t},uZn.Hh=function(n,t){return n},uZn.Ih=function(n){return n.pk()?n.Lj():emn(this.Dh(),n)},uZn.Jh=function(){var n;return(n=this.zh())?n.Qk():null},uZn.Kh=function(){return this.zh()?this.zh().Nk():null},uZn.Lh=function(n,t,e){return Dyn(this,n,t,e)},uZn.Mh=function(n){return vtn(this,n)},uZn.Nh=function(n,t){return U9(this,n,t)},uZn.Oh=function(){var n;return!!(n=this.zh())&&n.Rk()},uZn.Ph=function(){throw hv(new Kv)},uZn.Qh=function(){return Kvn(this)},uZn.Rh=function(n,t,e,i){return kyn(this,n,t,i)},uZn.Sh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().zk(this,this.hi(),t-this.ji(),n,e)},uZn.Th=function(n,t,e,i){return O1(this,n,t,i)},uZn.Uh=function(n,t,e){return uG(ern(this.Dh(),t),69).wk().Ak(this,this.hi(),t-this.ji(),n,e)},uZn.Vh=function(){return!!this.zh()&&!!this.zh().Pk()},uZn.Wh=function(n){return Wkn(this,n)},uZn.Xh=function(n){return M0(this,n)},uZn.Zh=function(n){return jWn(this,n)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return this.zh()?this.zh().Pk():null},uZn.ai=function(){return Kvn(this)},uZn.bi=function(n,t){sLn(this,n,t)},uZn.ci=function(n){this.$h().Sk(n)},uZn.di=function(n){this.$h().Vk(n)},uZn.ei=function(n){this.$h().Uk(n)},uZn.fi=function(n,t){var e,i,r,c;return(c=this.Jh())&&n&&(t=Nyn(c.El(),this,t),c.Il(this)),(i=this.Ph())&&(0!=(PHn(this,this.Ph(),this.Fh()).Bb&P0n)?(r=i.Qh())&&(n?!c&&r.Il(this):r.Hl(this)):(t=(e=this.Fh())>=0?this.Ah(t):this.Ph().Th(this,-1-e,null,t),t=this.Ch(null,-1,t))),this.di(n),t},uZn.gi=function(n){var t,e,i,r,c,a,o;if((c=emn(e=this.Dh(),n))>=(t=this.ji()))return uG(n,69).wk().Dk(this,this.hi(),c-t);if(c<=-1){if(!(a=izn((gAn(),kBt),e,n)))throw hv(new vM(Gtt+n.xe()+Vtt));if(PP(),uG(a,69).xk()||(a=_3(Nen(kBt,a))),r=uG((i=this.Ih(a))>=0?this.Lh(i,!0,!0):YNn(this,a,!0),160),(o=a.Ik())>1||-1==o)return uG(uG(r,220).Sl(n,!1),79)}else if(n.Jk())return uG((i=this.Ih(n))>=0?this.Lh(i,!1,!0):YNn(this,n,!1),79);return new jA(this,n)},uZn.hi=function(){return Wen(this)},uZn.ii=function(){return(tQ(),M_t).S},uZn.ji=function(){return iQ(this.ii())},uZn.ki=function(n){oAn(this,n)},uZn.Ib=function(){return vxn(this)},VW(Ytt,"BasicEObjectImpl",99),sDn(119,99,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1}),uZn.li=function(n){return zen(this)[n]},uZn.mi=function(n,t){uQ(zen(this),n,t)},uZn.ni=function(n){uQ(zen(this),n,null)},uZn.th=function(){return uG(Lsn(this,4),129)},uZn.uh=function(){throw hv(new Kv)},uZn.vh=function(){return!!(4&this.Db)},uZn.zh=function(){throw hv(new Kv)},uZn.oi=function(n){Dvn(this,2,n)},uZn.Bh=function(n,t){this.Db=t<<16|255&this.Db,this.oi(n)},uZn.Dh=function(){return e1(this)},uZn.Fh=function(){return this.Db>>16},uZn.Gh=function(){var n;return jP(),null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?tBt:new Vx(this,n)},uZn.wh=function(){return!(1&this.Db)},uZn.Jh=function(){return uG(Lsn(this,128),2034)},uZn.Kh=function(){return uG(Lsn(this,16),29)},uZn.Oh=function(){return!!(32&this.Db)},uZn.Ph=function(){return uG(Lsn(this,2),54)},uZn.Vh=function(){return!!(64&this.Db)},uZn.$h=function(){throw hv(new Kv)},uZn._h=function(){return uG(Lsn(this,64),288)},uZn.ci=function(n){Dvn(this,16,n)},uZn.di=function(n){Dvn(this,128,n)},uZn.ei=function(n){Dvn(this,64,n)},uZn.hi=function(){return $vn(this)},uZn.Db=0,VW(Ytt,"MinimalEObjectImpl",119),sDn(120,119,{110:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.oi=function(n){this.Cb=n},uZn.Ph=function(){return this.Cb},VW(Ytt,"MinimalEObjectImpl/Container",120),sDn(2083,120,{110:1,342:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return ajn(this,n,t,e)},uZn.Uh=function(n,t,e){return BIn(this,n,t,e)},uZn.Wh=function(n){return j4(this,n)},uZn.bi=function(n,t){bln(this,n,t)},uZn.ii=function(){return tYn(),zKt},uZn.ki=function(n){ffn(this,n)},uZn.nf=function(){return Qkn(this)},uZn.gh=function(){return!this.o&&(this.o=new ltn((tYn(),XKt),EFt,this,0)),this.o},uZn.of=function(n){return VDn(this,n)},uZn.pf=function(n){return vnn(this,n)},uZn.qf=function(n,t){return Myn(this,n,t)},VW(Ztt,"EMapPropertyHolderImpl",2083),sDn(572,120,{110:1,377:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},ns),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return 0!=this.a;case 1:return 0!=this.b}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Scn(this,uM(pK(t)));case 1:return void pcn(this,uM(pK(t)))}sLn(this,n,t)},uZn.ii=function(){return tYn(),KKt},uZn.ki=function(n){switch(n){case 0:return void Scn(this,0);case 1:return void pcn(this,0)}oAn(this,n)},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (x: ",Oj(n,this.a),n.a+=", y: ",Oj(n,this.b),n.a+=")",n.a)},uZn.a=0,uZn.b=0,VW(Ztt,"ElkBendPointImpl",572),sDn(739,2083,{110:1,342:1,167:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return phn(this,n,t,e)},uZn.Wh=function(n){return _sn(this,n)},uZn.bi=function(n,t){CSn(this,n,t)},uZn.ii=function(){return tYn(),HKt},uZn.ki=function(n){Awn(this,n)},uZn.jh=function(){return this.k},uZn.kh=function(){return xJ(this)},uZn.Ib=function(){return Egn(this)},uZn.k=null,VW(Ztt,"ElkGraphElementImpl",739),sDn(740,739,{110:1,342:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return spn(this,n,t,e)},uZn.Wh=function(n){return Kpn(this,n)},uZn.bi=function(n,t){ISn(this,n,t)},uZn.ii=function(){return tYn(),VKt},uZn.ki=function(n){Tmn(this,n)},uZn.lh=function(){return this.f},uZn.mh=function(){return this.g},uZn.nh=function(){return this.i},uZn.oh=function(){return this.j},uZn.ph=function(n,t){vN(this,n,t)},uZn.qh=function(n,t){kN(this,n,t)},uZn.rh=function(n){ycn(this,n)},uZn.sh=function(n){Mcn(this,n)},uZn.Ib=function(){return rOn(this)},uZn.f=0,uZn.g=0,uZn.i=0,uZn.j=0,VW(Ztt,"ElkShapeImpl",740),sDn(741,740,{110:1,342:1,84:1,167:1,422:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1}),uZn.Lh=function(n,t,e){return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return eSn(this,n,t,e)},uZn.Wh=function(n){return iln(this,n)},uZn.bi=function(n,t){SDn(this,n,t)},uZn.ii=function(){return tYn(),FKt},uZn.ki=function(n){yyn(this,n)},uZn.hh=function(){return!this.d&&(this.d=new f_(aFt,this,8,5)),this.d},uZn.ih=function(){return!this.e&&(this.e=new f_(aFt,this,7,4)),this.e},VW(Ztt,"ElkConnectableShapeImpl",741),sDn(326,739,{110:1,342:1,74:1,167:1,326:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},es),uZn.Ah=function(n){return sEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 3:return s0(this);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),this.b;case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),this.c;case 6:return!this.a&&(this.a=new fz(oFt,this,6,6)),this.a;case 7:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return qx(),!!V$n(this);case 9:return qx(),!!BNn(this);case 10:return qx(),!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return Xdn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?sEn(this,e):this.Cb.Th(this,-1-i,null,e)),nF(this,uG(n,27),e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nmn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nmn(this.c,n,e);case 6:return!this.a&&(this.a=new fz(oFt,this,6,6)),Nmn(this.a,n,e)}return SCn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 3:return nF(this,null,e);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),Nyn(this.b,n,e);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),Nyn(this.c,n,e);case 6:return!this.a&&(this.a=new fz(oFt,this,6,6)),Nyn(this.a,n,e)}return phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 3:return!!s0(this);case 4:return!!this.b&&0!=this.b.i;case 5:return!!this.c&&0!=this.c.i;case 6:return!!this.a&&0!=this.a.i;case 7:return!this.b&&(this.b=new f_(cFt,this,4,7)),!(this.b.i<=1&&(!this.c&&(this.c=new f_(cFt,this,5,8)),this.c.i<=1));case 8:return V$n(this);case 9:return BNn(this);case 10:return!this.b&&(this.b=new f_(cFt,this,4,7)),0!=this.b.i&&(!this.c&&(this.c=new f_(cFt,this,5,8)),0!=this.c.i)}return _sn(this,n)},uZn.bi=function(n,t){switch(n){case 3:return void ARn(this,uG(t,27));case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),CVn(this.b),!this.b&&(this.b=new f_(cFt,this,4,7)),void CW(this.b,uG(t,16));case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),CVn(this.c),!this.c&&(this.c=new f_(cFt,this,5,8)),void CW(this.c,uG(t,16));case 6:return!this.a&&(this.a=new fz(oFt,this,6,6)),CVn(this.a),!this.a&&(this.a=new fz(oFt,this,6,6)),void CW(this.a,uG(t,16))}CSn(this,n,t)},uZn.ii=function(){return tYn(),_Kt},uZn.ki=function(n){switch(n){case 3:return void ARn(this,null);case 4:return!this.b&&(this.b=new f_(cFt,this,4,7)),void CVn(this.b);case 5:return!this.c&&(this.c=new f_(cFt,this,5,8)),void CVn(this.c);case 6:return!this.a&&(this.a=new fz(oFt,this,6,6)),void CVn(this.a)}Awn(this,n)},uZn.Ib=function(){return SXn(this)},VW(Ztt,"ElkEdgeImpl",326),sDn(452,2083,{110:1,342:1,166:1,452:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},is),uZn.Ah=function(n){return Vjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 1:return this.j;case 2:return this.k;case 3:return this.b;case 4:return this.c;case 5:return!this.a&&(this.a=new MD(eFt,this,5)),this.a;case 6:return f0(this);case 7:return t?fMn(this):this.i;case 8:return t?hMn(this):this.f;case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),this.g;case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),this.e;case 11:return this.d}return ajn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?Vjn(this,e):this.Cb.Th(this,-1-i,null,e)),ZK(this,uG(n,74),e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nmn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nmn(this.e,n,e)}return uG(ern(uG(Lsn(this,16),29)||(tYn(),BKt),t),69).wk().zk(this,$vn(this),t-iQ((tYn(),BKt)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 5:return!this.a&&(this.a=new MD(eFt,this,5)),Nyn(this.a,n,e);case 6:return ZK(this,null,e);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),Nyn(this.g,n,e);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),Nyn(this.e,n,e)}return BIn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 1:return 0!=this.j;case 2:return 0!=this.k;case 3:return 0!=this.b;case 4:return 0!=this.c;case 5:return!!this.a&&0!=this.a.i;case 6:return!!f0(this);case 7:return!!this.i;case 8:return!!this.f;case 9:return!!this.g&&0!=this.g.i;case 10:return!!this.e&&0!=this.e.i;case 11:return null!=this.d}return j4(this,n)},uZn.bi=function(n,t){switch(n){case 1:return void Tcn(this,uM(pK(t)));case 2:return void Ecn(this,uM(pK(t)));case 3:return void mcn(this,uM(pK(t)));case 4:return void jcn(this,uM(pK(t)));case 5:return!this.a&&(this.a=new MD(eFt,this,5)),CVn(this.a),!this.a&&(this.a=new MD(eFt,this,5)),void CW(this.a,uG(t,16));case 6:return void ORn(this,uG(t,74));case 7:return void Van(this,uG(t,84));case 8:return void Xan(this,uG(t,84));case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),CVn(this.g),!this.g&&(this.g=new f_(oFt,this,9,10)),void CW(this.g,uG(t,16));case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),CVn(this.e),!this.e&&(this.e=new f_(oFt,this,10,9)),void CW(this.e,uG(t,16));case 11:return void fon(this,mK(t))}bln(this,n,t)},uZn.ii=function(){return tYn(),BKt},uZn.ki=function(n){switch(n){case 1:return void Tcn(this,0);case 2:return void Ecn(this,0);case 3:return void mcn(this,0);case 4:return void jcn(this,0);case 5:return!this.a&&(this.a=new MD(eFt,this,5)),void CVn(this.a);case 6:return void ORn(this,null);case 7:return void Van(this,null);case 8:return void Xan(this,null);case 9:return!this.g&&(this.g=new f_(oFt,this,9,10)),void CVn(this.g);case 10:return!this.e&&(this.e=new f_(oFt,this,10,9)),void CVn(this.e);case 11:return void fon(this,null)}ffn(this,n)},uZn.Ib=function(){return A$n(this)},uZn.b=0,uZn.c=0,uZn.d=null,uZn.j=0,uZn.k=0,VW(Ztt,"ElkEdgeSectionImpl",452),sDn(158,120,{110:1,94:1,93:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Lh=function(n,t,e){return 0==n?(!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab):$tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){return 0==t?(!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e)):uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){return 0==n?!!this.Ab&&0!=this.Ab.i:l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.Zh=function(n){return zQn(this,n)},uZn.bi=function(n,t){if(0===n)return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.di=function(n){Dvn(this,128,n)},uZn.ii=function(){return YYn(),$_t},uZn.ki=function(n){if(0===n)return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){this.Bb|=1},uZn.qi=function(n){return GUn(this,n)},uZn.Bb=0,VW(Ytt,"EModelElementImpl",158),sDn(720,158,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},Fl),uZn.ri=function(n,t){return cWn(this,n,t)},uZn.si=function(n){var t,e,i,r;if(this.a!=Hrn(n)||256&n.Bb)throw hv(new vM(cet+n.zb+eet));for(e=n1(n);0!=V5(e.a).i;){if(_Tn(t=uG(yzn(e,0,F$(r=uG(Vrn(V5(e.a),0),89).c,90)?uG(r,29):(YYn(),x_t)),29)))return uG(i=Hrn(t).wi().si(t),54).ci(n),i;e=n1(t)}return"java.util.Map$Entry"==(null!=n.D?n.D:n.B)?new Eq(n):new BG(n)},uZn.ti=function(n,t){return cYn(this,n,t)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.a}return $tn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t,e)},uZn.Sh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 1:return this.a&&(e=uG(this.a,54).Th(this,4,fFt,e)),ywn(this,uG(n,241),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 1:return ywn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),A_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),A_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return!!this.a}return l5(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void yIn(this,uG(t,241))}lpn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n),t)},uZn.ii=function(){return YYn(),A_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void yIn(this,null)}sdn(this,n-iQ((YYn(),A_t)),ern(uG(Lsn(this,16),29)||A_t,n))},VW(Ytt,"EFactoryImpl",720),sDn(1037,720,{110:1,2113:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1},rs),uZn.ri=function(n,t){switch(n.hk()){case 12:return uG(t,149).Pg();case 13:return cpn(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 4:return new cs;case 6:return new Bk;case 7:return new Hk;case 8:return new es;case 9:return new ns;case 10:return new is;case 11:return new as;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 13:case 12:return null;default:throw hv(new vM(tet+n.xe()+eet))}},VW(Ztt,"ElkGraphFactoryImpl",1037),sDn(448,158,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1}),uZn.Gh=function(){var n;return null==(n=$1(eqn(uG(Lsn(this,16),29)||this.ii())))?(jP(),jP(),tBt):new zR(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.xe()}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),D_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void this.ui(null)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.xe=function(){return this.zb},uZn.ui=function(n){qon(this,n)},uZn.Ib=function(){return Wwn(this)},uZn.zb=null,VW(Ytt,"ENamedElementImpl",448),sDn(184,448,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},aZ),uZn.Ah=function(n){return Jjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return this.yb;case 3:return this.xb;case 4:return this.sb;case 5:return!this.rb&&(this.rb=new vz(this,s_t,this)),this.rb;case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),this.vb;case 7:return t?this.Db>>16==7?uG(this.Cb,241):null:$0(this)}return $tn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 4:return this.sb&&(e=uG(this.sb,54).Th(this,1,sFt,e)),Jwn(this,uG(n,480),e);case 5:return!this.rb&&(this.rb=new vz(this,s_t,this)),Nmn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nmn(this.vb,n,e);case 7:return this.Cb&&(e=(i=this.Db>>16)>=0?Jjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 4:return Jwn(this,null,e);case 5:return!this.rb&&(this.rb=new vz(this,s_t,this)),Nyn(this.rb,n,e);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),Nyn(this.vb,n,e);case 7:return $Un(this,null,7,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),F_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),F_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.yb;case 3:return null!=this.xb;case 4:return!!this.sb;case 5:return!!this.rb&&0!=this.rb.i;case 6:return!!this.vb&&0!=this.vb.i;case 7:return!!$0(this)}return l5(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.Zh=function(n){return jKn(this,n)||zQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void Von(this,mK(t));case 3:return void Xon(this,mK(t));case 4:return void HIn(this,uG(t,480));case 5:return!this.rb&&(this.rb=new vz(this,s_t,this)),CVn(this.rb),!this.rb&&(this.rb=new vz(this,s_t,this)),void CW(this.rb,uG(t,16));case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),CVn(this.vb),!this.vb&&(this.vb=new i_(fFt,this,6,7)),void CW(this.vb,uG(t,16))}lpn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n),t)},uZn.ei=function(n){var t,e;if(n&&this.rb)for(e=new DD(this.rb);e.e!=e.i.gc();)F$(t=Zkn(e),364)&&(uG(t,364).w=null);Dvn(this,64,n)},uZn.ii=function(){return YYn(),F_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void qon(this,null);case 2:return void Von(this,null);case 3:return void Xon(this,null);case 4:return void HIn(this,null);case 5:return!this.rb&&(this.rb=new vz(this,s_t,this)),void CVn(this.rb);case 6:return!this.vb&&(this.vb=new i_(fFt,this,6,7)),void CVn(this.vb)}sdn(this,n-iQ((YYn(),F_t)),ern(uG(Lsn(this,16),29)||F_t,n))},uZn.pi=function(){ojn(this)},uZn.vi=function(){return!this.rb&&(this.rb=new vz(this,s_t,this)),this.rb},uZn.wi=function(){return this.sb},uZn.xi=function(){return this.ub},uZn.yi=function(){return this.xb},uZn.zi=function(){return this.yb},uZn.Ai=function(n){this.ub=n},uZn.Ib=function(){var n;return 64&this.Db?Wwn(this):((n=new fx(Wwn(this))).a+=" (nsURI: ",zA(n,this.yb),n.a+=", nsPrefix: ",zA(n,this.xb),n.a+=")",n.a)},uZn.xb=null,uZn.yb=null,VW(Ytt,"EPackageImpl",184),sDn(569,184,{110:1,2115:1,569:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1},iDn),uZn.q=!1,uZn.r=!1;var dFt=!1;VW(Ztt,"ElkGraphPackageImpl",569),sDn(366,740,{110:1,342:1,167:1,135:1,422:1,366:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},cs),uZn.Ah=function(n){return zjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 7:return x0(this);case 8:return this.a}return spn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 7===t?(this.Cb&&(e=(i=this.Db>>16)>=0?zjn(this,e):this.Cb.Th(this,-1-i,null,e)),dV(this,uG(n,167),e)):SCn(this,n,t,e)},uZn.Uh=function(n,t,e){return 7==t?dV(this,null,e):phn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 7:return!!x0(this);case 8:return!m_("",this.a)}return Kpn(this,n)},uZn.bi=function(n,t){switch(n){case 7:return void vKn(this,uG(t,167));case 8:return void zan(this,mK(t))}ISn(this,n,t)},uZn.ii=function(){return tYn(),UKt},uZn.ki=function(n){switch(n){case 7:return void vKn(this,null);case 8:return void zan(this,"")}Tmn(this,n)},uZn.Ib=function(){return VOn(this)},uZn.a="",VW(Ztt,"ElkLabelImpl",366),sDn(207,741,{110:1,342:1,84:1,167:1,27:1,422:1,207:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Bk),uZn.Ah=function(n){return hEn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 9:return!this.c&&(this.c=new fz(wFt,this,9,9)),this.c;case 10:return!this.a&&(this.a=new fz(bFt,this,10,11)),this.a;case 11:return R0(this);case 12:return!this.b&&(this.b=new fz(aFt,this,12,3)),this.b;case 13:return qx(),!this.a&&(this.a=new fz(bFt,this,10,11)),this.a.i>0}return SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 9:return!this.c&&(this.c=new fz(wFt,this,9,9)),Nmn(this.c,n,e);case 10:return!this.a&&(this.a=new fz(bFt,this,10,11)),Nmn(this.a,n,e);case 11:return this.Cb&&(e=(i=this.Db>>16)>=0?hEn(this,e):this.Cb.Th(this,-1-i,null,e)),n_(this,uG(n,27),e);case 12:return!this.b&&(this.b=new fz(aFt,this,12,3)),Nmn(this.b,n,e)}return tSn(this,n,t,e)},uZn.Uh=function(n,t,e){switch(t){case 9:return!this.c&&(this.c=new fz(wFt,this,9,9)),Nyn(this.c,n,e);case 10:return!this.a&&(this.a=new fz(bFt,this,10,11)),Nyn(this.a,n,e);case 11:return n_(this,null,e);case 12:return!this.b&&(this.b=new fz(aFt,this,12,3)),Nyn(this.b,n,e)}return eSn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 9:return!!this.c&&0!=this.c.i;case 10:return!!this.a&&0!=this.a.i;case 11:return!!R0(this);case 12:return!!this.b&&0!=this.b.i;case 13:return!this.a&&(this.a=new fz(bFt,this,10,11)),this.a.i>0}return iln(this,n)},uZn.bi=function(n,t){switch(n){case 9:return!this.c&&(this.c=new fz(wFt,this,9,9)),CVn(this.c),!this.c&&(this.c=new fz(wFt,this,9,9)),void CW(this.c,uG(t,16));case 10:return!this.a&&(this.a=new fz(bFt,this,10,11)),CVn(this.a),!this.a&&(this.a=new fz(bFt,this,10,11)),void CW(this.a,uG(t,16));case 11:return void GRn(this,uG(t,27));case 12:return!this.b&&(this.b=new fz(aFt,this,12,3)),CVn(this.b),!this.b&&(this.b=new fz(aFt,this,12,3)),void CW(this.b,uG(t,16))}SDn(this,n,t)},uZn.ii=function(){return tYn(),GKt},uZn.ki=function(n){switch(n){case 9:return!this.c&&(this.c=new fz(wFt,this,9,9)),void CVn(this.c);case 10:return!this.a&&(this.a=new fz(bFt,this,10,11)),void CVn(this.a);case 11:return void GRn(this,null);case 12:return!this.b&&(this.b=new fz(aFt,this,12,3)),void CVn(this.b)}yyn(this,n)},uZn.Ib=function(){return VBn(this)},VW(Ztt,"ElkNodeImpl",207),sDn(193,741,{110:1,342:1,84:1,167:1,123:1,422:1,193:1,96:1,94:1,93:1,58:1,114:1,54:1,99:1,119:1,120:1},Hk),uZn.Ah=function(n){return Wjn(this,n)},uZn.Lh=function(n,t,e){return 9==n?h0(this):SMn(this,n,t,e)},uZn.Sh=function(n,t,e){var i;return 9===t?(this.Cb&&(e=(i=this.Db>>16)>=0?Wjn(this,e):this.Cb.Th(this,-1-i,null,e)),tF(this,uG(n,27),e)):tSn(this,n,t,e)},uZn.Uh=function(n,t,e){return 9==t?tF(this,null,e):eSn(this,n,t,e)},uZn.Wh=function(n){return 9==n?!!h0(this):iln(this,n)},uZn.bi=function(n,t){9!==n?SDn(this,n,t):LRn(this,uG(t,27))},uZn.ii=function(){return tYn(),qKt},uZn.ki=function(n){9!==n?yyn(this,n):LRn(this,null)},uZn.Ib=function(){return zBn(this)},VW(Ztt,"ElkPortImpl",193);var gFt=Iq(Pet,"BasicEMap/Entry");sDn(1122,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,119:1,120:1},as),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Wan(this,uG(n,149))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return Dyn(this,n,t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.b;case 1:return null!=this.c}return Wkn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return void Wan(this,uG(t,149));case 1:return void Han(this,t)}sLn(this,n,t)},uZn.ii=function(){return tYn(),XKt},uZn.ki=function(n){switch(n){case 0:return void Wan(this,null);case 1:return void Han(this,null)}oAn(this,n)},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=n?Hon(n):0),this.a},uZn.md=function(){return this.c},uZn.Ci=function(n){this.a=n},uZn.nd=function(n){var t;return t=this.c,Han(this,n),t},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):(JA(JA(JA(n=new WM,this.b?this.b.Pg():IZn),Y4n),ox(this.c)),n.a)},uZn.a=-1,uZn.c=null;var pFt,mFt,vFt,kFt,yFt,MFt,TFt,jFt,EFt=VW(Ztt,"ElkPropertyToValueMapEntryImpl",1122);sDn(996,1,{},ss),VW(Oet,"JsonAdapter",996),sDn(216,63,S1n,SM),VW(Oet,"JsonImportException",216),sDn(868,1,{},Zjn),VW(Oet,"JsonImporter",868),sDn(903,1,{},QO),VW(Oet,"JsonImporter/lambda$0$Type",903),sDn(904,1,{},JO),VW(Oet,"JsonImporter/lambda$1$Type",904),sDn(912,1,{},Yp),VW(Oet,"JsonImporter/lambda$10$Type",912),sDn(914,1,{},YO),VW(Oet,"JsonImporter/lambda$11$Type",914),sDn(915,1,{},ZO),VW(Oet,"JsonImporter/lambda$12$Type",915),sDn(921,1,{},SY),VW(Oet,"JsonImporter/lambda$13$Type",921),sDn(920,1,{},PY),VW(Oet,"JsonImporter/lambda$14$Type",920),sDn(916,1,{},nA),VW(Oet,"JsonImporter/lambda$15$Type",916),sDn(917,1,{},tA),VW(Oet,"JsonImporter/lambda$16$Type",917),sDn(918,1,{},eA),VW(Oet,"JsonImporter/lambda$17$Type",918),sDn(919,1,{},iA),VW(Oet,"JsonImporter/lambda$18$Type",919),sDn(924,1,{},Zp),VW(Oet,"JsonImporter/lambda$19$Type",924),sDn(905,1,{},nm),VW(Oet,"JsonImporter/lambda$2$Type",905),sDn(922,1,{},tm),VW(Oet,"JsonImporter/lambda$20$Type",922),sDn(923,1,{},em),VW(Oet,"JsonImporter/lambda$21$Type",923),sDn(927,1,{},im),VW(Oet,"JsonImporter/lambda$22$Type",927),sDn(925,1,{},rm),VW(Oet,"JsonImporter/lambda$23$Type",925),sDn(926,1,{},cm),VW(Oet,"JsonImporter/lambda$24$Type",926),sDn(929,1,{},am),VW(Oet,"JsonImporter/lambda$25$Type",929),sDn(928,1,{},om),VW(Oet,"JsonImporter/lambda$26$Type",928),sDn(930,1,QZn,rA),uZn.Cd=function(n){ptn(this.b,this.a,mK(n))},VW(Oet,"JsonImporter/lambda$27$Type",930),sDn(931,1,QZn,cA),uZn.Cd=function(n){mtn(this.b,this.a,mK(n))},VW(Oet,"JsonImporter/lambda$28$Type",931),sDn(932,1,{},aA),VW(Oet,"JsonImporter/lambda$29$Type",932),sDn(908,1,{},um),VW(Oet,"JsonImporter/lambda$3$Type",908),sDn(933,1,{},oA),VW(Oet,"JsonImporter/lambda$30$Type",933),sDn(934,1,{},sm),VW(Oet,"JsonImporter/lambda$31$Type",934),sDn(935,1,{},hm),VW(Oet,"JsonImporter/lambda$32$Type",935),sDn(936,1,{},fm),VW(Oet,"JsonImporter/lambda$33$Type",936),sDn(937,1,{},lm),VW(Oet,"JsonImporter/lambda$34$Type",937),sDn(870,1,{},bm),VW(Oet,"JsonImporter/lambda$35$Type",870),sDn(941,1,{},DU),VW(Oet,"JsonImporter/lambda$36$Type",941),sDn(938,1,QZn,wm),uZn.Cd=function(n){z8(this.a,uG(n,377))},VW(Oet,"JsonImporter/lambda$37$Type",938),sDn(939,1,QZn,sA),uZn.Cd=function(n){vA(this.a,this.b,uG(n,166))},VW(Oet,"JsonImporter/lambda$38$Type",939),sDn(940,1,QZn,hA),uZn.Cd=function(n){kA(this.a,this.b,uG(n,166))},VW(Oet,"JsonImporter/lambda$39$Type",940),sDn(906,1,{},dm),VW(Oet,"JsonImporter/lambda$4$Type",906),sDn(942,1,QZn,gm),uZn.Cd=function(n){W8(this.a,uG(n,8))},VW(Oet,"JsonImporter/lambda$40$Type",942),sDn(907,1,{},pm),VW(Oet,"JsonImporter/lambda$5$Type",907),sDn(911,1,{},mm),VW(Oet,"JsonImporter/lambda$6$Type",911),sDn(909,1,{},vm),VW(Oet,"JsonImporter/lambda$7$Type",909),sDn(910,1,{},km),VW(Oet,"JsonImporter/lambda$8$Type",910),sDn(913,1,{},ym),VW(Oet,"JsonImporter/lambda$9$Type",913),sDn(961,1,QZn,Mm),uZn.Cd=function(n){pQ(this.a,new QW(mK(n)))},VW(Oet,"JsonMetaDataConverter/lambda$0$Type",961),sDn(962,1,QZn,Tm),uZn.Cd=function(n){SW(this.a,uG(n,245))},VW(Oet,"JsonMetaDataConverter/lambda$1$Type",962),sDn(963,1,QZn,jm),uZn.Cd=function(n){m2(this.a,uG(n,143))},VW(Oet,"JsonMetaDataConverter/lambda$2$Type",963),sDn(964,1,QZn,Em),uZn.Cd=function(n){PW(this.a,uG(n,170))},VW(Oet,"JsonMetaDataConverter/lambda$3$Type",964),sDn(245,22,{3:1,34:1,22:1,245:1},fA);var SFt,PFt=_cn(p3n,"GraphFeature",245,Oat,brn,QU);sDn(11,1,{34:1,149:1},Cm,uF,mL,_N),uZn.Fd=function(n){return dD(this,uG(n,149))},uZn.Fb=function(n){return QZ(this,n)},uZn.Sg=function(){return Jkn(this)},uZn.Pg=function(){return this.b},uZn.Hb=function(){return pln(this.b)},uZn.Ib=function(){return this.b},VW(p3n,"Property",11),sDn(671,1,b2n,Sm),uZn.Ne=function(n,t){return wgn(this,uG(n,96),uG(t,96))},uZn.Fb=function(n){return this===n},uZn.Oe=function(){return new Zw(this)},VW(p3n,"PropertyHolderComparator",671),sDn(709,1,$Zn,Pm),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return Mtn(this)},uZn.Qb=function(){xj()},uZn.Ob=function(){return!!this.a},VW(qet,"ElkGraphUtil/AncestorIterator",709);var CFt=Iq(Pet,"EList");sDn(70,56,{20:1,31:1,56:1,16:1,15:1,70:1,61:1}),uZn.bd=function(n,t){$dn(this,n,t)},uZn.Fc=function(n){return ttn(this,n)},uZn.cd=function(n,t){return bfn(this,n,t)},uZn.Gc=function(n){return CW(this,n)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Li=function(){return!0},uZn.Mi=function(n,t){},uZn.Ni=function(){},uZn.Oi=function(n,t){Ann(this,n,t)},uZn.Pi=function(n,t,e){},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Fb=function(n){return G_n(this,n)},uZn.Hb=function(){return Bhn(this)},uZn.Si=function(){return!1},uZn.Kc=function(){return new DD(this)},uZn.ed=function(){return new Zx(this)},uZn.fd=function(n){var t;if(t=this.gc(),n<0||n>t)throw hv(new w_(n,t));return new Qz(this,n)},uZn.Ui=function(n,t){this.Ti(n,this.dd(t))},uZn.Mc=function(n){return rin(this,n)},uZn.Wi=function(n,t){return t},uZn.hd=function(n,t){return Uyn(this,n,t)},uZn.Ib=function(){return Tpn(this)},uZn.Yi=function(){return!0},uZn.Zi=function(n,t){return gln(this,t)},VW(Pet,"AbstractEList",70),sDn(66,70,Qet,ls,Drn,Hun),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){V9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.$b=function(){z9(this)},uZn.Hc=function(n){return sSn(this,n)},uZn.Xb=function(n){return Vrn(this,n)},uZn._i=function(n){var t,e,i;++this.j,n>(e=null==this.g?0:this.g.length)&&(i=this.g,(t=e+(e/2|0)+4)=0&&(this.gd(t),!0)},uZn.Xi=function(n,t){return this.Dj(n,this.Zi(n,t))},uZn.gc=function(){return this.Ej()},uZn.Pc=function(){return this.Fj()},uZn.Qc=function(n){return this.Gj(n)},uZn.Ib=function(){return this.Hj()},VW(Pet,"DelegatingEList",2093),sDn(2094,2093,_it),uZn.Ei=function(n,t){return dGn(this,n,t)},uZn.Fi=function(n){return this.Ei(this.Ej(),n)},uZn.Gi=function(n,t){cDn(this,n,t)},uZn.Hi=function(n){S$n(this,n)},uZn.Li=function(){return!this.Mj()},uZn.$b=function(){_Vn(this)},uZn.Ij=function(n,t,e,i,r){return new VZ(this,n,t,e,i,r)},uZn.Jj=function(n){Msn(this.jj(),n)},uZn.Kj=function(){return null},uZn.Lj=function(){return-1},uZn.jj=function(){return null},uZn.Mj=function(){return!1},uZn.Nj=function(n,t){return t},uZn.Oj=function(n,t){return t},uZn.Pj=function(){return!1},uZn.Qj=function(){return!this.Aj()},uZn.Ti=function(n,t){var e,i;return this.Pj()?(i=this.Qj(),e=pIn(this,n,t),this.Jj(this.Ij(7,xwn(t),e,n,i)),e):pIn(this,n,t)},uZn.gd=function(n){var t,e,i,r;return this.Pj()?(e=null,i=this.Qj(),t=this.Ij(4,r=Oq(this,n),null,n,i),this.Mj()&&r?(e=this.Oj(r,e))?(e.nj(t),e.oj()):this.Jj(t):e?(e.nj(t),e.oj()):this.Jj(t),r):(r=Oq(this,n),this.Mj()&&r&&(e=this.Oj(r,null))&&e.oj(),r)},uZn.Xi=function(n,t){return gGn(this,n,t)},VW(Utt,"DelegatingNotifyingListImpl",2094),sDn(152,1,Bit),uZn.nj=function(n){return kPn(this,n)},uZn.oj=function(){Cen(this)},uZn.gj=function(){return this.d},uZn.Kj=function(){return null},uZn.Rj=function(){return null},uZn.hj=function(n){return-1},uZn.ij=function(){return OFn(this)},uZn.jj=function(){return null},uZn.kj=function(){return AFn(this)},uZn.lj=function(){return this.o<0?this.o<-2?-2-this.o-1:-1:this.o},uZn.Sj=function(){return!1},uZn.mj=function(n){var t,e,i,r,c,a,o,u;switch(this.d){case 1:case 2:switch(n.gj()){case 1:case 2:if(xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0}case 4:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null))return a=kzn(this),c=this.o<0?this.o<-2?-2-this.o-1:-1:this.o,i=n.lj(),this.d=6,u=new Drn(2),c<=i?(ttn(u,this.n),ttn(u,n.kj()),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=c,i+1])):(ttn(u,n.kj()),ttn(u,this.n),this.g=Uhn(cT(YHt,1),W1n,28,15,[this.o=i,c])),this.n=u,a||(this.o=-2-this.o-1),!0;break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.jj())&&this.hj(null)==n.hj(null)){for(a=kzn(this),i=n.lj(),o=uG(this.g,53),e=Inn(YHt,W1n,28,o.length+1,15,1),t=0;t>>0).toString(16))).a+=" (eventType: ",this.d){case 1:e.a+="SET";break;case 2:e.a+="UNSET";break;case 3:e.a+="ADD";break;case 5:e.a+="ADD_MANY";break;case 4:e.a+="REMOVE";break;case 6:e.a+="REMOVE_MANY";break;case 7:e.a+="MOVE";break;case 8:e.a+="REMOVING_ADAPTER";break;case 9:e.a+="RESOLVE";break;default:Aj(e,this.d)}if(pHn(this)&&(e.a+=", touch: true"),e.a+=", position: ",Aj(e,this.o<0?this.o<-2?-2-this.o-1:-1:this.o),e.a+=", notifier: ",VA(e,this.jj()),e.a+=", feature: ",VA(e,this.Kj()),e.a+=", oldValue: ",VA(e,AFn(this)),e.a+=", newValue: ",6==this.d&&F$(this.g,53)){for(t=uG(this.g,53),e.a+="[",n=0;n10?(this.b&&this.c.j==this.a||(this.b=new oX(this),this.a=this.j),cS(this.b,n)):sSn(this,n)},uZn.Yi=function(){return!0},uZn.a=0,VW(Pet,"AbstractEList/1",966),sDn(302,77,v0n,w_),VW(Pet,"AbstractEList/BasicIndexOutOfBoundsException",302),sDn(37,1,$Zn,DD),uZn.Nb=function(n){Sz(this,n)},uZn.Xj=function(){if(this.i.j!=this.f)throw hv(new Fv)},uZn.Yj=function(){return Zkn(this)},uZn.Ob=function(){return this.e!=this.i.gc()},uZn.Pb=function(){return this.Yj()},uZn.Qb=function(){$Sn(this)},uZn.e=0,uZn.f=0,uZn.g=-1,VW(Pet,"AbstractEList/EIterator",37),sDn(286,37,UZn,Zx,Qz),uZn.Qb=function(){$Sn(this)},uZn.Rb=function(n){Smn(this,n)},uZn.Zj=function(){var n;try{return n=this.d.Xb(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.$j=function(n){cTn(this,n)},uZn.Sb=function(){return 0!=this.e},uZn.Tb=function(){return this.e},uZn.Ub=function(){return this.Zj()},uZn.Vb=function(){return this.e-1},uZn.Wb=function(n){this.$j(n)},VW(Pet,"AbstractEList/EListIterator",286),sDn(355,37,$Zn,nR),uZn.Yj=function(){return nyn(this)},uZn.Qb=function(){throw hv(new Kv)},VW(Pet,"AbstractEList/NonResolvingEIterator",355),sDn(398,286,UZn,tR,N_),uZn.Rb=function(n){throw hv(new Kv)},uZn.Yj=function(){var n;try{return n=this.c.Vi(this.e),this.Xj(),this.g=this.e++,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Zj=function(){var n;try{return n=this.c.Vi(--this.e),this.Xj(),this.g=this.e,n}catch(t){throw F$(t=Ehn(t),77)?(this.Xj(),hv(new Bv)):hv(t)}},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},VW(Pet,"AbstractEList/NonResolvingEListIterator",398),sDn(2080,70,Git),uZn.Ei=function(n,t){var e,i,r,c,a,o,u,s,h;if(0!=(i=t.gc())){for(e=Vln(this,(s=null==(u=uG(Lsn(this.a,4),129))?0:u.length)+i),(h=s-n)>0&&qGn(u,n,e,n+i,h),o=t.Kc(),c=0;ce)throw hv(new w_(n,e));return new qJ(this,n)},uZn.$b=function(){var n,t;++this.j,t=null==(n=uG(Lsn(this.a,4),129))?0:n.length,Pkn(this,null),Ann(this,t,n)},uZn.Hc=function(n){var t,e,i,r;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(i=0,r=(e=t).length;i=(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length))throw hv(new w_(n,e));return t[n]},uZn.dd=function(n){var t,e,i;if(null!=(t=uG(Lsn(this.a,4),129)))if(null!=n){for(e=0,i=t.length;ee)throw hv(new w_(n,e));return new GJ(this,n)},uZn.Ti=function(n,t){var e,i,r;if(n>=(r=null==(e=lvn(this))?0:e.length))throw hv(new dM(Vet+n+zet+r));if(t>=r)throw hv(new dM(Wet+t+zet+r));return i=e[t],n!=t&&(n0&&qGn(n,0,t,0,e),t},uZn.Qc=function(n){var t,e;return(e=null==(t=uG(Lsn(this.a,4),129))?0:t.length)>0&&(n.lengthe&&uQ(n,e,null),n},VW(Pet,"ArrayDelegatingEList",2080),sDn(1051,37,$Zn,M9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},VW(Pet,"ArrayDelegatingEList/EIterator",1051),sDn(722,286,UZn,pz,GJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},uZn.$j=function(n){cTn(this,n),this.a=uG(Lsn(this.b.a,4),129)},uZn.Qb=function(){$Sn(this),this.a=uG(Lsn(this.b.a,4),129)},VW(Pet,"ArrayDelegatingEList/EListIterator",722),sDn(1052,355,$Zn,T9),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},VW(Pet,"ArrayDelegatingEList/NonResolvingEIterator",1052),sDn(723,398,UZn,mz,qJ),uZn.Xj=function(){if(this.b.j!=this.f||xA(uG(Lsn(this.b.a,4),129))!==xA(this.a))throw hv(new Fv)},VW(Pet,"ArrayDelegatingEList/NonResolvingEListIterator",723),sDn(615,302,v0n,pL),VW(Pet,"BasicEList/BasicIndexOutOfBoundsException",615),sDn(710,66,Qet,AA),uZn.bd=function(n,t){throw hv(new Kv)},uZn.Fc=function(n){throw hv(new Kv)},uZn.cd=function(n,t){throw hv(new Kv)},uZn.Gc=function(n){throw hv(new Kv)},uZn.$b=function(){throw hv(new Kv)},uZn._i=function(n){throw hv(new Kv)},uZn.Kc=function(){return this.Ii()},uZn.ed=function(){return this.Ji()},uZn.fd=function(n){return this.Ki(n)},uZn.Ti=function(n,t){throw hv(new Kv)},uZn.Ui=function(n,t){throw hv(new Kv)},uZn.gd=function(n){throw hv(new Kv)},uZn.Mc=function(n){throw hv(new Kv)},uZn.hd=function(n,t){throw hv(new Kv)},VW(Pet,"BasicEList/UnmodifiableEList",710),sDn(721,1,{3:1,20:1,16:1,15:1,61:1,597:1}),uZn.bd=function(n,t){Y$(this,n,uG(t,44))},uZn.Fc=function(n){return YR(this,uG(n,44))},uZn.Jc=function(n){V8(this,n)},uZn.Xb=function(n){return uG(Vrn(this.c,n),136)},uZn.Ti=function(n,t){return uG(this.c.Ti(n,t),44)},uZn.Ui=function(n,t){Z$(this,n,uG(t,44))},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return uG(this.c.gd(n),44)},uZn.hd=function(n,t){return EW(this,n,uG(t,44))},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.cd=function(n,t){return this.c.cd(n,t)},uZn.Gc=function(n){return this.c.Gc(n)},uZn.$b=function(){this.c.$b()},uZn.Hc=function(n){return this.c.Hc(n)},uZn.Ic=function(n){return yhn(this.c,n)},uZn._j=function(){var n,t;if(null==this.d){for(this.d=Inn(IFt,qit,66,2*this.f+1,0,1),t=this.e,this.f=0,n=this.c.Kc();n.e!=n.i.gc();)bMn(this,uG(n.Yj(),136));this.e=t}},uZn.Fb=function(n){return H_(this,n)},uZn.Hb=function(){return Bhn(this.c)},uZn.dd=function(n){return this.c.dd(n)},uZn.ak=function(){this.c=new Im(this)},uZn.dc=function(){return 0==this.f},uZn.Kc=function(){return this.c.Kc()},uZn.ed=function(){return this.c.ed()},uZn.fd=function(n){return this.c.fd(n)},uZn.bk=function(){return Tnn(this)},uZn.ck=function(n,t,e){return new xU(n,t,e)},uZn.dk=function(){return new ws},uZn.Mc=function(n){return uan(this,n)},uZn.gc=function(){return this.f},uZn.kd=function(n,t){return new C2(this.c,n,t)},uZn.Pc=function(){return this.c.Pc()},uZn.Qc=function(n){return this.c.Qc(n)},uZn.Ib=function(){return Tpn(this.c)},uZn.e=0,uZn.f=0,VW(Pet,"BasicEMap",721),sDn(1046,66,Qet,Im),uZn.Mi=function(n,t){Qv(this,uG(t,136))},uZn.Pi=function(n,t,e){var i;++(i=this,uG(t,136),i).a.e},uZn.Qi=function(n,t){Jv(this,uG(t,136))},uZn.Ri=function(n,t,e){fR(this,uG(t,136),uG(e,136))},uZn.Oi=function(n,t){Osn(this.a)},VW(Pet,"BasicEMap/1",1046),sDn(1047,66,Qet,ws),uZn.aj=function(n){return Inn(FFt,Xit,621,n,0,1)},VW(Pet,"BasicEMap/2",1047),sDn(1048,KZn,FZn,Om),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return ymn(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new aj(this.a)},uZn.Mc=function(n){var t;return t=this.a.f,Svn(this.a,n),this.a.f!=t},uZn.gc=function(){return this.a.f},VW(Pet,"BasicEMap/3",1048),sDn(1049,31,RZn,Am),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){return q_n(this.a,n)},uZn.Kc=function(){return 0==this.a.f?(EK(),KFt.a):new oj(this.a)},uZn.gc=function(){return this.a.f},VW(Pet,"BasicEMap/4",1049),sDn(1050,KZn,FZn,Lm),uZn.$b=function(){this.a.c.$b()},uZn.Hc=function(n){var t,e,i,r,c,a,o,u,s;if(this.a.f>0&&F$(n,44)&&(this.a._j(),r=null==(o=(u=uG(n,44)).ld())?0:Hon(o),c=iF(this.a,r),t=this.a.d[c]))for(e=uG(t.g,379),s=t.i,a=0;a"+this.c},uZn.a=0;var KFt,FFt=VW(Pet,"BasicEMap/EntryImpl",621);sDn(546,1,{},ds),VW(Pet,"BasicEMap/View",546),sDn(783,1,{}),uZn.Fb=function(n){return PDn((hZ(),Vot),n)},uZn.Hb=function(){return Zfn((hZ(),Vot))},uZn.Ib=function(){return vIn((hZ(),Vot))},VW(Pet,"ECollections/BasicEmptyUnmodifiableEList",783),sDn(1348,1,UZn,gs),uZn.Nb=function(n){Sz(this,n)},uZn.Rb=function(n){throw hv(new Kv)},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},uZn.Pb=function(){throw hv(new Bv)},uZn.Tb=function(){return 0},uZn.Ub=function(){throw hv(new Bv)},uZn.Vb=function(){return-1},uZn.Qb=function(){throw hv(new Kv)},uZn.Wb=function(n){throw hv(new Kv)},VW(Pet,"ECollections/BasicEmptyUnmodifiableEList/1",1348),sDn(1346,783,{20:1,16:1,15:1,61:1},Gk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){V8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(Vot,n,t)},uZn.Pc=function(){return SV((hZ(),Vot))},uZn.Qc=function(n){return hZ(),oTn(Vot,n)},VW(Pet,"ECollections/EmptyUnmodifiableEList",1346),sDn(1347,783,{20:1,16:1,15:1,61:1,597:1},qk),uZn.bd=function(n,t){iE()},uZn.Fc=function(n){return rE()},uZn.cd=function(n,t){return cE()},uZn.Gc=function(n){return aE()},uZn.$b=function(){oE()},uZn.Hc=function(n){return!1},uZn.Ic=function(n){return!1},uZn.Jc=function(n){V8(this,n)},uZn.Xb=function(n){return oL((hZ(),n)),null},uZn.dd=function(n){return-1},uZn.dc=function(){return!0},uZn.Kc=function(){return this.a},uZn.ed=function(){return this.a},uZn.fd=function(n){return this.a},uZn.Ti=function(n,t){return uE()},uZn.Ui=function(n,t){sE()},uZn.Lc=function(){return new fX(null,new h3(this,16))},uZn.gd=function(n){return hE()},uZn.Mc=function(n){return fE()},uZn.hd=function(n,t){return lE()},uZn.gc=function(){return 0},uZn.jd=function(n){Lon(this,n)},uZn.Nc=function(){return new h3(this,16)},uZn.Oc=function(){return new fX(null,new h3(this,16))},uZn.kd=function(n,t){return hZ(),new C2(Vot,n,t)},uZn.Pc=function(){return SV((hZ(),Vot))},uZn.Qc=function(n){return hZ(),oTn(Vot,n)},uZn.bk=function(){return hZ(),hZ(),zot},VW(Pet,"ECollections/EmptyUnmodifiableEMap",1347);var _Ft,BFt=Iq(Pet,"Enumerator");sDn(288,1,{288:1},Z_n),uZn.Fb=function(n){var t;return this===n||!!F$(n,288)&&(t=uG(n,288),this.f==t.f&&yX(this.i,t.i)&&kX(this.a,256&this.f?256&t.f?t.a:null:256&t.f?null:t.a)&&kX(this.d,t.d)&&kX(this.g,t.g)&&kX(this.e,t.e)&&Ykn(this,t))},uZn.Hb=function(){return this.f},uZn.Ib=function(){return DUn(this)},uZn.f=0;var HFt,UFt,GFt,qFt=0,XFt=0,VFt=0,zFt=0,WFt=0,QFt=0,JFt=0,YFt=0,ZFt=0,n_t=0,t_t=0,e_t=0,i_t=0;VW(Pet,"URI",288),sDn(1121,45,B0n,Xk),uZn.zc=function(n,t){return uG(r2(this,mK(n),uG(t,288)),288)},VW(Pet,"URI/URICache",1121),sDn(506,66,Qet,us,$X),uZn.Si=function(){return!0},VW(Pet,"UniqueEList",506),sDn(590,63,S1n,Pen),VW(Pet,"WrappedException",590);var r_t,c_t=Iq(Itt,Wit),a_t=Iq(Itt,Qit),o_t=Iq(Itt,Jit),u_t=Iq(Itt,Yit),s_t=Iq(Itt,Zit),h_t=Iq(Itt,"EClass"),f_t=Iq(Itt,"EDataType");sDn(1233,45,B0n,Vk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},VW(Itt,"EDataType/Internal/ConversionDelegate/Factory/Registry/Impl",1233);var l_t,b_t,w_t=Iq(Itt,"EEnum"),d_t=Iq(Itt,nrt),g_t=Iq(Itt,trt),p_t=Iq(Itt,ert),m_t=Iq(Itt,irt),v_t=Iq(Itt,rrt);sDn(1042,1,{},os),uZn.Ib=function(){return"NIL"},VW(Itt,"EStructuralFeature/Internal/DynamicValueHolder/1",1042),sDn(1041,45,B0n,zk),uZn.xc=function(n){return RA(n)?U1(this,n):DA(FX(this.f,n))},VW(Itt,"EStructuralFeature/Internal/SettingDelegate/Factory/Registry/Impl",1041);var k_t,y_t,M_t,T_t,j_t,E_t,S_t,P_t,C_t,I_t,O_t,A_t,L_t,N_t,$_t,D_t,x_t,R_t,K_t,F_t,__t,B_t,H_t,U_t,G_t,q_t,X_t,V_t,z_t,W_t,Q_t,J_t=Iq(Itt,crt),Y_t=Iq(Itt,"EValidator/PatternMatcher"),Z_t=Iq(art,"FeatureMap/Entry");sDn(545,1,{76:1},TA),uZn.Lk=function(){return this.a},uZn.md=function(){return this.b},VW(Ytt,"BasicEObjectImpl/1",545),sDn(1040,1,ort,jA),uZn.Fk=function(n){return U9(this.a,this.b,n)},uZn.Qj=function(){return M0(this.a,this.b)},uZn.Wb=function(n){y0(this.a,this.b,n)},uZn.Gk=function(){zQ(this.a,this.b)},VW(Ytt,"BasicEObjectImpl/4",1040),sDn(2081,1,{114:1}),uZn.Mk=function(n){this.e=0==n?X_t:Inn(dat,EZn,1,n,5,1)},uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Nk=function(){return this.c},uZn.Ok=function(){throw hv(new Kv)},uZn.Pk=function(){throw hv(new Kv)},uZn.Qk=function(){return this.d},uZn.Rk=function(){return null!=this.e},uZn.Sk=function(n){this.c=n},uZn.Tk=function(n){throw hv(new Kv)},uZn.Uk=function(n){throw hv(new Kv)},uZn.Vk=function(n){this.d=n},VW(Ytt,"BasicEObjectImpl/EPropertiesHolderBaseImpl",2081),sDn(192,2081,{114:1},Ll),uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},VW(Ytt,"BasicEObjectImpl/EPropertiesHolderImpl",192),sDn(516,99,Jtt,ps),uZn.uh=function(){return this.f},uZn.zh=function(){return this.k},uZn.Bh=function(n,t){this.g=n,this.i=t},uZn.Dh=function(){return 2&this.j?this.$h().Nk():this.ii()},uZn.Fh=function(){return this.i},uZn.wh=function(){return!!(1&this.j)},uZn.Ph=function(){return this.g},uZn.Vh=function(){return!!(4&this.j)},uZn.$h=function(){return!this.k&&(this.k=new Ll),this.k},uZn.ci=function(n){this.$h().Sk(n),n?this.j|=2:this.j&=-3},uZn.ei=function(n){this.$h().Uk(n),n?this.j|=4:this.j&=-5},uZn.ii=function(){return(tQ(),M_t).S},uZn.i=0,uZn.j=1,VW(Ytt,"EObjectImpl",516),sDn(798,516,{110:1,94:1,93:1,58:1,114:1,54:1,99:1},BG),uZn.li=function(n){return this.e[n]},uZn.mi=function(n,t){this.e[n]=t},uZn.ni=function(n){this.e[n]=null},uZn.Dh=function(){return this.d},uZn.Ih=function(n){return emn(this.d,n)},uZn.Kh=function(){return this.d},uZn.Oh=function(){return null!=this.e},uZn.$h=function(){return!this.k&&(this.k=new ms),this.k},uZn.ci=function(n){this.d=n},uZn.hi=function(){var n;return null==this.e&&(n=iQ(this.d),this.e=0==n?V_t:Inn(dat,EZn,1,n,5,1)),this},uZn.ji=function(){return 0},VW(Ytt,"DynamicEObjectImpl",798),sDn(1522,798,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1},Eq),uZn.Fb=function(n){return this===n},uZn.Hb=function(){return xx(this)},uZn.ci=function(n){this.d=n,this.b=EKn(n,"key"),this.c=EKn(n,uet)},uZn.Bi=function(){var n;return-1==this.a&&(n=Ven(this,this.b),this.a=null==n?0:Hon(n)),this.a},uZn.ld=function(){return Ven(this,this.b)},uZn.md=function(){return Ven(this,this.c)},uZn.Ci=function(n){this.a=n},uZn.Di=function(n){y0(this,this.b,n)},uZn.nd=function(n){var t;return t=Ven(this,this.c),y0(this,this.c,n),t},uZn.a=0,VW(Ytt,"DynamicEObjectImpl/BasicEMapEntry",1522),sDn(1523,1,{114:1},ms),uZn.Mk=function(n){throw hv(new Kv)},uZn.li=function(n){throw hv(new Kv)},uZn.mi=function(n,t){throw hv(new Kv)},uZn.ni=function(n){throw hv(new Kv)},uZn.Nk=function(){throw hv(new Kv)},uZn.Ok=function(){return this.a},uZn.Pk=function(){return this.b},uZn.Qk=function(){return this.c},uZn.Rk=function(){throw hv(new Kv)},uZn.Sk=function(n){throw hv(new Kv)},uZn.Tk=function(n){this.a=n},uZn.Uk=function(n){this.b=n},uZn.Vk=function(n){this.c=n},VW(Ytt,"DynamicEObjectImpl/DynamicEPropertiesHolderImpl",1523),sDn(519,158,{110:1,94:1,93:1,598:1,155:1,58:1,114:1,54:1,99:1,519:1,158:1,119:1,120:1},vs),uZn.Ah=function(n){return Yjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.d;case 2:return e?(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),this.b):(!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),Tnn(this.b));case 3:return F0(this);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),this.a;case 5:return!this.c&&(this.c=new OD(nFt,this,5)),this.c}return $tn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 3:return this.Cb&&(e=(i=this.Db>>16)>=0?Yjn(this,e):this.Cb.Th(this,-1-i,null,e)),gV(this,uG(n,155),e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),G_(this.b,n,e);case 3:return gV(this,null,e);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),T_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),T_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.d;case 2:return!!this.b&&0!=this.b.f;case 3:return!!F0(this);case 4:return!!this.a&&0!=this.a.i;case 5:return!!this.c&&0!=this.c.i}return l5(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void xq(this,mK(t));case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void Jun(this.b,t);case 3:return void kKn(this,uG(t,155));case 4:return!this.a&&(this.a=new MD(nFt,this,4)),CVn(this.a),!this.a&&(this.a=new MD(nFt,this,4)),void CW(this.a,uG(t,16));case 5:return!this.c&&(this.c=new OD(nFt,this,5)),CVn(this.c),!this.c&&(this.c=new OD(nFt,this,5)),void CW(this.c,uG(t,16))}lpn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n),t)},uZn.ii=function(){return YYn(),T_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void Yan(this,null);case 2:return!this.b&&(this.b=new XR((YYn(),H_t),wBt,this)),void this.b.c.$b();case 3:return void kKn(this,null);case 4:return!this.a&&(this.a=new MD(nFt,this,4)),void CVn(this.a);case 5:return!this.c&&(this.c=new OD(nFt,this,5)),void CVn(this.c)}sdn(this,n-iQ((YYn(),T_t)),ern(uG(Lsn(this,16),29)||T_t,n))},uZn.Ib=function(){return fdn(this)},uZn.d=null,VW(Ytt,"EAnnotationImpl",519),sDn(141,721,urt,ltn),uZn.Gi=function(n,t){qN(this,n,uG(t,44))},uZn.Wk=function(n,t){return U_(this,uG(n,44),t)},uZn.$i=function(n){return uG(uG(this.c,71).$i(n),136)},uZn.Ii=function(){return uG(this.c,71).Ii()},uZn.Ji=function(){return uG(this.c,71).Ji()},uZn.Ki=function(n){return uG(this.c,71).Ki(n)},uZn.Xk=function(n,t){return G_(this,n,t)},uZn.Fk=function(n){return uG(this.c,79).Fk(n)},uZn.ak=function(){},uZn.Qj=function(){return uG(this.c,79).Qj()},uZn.ck=function(n,t,e){var i;return(i=uG(Hrn(this.b).wi().si(this.b),136)).Ci(n),i.Di(t),i.nd(e),i},uZn.dk=function(){return new zm(this)},uZn.Wb=function(n){Jun(this,n)},uZn.Gk=function(){uG(this.c,79).Gk()},VW(art,"EcoreEMap",141),sDn(165,141,urt,XR),uZn._j=function(){var n,t,e,i,r;if(null==this.d){for(r=Inn(IFt,qit,66,2*this.f+1,0,1),e=this.c.Kc();e.e!=e.i.gc();)!(n=r[i=((t=uG(e.Yj(),136)).Bi()&vZn)%r.length])&&(n=r[i]=new zm(this)),n.Fc(t);this.d=r}},VW(Ytt,"EAnnotationImpl/1",165),sDn(292,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,481:1,54:1,99:1,158:1,292:1,119:1,120:1}),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void this.ui(mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj())}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),G_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void this.ui(null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj())}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){bEn(this),this.Bb|=1},uZn.Hk=function(){return bEn(this)},uZn.Ik=function(){return this.t},uZn.Jk=function(){var n;return(n=this.t)>1||-1==n},uZn.Si=function(){return!!(512&this.Bb)},uZn.Yk=function(n,t){return Ywn(this,n,t)},uZn.Zk=function(n){Ccn(this,n)},uZn.Ib=function(){return L$n(this)},uZn.s=0,uZn.t=1,VW(Ytt,"ETypedElementImpl",292),sDn(462,292,{110:1,94:1,93:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,462:1,292:1,119:1,120:1,692:1}),uZn.Ah=function(n){return pjn(this,n)},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!this.Jk();case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),0!=(this.Bb&w1n);case 11:return qx(),0!=(this.Bb&frt);case 12:return qx(),0!=(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),0!=(this.Bb&hrt);case 16:return qx(),0!=(this.Bb&zZn);case 17:return K0(this)}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 17:return this.Cb&&(e=(i=this.Db>>16)>=0?pjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 17:return $Un(this,null,17,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return this.Jk();case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return 0==(this.Bb&w1n);case 11:return 0!=(this.Bb&frt);case 12:return 0!=(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return 0!=(this.Bb&hrt);case 16:return 0!=(this.Bb&zZn);case 17:return!!K0(this)}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void this.Zk(uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),U_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void this.Zk(1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.pi=function(){BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.pk=function(){return this.f},uZn.ik=function(){return NRn(this)},uZn.qk=function(){return K0(this)},uZn.uk=function(){return null},uZn.$k=function(){return this.k},uZn.Lj=function(){return this.n},uZn.vk=function(){return qSn(this)},uZn.wk=function(){var n,t,e,i,r,c,a,o,u;return this.p||((null==(e=K0(this)).i&&eqn(e),e.i).length,(i=this.uk())&&iQ(K0(i)),n=(a=(r=bEn(this)).kk())?1&a.i?a==ZHt?cot:a==YHt?dot:a==iUt?lot:a==eUt?fot:a==nUt?yot:a==rUt?Tot:a==tUt?uot:hot:a:null,t=NRn(this),o=r.ik(),zgn(this),0!=(this.Bb&zZn)&&((c=cSn((gAn(),kBt),e))&&c!=this||(c=_3(Nen(kBt,this))))?this.p=new SA(this,c):this.Jk()?this.al()?i?0!=(this.Bb&hrt)?n?this.bl()?this.p=new CY(47,n,this,i):this.p=new CY(5,n,this,i):this.bl()?this.p=new r8(46,this,i):this.p=new r8(4,this,i):n?this.bl()?this.p=new CY(49,n,this,i):this.p=new CY(7,n,this,i):this.bl()?this.p=new r8(48,this,i):this.p=new r8(6,this,i):0!=(this.Bb&hrt)?n?n==Sat?this.p=new RU(50,gFt,this):this.bl()?this.p=new RU(43,n,this):this.p=new RU(1,n,this):this.bl()?this.p=new GZ(42,this):this.p=new GZ(0,this):n?n==Sat?this.p=new RU(41,gFt,this):this.bl()?this.p=new RU(45,n,this):this.p=new RU(3,n,this):this.bl()?this.p=new GZ(44,this):this.p=new GZ(2,this):F$(r,156)?n==Z_t?this.p=new GZ(40,this):512&this.Bb?0!=(this.Bb&hrt)?this.p=n?new RU(9,n,this):new GZ(8,this):this.p=n?new RU(11,n,this):new GZ(10,this):0!=(this.Bb&hrt)?this.p=n?new RU(13,n,this):new GZ(12,this):this.p=n?new RU(15,n,this):new GZ(14,this):i?(u=i.t)>1||-1==u?this.bl()?0!=(this.Bb&hrt)?this.p=n?new CY(25,n,this,i):new r8(24,this,i):this.p=n?new CY(27,n,this,i):new r8(26,this,i):0!=(this.Bb&hrt)?this.p=n?new CY(29,n,this,i):new r8(28,this,i):this.p=n?new CY(31,n,this,i):new r8(30,this,i):this.bl()?0!=(this.Bb&hrt)?this.p=n?new CY(33,n,this,i):new r8(32,this,i):this.p=n?new CY(35,n,this,i):new r8(34,this,i):0!=(this.Bb&hrt)?this.p=n?new CY(37,n,this,i):new r8(36,this,i):this.p=n?new CY(39,n,this,i):new r8(38,this,i):this.bl()?0!=(this.Bb&hrt)?this.p=n?new RU(17,n,this):new GZ(16,this):this.p=n?new RU(19,n,this):new GZ(18,this):0!=(this.Bb&hrt)?this.p=n?new RU(21,n,this):new GZ(20,this):this.p=n?new RU(23,n,this):new GZ(22,this):this._k()?this.bl()?this.p=new KU(uG(r,29),this,i):this.p=new _1(uG(r,29),this,i):F$(r,156)?n==Z_t?this.p=new GZ(40,this):0!=(this.Bb&hrt)?this.p=n?new bV(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new AY(uG(r,156),t,o,this):this.p=n?new lV(t,o,this,(Pmn(),a==YHt?hBt:a==ZHt?cBt:a==nUt?fBt:a==iUt?sBt:a==eUt?uBt:a==rUt?bBt:a==tUt?aBt:a==JHt?oBt:lBt)):new OY(uG(r,156),t,o,this):this.al()?i?0!=(this.Bb&hrt)?this.bl()?this.p=new GU(uG(r,29),this,i):this.p=new UU(uG(r,29),this,i):this.bl()?this.p=new HU(uG(r,29),this,i):this.p=new FU(uG(r,29),this,i):0!=(this.Bb&hrt)?this.bl()?this.p=new cK(uG(r,29),this):this.p=new iK(uG(r,29),this):this.bl()?this.p=new eK(uG(r,29),this):this.p=new tK(uG(r,29),this):this.bl()?i?0!=(this.Bb&hrt)?this.p=new qU(uG(r,29),this,i):this.p=new _U(uG(r,29),this,i):0!=(this.Bb&hrt)?this.p=new aK(uG(r,29),this):this.p=new rK(uG(r,29),this):i?0!=(this.Bb&hrt)?this.p=new XU(uG(r,29),this,i):this.p=new BU(uG(r,29),this,i):0!=(this.Bb&hrt)?this.p=new oK(uG(r,29),this):this.p=new OX(uG(r,29),this)),this.p},uZn.rk=function(){return 0!=(this.Bb&w1n)},uZn._k=function(){return!1},uZn.al=function(){return!1},uZn.sk=function(){return 0!=(this.Bb&zZn)},uZn.xk=function(){return ein(this)},uZn.bl=function(){return!1},uZn.tk=function(){return 0!=(this.Bb&hrt)},uZn.cl=function(n){this.k=n},uZn.ui=function(n){g2(this,n)},uZn.Ib=function(){return MBn(this)},uZn.e=!1,uZn.n=0,VW(Ytt,"EStructuralFeatureImpl",462),sDn(331,462,{110:1,94:1,93:1,35:1,155:1,197:1,58:1,179:1,69:1,114:1,481:1,54:1,99:1,331:1,158:1,462:1,292:1,119:1,120:1,692:1},Wk),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),!!SNn(this);case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),0!=(this.Bb&w1n);case 11:return qx(),0!=(this.Bb&frt);case 12:return qx(),0!=(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),0!=(this.Bb&hrt);case 16:return qx(),0!=(this.Bb&zZn);case 17:return K0(this);case 18:return qx(),0!=(this.Bb&Qtt);case 19:return t?khn(this):E7(this)}return $tn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return SNn(this);case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return 0==(this.Bb&w1n);case 11:return 0!=(this.Bb&frt);case 12:return 0!=(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return 0!=(this.Bb&hrt);case 16:return 0!=(this.Bb&zZn);case 17:return!!K0(this);case 18:return 0!=(this.Bb&Qtt);case 19:return!!E7(this)}return l5(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void fj(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void Sgn(this,oM(gK(t)))}lpn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n),t)},uZn.ii=function(){return YYn(),j_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return this.b=0,void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return void Sgn(this,!1)}sdn(this,n-iQ((YYn(),j_t)),ern(uG(Lsn(this,16),29)||j_t,n))},uZn.pi=function(){khn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.Jk=function(){return SNn(this)},uZn.Yk=function(n,t){return this.b=0,this.a=null,Ywn(this,n,t)},uZn.Zk=function(n){fj(this,n)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (iD: ",Lj(n,0!=(this.Bb&Qtt)),n.a+=")",n.a)},uZn.b=0,VW(Ytt,"EAttributeImpl",331),sDn(364,448,{110:1,94:1,93:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,364:1,158:1,119:1,120:1,691:1}),uZn.dl=function(n){return n.Dh()==this},uZn.Ah=function(n){return zTn(this,n)},uZn.Bh=function(n,t){this.w=null,this.Db=t<<16|255&this.Db,this.Cb=n},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return this.ik();case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A}return $tn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?zTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().zk(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e)}return uG(ern(uG(Lsn(this,16),29)||this.ii(),t),69).wk().Ak(this,$vn(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return null!=this.ik();case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i}return l5(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),CVn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16))}lpn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n),t)},uZn.ii=function(){return YYn(),S_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void CVn(this.A)}sdn(this,n-iQ(this.ii()),ern(uG(Lsn(this,16),29)||this.ii(),n))},uZn.hk=function(){var n;return-1==this.G&&(this.G=(n=Hrn(this))?Hyn(n.vi(),this):-1),this.G},uZn.ik=function(){return null},uZn.jk=function(){return Hrn(this)},uZn.el=function(){return this.v},uZn.kk=function(){return _Tn(this)},uZn.lk=function(){return null!=this.D?this.D:this.B},uZn.mk=function(){return this.F},uZn.fk=function(n){return LGn(this,n)},uZn.fl=function(n){this.v=n},uZn.gl=function(n){tun(this,n)},uZn.hl=function(n){this.C=n},uZn.ui=function(n){d2(this,n)},uZn.Ib=function(){return pmn(this)},uZn.C=null,uZn.D=null,uZn.G=-1,VW(Ytt,"EClassifierImpl",364),sDn(90,364,{110:1,94:1,93:1,29:1,142:1,155:1,197:1,58:1,114:1,54:1,99:1,90:1,364:1,158:1,482:1,119:1,120:1,691:1},Kl),uZn.dl=function(n){return zF(this,n.Dh())},uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return null!=this.D?this.D:this.B;case 3:return _Tn(this);case 4:return null;case 5:return this.F;case 6:return t?Hrn(this):D0(this);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),this.A;case 8:return qx(),!!(256&this.Bb);case 9:return qx(),!!(512&this.Bb);case 10:return n1(this);case 11:return!this.q&&(this.q=new fz(p_t,this,11,10)),this.q;case 12:return hXn(this);case 13:return Zqn(this);case 14:return Zqn(this),this.r;case 15:return hXn(this),this.k;case 16:return RAn(this);case 17:return $qn(this);case 18:return eqn(this);case 19:return mRn(this);case 20:return hXn(this),this.o;case 21:return!this.s&&(this.s=new fz(o_t,this,21,17)),this.s;case 22:return V5(this);case 23:return x_n(this)}return $tn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 6:return this.Cb&&(e=(i=this.Db>>16)>=0?zTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e);case 11:return!this.q&&(this.q=new fz(p_t,this,11,10)),Nmn(this.q,n,e);case 21:return!this.s&&(this.s=new fz(o_t,this,21,17)),Nmn(this.s,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 11:return!this.q&&(this.q=new fz(p_t,this,11,10)),Nyn(this.q,n,e);case 21:return!this.s&&(this.s=new fz(o_t,this,21,17)),Nyn(this.s,n,e);case 22:return Nyn(V5(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),E_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),E_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!1;case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!!(256&this.Bb);case 9:return!!(512&this.Bb);case 10:return!(!this.u||0==V5(this.u.a).i||this.n&&yMn(this.n));case 11:return!!this.q&&0!=this.q.i;case 12:return 0!=hXn(this).i;case 13:return 0!=Zqn(this).i;case 14:return Zqn(this),0!=this.r.i;case 15:return hXn(this),0!=this.k.i;case 16:return 0!=RAn(this).i;case 17:return 0!=$qn(this).i;case 18:return 0!=eqn(this).i;case 19:return 0!=mRn(this).i;case 20:return hXn(this),!!this.o;case 21:return!!this.s&&0!=this.s.i;case 22:return!!this.n&&yMn(this.n);case 23:return 0!=x_n(this).i}return l5(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.Zh=function(n){return(null==this.i||this.q&&0!=this.q.i?null:EKn(this,n))||zQn(this,n)},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),CVn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void gdn(this,oM(gK(t)));case 9:return void vdn(this,oM(gK(t)));case 10:return _Vn(n1(this)),void CW(n1(this),uG(t,16));case 11:return!this.q&&(this.q=new fz(p_t,this,11,10)),CVn(this.q),!this.q&&(this.q=new fz(p_t,this,11,10)),void CW(this.q,uG(t,16));case 21:return!this.s&&(this.s=new fz(o_t,this,21,17)),CVn(this.s),!this.s&&(this.s=new fz(o_t,this,21,17)),void CW(this.s,uG(t,16));case 22:return CVn(V5(this)),void CW(V5(this),uG(t,16))}lpn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n),t)},uZn.ii=function(){return YYn(),E_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void CVn(this.A);case 8:return void gdn(this,!1);case 9:return void vdn(this,!1);case 10:return void(this.u&&_Vn(this.u));case 11:return!this.q&&(this.q=new fz(p_t,this,11,10)),void CVn(this.q);case 21:return!this.s&&(this.s=new fz(o_t,this,21,17)),void CVn(this.s);case 22:return void(this.n&&CVn(this.n))}sdn(this,n-iQ((YYn(),E_t)),ern(uG(Lsn(this,16),29)||E_t,n))},uZn.pi=function(){var n,t;if(hXn(this),Zqn(this),RAn(this),$qn(this),eqn(this),mRn(this),x_n(this),z9(iG(y9(this))),this.s)for(n=0,t=this.s.i;n=0;--t)Vrn(this,t);return gmn(this,n)},uZn.Gk=function(){CVn(this)},uZn.Zi=function(n,t){return Dcn(this,n,t)},VW(art,"EcoreEList",632),sDn(505,632,Trt,FG),uZn.Li=function(){return!1},uZn.Lj=function(){return this.c},uZn.Mj=function(){return!1},uZn.ol=function(){return!0},uZn.Si=function(){return!0},uZn.Wi=function(n,t){return t},uZn.Yi=function(){return!1},uZn.c=0,VW(art,"EObjectEList",505),sDn(83,505,Trt,MD),uZn.Mj=function(){return!0},uZn.ml=function(){return!1},uZn.al=function(){return!0},VW(art,"EObjectContainmentEList",83),sDn(555,83,Trt,TD),uZn.Ni=function(){this.b=!0},uZn.Qj=function(){return this.b},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.b,this.b=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.b=!1},uZn.b=!1,VW(art,"EObjectContainmentEList/Unsettable",555),sDn(1161,555,Trt,hV),uZn.Ti=function(n,t){var e,i;return e=uG(Vdn(this,n,t),89),uN(this.e)&&Yv(this,new wtn(this.a,7,(YYn(),P_t),xwn(t),F$(i=e.c,90)?uG(i,29):x_t,n)),e},uZn.Uj=function(n,t){return Dmn(this,uG(n,89),t)},uZn.Vj=function(n,t){return $mn(this,uG(n,89),t)},uZn.Wj=function(n,t,e){return TSn(this,uG(n,89),uG(t,89),e)},uZn.Ij=function(n,t,e,i,r){switch(n){case 3:return i2(this,n,t,e,i,this.i>1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return yMn(this)},uZn.Gk=function(){CVn(this)},VW(Ytt,"EClassImpl/1",1161),sDn(1175,1174,Fit),uZn.dj=function(n){var t,e,i,r,c,a,o;if(8!=(e=n.gj())){if(0==(i=xkn(n)))switch(e){case 1:case 9:null!=(o=n.kj())&&(!(t=y9(uG(o,482))).c&&(t.c=new Ks),rin(t.c,n.jj())),null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 3:null!=(a=n.ij())&&(1&(r=uG(a,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29))));break;case 5:if(null!=(a=n.ij()))for(c=uG(a,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),ttn(t.c,uG(n.jj(),29)));break;case 4:null!=(o=n.kj())&&(1&(r=uG(o,482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj())));break;case 6:if(null!=(o=n.kj()))for(c=uG(o,16).Kc();c.Ob();)1&(r=uG(c.Pb(),482)).Bb||(!(t=y9(r)).c&&(t.c=new Ks),rin(t.c,n.jj()))}this.ql(i)}},uZn.ql=function(n){bBn(this,n)},uZn.b=63,VW(Ytt,"ESuperAdapter",1175),sDn(1176,1175,Fit,$m),uZn.ql=function(n){yLn(this,n)},VW(Ytt,"EClassImpl/10",1176),sDn(1165,710,Trt),uZn.Ei=function(n,t){return PCn(this,n,t)},uZn.Fi=function(n){return QMn(this,n)},uZn.Gi=function(n,t){edn(this,n,t)},uZn.Hi=function(n){V9(this,n)},uZn.$i=function(n){return Otn(this,n)},uZn.Xi=function(n,t){return iin(this,n,t)},uZn.Wk=function(n,t){throw hv(new Kv)},uZn.Ii=function(){return new nR(this)},uZn.Ji=function(){return new tR(this)},uZn.Ki=function(n){return han(this,n)},uZn.Xk=function(n,t){throw hv(new Kv)},uZn.Fk=function(n){return this},uZn.Qj=function(){return 0!=this.i},uZn.Wb=function(n){throw hv(new Kv)},uZn.Gk=function(){throw hv(new Kv)},VW(art,"EcoreEList/UnmodifiableEList",1165),sDn(328,1165,Trt,vL),uZn.Yi=function(){return!1},VW(art,"EcoreEList/UnmodifiableEList/FastCompare",328),sDn(1168,328,Trt,Afn),uZn.dd=function(n){var t,e;if(F$(n,179)&&-1!=(t=uG(n,179).Lj()))for(e=this.i;t4){if(!this.fk(n))return!1;if(this.al()){if(a=(t=(e=uG(n,54)).Eh())==this.b&&(this.ml()?e.yh(e.Fh(),uG(ern(e1(this.b),this.Lj()).Hk(),29).kk())==lMn(uG(ern(e1(this.b),this.Lj()),19)).n:-1-e.Fh()==this.Lj()),this.nl()&&!a&&!t&&e.Jh())for(i=0;i1||-1==e)},uZn.ml=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&!!lMn(uG(n,19))},uZn.nl=function(){var n;return!!F$(n=ern(e1(this.b),this.Lj()),102)&&0!=(uG(n,19).Bb&P0n)},uZn.dd=function(n){var t,e,i;if((e=this.zj(n))>=0)return e;if(this.ol())for(t=0,i=this.Ej();t=0;--n)yzn(this,n,this.xj(n));return this.Fj()},uZn.Qc=function(n){var t;if(this.nl())for(t=this.Ej()-1;t>=0;--t)yzn(this,t,this.xj(t));return this.Gj(n)},uZn.Gk=function(){_Vn(this)},uZn.Zi=function(n,t){return Atn(this,n,t)},VW(art,"DelegatingEcoreEList",756),sDn(1171,756,Crt,aF),uZn.qj=function(n,t){VR(this,n,uG(t,29))},uZn.rj=function(n){BN(this,uG(n,29))},uZn.xj=function(n){var t;return F$(t=uG(Vrn(V5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Cj=function(n){var t;return F$(t=uG(e_n(V5(this.a),n),89).c,90)?uG(t,29):(YYn(),x_t)},uZn.Dj=function(n,t){return YMn(this,n,uG(t,29))},uZn.Li=function(){return!1},uZn.Ij=function(n,t,e,i,r){return null},uZn.sj=function(){return new Rm(this)},uZn.tj=function(){CVn(V5(this.a))},uZn.uj=function(n){return Mdn(this,n)},uZn.vj=function(n){var t;for(t=n.Kc();t.Ob();)if(!Mdn(this,t.Pb()))return!1;return!0},uZn.wj=function(n){var t,e,i;if(F$(n,15)&&(i=uG(n,15)).gc()==V5(this.a).i){for(t=i.Kc(),e=new DD(this);t.Ob();)if(xA(t.Pb())!==xA(Zkn(e)))return!1;return!0}return!1},uZn.yj=function(){var n,t,e,i;for(t=1,n=new DD(V5(this.a));n.e!=n.i.gc();)t=31*t+((e=F$(i=uG(Zkn(n),89).c,90)?uG(i,29):(YYn(),x_t))?xx(e):0);return t},uZn.zj=function(n){var t,e,i,r;for(i=0,e=new DD(V5(this.a));e.e!=e.i.gc();){if(t=uG(Zkn(e),89),xA(n)===xA(F$(r=t.c,90)?uG(r,29):(YYn(),x_t)))return i;++i}return-1},uZn.Aj=function(){return 0==V5(this.a).i},uZn.Bj=function(){return null},uZn.Ej=function(){return V5(this.a).i},uZn.Fj=function(){var n,t,e,i,r,c;for(c=V5(this.a).i,r=Inn(dat,EZn,1,c,5,1),e=0,t=new DD(V5(this.a));t.e!=t.i.gc();)n=uG(Zkn(t),89),r[e++]=F$(i=n.c,90)?uG(i,29):(YYn(),x_t);return r},uZn.Gj=function(n){var t,e,i,r;for(r=V5(this.a).i,n.lengthr&&uQ(n,r,null),e=0,t=new DD(V5(this.a));t.e!=t.i.gc();)uQ(n,e++,F$(i=uG(Zkn(t),89).c,90)?uG(i,29):(YYn(),x_t));return n},uZn.Hj=function(){var n,t,e,i,r;for((r=new VM).a+="[",n=V5(this.a),t=0,i=V5(this.a).i;t>16)>=0?zTn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,6,e);case 9:return!this.a&&(this.a=new fz(d_t,this,9,5)),Nmn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 6:return $Un(this,null,6,e);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),Nyn(this.A,n,e);case 9:return!this.a&&(this.a=new fz(d_t,this,9,5)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),I_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),I_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return null!=this.D&&this.D==this.F;case 3:return!!_Tn(this);case 4:return!!dbn(this);case 5:return null!=this.F&&this.F!=this.D&&this.F!=this.B;case 6:return!!D0(this);case 7:return!!this.A&&0!=this.A.i;case 8:return!(256&this.Bb);case 9:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void d2(this,mK(t));case 2:return void pN(this,mK(t));case 5:return void TWn(this,mK(t));case 7:return!this.A&&(this.A=new PD(J_t,this,7)),CVn(this.A),!this.A&&(this.A=new PD(J_t,this,7)),void CW(this.A,uG(t,16));case 8:return void pdn(this,oM(gK(t)));case 9:return!this.a&&(this.a=new fz(d_t,this,9,5)),CVn(this.a),!this.a&&(this.a=new fz(d_t,this,9,5)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n),t)},uZn.ii=function(){return YYn(),I_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,184)&&(uG(this.Cb,184).tb=null),void qon(this,null);case 2:return sbn(this,null),void Ocn(this,this.D);case 5:return void TWn(this,null);case 7:return!this.A&&(this.A=new PD(J_t,this,7)),void CVn(this.A);case 8:return void pdn(this,!0);case 9:return!this.a&&(this.a=new fz(d_t,this,9,5)),void CVn(this.a)}sdn(this,n-iQ((YYn(),I_t)),ern(uG(Lsn(this,16),29)||I_t,n))},uZn.pi=function(){var n,t;if(this.a)for(n=0,t=this.a.i;n>16==5?uG(this.Cb,685):null}return $tn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 5:return this.Cb&&(e=(i=this.Db>>16)>=0?Qjn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 5:return $Un(this,null,5,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),O_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),O_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return 0!=this.d;case 3:return!!this.b;case 4:return null!=this.c;case 5:return!(this.Db>>16!=5||!uG(this.Cb,685))}return l5(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void Icn(this,uG(t,17).a);case 3:return void h$n(this,uG(t,2039));case 4:return void Uan(this,mK(t))}lpn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n),t)},uZn.ii=function(){return YYn(),O_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void qon(this,null);case 2:return void Icn(this,0);case 3:return void h$n(this,null);case 4:return void Uan(this,null)}sdn(this,n-iQ((YYn(),O_t)),ern(uG(Lsn(this,16),29)||O_t,n))},uZn.Ib=function(){var n;return null==(n=this.c)?this.zb:n},uZn.b=null,uZn.c=null,uZn.d=0,VW(Ytt,"EEnumLiteralImpl",582);var nBt,tBt,eBt,iBt=Iq(Ytt,"EFactoryImpl/InternalEDateTimeFormat");sDn(499,1,{2114:1},Km),VW(Ytt,"EFactoryImpl/1ClientInternalEDateTimeFormat",499),sDn(248,120,{110:1,94:1,93:1,89:1,58:1,114:1,54:1,99:1,248:1,119:1,120:1},ev),uZn.Ch=function(n,t,e){var i;return e=$Un(this,n,t,e),this.e&&F$(n,179)&&(i=bRn(this,this.e))!=this.c&&(e=PWn(this,i,e)),e},uZn.Lh=function(n,t,e){switch(n){case 0:return this.f;case 1:return!this.d&&(this.d=new MD(g_t,this,1)),this.d;case 2:return t?MGn(this):this.c;case 3:return this.b;case 4:return this.e;case 5:return t?PMn(this):this.a}return $tn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return vwn(this,null,e);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),Nyn(this.d,n,e);case 3:return kwn(this,null,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),L_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),L_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.f;case 1:return!!this.d&&0!=this.d.i;case 2:return!!this.c;case 3:return!!this.b;case 4:return!!this.e;case 5:return!!this.a}return l5(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void cPn(this,uG(t,89));case 1:return!this.d&&(this.d=new MD(g_t,this,1)),CVn(this.d),!this.d&&(this.d=new MD(g_t,this,1)),void CW(this.d,uG(t,16));case 3:return void rPn(this,uG(t,89));case 4:return void MIn(this,uG(t,850));case 5:return void Urn(this,uG(t,142))}lpn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n),t)},uZn.ii=function(){return YYn(),L_t},uZn.ki=function(n){switch(n){case 0:return void cPn(this,null);case 1:return!this.d&&(this.d=new MD(g_t,this,1)),void CVn(this.d);case 3:return void rPn(this,null);case 4:return void MIn(this,null);case 5:return void Urn(this,null)}sdn(this,n-iQ((YYn(),L_t)),ern(uG(Lsn(this,16),29)||L_t,n))},uZn.Ib=function(){var n;return(n=new lx(vxn(this))).a+=" (expression: ",qXn(this,n),n.a+=")",n.a},VW(Ytt,"EGenericTypeImpl",248),sDn(2067,2062,Irt),uZn.Gi=function(n,t){YK(this,n,t)},uZn.Wk=function(n,t){return YK(this,this.gc(),n),t},uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return this.Ji()},uZn.pj=function(){return new Vm(this)},uZn.Ji=function(){return this.Ki(0)},uZn.Ki=function(n){return this.pj().fd(n)},uZn.Xk=function(n,t){return Wpn(this,n,!0),t},uZn.Ti=function(n,t){var e;return e=Kjn(this,t),this.fd(n).Rb(e),e},uZn.Ui=function(n,t){Wpn(this,t,!0),this.fd(n).Rb(t)},VW(art,"AbstractSequentialInternalEList",2067),sDn(496,2067,Irt,Vx),uZn.$i=function(n){return hyn(this.pj(),n)},uZn.Ii=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.pj=function(){return new kL(this.a,this.b)},uZn.Ji=function(){return null==this.b?(EP(),EP(),eBt):this.sl()},uZn.Ki=function(n){var t,e;if(null==this.b){if(n<0||n>1)throw hv(new dM(Hit+n+", size=0"));return EP(),EP(),eBt}for(e=this.sl(),t=0;t0;)if(t=this.c[--this.d],(!this.e||t.pk()!=tFt||0!=t.Lj())&&(!this.vl()||this.b.Xh(t)))if(c=this.b.Nh(t,this.ul()),this.f=(PP(),uG(t,69).xk()),this.f||t.Jk()){if(this.ul()?(i=uG(c,15),this.k=i):(i=uG(c,71),this.k=this.j=i),F$(this.k,59)?(this.o=this.k.gc(),this.n=this.o):this.p=this.j?this.j.Ki(this.k.gc()):this.k.fd(this.k.gc()),this.p?dAn(this,this.p):hLn(this))return r=this.p?this.p.Ub():this.j?this.j.$i(--this.n):this.k.Xb(--this.n),this.f?((n=uG(r,76)).Lk(),e=n.md(),this.i=e):(e=r,this.i=e),this.g=-3,!0}else if(null!=c)return this.k=null,this.p=null,e=c,this.i=e,this.g=-2,!0;return this.k=null,this.p=null,this.g=-1,!1}},uZn.Pb=function(){return Ksn(this)},uZn.Tb=function(){return this.a},uZn.Ub=function(){var n;if(this.g<-1||this.Sb())return--this.a,this.g=0,n=this.i,this.Sb(),n;throw hv(new Bv)},uZn.Vb=function(){return this.a-1},uZn.Qb=function(){throw hv(new Kv)},uZn.ul=function(){return!1},uZn.Wb=function(n){throw hv(new Kv)},uZn.vl=function(){return!0},uZn.a=0,uZn.d=0,uZn.f=!1,uZn.g=0,uZn.n=0,uZn.o=0,VW(art,"EContentsEList/FeatureIteratorImpl",287),sDn(711,287,Ort,WR),uZn.ul=function(){return!0},VW(art,"EContentsEList/ResolvingFeatureIteratorImpl",711),sDn(1178,711,Ort,QR),uZn.vl=function(){return!1},VW(Ytt,"ENamedElementImpl/1/1",1178),sDn(1179,287,Ort,JR),uZn.vl=function(){return!1},VW(Ytt,"ENamedElementImpl/1/2",1179),sDn(39,152,Bit,t8,e8,lz,btn,Ken,j9,Bcn,o4,Hcn,u4,E9,s4,qcn,h4,S9,f4,Ucn,l4,bz,wtn,kZ,Gcn,b4,P9,w4),uZn.Kj=function(){return ntn(this)},uZn.Rj=function(){var n;return(n=ntn(this))?n.ik():null},uZn.hj=function(n){return-1==this.b&&this.a&&(this.b=this.c.Hh(this.a.Lj(),this.a.pk())),this.c.yh(this.b,n)},uZn.jj=function(){return this.c},uZn.Sj=function(){var n;return!!(n=ntn(this))&&n.tk()},uZn.b=-1,VW(Ytt,"ENotificationImpl",39),sDn(411,292,{110:1,94:1,93:1,155:1,197:1,58:1,62:1,114:1,481:1,54:1,99:1,158:1,411:1,292:1,119:1,120:1},Yk),uZn.Ah=function(n){return fEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,29):null;case 11:return!this.d&&(this.d=new PD(J_t,this,11)),this.d;case 12:return!this.c&&(this.c=new fz(m_t,this,12,10)),this.c;case 13:return!this.a&&(this.a=new oF(this,this)),this.a;case 14:return Aen(this)}return $tn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?fEn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,10,e);case 12:return!this.c&&(this.c=new fz(m_t,this,12,10)),Nmn(this.c,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return $Un(this,null,10,e);case 11:return!this.d&&(this.d=new PD(J_t,this,11)),Nyn(this.d,n,e);case 12:return!this.c&&(this.c=new fz(m_t,this,12,10)),Nyn(this.c,n,e);case 14:return Nyn(Aen(this),n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),R_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),R_t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,29));case 11:return!!this.d&&0!=this.d.i;case 12:return!!this.c&&0!=this.c.i;case 13:return!(!this.a||0==Aen(this.a.a).i||this.b&&MMn(this.b));case 14:return!!this.b&&MMn(this.b)}return l5(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),CVn(this.d),!this.d&&(this.d=new PD(J_t,this,11)),void CW(this.d,uG(t,16));case 12:return!this.c&&(this.c=new fz(m_t,this,12,10)),CVn(this.c),!this.c&&(this.c=new fz(m_t,this,12,10)),void CW(this.c,uG(t,16));case 13:return!this.a&&(this.a=new oF(this,this)),_Vn(this.a),!this.a&&(this.a=new oF(this,this)),void CW(this.a,uG(t,16));case 14:return CVn(Aen(this)),void CW(Aen(this),uG(t,16))}lpn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n),t)},uZn.ii=function(){return YYn(),R_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 11:return!this.d&&(this.d=new PD(J_t,this,11)),void CVn(this.d);case 12:return!this.c&&(this.c=new fz(m_t,this,12,10)),void CVn(this.c);case 13:return void(this.a&&_Vn(this.a));case 14:return void(this.b&&CVn(this.b))}sdn(this,n-iQ((YYn(),R_t)),ern(uG(Lsn(this,16),29)||R_t,n))},uZn.pi=function(){var n,t;if(this.c)for(n=0,t=this.c.i;ni&&uQ(n,i,null),e=0,t=new DD(Aen(this.a));t.e!=t.i.gc();)uQ(n,e++,uG(Zkn(t),89).c||(YYn(),N_t));return n},uZn.Hj=function(){var n,t,e,i;for((i=new VM).a+="[",n=Aen(this.a),t=0,e=Aen(this.a).i;t1);case 5:return i2(this,n,t,e,i,this.i-uG(e,15).gc()>0);default:return new Ken(this.e,n,this.c,t,e,i,!0)}},uZn.Tj=function(){return!0},uZn.Qj=function(){return MMn(this)},uZn.Gk=function(){CVn(this)},VW(Ytt,"EOperationImpl/2",1377),sDn(507,1,{2037:1,507:1},EA),VW(Ytt,"EPackageImpl/1",507),sDn(14,83,Trt,fz),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.ml=function(){return!0},uZn.b=0,VW(art,"EObjectContainmentWithInverseEList",14),sDn(365,14,Trt,i_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectContainmentWithInverseEList/Resolving",365),sDn(308,365,Trt,vz),uZn.Ni=function(){this.a.tb=null},VW(Ytt,"EPackageImpl/2",308),sDn(1278,1,{},Ps),VW(Ytt,"EPackageImpl/3",1278),sDn(733,45,B0n,Zk),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},VW(Ytt,"EPackageRegistryImpl",733),sDn(518,292,{110:1,94:1,93:1,155:1,197:1,58:1,2116:1,114:1,481:1,54:1,99:1,158:1,518:1,292:1,119:1,120:1},ny),uZn.Ah=function(n){return lEn(this,n)},uZn.Lh=function(n,t,e){var i;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(i=this.t)>1||-1==i;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return this.Db>>16==10?uG(this.Cb,62):null}return $tn(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n),t,e)},uZn.Sh=function(n,t,e){var i;switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nmn(this.Ab,n,e);case 10:return this.Cb&&(e=(i=this.Db>>16)>=0?lEn(this,e):this.Cb.Th(this,-1-i,null,e)),$Un(this,n,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().zk(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 9:return IW(this,e);case 10:return $Un(this,null,10,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),__t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),__t)),n,e)},uZn.Wh=function(n){var t;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(t=this.t)>1||-1==t;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return!(this.Db>>16!=10||!uG(this.Cb,62))}return l5(this,n-iQ((YYn(),__t)),ern(uG(Lsn(this,16),29)||__t,n))},uZn.ii=function(){return YYn(),__t},VW(Ytt,"EParameterImpl",518),sDn(102,462,{110:1,94:1,93:1,155:1,197:1,58:1,19:1,179:1,69:1,114:1,481:1,54:1,99:1,158:1,102:1,462:1,292:1,119:1,120:1,692:1},PK),uZn.Lh=function(n,t,e){var i,r;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return qx(),!!(256&this.Bb);case 3:return qx(),!!(512&this.Bb);case 4:return xwn(this.s);case 5:return xwn(this.t);case 6:return qx(),(r=this.t)>1||-1==r;case 7:return qx(),this.s>=1;case 8:return t?bEn(this):this.r;case 9:return this.q;case 10:return qx(),0!=(this.Bb&w1n);case 11:return qx(),0!=(this.Bb&frt);case 12:return qx(),0!=(this.Bb&j0n);case 13:return this.j;case 14:return NRn(this);case 15:return qx(),0!=(this.Bb&hrt);case 16:return qx(),0!=(this.Bb&zZn);case 17:return K0(this);case 18:return qx(),0!=(this.Bb&Qtt);case 19:return qx(),!(!(i=lMn(this))||0==(i.Bb&Qtt));case 20:return qx(),0!=(this.Bb&P0n);case 21:return t?lMn(this):this.b;case 22:return t?Ffn(this):R9(this);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),this.a}return $tn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t,e)},uZn.Wh=function(n){var t,e;switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!(256&this.Bb);case 3:return!(512&this.Bb);case 4:return 0!=this.s;case 5:return 1!=this.t;case 6:return(e=this.t)>1||-1==e;case 7:return this.s>=1;case 8:return!!this.r&&!this.q.e&&0==yQ(this.q).i;case 9:return!(!this.q||this.r&&!this.q.e&&0==yQ(this.q).i);case 10:return 0==(this.Bb&w1n);case 11:return 0!=(this.Bb&frt);case 12:return 0!=(this.Bb&j0n);case 13:return null!=this.j;case 14:return null!=NRn(this);case 15:return 0!=(this.Bb&hrt);case 16:return 0!=(this.Bb&zZn);case 17:return!!K0(this);case 18:return 0!=(this.Bb&Qtt);case 19:return!!(t=lMn(this))&&0!=(t.Bb&Qtt);case 20:return 0==(this.Bb&P0n);case 21:return!!this.b;case 22:return!!R9(this);case 23:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.bi=function(n,t){var e;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void g2(this,mK(t));case 2:return void ddn(this,oM(gK(t)));case 3:return void mdn(this,oM(gK(t)));case 4:return void Pcn(this,uG(t,17).a);case 5:return void Ccn(this,uG(t,17).a);case 8:return void Kbn(this,uG(t,142));case 9:return void((e=CCn(this,uG(t,89),null))&&e.oj());case 10:return void Wdn(this,oM(gK(t)));case 11:return void Ydn(this,oM(gK(t)));case 12:return void Qdn(this,oM(gK(t)));case 13:return void mA(this,mK(t));case 15:return void Jdn(this,oM(gK(t)));case 16:return void Cgn(this,oM(gK(t)));case 18:return void p2(this,oM(gK(t)));case 20:return void Ign(this,oM(gK(t)));case 21:return void bon(this,uG(t,19));case 23:return!this.a&&(this.a=new OD(u_t,this,23)),CVn(this.a),!this.a&&(this.a=new OD(u_t,this,23)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n),t)},uZn.ii=function(){return YYn(),B_t},uZn.ki=function(n){var t;switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),4),void qon(this,null);case 2:return void ddn(this,!0);case 3:return void mdn(this,!0);case 4:return void Pcn(this,0);case 5:return void Ccn(this,1);case 8:return void Kbn(this,null);case 9:return void((t=CCn(this,null,null))&&t.oj());case 10:return void Wdn(this,!0);case 11:return void Ydn(this,!1);case 12:return void Qdn(this,!1);case 13:return this.i=null,void lon(this,null);case 15:return void Jdn(this,!1);case 16:return void Cgn(this,!1);case 18:return Pgn(this,!1),void(F$(this.Cb,90)&&yLn(y9(uG(this.Cb,90)),2));case 20:return void Ign(this,!0);case 21:return void bon(this,null);case 23:return!this.a&&(this.a=new OD(u_t,this,23)),void CVn(this.a)}sdn(this,n-iQ((YYn(),B_t)),ern(uG(Lsn(this,16),29)||B_t,n))},uZn.pi=function(){Ffn(this),BJ(Nen((gAn(),kBt),this)),bEn(this),this.Bb|=1},uZn.uk=function(){return lMn(this)},uZn._k=function(){var n;return!!(n=lMn(this))&&0!=(n.Bb&Qtt)},uZn.al=function(){return 0!=(this.Bb&Qtt)},uZn.bl=function(){return 0!=(this.Bb&P0n)},uZn.Yk=function(n,t){return this.c=null,Ywn(this,n,t)},uZn.Ib=function(){var n;return 64&this.Db?MBn(this):((n=new fx(MBn(this))).a+=" (containment: ",Lj(n,0!=(this.Bb&Qtt)),n.a+=", resolveProxies: ",Lj(n,0!=(this.Bb&P0n)),n.a+=")",n.a)},VW(Ytt,"EReferenceImpl",102),sDn(561,120,{110:1,44:1,94:1,93:1,136:1,58:1,114:1,54:1,99:1,561:1,119:1,120:1},Cs),uZn.Fb=function(n){return this===n},uZn.ld=function(){return this.b},uZn.md=function(){return this.c},uZn.Hb=function(){return xx(this)},uZn.Di=function(n){Rq(this,mK(n))},uZn.nd=function(n){return DG(this,mK(n))},uZn.Lh=function(n,t,e){switch(n){case 0:return this.b;case 1:return this.c}return $tn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.b;case 1:return null!=this.c}return l5(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.bi=function(n,t){switch(n){case 0:return void Kq(this,mK(t));case 1:return void Jan(this,mK(t))}lpn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n),t)},uZn.ii=function(){return YYn(),H_t},uZn.ki=function(n){switch(n){case 0:return void Qan(this,null);case 1:return void Jan(this,null)}sdn(this,n-iQ((YYn(),H_t)),ern(uG(Lsn(this,16),29)||H_t,n))},uZn.Bi=function(){var n;return-1==this.a&&(n=this.b,this.a=null==n?0:pln(n)),this.a},uZn.Ci=function(n){this.a=n},uZn.Ib=function(){var n;return 64&this.Db?vxn(this):((n=new fx(vxn(this))).a+=" (key: ",zA(n,this.b),n.a+=", value: ",zA(n,this.c),n.a+=")",n.a)},uZn.a=-1,uZn.b=null,uZn.c=null;var rBt,cBt,aBt,oBt,uBt,sBt,hBt,fBt,lBt,bBt,wBt=VW(Ytt,"EStringToStringMapEntryImpl",561),dBt=Iq(art,"FeatureMap/Entry/Internal");sDn(576,1,Art),uZn.xl=function(n){return this.yl(uG(n,54))},uZn.yl=function(n){return this.xl(n)},uZn.Fb=function(n){var t,e;return this===n||!!F$(n,76)&&(t=uG(n,76)).Lk()==this.c&&(null==(e=this.md())?null==t.md():udn(e,t.md()))},uZn.Lk=function(){return this.c},uZn.Hb=function(){var n;return n=this.md(),Hon(this.c)^(null==n?0:Hon(n))},uZn.Ib=function(){var n,t;return t=Hrn((n=this.c).qk()).yi(),n.xe(),(null!=t&&0!=t.length?t+":"+n.xe():n.xe())+"="+this.md()},VW(Ytt,"EStructuralFeatureImpl/BasicFeatureMapEntry",576),sDn(791,576,Art,sF),uZn.yl=function(n){return new sF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return Kun(this,n,this.a,t,e)},uZn.Al=function(n,t,e){return Fun(this,n,this.a,t,e)},VW(Ytt,"EStructuralFeatureImpl/ContainmentUpdatingFeatureMapEntry",791),sDn(1350,1,{},SA),uZn.yk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Yl(this.a).Fk(i)},uZn.zk=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Pl(this.a,i,r)},uZn.Ak=function(n,t,e,i,r){return uG(vtn(n,this.b),220).Ql(this.a,i,r)},uZn.Bk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a).Qj()},uZn.Ck=function(n,t,e,i){uG(vtn(n,this.b),220).Yl(this.a).Wb(i)},uZn.Dk=function(n,t,e){return uG(vtn(n,this.b),220).Yl(this.a)},uZn.Ek=function(n,t,e){uG(vtn(n,this.b),220).Yl(this.a).Gk()},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateFeatureMapDelegator",1350),sDn(91,1,{},RU,CY,GZ,r8),uZn.yk=function(n,t,e,i,r){var c;if(null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),!r)switch(this.e){case 50:case 41:return uG(c,597).bk();case 40:return uG(c,220).Vl()}return c},uZn.zk=function(n,t,e,i,r){var c;return null==(c=t.li(e))&&t.mi(e,c=xYn(this,n)),uG(c,71).Wk(i,r)},uZn.Ak=function(n,t,e,i,r){var c;return null!=(c=t.li(e))&&(r=uG(c,71).Xk(i,r)),r},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&uG(i,79).Qj()},uZn.Ck=function(n,t,e,i){var r;!(r=uG(t.li(e),79))&&t.mi(e,r=xYn(this,n)),r.Wb(i)},uZn.Dk=function(n,t,e){var i;return null==(i=t.li(e))&&t.mi(e,i=xYn(this,n)),F$(i,79)?uG(i,79):new _m(uG(t.li(e),15))},uZn.Ek=function(n,t,e){var i;!(i=uG(t.li(e),79))&&t.mi(e,i=xYn(this,n)),i.Gk()},uZn.b=0,uZn.e=0,VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateMany",91),sDn(512,1,{}),uZn.zk=function(n,t,e,i,r){throw hv(new Kv)},uZn.Ak=function(n,t,e,i,r){throw hv(new Kv)},uZn.Dk=function(n,t,e){return new IY(this,n,t,e)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle",512),sDn(1367,1,ort,IY),uZn.Fk=function(n){return this.a.yk(this.c,this.d,this.b,n,!0)},uZn.Qj=function(){return this.a.Bk(this.c,this.d,this.b)},uZn.Wb=function(n){this.a.Ck(this.c,this.d,this.b,n)},uZn.Gk=function(){this.a.Ek(this.c,this.d,this.b)},uZn.b=0,VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingle/1",1367),sDn(784,512,{},_1),uZn.yk=function(n,t,e,i,r){return PHn(n,n.Ph(),n.Fh())==this.b?this.bl()&&i?J$n(n):n.Ph():null},uZn.zk=function(n,t,e,i,r){var c,a;return n.Ph()&&(r=(c=n.Fh())>=0?n.Ah(r):n.Ph().Th(n,-1-c,null,r)),a=emn(n.Dh(),this.e),n.Ch(i,a,r)},uZn.Ak=function(n,t,e,i,r){var c;return c=emn(n.Dh(),this.e),n.Ch(null,c,r)},uZn.Bk=function(n,t,e){var i;return i=emn(n.Dh(),this.e),!!n.Ph()&&n.Fh()==i},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));if(r=n.Ph(),a=emn(n.Dh(),this.e),xA(i)!==xA(r)||n.Fh()!=a&&null!=i){if(eEn(n,uG(i,58)))throw hv(new vM(net+n.Ib()));u=null,r&&(u=(c=n.Fh())>=0?n.Ah(u):n.Ph().Th(n,-1-c,null,u)),(o=uG(i,54))&&(u=o.Rh(n,emn(o.Dh(),this.b),null,u)),(u=n.Ch(o,a,u))&&u.oj()}else n.vh()&&n.wh()&&Msn(n,new lz(n,1,a,i,i))},uZn.Ek=function(n,t,e){var i,r,c;n.Ph()?(c=(i=n.Fh())>=0?n.Ah(null):n.Ph().Th(n,-1-i,null,null),r=emn(n.Dh(),this.e),(c=n.Ch(null,r,c))&&c.oj()):n.vh()&&n.wh()&&Msn(n,new bz(n,1,this.e,null,null))},uZn.bl=function(){return!1},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainer",784),sDn(1351,784,{},KU),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleContainerResolving",1351),sDn(574,512,{}),uZn.yk=function(n,t,e,i,r){var c;return null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c},uZn.Bk=function(n,t,e){var i;return null!=(i=t.li(e))&&(xA(i)===xA(rBt)||!udn(i,this.b))},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=null==(c=t.li(e))?this.b:xA(c)===xA(rBt)?null:c,null==i?null!=this.c?(t.mi(e,null),i=this.b):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Cl(n,1,this.e,r,i))):null==i?null!=this.c?t.mi(e,null):null!=this.b?t.mi(e,rBt):t.mi(e,null):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=null==(r=t.li(e))?this.b:xA(r)===xA(rBt)?null:r,t.ni(e),Msn(n,this.d.Cl(n,1,this.e,i,this.b))):t.ni(e)},uZn.Bl=function(n){throw hv(new $v)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData",574),sDn($rt,1,{},Is),uZn.Cl=function(n,t,e,i,r){return new bz(n,t,e,i,r)},uZn.Dl=function(n,t,e,i,r,c){return new kZ(n,t,e,i,r,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator",$rt),sDn(1368,$rt,{},Os),uZn.Cl=function(n,t,e,i,r){return new P9(n,t,e,oM(gK(i)),oM(gK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new w4(n,t,e,oM(gK(i)),oM(gK(r)),c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/1",1368),sDn(1369,$rt,{},As),uZn.Cl=function(n,t,e,i,r){return new Bcn(n,t,e,uG(i,222).a,uG(r,222).a)},uZn.Dl=function(n,t,e,i,r,c){return new o4(n,t,e,uG(i,222).a,uG(r,222).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/2",1369),sDn(1370,$rt,{},Ls),uZn.Cl=function(n,t,e,i,r){return new Hcn(n,t,e,uG(i,180).a,uG(r,180).a)},uZn.Dl=function(n,t,e,i,r,c){return new u4(n,t,e,uG(i,180).a,uG(r,180).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/3",1370),sDn(1371,$rt,{},Ns),uZn.Cl=function(n,t,e,i,r){return new E9(n,t,e,uM(pK(i)),uM(pK(r)))},uZn.Dl=function(n,t,e,i,r,c){return new s4(n,t,e,uM(pK(i)),uM(pK(r)),c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/4",1371),sDn(1372,$rt,{},$s),uZn.Cl=function(n,t,e,i,r){return new qcn(n,t,e,uG(i,161).a,uG(r,161).a)},uZn.Dl=function(n,t,e,i,r,c){return new h4(n,t,e,uG(i,161).a,uG(r,161).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/5",1372),sDn(1373,$rt,{},Ds),uZn.Cl=function(n,t,e,i,r){return new S9(n,t,e,uG(i,17).a,uG(r,17).a)},uZn.Dl=function(n,t,e,i,r,c){return new f4(n,t,e,uG(i,17).a,uG(r,17).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/6",1373),sDn(1374,$rt,{},xs),uZn.Cl=function(n,t,e,i,r){return new Ucn(n,t,e,uG(i,168).a,uG(r,168).a)},uZn.Dl=function(n,t,e,i,r,c){return new l4(n,t,e,uG(i,168).a,uG(r,168).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/7",1374),sDn(1375,$rt,{},Rs),uZn.Cl=function(n,t,e,i,r){return new Gcn(n,t,e,uG(i,191).a,uG(r,191).a)},uZn.Dl=function(n,t,e,i,r,c){return new b4(n,t,e,uG(i,191).a,uG(r,191).a,c)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleData/NotificationCreator/8",1375),sDn(1353,574,{},OY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataDynamic",1353),sDn(1354,574,{},lV),uZn.Bl=function(n){},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataStatic",1354),sDn(785,574,{}),uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c;n.vh()&&n.wh()?(r=!0,null==(c=t.li(e))?(r=!1,c=this.b):xA(c)===xA(rBt)&&(c=null),null==i?null!=this.c?(t.mi(e,null),i=this.b):t.mi(e,rBt):(this.Bl(i),t.mi(e,i)),Msn(n,this.d.Dl(n,1,this.e,c,i,!r))):null==i?null!=this.c?t.mi(e,null):t.mi(e,rBt):(this.Bl(i),t.mi(e,i))},uZn.Ek=function(n,t,e){var i,r;n.vh()&&n.wh()?(i=!0,null==(r=t.li(e))?(i=!1,r=this.b):xA(r)===xA(rBt)&&(r=null),t.ni(e),Msn(n,this.d.Dl(n,2,this.e,r,this.b,i))):t.ni(e)},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettable",785),sDn(1355,785,{},AY),uZn.Bl=function(n){if(!this.a.fk(n))throw hv(new mM(Lrt+Tbn(n)+Nrt+this.a+"'"))},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableDynamic",1355),sDn(1356,785,{},bV),uZn.Bl=function(n){},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleDataUnsettableStatic",1356),sDn(410,512,{},OX),uZn.yk=function(n,t,e,i,r){var c,a,o,u,s;if(s=t.li(e),this.tk()&&xA(s)===xA(rBt))return null;if(this.bl()&&i&&null!=s){if((o=uG(s,54)).Vh()&&o!=(u=mwn(n,o))){if(!LGn(this.a,u))throw hv(new mM(Lrt+Tbn(u)+Nrt+this.a+"'"));t.mi(e,s=u),this.al()&&(c=uG(u,54),a=o.Th(n,this.b?emn(o.Dh(),this.b):-1-emn(n.Dh(),this.e),null,null),!c.Ph()&&(a=c.Rh(n,this.b?emn(c.Dh(),this.b):-1-emn(n.Dh(),this.e),null,a)),a&&a.oj()),n.vh()&&n.wh()&&Msn(n,new bz(n,9,this.e,o,u))}return s}return s},uZn.zk=function(n,t,e,i,r){var c,a;return xA(a=t.li(e))===xA(rBt)&&(a=null),t.mi(e,i),this.Mj()?xA(a)!==xA(i)&&null!=a&&(r=(c=uG(a,54)).Th(n,emn(c.Dh(),this.b),null,r)):this.al()&&null!=a&&(r=uG(a,54).Th(n,-1-emn(n.Dh(),this.e),null,r)),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),r.nj(new bz(n,1,this.e,a,i))),r},uZn.Ak=function(n,t,e,i,r){var c;return xA(c=t.li(e))===xA(rBt)&&(c=null),t.ni(e),n.vh()&&n.wh()&&(!r&&(r=new cj(4)),this.tk()?r.nj(new bz(n,2,this.e,c,null)):r.nj(new bz(n,1,this.e,c,null))),r},uZn.Bk=function(n,t,e){return null!=t.li(e)},uZn.Ck=function(n,t,e,i){var r,c,a,o,u;if(null!=i&&!LGn(this.a,i))throw hv(new mM(Lrt+(F$(i,58)?nPn(uG(i,58).Dh()):crn(Tbn(i)))+Nrt+this.a+"'"));o=null!=(u=t.li(e)),this.tk()&&xA(u)===xA(rBt)&&(u=null),a=null,this.Mj()?xA(u)!==xA(i)&&(null!=u&&(a=(r=uG(u,54)).Th(n,emn(r.Dh(),this.b),null,a)),null!=i&&(a=(r=uG(i,54)).Rh(n,emn(r.Dh(),this.b),null,a))):this.al()&&xA(u)!==xA(i)&&(null!=u&&(a=uG(u,54).Th(n,-1-emn(n.Dh(),this.e),null,a)),null!=i&&(a=uG(i,54).Rh(n,-1-emn(n.Dh(),this.e),null,a))),null==i&&this.tk()?t.mi(e,rBt):t.mi(e,i),n.vh()&&n.wh()?(c=new kZ(n,1,this.e,u,i,this.tk()&&!o),a?(a.nj(c),a.oj()):Msn(n,c)):a&&a.oj()},uZn.Ek=function(n,t,e){var i,r,c,a,o;a=null!=(o=t.li(e)),this.tk()&&xA(o)===xA(rBt)&&(o=null),c=null,null!=o&&(this.Mj()?c=(i=uG(o,54)).Th(n,emn(i.Dh(),this.b),null,c):this.al()&&(c=uG(o,54).Th(n,-1-emn(n.Dh(),this.e),null,c))),t.ni(e),n.vh()&&n.wh()?(r=new kZ(n,this.tk()?2:1,this.e,o,null,a),c?(c.nj(r),c.oj()):Msn(n,r)):c&&c.oj()},uZn.Mj=function(){return!1},uZn.al=function(){return!1},uZn.bl=function(){return!1},uZn.tk=function(){return!1},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObject",410),sDn(575,410,{},tK),uZn.al=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainment",575),sDn(1359,575,{},eK),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentResolving",1359),sDn(787,575,{},iK),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettable",787),sDn(1361,787,{},cK),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentUnsettableResolving",1361),sDn(650,575,{},FU),uZn.Mj=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverse",650),sDn(1360,650,{},HU),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseResolving",1360),sDn(788,650,{},UU),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettable",788),sDn(1362,788,{},GU),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectContainmentWithInverseUnsettableResolving",1362),sDn(651,410,{},rK),uZn.bl=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolving",651),sDn(1363,651,{},aK),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingUnsettable",1363),sDn(789,651,{},_U),uZn.Mj=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverse",789),sDn(1364,789,{},qU),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectResolvingWithInverseUnsettable",1364),sDn(1357,410,{},oK),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectUnsettable",1357),sDn(786,410,{},BU),uZn.Mj=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverse",786),sDn(1358,786,{},XU),uZn.tk=function(){return!0},VW(Ytt,"EStructuralFeatureImpl/InternalSettingDelegateSingleEObjectWithInverseUnsettable",1358),sDn(790,576,Art,EQ),uZn.yl=function(n){return new EQ(this.a,this.c,n)},uZn.md=function(){return this.b},uZn.zl=function(n,t,e){return Snn(this,n,this.b,e)},uZn.Al=function(n,t,e){return Pnn(this,n,this.b,e)},VW(Ytt,"EStructuralFeatureImpl/InverseUpdatingFeatureMapEntry",790),sDn(1365,1,ort,_m),uZn.Fk=function(n){return this.a},uZn.Qj=function(){return F$(this.a,97)?uG(this.a,97).Qj():!this.a.dc()},uZn.Wb=function(n){this.a.$b(),this.a.Gc(uG(n,15))},uZn.Gk=function(){F$(this.a,97)?uG(this.a,97).Gk():this.a.$b()},VW(Ytt,"EStructuralFeatureImpl/SettingMany",1365),sDn(1366,576,Art,o8),uZn.xl=function(n){return new hF((uzn(),oHt),this.b.ri(this.a,n))},uZn.md=function(){return null},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},VW(Ytt,"EStructuralFeatureImpl/SimpleContentFeatureMapEntry",1366),sDn(652,576,Art,hF),uZn.xl=function(n){return new hF(this.c,n)},uZn.md=function(){return this.a},uZn.zl=function(n,t,e){return e},uZn.Al=function(n,t,e){return e},VW(Ytt,"EStructuralFeatureImpl/SimpleFeatureMapEntry",652),sDn(403,506,Qet,Ks),uZn.aj=function(n){return Inn(h_t,EZn,29,n,0,1)},uZn.Yi=function(){return!1},VW(Ytt,"ESuperAdapter/1",403),sDn(457,448,{110:1,94:1,93:1,155:1,197:1,58:1,114:1,850:1,54:1,99:1,158:1,457:1,119:1,120:1},Fs),uZn.Lh=function(n,t,e){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),this.Ab;case 1:return this.zb;case 2:return!this.a&&(this.a=new AX(this,g_t,this)),this.a}return $tn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),Nyn(this.Ab,n,e);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),Nyn(this.a,n,e)}return uG(ern(uG(Lsn(this,16),29)||(YYn(),q_t),t),69).wk().Ak(this,$vn(this),t-iQ((YYn(),q_t)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.Ab&&0!=this.Ab.i;case 1:return null!=this.zb;case 2:return!!this.a&&0!=this.a.i}return l5(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),CVn(this.Ab),!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CW(this.Ab,uG(t,16));case 1:return void qon(this,mK(t));case 2:return!this.a&&(this.a=new AX(this,g_t,this)),CVn(this.a),!this.a&&(this.a=new AX(this,g_t,this)),void CW(this.a,uG(t,16))}lpn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n),t)},uZn.ii=function(){return YYn(),q_t},uZn.ki=function(n){switch(n){case 0:return!this.Ab&&(this.Ab=new fz(c_t,this,0,3)),void CVn(this.Ab);case 1:return void qon(this,null);case 2:return!this.a&&(this.a=new AX(this,g_t,this)),void CVn(this.a)}sdn(this,n-iQ((YYn(),q_t)),ern(uG(Lsn(this,16),29)||q_t,n))},VW(Ytt,"ETypeParameterImpl",457),sDn(458,83,Trt,AX),uZn.Nj=function(n,t){return mCn(this,uG(n,89),t)},uZn.Oj=function(n,t){return vCn(this,uG(n,89),t)},VW(Ytt,"ETypeParameterImpl/1",458),sDn(647,45,B0n,ty),uZn.ec=function(){return new Um(this)},VW(Ytt,"ETypeParameterImpl/2",647),sDn(570,KZn,FZn,Um),uZn.Fc=function(n){return WF(this,uG(n,89))},uZn.Gc=function(n){var t,e,i;for(i=!1,e=n.Kc();e.Ob();)t=uG(e.Pb(),89),null==vJ(this.a,t,"")&&(i=!0);return i},uZn.$b=function(){$z(this.a)},uZn.Hc=function(n){return Pz(this.a,n)},uZn.Kc=function(){return new Gm(new bsn(new Nw(this.a).a))},uZn.Mc=function(n){return C7(this,n)},uZn.gc=function(){return oS(this.a)},VW(Ytt,"ETypeParameterImpl/2/1",570),sDn(571,1,$Zn,Gm),uZn.Nb=function(n){Sz(this,n)},uZn.Pb=function(){return uG(von(this.a).ld(),89)},uZn.Ob=function(){return this.a.b},uZn.Qb=function(){Oen(this.a)},VW(Ytt,"ETypeParameterImpl/2/1/1",571),sDn(1329,45,B0n,ey),uZn._b=function(n){return RA(n)?AZ(this,n):!!FX(this.f,n)},uZn.xc=function(n){var t;return F$(t=RA(n)?U1(this,n):DA(FX(this.f,n)),851)?(t=uG(t,851).Kk(),vJ(this,uG(n,241),t),t):null!=t?t:null==n?(SP(),EBt):null},VW(Ytt,"EValidatorRegistryImpl",1329),sDn(1349,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,2040:1,54:1,99:1,158:1,119:1,120:1},_s),uZn.ri=function(n,t){switch(n.hk()){case 21:case 22:case 23:case 24:case 26:case 31:case 32:case 37:case 38:case 39:case 40:case 43:case 44:case 48:case 49:case 20:return null==t?null:cpn(t);case 25:return Xrn(t);case 27:return nen(t);case 28:return ten(t);case 29:return null==t?null:N$(QKt[0],uG(t,206));case 41:return null==t?"":Ij(uG(t,297));case 42:return cpn(t);case 50:return mK(t);default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new Wk;case 1:return new vs;case 2:return new Kl;case 4:return new Gv;case 5:return new Jk;case 6:return new Uv;case 7:return new Fl;case 10:return new ps;case 11:return new Yk;case 12:return new aZ;case 13:return new ny;case 14:return new PK;case 17:return new Cs;case 18:return new ev;case 19:return new Fs;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){switch(n.hk()){case 20:return null==t?null:new Wj(t);case 21:return null==t?null:new PN(t);case 23:case 22:return null==t?null:Ovn(t);case 26:case 24:return null==t?null:Ben(mUn(t,-128,127)<<24>>24);case 25:return cxn(t);case 27:return sjn(t);case 28:return hjn(t);case 29:return rIn(t);case 32:case 31:return null==t?null:YIn(t);case 38:case 37:return null==t?null:new tk(t);case 40:case 39:return null==t?null:xwn(mUn(t,j1n,vZn));case 41:case 42:return null;case 44:case 43:return null==t?null:Hvn(tJn(t));case 49:case 48:return null==t?null:Rwn(mUn(t,xrt,32767)<<16>>16);case 50:return t;default:throw hv(new vM(tet+n.xe()+eet))}},VW(Ytt,"EcoreFactoryImpl",1349),sDn(560,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,2038:1,54:1,99:1,158:1,184:1,560:1,119:1,120:1,690:1},dJ),uZn.gb=!1,uZn.hb=!1;var gBt,pBt=!1;VW(Ytt,"EcorePackageImpl",560),sDn(1234,1,{851:1},Bs),uZn.Kk=function(){return HD(),SBt},VW(Ytt,"EcorePackageImpl/1",1234),sDn(1243,1,Wrt,Hs),uZn.fk=function(n){return F$(n,155)},uZn.gk=function(n){return Inn(uFt,EZn,155,n,0,1)},VW(Ytt,"EcorePackageImpl/10",1243),sDn(1244,1,Wrt,Us),uZn.fk=function(n){return F$(n,197)},uZn.gk=function(n){return Inn(hFt,EZn,197,n,0,1)},VW(Ytt,"EcorePackageImpl/11",1244),sDn(1245,1,Wrt,Gs),uZn.fk=function(n){return F$(n,58)},uZn.gk=function(n){return Inn(nFt,EZn,58,n,0,1)},VW(Ytt,"EcorePackageImpl/12",1245),sDn(1246,1,Wrt,qs),uZn.fk=function(n){return F$(n,411)},uZn.gk=function(n){return Inn(p_t,yrt,62,n,0,1)},VW(Ytt,"EcorePackageImpl/13",1246),sDn(1247,1,Wrt,Xs),uZn.fk=function(n){return F$(n,241)},uZn.gk=function(n){return Inn(fFt,EZn,241,n,0,1)},VW(Ytt,"EcorePackageImpl/14",1247),sDn(1248,1,Wrt,Vs),uZn.fk=function(n){return F$(n,518)},uZn.gk=function(n){return Inn(m_t,EZn,2116,n,0,1)},VW(Ytt,"EcorePackageImpl/15",1248),sDn(1249,1,Wrt,zs),uZn.fk=function(n){return F$(n,102)},uZn.gk=function(n){return Inn(v_t,krt,19,n,0,1)},VW(Ytt,"EcorePackageImpl/16",1249),sDn(1250,1,Wrt,Ws),uZn.fk=function(n){return F$(n,179)},uZn.gk=function(n){return Inn(o_t,krt,179,n,0,1)},VW(Ytt,"EcorePackageImpl/17",1250),sDn(1251,1,Wrt,Qs),uZn.fk=function(n){return F$(n,481)},uZn.gk=function(n){return Inn(a_t,EZn,481,n,0,1)},VW(Ytt,"EcorePackageImpl/18",1251),sDn(1252,1,Wrt,Js),uZn.fk=function(n){return F$(n,561)},uZn.gk=function(n){return Inn(wBt,Xit,561,n,0,1)},VW(Ytt,"EcorePackageImpl/19",1252),sDn(1235,1,Wrt,Ys),uZn.fk=function(n){return F$(n,331)},uZn.gk=function(n){return Inn(u_t,krt,35,n,0,1)},VW(Ytt,"EcorePackageImpl/2",1235),sDn(1253,1,Wrt,Zs),uZn.fk=function(n){return F$(n,248)},uZn.gk=function(n){return Inn(g_t,Prt,89,n,0,1)},VW(Ytt,"EcorePackageImpl/20",1253),sDn(1254,1,Wrt,nh),uZn.fk=function(n){return F$(n,457)},uZn.gk=function(n){return Inn(J_t,EZn,850,n,0,1)},VW(Ytt,"EcorePackageImpl/21",1254),sDn(1255,1,Wrt,th),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,VZn,485,n,8,1)},VW(Ytt,"EcorePackageImpl/22",1255),sDn(1256,1,Wrt,eh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,VZn,195,n,0,2)},VW(Ytt,"EcorePackageImpl/23",1256),sDn(1257,1,Wrt,ih),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,VZn,222,n,0,1)},VW(Ytt,"EcorePackageImpl/24",1257),sDn(1258,1,Wrt,rh),uZn.fk=function(n){return F$(n,180)},uZn.gk=function(n){return Inn(hot,VZn,180,n,0,1)},VW(Ytt,"EcorePackageImpl/25",1258),sDn(1259,1,Wrt,ch),uZn.fk=function(n){return F$(n,206)},uZn.gk=function(n){return Inn(iot,VZn,206,n,0,1)},VW(Ytt,"EcorePackageImpl/26",1259),sDn(1260,1,Wrt,ah),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(aUt,EZn,2215,n,0,1)},VW(Ytt,"EcorePackageImpl/27",1260),sDn(1261,1,Wrt,oh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,VZn,345,n,7,1)},VW(Ytt,"EcorePackageImpl/28",1261),sDn(1262,1,Wrt,uh),uZn.fk=function(n){return F$(n,61)},uZn.gk=function(n){return Inn(CFt,H3n,61,n,0,1)},VW(Ytt,"EcorePackageImpl/29",1262),sDn(1236,1,Wrt,sh),uZn.fk=function(n){return F$(n,519)},uZn.gk=function(n){return Inn(c_t,{3:1,4:1,5:1,2033:1},598,n,0,1)},VW(Ytt,"EcorePackageImpl/3",1236),sDn(1263,1,Wrt,hh),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(BFt,EZn,2039,n,0,1)},VW(Ytt,"EcorePackageImpl/30",1263),sDn(1264,1,Wrt,fh),uZn.fk=function(n){return F$(n,160)},uZn.gk=function(n){return Inn(IBt,H3n,160,n,0,1)},VW(Ytt,"EcorePackageImpl/31",1264),sDn(1265,1,Wrt,lh),uZn.fk=function(n){return F$(n,76)},uZn.gk=function(n){return Inn(Z_t,Qrt,76,n,0,1)},VW(Ytt,"EcorePackageImpl/32",1265),sDn(1266,1,Wrt,bh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,VZn,161,n,0,1)},VW(Ytt,"EcorePackageImpl/33",1266),sDn(1267,1,Wrt,wh),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,VZn,17,n,0,1)},VW(Ytt,"EcorePackageImpl/34",1267),sDn(1268,1,Wrt,dh),uZn.fk=function(n){return F$(n,297)},uZn.gk=function(n){return Inn(gat,EZn,297,n,0,1)},VW(Ytt,"EcorePackageImpl/35",1268),sDn(1269,1,Wrt,gh),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,VZn,168,n,0,1)},VW(Ytt,"EcorePackageImpl/36",1269),sDn(1270,1,Wrt,ph),uZn.fk=function(n){return F$(n,85)},uZn.gk=function(n){return Inn(mat,EZn,85,n,0,1)},VW(Ytt,"EcorePackageImpl/37",1270),sDn(1271,1,Wrt,mh),uZn.fk=function(n){return F$(n,599)},uZn.gk=function(n){return Inn(jBt,EZn,599,n,0,1)},VW(Ytt,"EcorePackageImpl/38",1271),sDn(1272,1,Wrt,vh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(oUt,EZn,2216,n,0,1)},VW(Ytt,"EcorePackageImpl/39",1272),sDn(1237,1,Wrt,kh),uZn.fk=function(n){return F$(n,90)},uZn.gk=function(n){return Inn(h_t,EZn,29,n,0,1)},VW(Ytt,"EcorePackageImpl/4",1237),sDn(1273,1,Wrt,yh),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,VZn,191,n,0,1)},VW(Ytt,"EcorePackageImpl/40",1273),sDn(1274,1,Wrt,Mh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(Ytt,"EcorePackageImpl/41",1274),sDn(1275,1,Wrt,Th),uZn.fk=function(n){return F$(n,596)},uZn.gk=function(n){return Inn(OFt,EZn,596,n,0,1)},VW(Ytt,"EcorePackageImpl/42",1275),sDn(1276,1,Wrt,jh),uZn.fk=function(n){return!1},uZn.gk=function(n){return Inn(uUt,VZn,2217,n,0,1)},VW(Ytt,"EcorePackageImpl/43",1276),sDn(1277,1,Wrt,Eh),uZn.fk=function(n){return F$(n,44)},uZn.gk=function(n){return Inn(Sat,c1n,44,n,0,1)},VW(Ytt,"EcorePackageImpl/44",1277),sDn(1238,1,Wrt,Sh),uZn.fk=function(n){return F$(n,142)},uZn.gk=function(n){return Inn(s_t,EZn,142,n,0,1)},VW(Ytt,"EcorePackageImpl/5",1238),sDn(1239,1,Wrt,Ph),uZn.fk=function(n){return F$(n,156)},uZn.gk=function(n){return Inn(f_t,EZn,156,n,0,1)},VW(Ytt,"EcorePackageImpl/6",1239),sDn(1240,1,Wrt,Ch),uZn.fk=function(n){return F$(n,469)},uZn.gk=function(n){return Inn(w_t,EZn,685,n,0,1)},VW(Ytt,"EcorePackageImpl/7",1240),sDn(1241,1,Wrt,Ih),uZn.fk=function(n){return F$(n,582)},uZn.gk=function(n){return Inn(d_t,EZn,694,n,0,1)},VW(Ytt,"EcorePackageImpl/8",1241),sDn(1242,1,Wrt,Oh),uZn.fk=function(n){return F$(n,480)},uZn.gk=function(n){return Inn(sFt,EZn,480,n,0,1)},VW(Ytt,"EcorePackageImpl/9",1242),sDn(1038,2080,Git,Qy),uZn.Mi=function(n,t){wdn(this,uG(t,424))},uZn.Qi=function(n,t){GAn(this,n,uG(t,424))},VW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList",1038),sDn(1039,152,Bit,SQ),uZn.jj=function(){return this.a.a},VW(Ytt,"MinimalEObjectImpl/1ArrayDelegatingAdapterList/1",1039),sDn(1067,1066,{},e$),VW("org.eclipse.emf.ecore.plugin","EcorePlugin",1067);var mBt,vBt,kBt,yBt,MBt,TBt,jBt=Iq(Jrt,"Resource");sDn(799,1524,Yrt),uZn.Hl=function(n){},uZn.Il=function(n){},uZn.El=function(){return!this.a&&(this.a=new qm(this)),this.a},uZn.Fl=function(n){var t,e,i,r,c;if((i=n.length)>0){if(s3(0,n.length),47==n.charCodeAt(0)){for(c=new R7(4),r=1,t=1;t0&&(Knn(0,e,n.length),n=n.substr(0,e))}return lNn(this,n)},uZn.Gl=function(){return this.c},uZn.Ib=function(){return Ij(this.Rm)+"@"+(Hon(this)>>>0).toString(16)+" uri='"+this.d+"'"},uZn.b=!1,VW(Zrt,"ResourceImpl",799),sDn(1525,799,Yrt,Xm),VW(Zrt,"BinaryResourceImpl",1525),sDn(1190,708,Jet),uZn.bj=function(n){return F$(n,58)?JZ(this,uG(n,58)):F$(n,599)?new DD(uG(n,599).El()):xA(n)===xA(this.f)?uG(n,16).Kc():(EK(),KFt.a)},uZn.Ob=function(){return u$n(this)},uZn.a=!1,VW(art,"EcoreUtil/ContentTreeIterator",1190),sDn(1526,1190,Jet,dz),uZn.bj=function(n){return xA(n)===xA(this.f)?uG(n,15).Kc():new L6(uG(n,58))},VW(Zrt,"ResourceImpl/5",1526),sDn(658,2092,Mrt,qm),uZn.Hc=function(n){return this.i<=4?sSn(this,n):F$(n,54)&&uG(n,54).Jh()==this.a},uZn.Mi=function(n,t){n==this.i-1&&(this.a.b||(this.a.b=!0))},uZn.Oi=function(n,t){0==n?this.a.b||(this.a.b=!0):Ann(this,n,t)},uZn.Qi=function(n,t){},uZn.Ri=function(n,t,e){},uZn.Lj=function(){return 2},uZn.jj=function(){return this.a},uZn.Mj=function(){return!0},uZn.Nj=function(n,t){return t=uG(n,54).fi(this.a,t)},uZn.Oj=function(n,t){return uG(n,54).fi(null,t)},uZn.Pj=function(){return!1},uZn.Si=function(){return!0},uZn.aj=function(n){return Inn(nFt,EZn,58,n,0,1)},uZn.Yi=function(){return!1},VW(Zrt,"ResourceImpl/ContentsEList",658),sDn(970,2062,m1n,Vm),uZn.fd=function(n){return this.a.Ki(n)},uZn.gc=function(){return this.a.gc()},VW(art,"AbstractSequentialInternalEList/1",970),sDn(634,1,{},HG),VW(art,"BasicExtendedMetaData",634),sDn(1181,1,{},CA),uZn.Jl=function(){return null},uZn.Kl=function(){return-2==this.a&&fw(this,qCn(this.d,this.b)),this.a},uZn.Ll=function(){return null},uZn.Ml=function(){return hZ(),hZ(),Vot},uZn.xe=function(){return this.c==wct&&lw(this,ckn(this.d,this.b)),this.c},uZn.Nl=function(){return 0},uZn.a=-2,uZn.c=wct,VW(art,"BasicExtendedMetaData/EClassExtendedMetaDataImpl",1181),sDn(1182,1,{},g4),uZn.Jl=function(){return this.a==(N7(),MBt)&&dw(this,TBn(this.f,this.b)),this.a},uZn.Kl=function(){return 0},uZn.Ll=function(){return this.c==(N7(),MBt)&&bw(this,jBn(this.f,this.b)),this.c},uZn.Ml=function(){return!this.d&&pw(this,iqn(this.f,this.b)),this.d},uZn.xe=function(){return this.e==wct&&vw(this,ckn(this.f,this.b)),this.e},uZn.Nl=function(){return-2==this.g&&yw(this,DPn(this.f,this.b)),this.g},uZn.e=wct,uZn.g=-2,VW(art,"BasicExtendedMetaData/EDataTypeExtendedMetaDataImpl",1182),sDn(1180,1,{},IA),uZn.b=!1,uZn.c=!1,VW(art,"BasicExtendedMetaData/EPackageExtendedMetaDataImpl",1180),sDn(1183,1,{},p4),uZn.c=-2,uZn.e=wct,uZn.f=wct,VW(art,"BasicExtendedMetaData/EStructuralFeatureExtendedMetaDataImpl",1183),sDn(593,632,Trt,_G),uZn.Lj=function(){return this.c},uZn.ol=function(){return!1},uZn.Wi=function(n,t){return t},uZn.c=0,VW(art,"EDataTypeEList",593);var EBt,SBt,PBt,CBt,IBt=Iq(art,"FeatureMap");sDn(78,593,{3:1,4:1,20:1,31:1,56:1,16:1,15:1,59:1,70:1,66:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},wsn),uZn.bd=function(n,t){iKn(this,n,uG(t,76))},uZn.Fc=function(n){return Qxn(this,uG(n,76))},uZn.Hi=function(n){OW(this,uG(n,76))},uZn.Nj=function(n,t){return q_(this,uG(n,76),t)},uZn.Oj=function(n,t){return X_(this,uG(n,76),t)},uZn.Ti=function(n,t){return lUn(this,n,t)},uZn.Wi=function(n,t){return Izn(this,n,uG(t,76))},uZn.hd=function(n,t){return kFn(this,n,uG(t,76))},uZn.Uj=function(n,t){return V_(this,uG(n,76),t)},uZn.Vj=function(n,t){return z_(this,uG(n,76),t)},uZn.Wj=function(n,t,e){return aPn(this,uG(n,76),uG(t,76),e)},uZn.Zi=function(n,t){return WPn(this,n,uG(t,76))},uZn.Ol=function(n,t){return UHn(this,n,t)},uZn.cd=function(n,t){var e,i,r,c,a,o,u,s,h;for(s=new Drn(t.gc()),r=t.Kc();r.Ob();)if(c=(i=uG(r.Pb(),76)).Lk(),EFn(this.e,c))(!c.Si()||!H5(this,c,i.md())&&!sSn(s,i))&&ttn(s,i);else{for(h=zKn(this.e.Dh(),c),e=uG(this.g,124),a=!0,o=0;o=0;)if(t=n[this.c],this.k.am(t.Lk()))return this.j=this.f?t:t.md(),this.i=-2,!0;return this.i=-1,this.g=-1,!1},VW(art,"BasicFeatureMap/FeatureEIterator",420),sDn(676,420,UZn,yL),uZn.ul=function(){return!0},VW(art,"BasicFeatureMap/ResolvingFeatureEIterator",676),sDn(968,496,Irt,G$),uZn.pj=function(){return this},VW(art,"EContentsEList/1",968),sDn(969,496,Irt,kL),uZn.ul=function(){return!1},VW(art,"EContentsEList/2",969),sDn(967,287,Ort,q$),uZn.wl=function(n){},uZn.Ob=function(){return!1},uZn.Sb=function(){return!1},VW(art,"EContentsEList/FeatureIteratorImpl/1",967),sDn(840,593,Trt,jD),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,VW(art,"EDataTypeEList/Unsettable",840),sDn(1958,593,Trt,ED),uZn.Si=function(){return!0},VW(art,"EDataTypeUniqueEList",1958),sDn(1959,840,Trt,SD),uZn.Si=function(){return!0},VW(art,"EDataTypeUniqueEList/Unsettable",1959),sDn(147,83,Trt,PD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectContainmentEList/Resolving",147),sDn(1184,555,Trt,CD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectContainmentEList/Unsettable/Resolving",1184),sDn(766,14,Trt,r_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,VW(art,"EObjectContainmentWithInverseEList/Unsettable",766),sDn(1222,766,Trt,c_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectContainmentWithInverseEList/Unsettable/Resolving",1222),sDn(757,505,Trt,ID),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,VW(art,"EObjectEList/Unsettable",757),sDn(338,505,Trt,OD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectResolvingEList",338),sDn(1844,757,Trt,AD),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectResolvingEList/Unsettable",1844),sDn(1527,1,{},Ah),VW(art,"EObjectValidator",1527),sDn(559,505,Trt,wz),uZn.il=function(){return this.d},uZn.jl=function(){return this.b},uZn.Mj=function(){return!0},uZn.ml=function(){return!0},uZn.b=0,VW(art,"EObjectWithInverseEList",559),sDn(1225,559,Trt,a_),uZn.ll=function(){return!0},VW(art,"EObjectWithInverseEList/ManyInverse",1225),sDn(635,559,Trt,o_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,VW(art,"EObjectWithInverseEList/Unsettable",635),sDn(1224,635,Trt,s_),uZn.ll=function(){return!0},VW(art,"EObjectWithInverseEList/Unsettable/ManyInverse",1224),sDn(767,559,Trt,u_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectWithInverseResolvingEList",767),sDn(32,767,Trt,f_),uZn.ll=function(){return!0},VW(art,"EObjectWithInverseResolvingEList/ManyInverse",32),sDn(768,635,Trt,h_),uZn.nl=function(){return!0},uZn.Wi=function(n,t){return R$n(this,n,uG(t,58))},VW(art,"EObjectWithInverseResolvingEList/Unsettable",768),sDn(1223,768,Trt,l_),uZn.ll=function(){return!0},VW(art,"EObjectWithInverseResolvingEList/Unsettable/ManyInverse",1223),sDn(1185,632,Trt),uZn.Li=function(){return!(1792&this.b)},uZn.Ni=function(){this.b|=1},uZn.kl=function(){return!!(4&this.b)},uZn.Mj=function(){return!!(40&this.b)},uZn.ll=function(){return!!(16&this.b)},uZn.ml=function(){return!!(8&this.b)},uZn.nl=function(){return 0!=(this.b&frt)},uZn.al=function(){return!!(32&this.b)},uZn.ol=function(){return 0!=(this.b&w1n)},uZn.fk=function(n){return this.d?v5(this.d,n):this.Lk().Hk().fk(n)},uZn.Qj=function(){return 2&this.b?!!(1&this.b):0!=this.i},uZn.Si=function(){return!!(128&this.b)},uZn.Gk=function(){var n;CVn(this),2&this.b&&(uN(this.e)?(n=!!(1&this.b),this.b&=-2,Yv(this,new j9(this.e,2,emn(this.e.Dh(),this.Lk()),n,!1))):this.b&=-2)},uZn.Yi=function(){return!(1536&this.b)},uZn.b=0,VW(art,"EcoreEList/Generic",1185),sDn(1186,1185,Trt,yZ),uZn.Lk=function(){return this.a},VW(art,"EcoreEList/Dynamic",1186),sDn(765,66,Qet,zm),uZn.aj=function(n){return Acn(this.a.a,n)},VW(art,"EcoreEMap/1",765),sDn(764,83,Trt,kz),uZn.Mi=function(n,t){bMn(this.b,uG(t,136))},uZn.Oi=function(n,t){Osn(this.b)},uZn.Pi=function(n,t,e){var i;++(i=this.b,uG(t,136),i).e},uZn.Qi=function(n,t){zdn(this.b,uG(t,136))},uZn.Ri=function(n,t,e){zdn(this.b,uG(e,136)),xA(e)===xA(t)&&uG(e,136).Ci(WN(uG(t,136).ld())),bMn(this.b,uG(t,136))},VW(art,"EcoreEMap/DelegateEObjectContainmentEList",764),sDn(1220,141,urt,xan),VW(art,"EcoreEMap/Unsettable",1220),sDn(1221,764,Trt,b_),uZn.Ni=function(){this.a=!0},uZn.Qj=function(){return this.a},uZn.Gk=function(){var n;CVn(this),uN(this.e)?(n=this.a,this.a=!1,Msn(this.e,new j9(this.e,2,this.c,n,!1))):this.a=!1},uZn.a=!1,VW(art,"EcoreEMap/Unsettable/UnsettableDelegateEObjectContainmentEList",1221),sDn(1189,215,B0n,DW),uZn.a=!1,uZn.b=!1,VW(art,"EcoreUtil/Copier",1189),sDn(759,1,$Zn,L6),uZn.Nb=function(n){Sz(this,n)},uZn.Ob=function(){return Ymn(this)},uZn.Pb=function(){var n;return Ymn(this),n=this.b,this.b=null,n},uZn.Qb=function(){this.a.Qb()},VW(art,"EcoreUtil/ProperContentIterator",759),sDn(1528,1527,{},_l),VW(art,"EcoreValidator",1528),Iq(art,"FeatureMapUtil/Validator"),sDn(1295,1,{2041:1},Lh),uZn.am=function(n){return!0},VW(art,"FeatureMapUtil/1",1295),sDn(773,1,{2041:1},yQn),uZn.am=function(n){var t;return this.c==n||(null==(t=gK(cQ(this.a,n)))?DBn(this,n)?(W9(this.a,n,(qx(),eot)),!0):(W9(this.a,n,(qx(),tot)),!1):t==(qx(),eot))},uZn.e=!1,VW(art,"FeatureMapUtil/BasicValidator",773),sDn(774,45,B0n,U$),VW(art,"FeatureMapUtil/BasicValidator/Cache",774),sDn(509,56,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,71:1,97:1},OA),uZn.bd=function(n,t){LFn(this.c,this.b,n,t)},uZn.Fc=function(n){return UHn(this.c,this.b,n)},uZn.cd=function(n,t){return _Xn(this.c,this.b,n,t)},uZn.Gc=function(n){return K$(this,n)},uZn.Gi=function(n,t){hrn(this.c,this.b,n,t)},uZn.Wk=function(n,t){return OBn(this.c,this.b,n,t)},uZn.$i=function(n){return gXn(this.c,this.b,n,!1)},uZn.Ii=function(){return wN(this.c,this.b)},uZn.Ji=function(){return dN(this.c,this.b)},uZn.Ki=function(n){return Onn(this.c,this.b,n)},uZn.Xk=function(n,t){return rF(this,n,t)},uZn.$b=function(){Zv(this)},uZn.Hc=function(n){return H5(this.c,this.b,n)},uZn.Ic=function(n){return Run(this.c,this.b,n)},uZn.Xb=function(n){return gXn(this.c,this.b,n,!0)},uZn.Fk=function(n){return this},uZn.dd=function(n){return U5(this.c,this.b,n)},uZn.dc=function(){return $A(this)},uZn.Qj=function(){return!kmn(this.c,this.b)},uZn.Kc=function(){return kin(this.c,this.b)},uZn.ed=function(){return yin(this.c,this.b)},uZn.fd=function(n){return lgn(this.c,this.b,n)},uZn.Ti=function(n,t){return EGn(this.c,this.b,n,t)},uZn.Ui=function(n,t){xnn(this.c,this.b,n,t)},uZn.gd=function(n){return zOn(this.c,this.b,n)},uZn.Mc=function(n){return $Hn(this.c,this.b,n)},uZn.hd=function(n,t){return hqn(this.c,this.b,n,t)},uZn.Wb=function(n){C$n(this.c,this.b),K$(this,uG(n,15))},uZn.gc=function(){return fgn(this.c,this.b)},uZn.Pc=function(){return v4(this.c,this.b)},uZn.Qc=function(n){return G5(this.c,this.b,n)},uZn.Ib=function(){var n,t;for((t=new VM).a+="[",n=wN(this.c,this.b);Zln(n);)zA(t,ox(_yn(n))),Zln(n)&&(t.a+=TZn);return t.a+="]",t.a},uZn.Gk=function(){C$n(this.c,this.b)},VW(art,"FeatureMapUtil/FeatureEList",509),sDn(644,39,Bit,i8),uZn.hj=function(n){return ydn(this,n)},uZn.mj=function(n){var t,e,i,r;switch(this.d){case 1:case 2:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.g=n.ij(),1==n.gj()&&(this.d=1),!0;break;case 3:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=5,ttn(t=new Drn(2),this.g),ttn(t,n.ij()),this.g=t,!0;break;case 5:if(3===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.g,16).Fc(n.ij()),!0;break;case 4:switch(n.gj()){case 3:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=1,this.g=n.ij(),!0;break;case 4:if(xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return this.d=6,ttn(r=new Drn(2),this.n),ttn(r,n.kj()),this.n=r,i=Uhn(cT(YHt,1),W1n,28,15,[this.o,n.lj()]),this.g=i,!0}break;case 6:if(4===n.gj()&&xA(n.jj())===xA(this.c)&&ydn(this,null)==n.hj(null))return uG(this.n,16).Fc(n.kj()),qGn(i=uG(this.g,53),0,e=Inn(YHt,W1n,28,i.length+1,15,1),0,i.length),e[i.length]=n.lj(),this.g=e,!0}return!1},VW(art,"FeatureMapUtil/FeatureENotificationImpl",644),sDn(564,509,{20:1,31:1,56:1,16:1,15:1,61:1,79:1,160:1,220:1,2036:1,71:1,97:1},Cq),uZn.Ol=function(n,t){return UHn(this.c,n,t)},uZn.Pl=function(n,t,e){return OBn(this.c,n,t,e)},uZn.Ql=function(n,t,e){return fXn(this.c,n,t,e)},uZn.Rl=function(){return this},uZn.Sl=function(n,t){return dXn(this.c,n,t)},uZn.Tl=function(n){return uG(gXn(this.c,this.b,n,!1),76).Lk()},uZn.Ul=function(n){return uG(gXn(this.c,this.b,n,!1),76).md()},uZn.Vl=function(){return this.a},uZn.Wl=function(n){return!kmn(this.c,n)},uZn.Xl=function(n,t){BXn(this.c,n,t)},uZn.Yl=function(n){return non(this.c,n)},uZn.Zl=function(n){ETn(this.c,n)},VW(art,"FeatureMapUtil/FeatureFeatureMap",564),sDn(1294,1,ort,PA),uZn.Fk=function(n){return gXn(this.b,this.a,-1,n)},uZn.Qj=function(){return!kmn(this.b,this.a)},uZn.Wb=function(n){BXn(this.b,this.a,n)},uZn.Gk=function(){C$n(this.b,this.a)},VW(art,"FeatureMapUtil/FeatureValue",1294);var OBt,ABt,LBt,NBt,$Bt,DBt=Iq(gct,"AnyType");sDn(680,63,S1n,PM),VW(gct,"InvalidDatatypeValueException",680);var xBt,RBt,KBt,FBt,_Bt,BBt,HBt,UBt,GBt,qBt,XBt,VBt,zBt,WBt,QBt,JBt,YBt,ZBt,nHt,tHt,eHt,iHt,rHt,cHt,aHt,oHt,uHt,sHt,hHt,fHt,lHt=Iq(gct,pct),bHt=Iq(gct,mct),wHt=Iq(gct,vct);sDn(844,516,{110:1,94:1,93:1,58:1,54:1,99:1,857:1},iy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uzn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b)}return $tn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.c&&(this.c=new wsn(this,0)),NHn(this.c,n,e);case 1:return(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uzn(),FBt)),160),71)).Xk(n,e);case 2:return!this.b&&(this.b=new wsn(this,2)),NHn(this.b,n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),t),69).wk().Ak(this,Wen(this),t-iQ(this.ii()),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i}return l5(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uzn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t)}lpn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n),t)},uZn.ii=function(){return uzn(),KBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void CVn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void CVn(this.b)}sdn(this,n-iQ(this.ii()),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():this.ii(),n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",VA(n,this.c),n.a+=", anyAttribute: ",VA(n,this.b),n.a+=")",n.a)},VW(kct,"AnyTypeImpl",844),sDn(681,516,{110:1,94:1,93:1,58:1,54:1,99:1,2119:1,681:1},Uh),uZn.Lh=function(n,t,e){switch(n){case 0:return this.a;case 1:return this.b}return $tn(this,n-iQ((uzn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return null!=this.a;case 1:return null!=this.b}return l5(this,n-iQ((uzn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.bi=function(n,t){switch(n){case 0:return void jw(this,mK(t));case 1:return void Sw(this,mK(t))}lpn(this,n-iQ((uzn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n),t)},uZn.ii=function(){return uzn(),JBt},uZn.ki=function(n){switch(n){case 0:return void(this.a=null);case 1:return void(this.b=null)}sdn(this,n-iQ((uzn(),JBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():JBt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (data: ",zA(n,this.a),n.a+=", target: ",zA(n,this.b),n.a+=")",n.a)},uZn.a=null,uZn.b=null,VW(kct,"ProcessingInstructionImpl",681),sDn(682,844,{110:1,94:1,93:1,58:1,54:1,99:1,857:1,2120:1,682:1},ry),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.c&&(this.c=new wsn(this,0)),this.c):(!this.c&&(this.c=new wsn(this,0)),this.c.b);case 1:return e?(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)):(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uzn(),FBt)),160),220)).Vl();case 2:return e?(!this.b&&(this.b=new wsn(this,2)),this.b):(!this.b&&(this.b=new wsn(this,2)),this.b.b);case 3:return!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uzn(),nHt),!0));case 4:return g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uzn(),nHt),!0))));case 5:return this.a}return $tn(this,n-iQ((uzn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.c&&0!=this.c.i;case 1:return!(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)).dc();case 2:return!!this.b&&0!=this.b.i;case 3:return!this.c&&(this.c=new wsn(this,0)),null!=mK(dXn(this.c,(uzn(),nHt),!0));case 4:return null!=g_(this.a,(!this.c&&(this.c=new wsn(this,0)),mK(dXn(this.c,(uzn(),nHt),!0))));case 5:return!!this.a}return l5(this,n-iQ((uzn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void cW(this.c,t);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(uG(T2(this.c,(uzn(),FBt)),160),220)).Wb(t);case 2:return!this.b&&(this.b=new wsn(this,2)),void cW(this.b,t);case 3:return void m4(this,mK(t));case 4:return void m4(this,d_(this.a,t));case 5:return void Ew(this,uG(t,156))}lpn(this,n-iQ((uzn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n),t)},uZn.ii=function(){return uzn(),ZBt},uZn.ki=function(n){switch(n){case 0:return!this.c&&(this.c=new wsn(this,0)),void CVn(this.c);case 1:return void(!this.c&&(this.c=new wsn(this,0)),uG(T2(this.c,(uzn(),FBt)),160)).$b();case 2:return!this.b&&(this.b=new wsn(this,2)),void CVn(this.b);case 3:return!this.c&&(this.c=new wsn(this,0)),void BXn(this.c,(uzn(),nHt),null);case 4:return void m4(this,d_(this.a,null));case 5:return void(this.a=null)}sdn(this,n-iQ((uzn(),ZBt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():ZBt,n))},VW(kct,"SimpleAnyTypeImpl",682),sDn(683,516,{110:1,94:1,93:1,58:1,54:1,99:1,2121:1,683:1},cy),uZn.Lh=function(n,t,e){switch(n){case 0:return e?(!this.a&&(this.a=new wsn(this,0)),this.a):(!this.a&&(this.a=new wsn(this,0)),this.a.b);case 1:return e?(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),this.b):(!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),Tnn(this.b));case 2:return e?(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),this.c):(!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),Tnn(this.c));case 3:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uzn(),iHt));case 4:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uzn(),rHt));case 5:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uzn(),aHt));case 6:return!this.a&&(this.a=new wsn(this,0)),T2(this.a,(uzn(),oHt))}return $tn(this,n-iQ((uzn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t,e)},uZn.Uh=function(n,t,e){switch(t){case 0:return!this.a&&(this.a=new wsn(this,0)),NHn(this.a,n,e);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),G_(this.b,n,e);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),G_(this.c,n,e);case 5:return!this.a&&(this.a=new wsn(this,0)),rF(T2(this.a,(uzn(),aHt)),n,e)}return uG(ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():(uzn(),eHt),t),69).wk().Ak(this,Wen(this),t-iQ((uzn(),eHt)),n,e)},uZn.Wh=function(n){switch(n){case 0:return!!this.a&&0!=this.a.i;case 1:return!!this.b&&0!=this.b.f;case 2:return!!this.c&&0!=this.c.f;case 3:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uzn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uzn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uzn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),!$A(T2(this.a,(uzn(),oHt)))}return l5(this,n-iQ((uzn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.bi=function(n,t){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void cW(this.a,t);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void Jun(this.b,t);case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void Jun(this.c,t);case 3:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uzn(),iHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,iHt),uG(t,16));case 4:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uzn(),rHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,rHt),uG(t,16));case 5:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uzn(),aHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,aHt),uG(t,16));case 6:return!this.a&&(this.a=new wsn(this,0)),Zv(T2(this.a,(uzn(),oHt))),!this.a&&(this.a=new wsn(this,0)),void K$(T2(this.a,oHt),uG(t,16))}lpn(this,n-iQ((uzn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n),t)},uZn.ii=function(){return uzn(),eHt},uZn.ki=function(n){switch(n){case 0:return!this.a&&(this.a=new wsn(this,0)),void CVn(this.a);case 1:return!this.b&&(this.b=new ltn((YYn(),H_t),wBt,this,1)),void this.b.c.$b();case 2:return!this.c&&(this.c=new ltn((YYn(),H_t),wBt,this,2)),void this.c.c.$b();case 3:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uzn(),iHt)));case 4:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uzn(),rHt)));case 5:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uzn(),aHt)));case 6:return!this.a&&(this.a=new wsn(this,0)),void Zv(T2(this.a,(uzn(),oHt)))}sdn(this,n-iQ((uzn(),eHt)),ern(2&this.j?(!this.k&&(this.k=new Ll),this.k).Nk():eHt,n))},uZn.Ib=function(){var n;return 4&this.j?vxn(this):((n=new fx(vxn(this))).a+=" (mixed: ",VA(n,this.a),n.a+=")",n.a)},VW(kct,"XMLTypeDocumentRootImpl",683),sDn(2028,720,{110:1,94:1,93:1,480:1,155:1,58:1,114:1,54:1,99:1,158:1,119:1,120:1,2122:1},Nh),uZn.ri=function(n,t){switch(n.hk()){case 7:case 8:case 9:case 10:case 16:case 22:case 23:case 24:case 25:case 26:case 32:case 33:case 34:case 36:case 37:case 44:case 45:case 50:case 51:case 53:case 55:case 56:case 57:case 58:case 60:case 61:case 4:return null==t?null:cpn(t);case 19:case 28:case 29:case 35:case 38:case 39:case 41:case 46:case 52:case 54:case 5:return mK(t);case 6:return lK(uG(t,195));case 12:case 47:case 49:case 11:return cWn(this,n,t);case 13:return null==t?null:VXn(uG(t,247));case 15:case 14:return null==t?null:MW(uM(pK(t)));case 17:return oPn((uzn(),t));case 18:return oPn(t);case 21:case 20:return null==t?null:TW(uG(t,161).a);case 27:return bK(uG(t,195));case 30:return STn((uzn(),uG(t,15)));case 31:return STn(uG(t,15));case 40:return dK((uzn(),t));case 42:return uPn((uzn(),t));case 43:return uPn(t);case 59:case 48:return wK((uzn(),t));default:throw hv(new vM(tet+n.xe()+eet))}},uZn.si=function(n){var t;switch(-1==n.G&&(n.G=(t=Hrn(n))?Hyn(t.vi(),n):-1),n.G){case 0:return new iy;case 1:return new Uh;case 2:return new ry;case 3:return new cy;default:throw hv(new vM(cet+n.zb+eet))}},uZn.ti=function(n,t){var e,i,r,c,a,o,u,s,h,f,l,b,w,d,g,p;switch(n.hk()){case 5:case 52:case 4:return t;case 6:return syn(t);case 8:case 7:return null==t?null:MPn(t);case 9:return null==t?null:Ben(mUn((i=yXn(t,!0)).length>0&&(s3(0,i.length),43==i.charCodeAt(0))?(s3(1,i.length+1),i.substr(1)):i,-128,127)<<24>>24);case 10:return null==t?null:Ben(mUn((r=yXn(t,!0)).length>0&&(s3(0,r.length),43==r.charCodeAt(0))?(s3(1,r.length+1),r.substr(1)):r,-128,127)<<24>>24);case 11:return mK(cYn(this,(uzn(),HBt),t));case 12:return mK(cYn(this,(uzn(),UBt),t));case 13:return null==t?null:new Wj(yXn(t,!0));case 15:case 14:return iRn(t);case 16:return mK(cYn(this,(uzn(),GBt),t));case 17:return bvn((uzn(),t));case 18:return bvn(t);case 28:case 29:case 35:case 38:case 39:case 41:case 54:case 19:return yXn(t,!0);case 21:case 20:return vRn(t);case 22:return mK(cYn(this,(uzn(),qBt),t));case 23:return mK(cYn(this,(uzn(),XBt),t));case 24:return mK(cYn(this,(uzn(),VBt),t));case 25:return mK(cYn(this,(uzn(),zBt),t));case 26:return mK(cYn(this,(uzn(),WBt),t));case 27:return Ckn(t);case 30:return wvn((uzn(),t));case 31:return wvn(t);case 32:return null==t?null:xwn(mUn((h=yXn(t,!0)).length>0&&(s3(0,h.length),43==h.charCodeAt(0))?(s3(1,h.length+1),h.substr(1)):h,j1n,vZn));case 33:return null==t?null:new PN((f=yXn(t,!0)).length>0&&(s3(0,f.length),43==f.charCodeAt(0))?(s3(1,f.length+1),f.substr(1)):f);case 34:return null==t?null:xwn(mUn((l=yXn(t,!0)).length>0&&(s3(0,l.length),43==l.charCodeAt(0))?(s3(1,l.length+1),l.substr(1)):l,j1n,vZn));case 36:return null==t?null:Hvn(tJn((b=yXn(t,!0)).length>0&&(s3(0,b.length),43==b.charCodeAt(0))?(s3(1,b.length+1),b.substr(1)):b));case 37:return null==t?null:Hvn(tJn((w=yXn(t,!0)).length>0&&(s3(0,w.length),43==w.charCodeAt(0))?(s3(1,w.length+1),w.substr(1)):w));case 40:return nTn((uzn(),t));case 42:return dvn((uzn(),t));case 43:return dvn(t);case 44:return null==t?null:new PN((d=yXn(t,!0)).length>0&&(s3(0,d.length),43==d.charCodeAt(0))?(s3(1,d.length+1),d.substr(1)):d);case 45:return null==t?null:new PN((g=yXn(t,!0)).length>0&&(s3(0,g.length),43==g.charCodeAt(0))?(s3(1,g.length+1),g.substr(1)):g);case 46:return yXn(t,!1);case 47:return mK(cYn(this,(uzn(),QBt),t));case 59:case 48:return ZMn((uzn(),t));case 49:return mK(cYn(this,(uzn(),YBt),t));case 50:return null==t?null:Rwn(mUn((p=yXn(t,!0)).length>0&&(s3(0,p.length),43==p.charCodeAt(0))?(s3(1,p.length+1),p.substr(1)):p,xrt,32767)<<16>>16);case 51:return null==t?null:Rwn(mUn((c=yXn(t,!0)).length>0&&(s3(0,c.length),43==c.charCodeAt(0))?(s3(1,c.length+1),c.substr(1)):c,xrt,32767)<<16>>16);case 53:return mK(cYn(this,(uzn(),tHt),t));case 55:return null==t?null:Rwn(mUn((a=yXn(t,!0)).length>0&&(s3(0,a.length),43==a.charCodeAt(0))?(s3(1,a.length+1),a.substr(1)):a,xrt,32767)<<16>>16);case 56:return null==t?null:Rwn(mUn((o=yXn(t,!0)).length>0&&(s3(0,o.length),43==o.charCodeAt(0))?(s3(1,o.length+1),o.substr(1)):o,xrt,32767)<<16>>16);case 57:return null==t?null:Hvn(tJn((u=yXn(t,!0)).length>0&&(s3(0,u.length),43==u.charCodeAt(0))?(s3(1,u.length+1),u.substr(1)):u));case 58:return null==t?null:Hvn(tJn((s=yXn(t,!0)).length>0&&(s3(0,s.length),43==s.charCodeAt(0))?(s3(1,s.length+1),s.substr(1)):s));case 60:return null==t?null:xwn(mUn((e=yXn(t,!0)).length>0&&(s3(0,e.length),43==e.charCodeAt(0))?(s3(1,e.length+1),e.substr(1)):e,j1n,vZn));case 61:return null==t?null:xwn(mUn(yXn(t,!0),j1n,vZn));default:throw hv(new vM(tet+n.xe()+eet))}},VW(kct,"XMLTypeFactoryImpl",2028),sDn(594,184,{110:1,94:1,93:1,155:1,197:1,58:1,241:1,114:1,54:1,99:1,158:1,184:1,119:1,120:1,690:1,2044:1,594:1},gJ),uZn.N=!1,uZn.O=!1;var dHt,gHt,pHt,mHt,vHt,kHt=!1;VW(kct,"XMLTypePackageImpl",594),sDn(1961,1,{851:1},$h),uZn.Kk=function(){return vGn(),qHt},VW(kct,"XMLTypePackageImpl/1",1961),sDn(1970,1,Wrt,Dh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/10",1970),sDn(1971,1,Wrt,xh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/11",1971),sDn(1972,1,Wrt,Rh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/12",1972),sDn(1973,1,Wrt,Kh),uZn.fk=function(n){return FA(n)},uZn.gk=function(n){return Inn(fot,VZn,345,n,7,1)},VW(kct,"XMLTypePackageImpl/13",1973),sDn(1974,1,Wrt,Fh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/14",1974),sDn(1975,1,Wrt,_h),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/15",1975),sDn(1976,1,Wrt,Bh),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/16",1976),sDn(1977,1,Wrt,Hh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/17",1977),sDn(1978,1,Wrt,Gh),uZn.fk=function(n){return F$(n,161)},uZn.gk=function(n){return Inn(lot,VZn,161,n,0,1)},VW(kct,"XMLTypePackageImpl/18",1978),sDn(1979,1,Wrt,qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/19",1979),sDn(1962,1,Wrt,Xh),uZn.fk=function(n){return F$(n,857)},uZn.gk=function(n){return Inn(DBt,EZn,857,n,0,1)},VW(kct,"XMLTypePackageImpl/2",1962),sDn(1980,1,Wrt,Vh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/20",1980),sDn(1981,1,Wrt,zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/21",1981),sDn(1982,1,Wrt,Wh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/22",1982),sDn(1983,1,Wrt,Qh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/23",1983),sDn(1984,1,Wrt,Jh),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,VZn,195,n,0,2)},VW(kct,"XMLTypePackageImpl/24",1984),sDn(1985,1,Wrt,Yh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/25",1985),sDn(1986,1,Wrt,Zh),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/26",1986),sDn(1987,1,Wrt,nf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/27",1987),sDn(1988,1,Wrt,tf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/28",1988),sDn(1989,1,Wrt,ef),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/29",1989),sDn(1963,1,Wrt,rf),uZn.fk=function(n){return F$(n,681)},uZn.gk=function(n){return Inn(lHt,EZn,2119,n,0,1)},VW(kct,"XMLTypePackageImpl/3",1963),sDn(1990,1,Wrt,cf),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,VZn,17,n,0,1)},VW(kct,"XMLTypePackageImpl/30",1990),sDn(1991,1,Wrt,af),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/31",1991),sDn(1992,1,Wrt,of),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,VZn,168,n,0,1)},VW(kct,"XMLTypePackageImpl/32",1992),sDn(1993,1,Wrt,uf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/33",1993),sDn(1994,1,Wrt,sf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/34",1994),sDn(1995,1,Wrt,hf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/35",1995),sDn(1996,1,Wrt,ff),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/36",1996),sDn(1997,1,Wrt,lf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/37",1997),sDn(1998,1,Wrt,bf),uZn.fk=function(n){return F$(n,15)},uZn.gk=function(n){return Inn(yat,H3n,15,n,0,1)},VW(kct,"XMLTypePackageImpl/38",1998),sDn(1999,1,Wrt,wf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/39",1999),sDn(1964,1,Wrt,df),uZn.fk=function(n){return F$(n,682)},uZn.gk=function(n){return Inn(bHt,EZn,2120,n,0,1)},VW(kct,"XMLTypePackageImpl/4",1964),sDn(2e3,1,Wrt,gf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/40",2e3),sDn(2001,1,Wrt,pf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/41",2001),sDn(2002,1,Wrt,mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/42",2002),sDn(2003,1,Wrt,vf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/43",2003),sDn(2004,1,Wrt,kf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/44",2004),sDn(2005,1,Wrt,yf),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,VZn,191,n,0,1)},VW(kct,"XMLTypePackageImpl/45",2005),sDn(2006,1,Wrt,Mf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/46",2006),sDn(2007,1,Wrt,Tf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/47",2007),sDn(2008,1,Wrt,jf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/48",2008),sDn(2009,1,Wrt,Ef),uZn.fk=function(n){return F$(n,191)},uZn.gk=function(n){return Inn(Tot,VZn,191,n,0,1)},VW(kct,"XMLTypePackageImpl/49",2009),sDn(1965,1,Wrt,Sf),uZn.fk=function(n){return F$(n,683)},uZn.gk=function(n){return Inn(wHt,EZn,2121,n,0,1)},VW(kct,"XMLTypePackageImpl/5",1965),sDn(2010,1,Wrt,Pf),uZn.fk=function(n){return F$(n,168)},uZn.gk=function(n){return Inn(yot,VZn,168,n,0,1)},VW(kct,"XMLTypePackageImpl/50",2010),sDn(2011,1,Wrt,Cf),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/51",2011),sDn(2012,1,Wrt,If),uZn.fk=function(n){return F$(n,17)},uZn.gk=function(n){return Inn(dot,VZn,17,n,0,1)},VW(kct,"XMLTypePackageImpl/52",2012),sDn(1966,1,Wrt,Of),uZn.fk=function(n){return RA(n)},uZn.gk=function(n){return Inn($ot,VZn,2,n,6,1)},VW(kct,"XMLTypePackageImpl/6",1966),sDn(1967,1,Wrt,Af),uZn.fk=function(n){return F$(n,195)},uZn.gk=function(n){return Inn(tUt,VZn,195,n,0,2)},VW(kct,"XMLTypePackageImpl/7",1967),sDn(1968,1,Wrt,Lf),uZn.fk=function(n){return KA(n)},uZn.gk=function(n){return Inn(cot,VZn,485,n,8,1)},VW(kct,"XMLTypePackageImpl/8",1968),sDn(1969,1,Wrt,Nf),uZn.fk=function(n){return F$(n,222)},uZn.gk=function(n){return Inn(uot,VZn,222,n,0,1)},VW(kct,"XMLTypePackageImpl/9",1969),sDn(55,63,S1n,CM),VW(Xct,"RegEx/ParseException",55),sDn(836,1,{},$f),uZn.bm=function(n){return n16*e)throw hv(new CM(rZn((t$(),Cit))));e=16*e+r}if(125!=this.a)throw hv(new CM(rZn((t$(),Iit))));if(e>Vct)throw hv(new CM(rZn((t$(),Oit))));n=e}else{if(r=0,0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(e=r,EYn(this),0!=this.c||(r=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=e=16*e+r}break;case 117:if(i=0,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));n=t=16*t+i;break;case 118:if(EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if(t=16*t+i,EYn(this),0!=this.c||(i=CMn(this.a))<0)throw hv(new CM(rZn((t$(),Pit))));if((t=16*t+i)>Vct)throw hv(new CM(rZn((t$(),"parser.descappe.4"))));n=t;break;case 65:case 90:case 122:throw hv(new CM(rZn((t$(),Ait))))}return n},uZn.dm=function(n){var t;switch(n){case 100:t=32&~this.e?(QYn(),CHt):kJn("Nd",!0);break;case 68:t=32&~this.e?(QYn(),NHt):kJn("Nd",!1);break;case 119:t=32&~this.e?(QYn(),HHt):kJn("IsWord",!0);break;case 87:t=32&~this.e?(QYn(),DHt):kJn("IsWord",!1);break;case 115:t=32&~this.e?(QYn(),RHt):kJn("IsSpace",!0);break;case 83:t=32&~this.e?(QYn(),$Ht):kJn("IsSpace",!1);break;default:throw hv(new Ky(zct+n.toString(16)))}return t},uZn.em=function(n){var t,e,i,r,c,a,o,u,s,h,f;for(this.b=1,EYn(this),t=null,0==this.c&&94==this.a?(EYn(this),n?(QYn(),QYn(),s=new K3(5)):(QYn(),QYn(),HFn(t=new K3(4),0,Vct),s=new K3(4))):(QYn(),QYn(),s=new K3(4)),r=!0;1!=(f=this.c)&&(0!=f||93!=this.a||r);){if(r=!1,e=this.a,i=!1,10==f)switch(e){case 100:case 68:case 119:case 87:case 115:case 83:TXn(s,this.dm(e)),i=!0;break;case 105:case 73:case 99:case 67:(e=this.um(s,e))<0&&(i=!0);break;case 112:case 80:if(!(h=PNn(this,e)))throw hv(new CM(rZn((t$(),git))));TXn(s,h),i=!0;break;default:e=this.cm()}else if(20==f){if((c=aR(this.i,58,this.d))<0)throw hv(new CM(rZn((t$(),pit))));if(a=!0,94==zJ(this.i,this.d)&&(++this.d,a=!1),!(o=itn(r1(this.i,this.d,c),a,!(512&~this.e))))throw hv(new CM(rZn((t$(),vit))));if(TXn(s,o),i=!0,c+1>=this.j||93!=zJ(this.i,c+1))throw hv(new CM(rZn((t$(),pit))));this.d=c+2}if(EYn(this),!i)if(0!=this.c||45!=this.a)HFn(s,e,e);else{if(EYn(this),1==(f=this.c))throw hv(new CM(rZn((t$(),mit))));0==f&&93==this.a?(HFn(s,e,e),HFn(s,45,45)):(u=this.a,10==f&&(u=this.cm()),EYn(this),HFn(s,e,u))}(this.e&w1n)==w1n&&0==this.c&&44==this.a&&EYn(this)}if(1==this.c)throw hv(new CM(rZn((t$(),mit))));return t&&(lWn(t,s),s=t),pxn(s),uVn(s),this.b=0,EYn(this),s},uZn.fm=function(){var n,t,e,i;for(e=this.em(!1);7!=(i=this.c);){if(n=this.a,(0!=i||45!=n&&38!=n)&&4!=i)throw hv(new CM(rZn((t$(),Eit))));if(EYn(this),9!=this.c)throw hv(new CM(rZn((t$(),jit))));if(t=this.em(!1),4==i)TXn(e,t);else if(45==n)lWn(e,t);else{if(38!=n)throw hv(new Ky("ASSERT"));Gzn(e,t)}}return EYn(this),e},uZn.gm=function(){var n,t;return n=this.a-48,QYn(),QYn(),t=new F1(12,null,n),!this.g&&(this.g=new ck),Vv(this.g,new Wm(n)),EYn(this),t},uZn.hm=function(){return EYn(this),QYn(),KHt},uZn.im=function(){return EYn(this),QYn(),xHt},uZn.jm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.km=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.lm=function(){return EYn(this),jln()},uZn.mm=function(){return EYn(this),QYn(),_Ht},uZn.nm=function(){return EYn(this),QYn(),UHt},uZn.om=function(){var n;if(this.d>=this.j||64!=(65504&(n=zJ(this.i,this.d++))))throw hv(new CM(rZn((t$(),lit))));return EYn(this),QYn(),QYn(),new IX(0,n-64)},uZn.pm=function(){return EYn(this),zGn()},uZn.qm=function(){return EYn(this),QYn(),GHt},uZn.rm=function(){var n;return QYn(),QYn(),n=new IX(0,105),EYn(this),n},uZn.sm=function(){return EYn(this),QYn(),BHt},uZn.tm=function(){return EYn(this),QYn(),FHt},uZn.um=function(n,t){return this.cm()},uZn.vm=function(){return EYn(this),QYn(),AHt},uZn.wm=function(){var n,t,e,i,r;if(this.d+1>=this.j)throw hv(new CM(rZn((t$(),sit))));if(i=-1,t=null,49<=(n=zJ(this.i,this.d))&&n<=57){if(i=n-48,!this.g&&(this.g=new ck),Vv(this.g,new Wm(i)),++this.d,41!=zJ(this.i,this.d))throw hv(new CM(rZn((t$(),ait))));++this.d}else switch(63==n&&--this.d,EYn(this),(t=eYn(this)).e){case 20:case 21:case 22:case 23:break;case 8:if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));break;default:throw hv(new CM(rZn((t$(),hit))))}if(EYn(this),e=null,2==(r=Evn(this)).e){if(2!=r.Pm())throw hv(new CM(rZn((t$(),fit))));e=r.Lm(1),r=r.Lm(0)}if(7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),QYn(),QYn(),new bin(i,t,r,e)},uZn.xm=function(){return EYn(this),QYn(),LHt},uZn.ym=function(){var n;if(EYn(this),n=jz(24,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.zm=function(){var n;if(EYn(this),n=jz(20,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Am=function(){var n;if(EYn(this),n=jz(22,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Bm=function(){var n,t,e,i,r;for(n=0,e=0,t=-1;this.d=this.j)throw hv(new CM(rZn((t$(),oit))));if(45==t){for(++this.d;this.d=this.j)throw hv(new CM(rZn((t$(),oit))))}if(58==t){if(++this.d,EYn(this),i=GW(Evn(this),n,e),7!=this.c)throw hv(new CM(rZn((t$(),ait))));EYn(this)}else{if(41!=t)throw hv(new CM(rZn((t$(),uit))));++this.d,EYn(this),i=GW(Evn(this),n,e)}return i},uZn.Cm=function(){var n;if(EYn(this),n=jz(21,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Dm=function(){var n;if(EYn(this),n=jz(23,Evn(this)),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Em=function(){var n,t;if(EYn(this),n=this.f++,t=Ez(Evn(this),n),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),t},uZn.Fm=function(){var n;if(EYn(this),n=Ez(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Gm=function(n){return EYn(this),5==this.c?(EYn(this),CX(n,(QYn(),QYn(),new n8(9,n)))):CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),t=new QN(2),5==this.c?(EYn(this),vVn(t,OHt),vVn(t,n)):(vVn(t,n),vVn(t,OHt)),t},uZn.Im=function(n){return EYn(this),5==this.c?(EYn(this),QYn(),QYn(),new n8(9,n)):(QYn(),QYn(),new n8(3,n))},uZn.a=0,uZn.b=0,uZn.c=0,uZn.d=0,uZn.e=0,uZn.f=1,uZn.g=null,uZn.j=0,VW(Xct,"RegEx/RegexParser",836),sDn(1947,836,{},ay),uZn.bm=function(n){return!1},uZn.cm=function(){return R_n(this)},uZn.dm=function(n){return yUn(n)},uZn.em=function(n){return PYn(this)},uZn.fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.gm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.hm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.im=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.jm=function(){return EYn(this),yUn(67)},uZn.km=function(){return EYn(this),yUn(73)},uZn.lm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.mm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.nm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.om=function(){return EYn(this),yUn(99)},uZn.pm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.qm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.rm=function(){return EYn(this),yUn(105)},uZn.sm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.tm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.um=function(n,t){return TXn(n,yUn(t)),-1},uZn.vm=function(){return EYn(this),QYn(),QYn(),new IX(0,94)},uZn.wm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.xm=function(){return EYn(this),QYn(),QYn(),new IX(0,36)},uZn.ym=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.zm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Am=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Bm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Cm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Dm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Em=function(){var n;if(EYn(this),n=Ez(Evn(this),0),7!=this.c)throw hv(new CM(rZn((t$(),ait))));return EYn(this),n},uZn.Fm=function(){throw hv(new CM(rZn((t$(),Lit))))},uZn.Gm=function(n){return EYn(this),CX(n,(QYn(),QYn(),new n8(3,n)))},uZn.Hm=function(n){var t;return EYn(this),QYn(),QYn(),vVn(t=new QN(2),n),vVn(t,OHt),t},uZn.Im=function(n){return EYn(this),QYn(),QYn(),new n8(3,n)};var yHt=null,MHt=null;VW(Xct,"RegEx/ParserForXMLSchema",1947),sDn(122,1,aat,Qm),uZn.Jm=function(n){throw hv(new Ky("Not supported."))},uZn.Km=function(){return-1},uZn.Lm=function(n){return null},uZn.Mm=function(){return null},uZn.Nm=function(n){},uZn.Om=function(n){},uZn.Pm=function(){return 0},uZn.Ib=function(){return this.Qm(0)},uZn.Qm=function(n){return 11==this.e?".":""},uZn.e=0;var THt,jHt,EHt,SHt,PHt,CHt,IHt,OHt,AHt,LHt,NHt,$Ht,DHt,xHt,RHt,KHt,FHt,_Ht,BHt,HHt,UHt,GHt,qHt,XHt,VHt=null,zHt=null,WHt=null,QHt=VW(Xct,"RegEx/Token",122);sDn(138,122,{3:1,138:1,122:1},K3),uZn.Qm=function(n){var t,e,i;if(4==this.e)if(this==IHt)e=".";else if(this==CHt)e="\\d";else if(this==HHt)e="\\w";else if(this==RHt)e="\\s";else{for((i=new VM).a+="[",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?zA(i,Mqn(this.b[t])):(zA(i,Mqn(this.b[t])),i.a+="-",zA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}else if(this==NHt)e="\\D";else if(this==DHt)e="\\W";else if(this==$Ht)e="\\S";else{for((i=new VM).a+="[^",t=0;t0&&(i.a+=","),this.b[t]===this.b[t+1]?zA(i,Mqn(this.b[t])):(zA(i,Mqn(this.b[t])),i.a+="-",zA(i,Mqn(this.b[t+1])));i.a+="]",e=i.a}return e},uZn.a=!1,uZn.c=!1,VW(Xct,"RegEx/RangeToken",138),sDn(592,1,{592:1},Wm),uZn.a=0,VW(Xct,"RegEx/RegexParser/ReferencePosition",592),sDn(591,1,{3:1,591:1},gE),uZn.Fb=function(n){var t;return null!=n&&!!F$(n,591)&&(t=uG(n,591),m_(this.b,t.b)&&this.a==t.a)},uZn.Hb=function(){return pln(this.b+"/"+XKn(this.a))},uZn.Ib=function(){return this.c.Qm(this.a)},uZn.a=0,VW(Xct,"RegEx/RegularExpression",591),sDn(228,122,aat,IX),uZn.Km=function(){return this.a},uZn.Qm=function(n){var t,e;switch(this.e){case 0:switch(this.a){case 124:case 42:case 43:case 63:case 40:case 41:case 46:case 91:case 123:case 92:e="\\"+jF(this.a&D1n);break;case 12:e="\\f";break;case 10:e="\\n";break;case 13:e="\\r";break;case 9:e="\\t";break;case 27:e="\\e";break;default:e=this.a>=P0n?"\\v"+r1(t="0"+(this.a>>>0).toString(16),t.length-6,t.length):""+jF(this.a&D1n)}break;case 8:e=this==AHt||this==LHt?""+jF(this.a&D1n):"\\"+jF(this.a&D1n);break;default:e=null}return e},uZn.a=0,VW(Xct,"RegEx/Token/CharToken",228),sDn(318,122,aat,n8),uZn.Lm=function(n){return this.a},uZn.Nm=function(n){this.b=n},uZn.Om=function(n){this.c=n},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;if(3==this.e)if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): CLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}"}else if(this.c<0&&this.b<0)t=this.a.Qm(n)+"*?";else if(this.c==this.b)t=this.a.Qm(n)+"{"+this.c+"}?";else if(this.c>=0&&this.b>=0)t=this.a.Qm(n)+"{"+this.c+","+this.b+"}?";else{if(!(this.c>=0&&this.b<0))throw hv(new Ky("Token#toString(): NONGREEDYCLOSURE "+this.c+TZn+this.b));t=this.a.Qm(n)+"{"+this.c+",}?"}return t},uZn.b=0,uZn.c=0,VW(Xct,"RegEx/Token/ClosureToken",318),sDn(837,122,aat,eW),uZn.Lm=function(n){return 0==n?this.a:this.b},uZn.Pm=function(){return 2},uZn.Qm=function(n){return 3==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+":9==this.b.e&&this.b.Lm(0)==this.a?this.a.Qm(n)+"+?":this.a.Qm(n)+""+this.b.Qm(n)},VW(Xct,"RegEx/Token/ConcatToken",837),sDn(1945,122,aat,bin),uZn.Lm=function(n){if(0==n)return this.d;if(1==n)return this.b;throw hv(new Ky("Internal Error: "+n))},uZn.Pm=function(){return this.b?2:1},uZn.Qm=function(n){var t;return t=this.c>0?"(?("+this.c+")":8==this.a.e?"(?("+this.a+")":"(?"+this.a,this.b?t+=this.d+"|"+this.b+")":t+=this.d+")",t},uZn.c=0,VW(Xct,"RegEx/Token/ConditionToken",1945),sDn(1946,122,aat,R3),uZn.Lm=function(n){return this.b},uZn.Pm=function(){return 1},uZn.Qm=function(n){return"(?"+(0==this.a?"":XKn(this.a))+(0==this.c?"":XKn(this.c))+":"+this.b.Qm(n)+")"},uZn.a=0,uZn.c=0,VW(Xct,"RegEx/Token/ModifierToken",1946),sDn(838,122,aat,PQ),uZn.Lm=function(n){return this.a},uZn.Pm=function(){return 1},uZn.Qm=function(n){var t;switch(t=null,this.e){case 6:t=0==this.b?"(?:"+this.a.Qm(n)+")":"("+this.a.Qm(n)+")";break;case 20:t="(?="+this.a.Qm(n)+")";break;case 21:t="(?!"+this.a.Qm(n)+")";break;case 22:t="(?<="+this.a.Qm(n)+")";break;case 23:t="(?"+this.a.Qm(n)+")"}return t},uZn.b=0,VW(Xct,"RegEx/Token/ParenToken",838),sDn(530,122,{3:1,122:1,530:1},F1),uZn.Mm=function(){return this.b},uZn.Qm=function(n){return 12==this.e?"\\"+this.a:Nxn(this.b)},uZn.a=0,VW(Xct,"RegEx/Token/StringToken",530),sDn(477,122,aat,QN),uZn.Jm=function(n){vVn(this,n)},uZn.Lm=function(n){return uG(DQ(this.a,n),122)},uZn.Pm=function(){return this.a?this.a.a.c.length:0},uZn.Qm=function(n){var t,e,i,r,c;if(1==this.e){if(2==this.a.a.c.length)t=uG(DQ(this.a,0),122),r=3==(e=uG(DQ(this.a,1),122)).e&&e.Lm(0)==t?t.Qm(n)+"+":9==e.e&&e.Lm(0)==t?t.Qm(n)+"+?":t.Qm(n)+""+e.Qm(n);else{for(c=new VM,i=0;i=this.c.b:this.a<=this.c.b},uZn.Sb=function(){return this.b>0},uZn.Tb=function(){return this.b},uZn.Vb=function(){return this.b-1},uZn.Qb=function(){throw hv(new TM(lat))},uZn.a=0,uZn.b=0,VW(sat,"ExclusiveRange/RangeIterator",258);var JHt=hJ(brt,"C"),YHt=hJ(grt,"I"),ZHt=hJ(dZn,"Z"),nUt=hJ(prt,"J"),tUt=hJ(lrt,"B"),eUt=hJ(wrt,"D"),iUt=hJ(drt,"F"),rUt=hJ(mrt,"S"),cUt=Iq("org.eclipse.elk.core.labels","ILabelManager"),aUt=Iq(Pet,"DiagnosticChain"),oUt=Iq(Jrt,"ResourceSet"),uUt=VW(Pet,"InvocationTargetException",null),sUt=(XM(),m9),hUt=hUt=VSn;Nan(bv),van("permProps",[[["locale","default"],[bat,"gecko1_8"]],[["locale","default"],[bat,"safari"]]]),hUt(null,"elk",null)}).call(this)}).call(this,void 0!==e.g?e.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],3:[function(n,t,e){"use strict";function i(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function r(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}var a=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var c=Object.assign({},t),a=!1;try{n.resolve("web-worker"),a=!0}catch(s){}if(t.workerUrl)if(a){var o=n("web-worker");c.workerFactory=function(n){return new o(n)}}else console.warn("Web worker requested but 'web-worker' package not installed. \nConsider installing the package or pass your own 'workerFactory' to ELK's constructor.\n... Falling back to non-web worker version.");if(!c.workerFactory){var u=n("./elk-worker.min.js").Worker;c.workerFactory=function(n){return new u(n)}}return r(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,c))}return c(e,t),e}(n("./elk-api.js").default);Object.defineProperty(t.exports,"__esModule",{value:!0}),t.exports=a,a.default=a},{"./elk-api.js":1,"./elk-worker.min.js":2,"web-worker":4}],4:[function(n,t,e){t.exports=Worker},{}]},{},[3])(3)},4266:(n,t,e)=>{"use strict";e.r(t),e.d(t,{render:()=>o});var i=e(3571),r=e(1485),c=e(8692),a=(0,i.K)((n,t,{parentById:e})=>{const i=new Set;let r=n;if(n===t)return e[n]||"root";for(;r;){if(i.add(r),r===t)return r;r=e[r]}for(r=t;r;){if(i.has(r))return r;r=e[r]}return"root"},"findCommonAncestor"),o=(0,i.K)(async(n,t,{common:e,getConfig:o,insertCluster:u,insertEdge:s,insertEdgeLabel:h,insertMarkers:f,insertNode:l,interpolateToCurve:b,labelHelper:w,log:d,positionEdgeLabel:g},{algorithm:p})=>{const m={},v={},k=(0,i.K)(async(n,t,e,i)=>{const r={width:0,height:0},c=o();if(i.isGroup){const a={...i,children:[]};if(t.children.push(a),m[i.id]=a,await y(n,e,a,i.id),i.label){const{shapeSvg:t,bbox:e}=await w(n,i,void 0,!0);r.width=e.width,r.wrappingWidth=c.flowchart.wrappingWidth,r.height=e.height-2,r.labelNode=t.node(),t.remove()}else r.width=0,r.height=0;a.labelData=r,a.domId=n}else{const e={...i};t.children.push(e),m[i.id]=e;const r=await l(n,i,{config:c,dir:i.dir}),a=r.node().getBBox();e.domId=r,e.width=a.width,e.height=a.height}},"addVertex"),y=(0,i.K)(async function(n,t,e,i){const r=t.filter(n=>n?.parentId===i);return d.info("addVertices APA12",r,i),await Promise.all(r.map(async i=>{await k(n,e,t,i)})),e},"addVertices"),M=(0,i.K)(async(n,t,e,i,r,c)=>{await Promise.all(e.map(async function(e){if(e)if(m[e.id]=e,m[e.id].offset={posX:e.x+n,posY:e.y+t,x:n,y:t,depth:c,width:Math.max(e.width,e.labels&&e.labels[0]?.width||0),height:e.height},e.isGroup){d.debug("id abc88 subgraph = ",e.id,e.x,e.y,e.labelData);const n=r.insert("g").attr("class","subgraph"),t=JSON.parse(JSON.stringify(e));t.x=e.offset.posX+e.width/2,t.y=e.offset.posY+e.height/2,t.width=Math.max(t.width,e.labelData.width),await u(n,t),d.debug("id (UIO)= ",e.id,e.width,e.shape,e.labels)}else d.info("id NODE = ",e.id,e.x,e.y,n,t,e.domId.node(),`translate(${e.x+n+e.width/2}, ${e.y+t+e.height/2})`),e.domId.attr("transform",`translate(${e.x+n+e.width/2}, ${e.y+t+e.height/2})`)})),await Promise.all(e.map(async function(e){e?.isGroup&&await M(n+e.x,t+e.y,e.children,i,r,c+1)}))},"drawNodes"),T=(0,i.K)(n=>{const t={parentById:{},childrenById:{}},e=n.filter(n=>n.isGroup);return d.info("Subgraphs - ",e),e.forEach(e=>{n.filter(n=>n.parentId===e.id).forEach(n=>{t.parentById[n.id]=e.id,void 0===t.childrenById[e.id]&&(t.childrenById[e.id]=[]),t.childrenById[e.id].push(n)})}),e.forEach(function(n){const e={id:n.id};void 0!==t.parentById[n.id]&&(e.parent=t.parentById[n.id])}),t},"addSubGraphs"),j=(0,i.K)(n=>{const t=n.start,e=n.end,i=t,r=e,c=m[n.start.id],a=m[n.end.id];return c&&a?{source:t,target:e,sourceId:i,targetId:r}:{source:t,target:e}},"getEdgeStartEndPoint"),E=(0,i.K)(function(n,t,e){const i=a(n,t,e);if(void 0===i||"root"===i)return{x:0,y:0};const r=m[i].offset;return{x:r.posX,y:r.posY}},"calcOffset"),S=(0,i.K)(async function(n,t,i){d.info("abc78 DAGA edges = ",n);const c=n.edges,a=i.insert("g").attr("class","edgeLabels"),u={},s=n.direction||"DOWN";return await Promise.all(c.map(async function(n){const i=n.id;void 0===u[i]?(u[i]=0,d.info("abc78 new entry",i,u[i])):(u[i]++,d.info("abc78 new entry",i,u[i]));const f=i+"_"+u[i];n.id=f,d.info("abc78 new link id to be used is",i,f,u[i]);const l="LS_"+n.start,w="LE_"+n.end,g={style:"",labelStyle:""};switch(g.minlen=n.length||1,n.text=n.label,"arrow_open"===n.type?g.arrowhead="none":g.arrowhead="normal",g.arrowTypeStart="arrow_open",g.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":g.arrowTypeStart="arrow_cross";case"arrow_cross":g.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":g.arrowTypeStart="arrow_point";case"arrow_point":g.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":g.arrowTypeStart="arrow_circle";case"arrow_circle":g.arrowTypeEnd="arrow_circle"}let p="",m="";switch(g.startLabelRight=n.startLabelRight,g.endLabelLeft=n.endLabelLeft,n.stroke){case"normal":p="fill:none;",g.thickness="normal",g.pattern="solid";break;case"dotted":g.thickness="normal",g.pattern="dotted",g.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":g.thickness="thick",g.pattern="solid",g.style="stroke-width: 3.5px;fill:none;"}g.style=g.style+=p,g.labelStyle=g.labelStyle+=m;const v=o();void 0!==n.interpolate?g.curve=b(n.interpolate,r.lUB):void 0!==c.defaultInterpolate?g.curve=b(c.defaultInterpolate,r.lUB):g.curve=b(v.curve,r.lUB),void 0===n.text?void 0!==n.style&&(g.arrowheadStyle="fill: #333"):(g.arrowheadStyle="fill: #333",g.labelpos="c"),g.labelType=n.labelType,g.label=(n?.text||"").replace(e.lineBreakRegex,"\n"),void 0===n.style&&(g.style=g.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),g.labelStyle=g.labelStyle.replace("color:","fill:"),g.id=f,g.classes="flowchart-link "+l+" "+w;const k=await h(a,g),{source:y,target:M,sourceId:T,targetId:E}=j(n,s);d.debug("abc78 source and target",y,M),t.edges.push({id:"e"+n.start+n.end,...n,sources:[y],targets:[M],sourceId:T,targetId:E,labelEl:k,labels:[{width:g.width,height:g.height,orgWidth:g.width,orgHeight:g.height,text:g.label,layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}}],edgeData:g})})),t},"addEdges");function P(n){switch(n){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":default:return"DOWN";case"BT":return"UP"}}function C(n,t){const e=m[n];e&&(void 0===e?.layoutOptions&&(e.layoutOptions={}),e.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",e.id!==t&&C(e.parentId,t))}function I(n,t,e,i){d.debug("UIO intersectLine",n,t,e,i);const r=t.y-n.y,c=n.x-t.x,a=t.x*n.y-n.x*t.y,o=r*e.x+c*e.y+a,u=r*i.x+c*i.y+a,s=1e-6;if(0!==o&&0!==u&&O(o,u))return;const h=i.y-e.y,f=e.x-i.x,l=i.x*e.y-e.x*i.y,b=h*n.x+f*n.y+l,w=h*t.x+f*t.y+l;if(Math.abs(b)0}(0,i.K)(P,"dir2ElkDirection"),(0,i.K)(C,"setIncludeChildrenPolicy"),(0,i.K)(I,"intersectLine"),(0,i.K)(O,"sameSign");const A=(0,i.K)((n,t,e)=>{const i=n.x,r=n.y,c=n.width,a=n.height,o=[{x:i,y:r-a/2},{x:i+c/2,y:r},{x:i,y:r+a/2},{x:i-c/2,y:r}];d.debug(`APA16 diamondIntersection calc abc89:\n outsidePoint: ${JSON.stringify(t)}\n insidePoint : ${JSON.stringify(e)}\n node-bounds : x:${n.x} y:${n.y} w:${n.width} h:${n.height}`,JSON.stringify(o));const u=[];let s=Number.POSITIVE_INFINITY,h=Number.POSITIVE_INFINITY;o.forEach(function(n){s=Math.min(s,n.x),h=Math.min(h,n.y)});const f=i-c/2-s,l=r-a/2-h;for(let b=0;b1&&u.sort(function(n,e){const i=n.x-t.x,r=n.y-t.y,c=Math.sqrt(i*i+r*r),a=e.x-t.x,o=e.y-t.y,u=Math.sqrt(a*a+o*o);return c{d.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(t)}\n insidePoint : ${JSON.stringify(e)}\n node : x:${n.x} y:${n.y} w:${n.width} h:${n.height}`);const i=n.x,r=n.y,c=Math.abs(i-e.x),a=n.width/2;let o=e.xMath.abs(i-t.x)*u){const n=e.y{const e=n.x,i=n.y,r=Math.abs(t.x-e),c=Math.abs(t.y-i),a=n.width/2,o=n.height/2;return r>=a||c>=o},"outsideNode"),$=(0,i.K)((n,t,e)=>{d.debug("APA18 cutPathAtIntersect Points:",n,"node:",t,"isDiamond",e);const i=[];let r=n[0],c=!1;return n.forEach(n=>{if(N(t,n)||c)d.debug("abc88 outside",n,r,i),r=n,c||i.push(n);else{let a;if(e){const e=A(t,r,n);Math.sqrt((r.x-e.x)**2+(r.y-e.y)**2)>1&&(a=e)}a||(a=L(t,r,n));let o=!1;i.forEach(n=>{o=o||n.x===a.x&&n.y===a.y}),i.some(n=>n.x===a.x&&n.y===a.y)?d.debug("abc88 no intersect",a,i):i.push(a),c=!0}}),i},"cutPathAtIntersect"),D=new c;f(t.select("g"),n.markers,n.type,n.diagramId);let x={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.layered.crossingMinimization.forceNodeModelOrder":n.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":n.config.elk?.considerModelOrder,"elk.algorithm":p,"nodePlacement.strategy":n.config.elk?.nodePlacementStrategy,"elk.layered.mergeEdges":n.config.elk?.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":35,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":n.config.elk?.cycleBreakingStrategy},children:[],edges:[]};d.info("Drawing flowchart using v4 renderer",D);const R=n.direction||"DOWN";x.layoutOptions["elk.direction"]=P(R);const K=T(n.nodes),F=t.insert("g").attr("class","subgraphs"),_=t.insert("g").attr("class","nodes");x=await y(_,n.nodes,x);const B=t.insert("g").attr("class","edges edgePaths");x=await S(n,x,t);n.nodes.forEach(t=>{const e=m[t.id];void 0!==K.childrenById[e.id]&&(e.labels=[{text:e.label,width:e?.labelData?.width||50,height:e?.labelData?.height||50},e.width=e.width+2*e.padding,d.debug("UIO node label",e?.labelData?.width,e.padding)],e.layoutOptions={"spacing.baseValue":30,"nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]"},e.dir&&(e.layoutOptions={...e.layoutOptions,"elk.algorithm":p,"elk.direction":P(e.dir),"nodePlacement.strategy":n.config.elk?.nodePlacementStrategy,"elk.layered.mergeEdges":n.config.elk?.mergeEdges,"elk.hierarchyHandling":"SEPARATE_CHILDREN"}),delete e.x,delete e.y,delete e.width,delete e.height)}),x.edges.forEach(n=>{const t=n.sources[0],e=n.targets[0];if(m[t].parentId!==m[e].parentId){const n=a(t,e,K);C(t,n),C(e,n)}});const H=await D.layout(x);await M(0,0,H.children,t,F,0),H.edges?.map(t=>{const e=m[t.sources[0]],i=K[t.sources[0]],r=m[t.targets[0]],c=t.start,a=t.end,o=E(c,a,K);if(d.debug("APA18 offset",o,c," ==> ",a,"edge:",t,"cluster:",i,e),t.sections){const i=t.sections[0].startPoint,c=t.sections[0].endPoint,a=(t.sections[0].bendPoints?t.sections[0].bendPoints:[]).map(n=>({x:n.x+o.x,y:n.y+o.y}));t.points=[{x:i.x+o.x,y:i.y+o.y},...a,{x:c.x+o.x,y:c.y+o.y}];let u=e.width,h=r.width;if(e.isGroup){const n=e.domId.node().getBBox();u=Math.max(e.width,e.labels[0].width+e.padding),d.debug("UIO width",e.id,e.with,"bbox.width=",n.width,"lw=",e.labels[0].width,"node:",e.width,"SW = ",u)}if(r.isGroup){const n=r.domId.node().getBBox();h=Math.max(r.width,r.labels[0].width+r.padding),d.debug("UIO width",e.id,e.with,n.width,"EW = ",h,"HTML:",e.innerHTML)}"diamond"!==e.shape&&"diam"!==e.shape||t.points.unshift({x:e.offset.posX+e.width/2,y:e.offset.posY+e.height/2}),"diamond"!==r.shape&&"diam"!==r.shape||t.points.push({x:r.offset.posX+r.width/2,y:r.offset.posY+r.height/2}),t.points=$(t.points.reverse(),{x:e.offset.posX+e.width/2,y:e.offset.posY+e.height/2,width:u,height:e.height,padding:e.padding},"diamond"===e.shape||"diam"===e.shape).reverse(),t.points=$(t.points,{x:r.offset.posX+r.width/2,y:r.offset.posY+r.height/2,width:h,height:r.height,padding:r.padding},"diamond"===r.shape||"diam"===r.shape);const f=s(B,t,v,n.type,e,r,n.diagramId);d.info("APA12 edge points after insert",JSON.stringify(t.points)),t.x=t.labels[0].x+o.x+t.labels[0].width/2,t.y=t.labels[0].y+o.y+t.labels[0].height/2,g(t,f)}})},"render")}}]); \ No newline at end of file diff --git a/assets/js/4312.3fc60254.js b/assets/js/4312.3fc60254.js deleted file mode 100644 index 748c106..0000000 --- a/assets/js/4312.3fc60254.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4312],{5871(t,r,e){function n(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>n}),(0,e(797).K2)(n,"populateCommonDb")},2938(t,r,e){e.d(r,{m:()=>o});var n=e(797),o=class{constructor(t){this.init=t,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},4312(t,r,e){e.d(r,{diagram:()=>ut});var n=e(5871),o=e(2938),a=e(3226),c=e(7633),s=e(797),i=e(8731),h=e(451),d={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},m=c.UI.gitGraph,$=(0,s.K2)(()=>(0,a.$t)({...m,...(0,c.zj)().gitGraph}),"getConfig"),l=new o.m(()=>{const t=$(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function y(){return(0,a.yT)({length:7})}function g(t,r){const e=Object.create(null);return t.reduce((t,n)=>{const o=r(n);return e[o]||(e[o]=!0,t.push(n)),t},[])}(0,s.K2)(y,"getID"),(0,s.K2)(g,"uniqBy");var p=(0,s.K2)(function(t){l.records.direction=t},"setDirection"),x=(0,s.K2)(function(t){s.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{l.records.options=JSON.parse(t)}catch(r){s.Rm.error("error while parsing gitGraph options",r.message)}},"setOptions"),f=(0,s.K2)(function(){return l.records.options},"getOptions"),u=(0,s.K2)(function(t){let r=t.msg,e=t.id;const n=t.type;let o=t.tags;s.Rm.info("commit",r,e,n,o),s.Rm.debug("Entering commit:",r,e,n,o);const a=$();e=c.Y2.sanitizeText(e,a),r=c.Y2.sanitizeText(r,a),o=o?.map(t=>c.Y2.sanitizeText(t,a));const i={id:e||l.records.seq+"-"+y(),message:r,seq:l.records.seq++,type:n??d.NORMAL,tags:o??[],parents:null==l.records.head?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=i,s.Rm.info("main branch",a.mainBranchName),l.records.commits.has(i.id)&&s.Rm.warn(`Commit ID ${i.id} already exists`),l.records.commits.set(i.id,i),l.records.branches.set(l.records.currBranch,i.id),s.Rm.debug("in pushCommit "+i.id)},"commit"),b=(0,s.K2)(function(t){let r=t.name;const e=t.order;if(r=c.Y2.sanitizeText(r,$()),l.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);l.records.branches.set(r,null!=l.records.head?l.records.head.id:null),l.records.branchConfig.set(r,{name:r,order:e}),E(r),s.Rm.debug("in createBranch")},"branch"),w=(0,s.K2)(t=>{let r=t.branch,e=t.id;const n=t.type,o=t.tags,a=$();r=c.Y2.sanitizeText(r,a),e&&(e=c.Y2.sanitizeText(e,a));const i=l.records.branches.get(l.records.currBranch),h=l.records.branches.get(r),m=i?l.records.commits.get(i):void 0,g=h?l.records.commits.get(h):void 0;if(m&&g&&m.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===m||!m){const t=new Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!l.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===g||!g){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(m===g){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&l.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${n} ${o?.join(" ")}`,token:`merge ${r} ${e} ${n} ${o?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${n} ${o?.join(" ")}`]},t}const p=h||"",x={id:e||`${l.records.seq}-${y()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:null==l.records.head?[]:[l.records.head.id,p],branch:l.records.currBranch,type:d.MERGE,customType:n,customId:!!e,tags:o??[]};l.records.head=x,l.records.commits.set(x.id,x),l.records.branches.set(l.records.currBranch,x.id),s.Rm.debug(l.records.branches),s.Rm.debug("in mergeBranch")},"merge"),B=(0,s.K2)(function(t){let r=t.id,e=t.targetId,n=t.tags,o=t.parent;s.Rm.debug("Entering cherryPick:",r,e,n);const a=$();if(r=c.Y2.sanitizeText(r,a),e=c.Y2.sanitizeText(e,a),n=n?.map(t=>c.Y2.sanitizeText(t,a)),o=c.Y2.sanitizeText(o,a),!r||!l.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const i=l.records.commits.get(r);if(void 0===i||!i)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&(!Array.isArray(i.parents)||!i.parents.includes(o))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const h=i.branch;if(i.type===d.MERGE&&!o){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!l.records.commits.has(e)){if(h===l.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=l.records.branches.get(l.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=l.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:l.records.seq+"-"+y(),message:`cherry-picked ${i?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:null==l.records.head?[]:[l.records.head.id,i.id],branch:l.records.currBranch,type:d.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${i.id}${i.type===d.MERGE?`|parent:${o}`:""}`]};l.records.head=c,l.records.commits.set(c.id,c),l.records.branches.set(l.records.currBranch,c.id),s.Rm.debug(l.records.branches),s.Rm.debug("in cherryPick")}},"cherryPick"),E=(0,s.K2)(function(t){if(t=c.Y2.sanitizeText(t,$()),!l.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{l.records.currBranch=t;const r=l.records.branches.get(l.records.currBranch);l.records.head=void 0!==r&&r?l.records.commits.get(r)??null:null}},"checkout");function k(t,r,e){const n=t.indexOf(r);-1===n?t.push(e):t.splice(n,1,e)}function C(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const n=[e,r.id,r.seq];for(const o in l.records.branches)l.records.branches.get(o)===r.id&&n.push(o);if(s.Rm.debug(n.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=l.records.commits.get(r.parents[0]);k(t,r,e),r.parents[1]&&t.push(l.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=l.records.commits.get(r.parents[0]);k(t,r,e)}}C(t=g(t,t=>t.id))}(0,s.K2)(k,"upsert"),(0,s.K2)(C,"prettyPrintCommitHistory");var T=(0,s.K2)(function(){s.Rm.debug(l.records.commits);C([R()[0]])},"prettyPrint"),L=(0,s.K2)(function(){l.reset(),(0,c.IU)()},"clear"),K=(0,s.K2)(function(){return[...l.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),M=(0,s.K2)(function(){return l.records.branches},"getBranches"),v=(0,s.K2)(function(){return l.records.commits},"getCommits"),R=(0,s.K2)(function(){const t=[...l.records.commits.values()];return t.forEach(function(t){s.Rm.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),P={commitType:d,getConfig:$,setDirection:p,setOptions:x,getOptions:f,commit:u,branch:b,merge:w,cherryPick:B,checkout:E,prettyPrint:T,clear:L,getBranchesAsObjArray:K,getBranches:M,getCommits:v,getCommitsArray:R,getCurrentBranch:(0,s.K2)(function(){return l.records.currBranch},"getCurrentBranch"),getDirection:(0,s.K2)(function(){return l.records.direction},"getDirection"),getHead:(0,s.K2)(function(){return l.records.head},"getHead"),setAccTitle:c.SV,getAccTitle:c.iN,getAccDescription:c.m7,setAccDescription:c.EI,setDiagramTitle:c.ke,getDiagramTitle:c.ab},I=(0,s.K2)((t,r)=>{(0,n.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)A(e,r)},"populate"),A=(0,s.K2)((t,r)=>{const e={Commit:(0,s.K2)(t=>r.commit(G(t)),"Commit"),Branch:(0,s.K2)(t=>r.branch(O(t)),"Branch"),Merge:(0,s.K2)(t=>r.merge(q(t)),"Merge"),Checkout:(0,s.K2)(t=>r.checkout(z(t)),"Checkout"),CherryPicking:(0,s.K2)(t=>r.cherryPick(D(t)),"CherryPicking")}[t.$type];e?e(t):s.Rm.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),G=(0,s.K2)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?d[t.type]:d.NORMAL,tags:t.tags??void 0}),"parseCommit"),O=(0,s.K2)(t=>({name:t.name,order:t.order??0}),"parseBranch"),q=(0,s.K2)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?d[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),z=(0,s.K2)(t=>t.branch,"parseCheckout"),D=(0,s.K2)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),H={parse:(0,s.K2)(async t=>{const r=await(0,i.qg)("gitGraph",t);s.Rm.debug(r),I(r,P)},"parse")};var S=(0,c.D7)(),Y=S?.gitGraph,N=10,j=40,W=new Map,_=new Map,F=new Map,U=[],V=0,J="LR",Q=(0,s.K2)(()=>{W.clear(),_.clear(),F.clear(),V=0,U=[],J="LR"},"clear"),X=(0,s.K2)(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),Z=(0,s.K2)(t=>{let r,e,n;return"BT"===J?(e=(0,s.K2)((t,r)=>t<=r,"comparisonFunc"),n=1/0):(e=(0,s.K2)((t,r)=>t>=r,"comparisonFunc"),n=0),t.forEach(t=>{const o="TB"===J||"BT"==J?_.get(t)?.y:_.get(t)?.x;void 0!==o&&e(o,n)&&(r=t,n=o)}),r},"findClosestParent"),tt=(0,s.K2)(t=>{let r="",e=1/0;return t.forEach(t=>{const n=_.get(t).y;n<=e&&(r=t,e=n)}),r||void 0},"findClosestParentBT"),rt=(0,s.K2)((t,r,e)=>{let n=e,o=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(n=nt(e),o=Math.max(n,o)):a.push(e),ot(e,n)}),n=o,a.forEach(t=>{at(t,n,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=tt(e.parents);n=_.get(t).y-j,n<=o&&(o=n);const r=W.get(e.branch).pos,a=n-N;_.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),et=(0,s.K2)(t=>{const r=Z(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=_.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),nt=(0,s.K2)(t=>et(t)+j,"calculateCommitPosition"),ot=(0,s.K2)((t,r)=>{const e=W.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const n=e.pos,o=r+N;return _.set(t.id,{x:n,y:o}),{x:n,y:o}},"setCommitPosition"),at=(0,s.K2)((t,r,e)=>{const n=W.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const o=r+e,a=n.pos;_.set(t.id,{x:a,y:o})},"setRootPosition"),ct=(0,s.K2)((t,r,e,n,o,a)=>{if(a===d.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${o%8} ${n}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${o%8} ${n}-inner`);else if(a===d.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const c=t.append("circle");if(c.attr("cx",e.x),c.attr("cy",e.y),c.attr("r",r.type===d.MERGE?9:10),c.attr("class",`commit ${r.id} commit${o%8}`),a===d.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${n} ${r.id} commit${o%8}`)}if(a===d.REVERSE){t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${n} ${r.id} commit${o%8}`)}}},"drawCommitBullet"),st=(0,s.K2)((t,r,e,n)=>{if(r.type!==d.CHERRY_PICK&&(r.customId&&r.type===d.MERGE||r.type!==d.MERGE)&&Y?.showCommitLabel){const o=t.append("g"),a=o.insert("rect").attr("class","commit-label-bkg"),c=o.append("text").attr("x",n).attr("y",e.y+25).attr("class","commit-label").text(r.id),s=c.node()?.getBBox();if(s&&(a.attr("x",e.posWithOffset-s.width/2-2).attr("y",e.y+13.5).attr("width",s.width+4).attr("height",s.height+4),"TB"===J||"BT"===J?(a.attr("x",e.x-(s.width+16+5)).attr("y",e.y-12),c.attr("x",e.x-(s.width+16)).attr("y",e.y+s.height-12)):c.attr("x",e.posWithOffset-s.width/2),Y.rotateCommitLabel))if("TB"===J||"BT"===J)c.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),a.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(s.width+10)/25*9.5,r=10+s.width/25*8.5;o.attr("transform","translate("+t+", "+r+") rotate(-45, "+n+", "+e.y+")")}}},"drawCommitLabel"),it=(0,s.K2)((t,r,e,n)=>{if(r.tags.length>0){let o=0,a=0,c=0;const s=[];for(const n of r.tags.reverse()){const r=t.insert("polygon"),i=t.append("circle"),h=t.append("text").attr("y",e.y-16-o).attr("class","tag-label").text(n),d=h.node()?.getBBox();if(!d)throw new Error("Tag bbox not found");a=Math.max(a,d.width),c=Math.max(c,d.height),h.attr("x",e.posWithOffset-d.width/2),s.push({tag:h,hole:i,rect:r,yOffset:o}),o+=20}for(const{tag:t,hole:r,rect:i,yOffset:h}of s){const o=c/2,s=e.y-19.2-h;if(i.attr("class","tag-label-bkg").attr("points",`\n ${n-a/2-2},${s+2} \n ${n-a/2-2},${s-2}\n ${e.posWithOffset-a/2-4},${s-o-2}\n ${e.posWithOffset+a/2+4},${s-o-2}\n ${e.posWithOffset+a/2+4},${s+o+2}\n ${e.posWithOffset-a/2-4},${s+o+2}`),r.attr("cy",s).attr("cx",n-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===J||"BT"===J){const c=n+h;i.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${c+2}\n ${e.x},${c-2}\n ${e.x+N},${c-o-2}\n ${e.x+N+a+4},${c-o-2}\n ${e.x+N+a+4},${c+o+2}\n ${e.x+N},${c+o+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),r.attr("cx",e.x+2).attr("cy",c).attr("transform","translate(12,12) rotate(45, "+e.x+","+n+")"),t.attr("x",e.x+5).attr("y",c+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+n+")")}}}},"drawCommitTags"),ht=(0,s.K2)(t=>{switch(t.customType??t.type){case d.NORMAL:return"commit-normal";case d.REVERSE:return"commit-reverse";case d.HIGHLIGHT:return"commit-highlight";case d.MERGE:return"commit-merge";case d.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dt=(0,s.K2)((t,r,e,n)=>{const o={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(n.get(t.id)??o).y-j}return 0}{const e=Z(t.parents);if(e){const a=n.get(e)??o;if("TB"===r)return a.y+j;if("BT"===r){return(n.get(t.id)??o).y-j}return a.x+j}}return 0},"calculatePosition"),mt=(0,s.K2)((t,r,e)=>{const n="BT"===J&&e?r:r+N,o="TB"===J||"BT"===J?n:W.get(t.branch)?.pos,a="TB"===J||"BT"===J?W.get(t.branch)?.pos:n;if(void 0===a||void 0===o)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:o,posWithOffset:n}},"getCommitPosition"),$t=(0,s.K2)((t,r,e)=>{if(!Y)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),o=t.append("g").attr("class","commit-labels");let a="TB"===J||"BT"===J?30:0;const c=[...r.keys()],i=Y?.parallelCommits??!1,h=(0,s.K2)((t,e)=>{const n=r.get(t)?.seq,o=r.get(e)?.seq;return void 0!==n&&void 0!==o?n-o:0},"sortKeys");let d=c.sort(h);"BT"===J&&(i&&rt(d,r,a),d=d.reverse()),d.forEach(t=>{const c=r.get(t);if(!c)throw new Error(`Commit not found for key ${t}`);i&&(a=dt(c,J,a,_));const s=mt(c,a,i);if(e){const t=ht(c),r=c.customType??c.type,e=W.get(c.branch)?.index??0;ct(n,c,s,t,e,r),st(o,c,s,a),it(o,c,s,a)}"TB"===J||"BT"===J?_.set(c.id,{x:s.x,y:s.posWithOffset}):_.set(c.id,{x:s.posWithOffset,y:s.y}),a="BT"===J&&i?a+j:a+j+N,a>V&&(V=a)})},"drawCommits"),lt=(0,s.K2)((t,r,e,n,o)=>{const a=("TB"===J||"BT"===J?e.xt.branch===a,"isOnBranchToGetCurve"),i=(0,s.K2)(e=>e.seq>t.seq&&e.seqi(t)&&c(t))},"shouldRerouteArrow"),yt=(0,s.K2)((t,r,e=0)=>{const n=t+Math.abs(t-r)/2;if(e>5)return n;if(U.every(t=>Math.abs(t-n)>=10))return U.push(n),n;const o=Math.abs(t-r);return yt(t,r-o/5,e+1)},"findLane"),gt=(0,s.K2)((t,r,e,n)=>{const o=_.get(r.id),a=_.get(e.id);if(void 0===o||void 0===a)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=lt(r,e,o,a,n);let s,i="",h="",m=0,$=0,l=W.get(e.branch)?.index;if(e.type===d.MERGE&&r.id!==e.parents[0]&&(l=W.get(r.branch)?.index),c){i="A 10 10, 0, 0, 0,",h="A 10 10, 0, 0, 1,",m=10,$=10;const t=o.ya.x&&(i="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===d.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${h} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${i} ${a.x} ${o.y+$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):"BT"===J?(o.xa.x&&(i="A 20 20, 0, 0, 0,",h="A 20 20, 0, 0, 1,",m=20,$=20,s=e.type===d.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${i} ${o.x-$} ${a.y} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`),o.x===a.x&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.ya.y&&(s=e.type===d.MERGE&&r.id!==e.parents[0]?`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${i} ${a.x} ${o.y-$} L ${a.x} ${a.y}`:`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${h} ${o.x+$} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&(s=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if(void 0===s)throw new Error("Line definition not found");t.append("path").attr("d",s).attr("class","arrow arrow"+l%8)},"drawArrow"),pt=(0,s.K2)((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const n=r.get(t);n.parents&&n.parents.length>0&&n.parents.forEach(t=>{gt(e,r.get(t),n,r)})})},"drawArrows"),xt=(0,s.K2)((t,r)=>{const e=t.append("g");r.forEach((t,r)=>{const n=r%8,o=W.get(t.name)?.pos;if(void 0===o)throw new Error(`Position not found for branch ${t.name}`);const a=e.append("line");a.attr("x1",0),a.attr("y1",o),a.attr("x2",V),a.attr("y2",o),a.attr("class","branch branch"+n),"TB"===J?(a.attr("y1",30),a.attr("x1",o),a.attr("y2",V),a.attr("x2",o)):"BT"===J&&(a.attr("y1",V),a.attr("x1",o),a.attr("y2",30),a.attr("x2",o)),U.push(o);const c=t.name,s=X(c),i=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(s);const d=s.getBBox();i.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-d.width-4-(!0===Y?.rotateCommitLabel?30:0)).attr("y",-d.height/2+8).attr("width",d.width+18).attr("height",d.height+4),h.attr("transform","translate("+(-d.width-14-(!0===Y?.rotateCommitLabel?30:0))+", "+(o-d.height/2-1)+")"),"TB"===J?(i.attr("x",o-d.width/2-10).attr("y",0),h.attr("transform","translate("+(o-d.width/2-5)+", 0)")):"BT"===J?(i.attr("x",o-d.width/2-10).attr("y",V),h.attr("transform","translate("+(o-d.width/2-5)+", "+V+")")):i.attr("transform","translate(-19, "+(o-d.height/2)+")")})},"drawBranches"),ft=(0,s.K2)(function(t,r,e,n,o){return W.set(t,{pos:r,index:e}),r+=50+(o?40:0)+("TB"===J||"BT"===J?n.width/2:0)},"setBranchPosition");var ut={parser:H,db:P,renderer:{draw:(0,s.K2)(function(t,r,e,n){if(Q(),s.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e),!Y)throw new Error("GitGraph config not found");const o=Y.rotateCommitLabel??!1,i=n.db;F=i.getCommits();const d=i.getBranchesAsObjArray();J=i.getDirection();const m=(0,h.Ltv)(`[id="${r}"]`);let $=0;d.forEach((t,r)=>{const e=X(t.name),n=m.append("g"),a=n.insert("g").attr("class","branchLabel"),c=a.insert("g").attr("class","label branch-label");c.node()?.appendChild(e);const s=e.getBBox();$=ft(t.name,$,r,s,o),c.remove(),a.remove(),n.remove()}),$t(m,F,!1),Y.showBranches&&xt(m,d),pt(m,F),$t(m,F,!0),a._K.insertTitle(m,"gitTitleText",Y.titleTopMargin??0,i.getDiagramTitle()),(0,c.mj)(void 0,m,Y.diagramPadding,Y.useMaxWidth)},"draw")},styles:(0,s.K2)(t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map(r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/4326.ef82c4b3.js b/assets/js/4326.ef82c4b3.js new file mode 100644 index 0000000..df35ebe --- /dev/null +++ b/assets/js/4326.ef82c4b3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4326],{4326:(e,t,r)=>{r.d(t,{default:()=>gn});class a extends Error{constructor(e,t){var r,n,i="KaTeX parse error: "+e,o=t&&t.loc;if(o&&o.start<=o.end){var s=o.lexer.input;r=o.start,n=o.end,r===s.length?i+=" at end of input: ":i+=" at position "+(r+1)+": ";var l=s.slice(r,n).replace(/[^]/g,"$&\u0332");i+=(r>15?"\u2026"+s.slice(r-15,r):s.slice(0,r))+l+(n+15e.replace(n,"-$1").toLowerCase(),o={"&":"&",">":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,l=e=>String(e).replace(s,e=>o[e]),h=e=>"ordgroup"===e.type||"color"===e.type?1===e.body.length?h(e.body[0]):e:"font"===e.type?h(e.body):e,m=new Set(["mathord","textord","atom"]),c=e=>m.has(h(e).type),u={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:e=>"#"+e},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:e=>Math.max(0,e),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:e=>Math.max(0,e),cli:"-e, --max-expand ",cliProcessor:e=>"Infinity"===e?1/0:parseInt(e)},globalGroup:{type:"boolean",cli:!1}};function p(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if("string"!=typeof r)return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class d{constructor(e){for(var t of(void 0===e&&(e={}),e=e||{},Object.keys(u))){var r=u[t],a=e[t];this[t]=void 0!==a?r.processor?r.processor(a):a:p(r)}}reportNonstrict(e,t,r){var n=this.strict;if("function"==typeof n&&(n=n(e,t,r)),n&&"ignore"!==n){if(!0===n||"error"===n)throw new a("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var a=this.strict;if("function"==typeof a)try{a=a(e,t,r)}catch(n){a="error"}return!(!a||"ignore"===a)&&(!0===a||"error"===a||("warn"===a?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),!1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+a+"': "+t+" ["+e+"]"),!1)))}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=(e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?":"!==t[2]?null:/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"})(e.url);if(null==t)return!1;e.protocol=t}var r="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(r)}}class g{constructor(e,t,r){this.id=e,this.size=t,this.cramped=r}sup(){return f[v[this.id]]}sub(){return f[b[this.id]]}fracNum(){return f[y[this.id]]}fracDen(){return f[x[this.id]]}cramp(){return f[w[this.id]]}text(){return f[k[this.id]]}isTight(){return this.size>=2}}var f=[new g(0,0,!1),new g(1,0,!0),new g(2,1,!1),new g(3,1,!0),new g(4,2,!1),new g(5,2,!0),new g(6,3,!1),new g(7,3,!0)],v=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],y=[2,3,4,5,6,7,6,7],x=[3,3,5,5,7,7,7,7],w=[1,1,3,3,5,5,7,7],k=[0,1,2,3,2,3,2,3],S={DISPLAY:f[0],TEXT:f[2],SCRIPT:f[4],SCRIPTSCRIPT:f[6]},z=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];var M=[];function A(e){for(var t=0;t=M[t]&&e<=M[t+1])return!0;return!1}z.forEach(e=>e.blocks.forEach(e=>M.push(...e)));var T=e=>e+" "+e,B=80,q={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:T("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:T("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:T("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:T("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:T("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:T("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:T("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:T("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};class C{constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText()).join("")}}var I={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},R={ex:!0,em:!0,mu:!0},H=function(e){return"string"!=typeof e&&(e=e.unit),e in I||e in R||"ex"===e},E=function(e,t){var r;if(e.unit in I)r=I[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n;if(n=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new a("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},N=function(e){return+e.toFixed(4)+"em"},O=function(e){return e.filter(e=>e).join(" ")},D=function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var a=t.getColor();a&&(this.style.color=a)}},L=function(e){var t=document.createElement(e);for(var r of(t.className=O(this.classes),Object.keys(this.style)))t.style[r]=this.style[r];for(var a of Object.keys(this.attributes))t.setAttribute(a,this.attributes[a]);for(var n=0;n/=\x00-\x1f]/,F=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+l(O(this.classes))+'"');var r="";for(var n of Object.keys(this.style))r+=i(n)+":"+this.style[n]+";";for(var o of(r&&(t+=' style="'+l(r)+'"'),Object.keys(this.attributes))){if(P.test(o))throw new a("Invalid attribute name '"+o+"'");t+=" "+o+'="'+l(this.attributes[o])+'"'}t+=">";for(var s=0;s"};class V{constructor(e,t,r,a){D.call(this,e,r,a),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return L.call(this,"span")}toMarkup(){return F.call(this,"span")}}class G{constructor(e,t,r,a){D.call(this,t,a),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return L.call(this,"a")}toMarkup(){return F.call(this,"a")}}class U{constructor(e,t,r){this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");for(var t of(e.src=this.src,e.alt=this.alt,e.className="mord",Object.keys(this.style)))e.style[t]=this.style[t];return e}toMarkup(){var e=''+l(this.alt)+'=n[0]&&e<=n[1])return r.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[\xee\xef\xed\xec]/.test(this.text)&&(this.text=X[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;for(var r of(this.italic>0&&((t=document.createElement("span")).style.marginRight=N(this.italic)),this.classes.length>0&&((t=t||document.createElement("span")).className=O(this.classes)),Object.keys(this.style)))(t=t||document.createElement("span")).style[r]=this.style[r];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+N(this.italic)+";"),Object.keys(this.style)))r+=i(a)+":"+this.style[a]+";";r&&(e=!0,t+=' style="'+l(r)+'"');var n=l(this.text);return e?(t+=">",t+=n,t+=""):n}}class W{constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var r=0;r':''}}class _{constructor(e){this.attributes=e||{}}toNode(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e="","\\gt",!0),ae(ne,oe,fe,"\u2208","\\in",!0),ae(ne,oe,fe,"\ue020","\\@not"),ae(ne,oe,fe,"\u2282","\\subset",!0),ae(ne,oe,fe,"\u2283","\\supset",!0),ae(ne,oe,fe,"\u2286","\\subseteq",!0),ae(ne,oe,fe,"\u2287","\\supseteq",!0),ae(ne,se,fe,"\u2288","\\nsubseteq",!0),ae(ne,se,fe,"\u2289","\\nsupseteq",!0),ae(ne,oe,fe,"\u22a8","\\models"),ae(ne,oe,fe,"\u2190","\\leftarrow",!0),ae(ne,oe,fe,"\u2264","\\le"),ae(ne,oe,fe,"\u2264","\\leq",!0),ae(ne,oe,fe,"<","\\lt",!0),ae(ne,oe,fe,"\u2192","\\rightarrow",!0),ae(ne,oe,fe,"\u2192","\\to"),ae(ne,se,fe,"\u2271","\\ngeq",!0),ae(ne,se,fe,"\u2270","\\nleq",!0),ae(ne,oe,ve,"\xa0","\\ "),ae(ne,oe,ve,"\xa0","\\space"),ae(ne,oe,ve,"\xa0","\\nobreakspace"),ae(ie,oe,ve,"\xa0","\\ "),ae(ie,oe,ve,"\xa0"," "),ae(ie,oe,ve,"\xa0","\\space"),ae(ie,oe,ve,"\xa0","\\nobreakspace"),ae(ne,oe,ve,null,"\\nobreak"),ae(ne,oe,ve,null,"\\allowbreak"),ae(ne,oe,ge,",",","),ae(ne,oe,ge,";",";"),ae(ne,se,he,"\u22bc","\\barwedge",!0),ae(ne,se,he,"\u22bb","\\veebar",!0),ae(ne,oe,he,"\u2299","\\odot",!0),ae(ne,oe,he,"\u2295","\\oplus",!0),ae(ne,oe,he,"\u2297","\\otimes",!0),ae(ne,oe,be,"\u2202","\\partial",!0),ae(ne,oe,he,"\u2298","\\oslash",!0),ae(ne,se,he,"\u229a","\\circledcirc",!0),ae(ne,se,he,"\u22a1","\\boxdot",!0),ae(ne,oe,he,"\u25b3","\\bigtriangleup"),ae(ne,oe,he,"\u25bd","\\bigtriangledown"),ae(ne,oe,he,"\u2020","\\dagger"),ae(ne,oe,he,"\u22c4","\\diamond"),ae(ne,oe,he,"\u22c6","\\star"),ae(ne,oe,he,"\u25c3","\\triangleleft"),ae(ne,oe,he,"\u25b9","\\triangleright"),ae(ne,oe,de,"{","\\{"),ae(ie,oe,be,"{","\\{"),ae(ie,oe,be,"{","\\textbraceleft"),ae(ne,oe,me,"}","\\}"),ae(ie,oe,be,"}","\\}"),ae(ie,oe,be,"}","\\textbraceright"),ae(ne,oe,de,"{","\\lbrace"),ae(ne,oe,me,"}","\\rbrace"),ae(ne,oe,de,"[","\\lbrack",!0),ae(ie,oe,be,"[","\\lbrack",!0),ae(ne,oe,me,"]","\\rbrack",!0),ae(ie,oe,be,"]","\\rbrack",!0),ae(ne,oe,de,"(","\\lparen",!0),ae(ne,oe,me,")","\\rparen",!0),ae(ie,oe,be,"<","\\textless",!0),ae(ie,oe,be,">","\\textgreater",!0),ae(ne,oe,de,"\u230a","\\lfloor",!0),ae(ne,oe,me,"\u230b","\\rfloor",!0),ae(ne,oe,de,"\u2308","\\lceil",!0),ae(ne,oe,me,"\u2309","\\rceil",!0),ae(ne,oe,be,"\\","\\backslash"),ae(ne,oe,be,"\u2223","|"),ae(ne,oe,be,"\u2223","\\vert"),ae(ie,oe,be,"|","\\textbar",!0),ae(ne,oe,be,"\u2225","\\|"),ae(ne,oe,be,"\u2225","\\Vert"),ae(ie,oe,be,"\u2225","\\textbardbl"),ae(ie,oe,be,"~","\\textasciitilde"),ae(ie,oe,be,"\\","\\textbackslash"),ae(ie,oe,be,"^","\\textasciicircum"),ae(ne,oe,fe,"\u2191","\\uparrow",!0),ae(ne,oe,fe,"\u21d1","\\Uparrow",!0),ae(ne,oe,fe,"\u2193","\\downarrow",!0),ae(ne,oe,fe,"\u21d3","\\Downarrow",!0),ae(ne,oe,fe,"\u2195","\\updownarrow",!0),ae(ne,oe,fe,"\u21d5","\\Updownarrow",!0),ae(ne,oe,pe,"\u2210","\\coprod"),ae(ne,oe,pe,"\u22c1","\\bigvee"),ae(ne,oe,pe,"\u22c0","\\bigwedge"),ae(ne,oe,pe,"\u2a04","\\biguplus"),ae(ne,oe,pe,"\u22c2","\\bigcap"),ae(ne,oe,pe,"\u22c3","\\bigcup"),ae(ne,oe,pe,"\u222b","\\int"),ae(ne,oe,pe,"\u222b","\\intop"),ae(ne,oe,pe,"\u222c","\\iint"),ae(ne,oe,pe,"\u222d","\\iiint"),ae(ne,oe,pe,"\u220f","\\prod"),ae(ne,oe,pe,"\u2211","\\sum"),ae(ne,oe,pe,"\u2a02","\\bigotimes"),ae(ne,oe,pe,"\u2a01","\\bigoplus"),ae(ne,oe,pe,"\u2a00","\\bigodot"),ae(ne,oe,pe,"\u222e","\\oint"),ae(ne,oe,pe,"\u222f","\\oiint"),ae(ne,oe,pe,"\u2230","\\oiiint"),ae(ne,oe,pe,"\u2a06","\\bigsqcup"),ae(ne,oe,pe,"\u222b","\\smallint"),ae(ie,oe,ce,"\u2026","\\textellipsis"),ae(ne,oe,ce,"\u2026","\\mathellipsis"),ae(ie,oe,ce,"\u2026","\\ldots",!0),ae(ne,oe,ce,"\u2026","\\ldots",!0),ae(ne,oe,ce,"\u22ef","\\@cdots",!0),ae(ne,oe,ce,"\u22f1","\\ddots",!0),ae(ne,oe,be,"\u22ee","\\varvdots"),ae(ie,oe,be,"\u22ee","\\varvdots"),ae(ne,oe,le,"\u02ca","\\acute"),ae(ne,oe,le,"\u02cb","\\grave"),ae(ne,oe,le,"\xa8","\\ddot"),ae(ne,oe,le,"~","\\tilde"),ae(ne,oe,le,"\u02c9","\\bar"),ae(ne,oe,le,"\u02d8","\\breve"),ae(ne,oe,le,"\u02c7","\\check"),ae(ne,oe,le,"^","\\hat"),ae(ne,oe,le,"\u20d7","\\vec"),ae(ne,oe,le,"\u02d9","\\dot"),ae(ne,oe,le,"\u02da","\\mathring"),ae(ne,oe,ue,"\ue131","\\@imath"),ae(ne,oe,ue,"\ue237","\\@jmath"),ae(ne,oe,be,"\u0131","\u0131"),ae(ne,oe,be,"\u0237","\u0237"),ae(ie,oe,be,"\u0131","\\i",!0),ae(ie,oe,be,"\u0237","\\j",!0),ae(ie,oe,be,"\xdf","\\ss",!0),ae(ie,oe,be,"\xe6","\\ae",!0),ae(ie,oe,be,"\u0153","\\oe",!0),ae(ie,oe,be,"\xf8","\\o",!0),ae(ie,oe,be,"\xc6","\\AE",!0),ae(ie,oe,be,"\u0152","\\OE",!0),ae(ie,oe,be,"\xd8","\\O",!0),ae(ie,oe,le,"\u02ca","\\'"),ae(ie,oe,le,"\u02cb","\\`"),ae(ie,oe,le,"\u02c6","\\^"),ae(ie,oe,le,"\u02dc","\\~"),ae(ie,oe,le,"\u02c9","\\="),ae(ie,oe,le,"\u02d8","\\u"),ae(ie,oe,le,"\u02d9","\\."),ae(ie,oe,le,"\xb8","\\c"),ae(ie,oe,le,"\u02da","\\r"),ae(ie,oe,le,"\u02c7","\\v"),ae(ie,oe,le,"\xa8",'\\"'),ae(ie,oe,le,"\u02dd","\\H"),ae(ie,oe,le,"\u25ef","\\textcircled");var ye={"--":!0,"---":!0,"``":!0,"''":!0};ae(ie,oe,be,"\u2013","--",!0),ae(ie,oe,be,"\u2013","\\textendash"),ae(ie,oe,be,"\u2014","---",!0),ae(ie,oe,be,"\u2014","\\textemdash"),ae(ie,oe,be,"\u2018","`",!0),ae(ie,oe,be,"\u2018","\\textquoteleft"),ae(ie,oe,be,"\u2019","'",!0),ae(ie,oe,be,"\u2019","\\textquoteright"),ae(ie,oe,be,"\u201c","``",!0),ae(ie,oe,be,"\u201c","\\textquotedblleft"),ae(ie,oe,be,"\u201d","''",!0),ae(ie,oe,be,"\u201d","\\textquotedblright"),ae(ne,oe,be,"\xb0","\\degree",!0),ae(ie,oe,be,"\xb0","\\degree"),ae(ie,oe,be,"\xb0","\\textdegree",!0),ae(ne,oe,be,"\xa3","\\pounds"),ae(ne,oe,be,"\xa3","\\mathsterling",!0),ae(ie,oe,be,"\xa3","\\pounds"),ae(ie,oe,be,"\xa3","\\textsterling",!0),ae(ne,se,be,"\u2720","\\maltese"),ae(ie,se,be,"\u2720","\\maltese");for(var xe='0123456789/@."',we=0;we<14;we++){var ke=xe.charAt(we);ae(ne,oe,be,ke,ke)}for(var Se='0123456789!@*()-=+";:?/.,',ze=0;ze<25;ze++){var Me=Se.charAt(ze);ae(ie,oe,be,Me,Me)}for(var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Te=0;Te<52;Te++){var Be=Ae.charAt(Te);ae(ne,oe,ue,Be,Be),ae(ie,oe,be,Be,Be)}ae(ne,se,be,"C","\u2102"),ae(ie,se,be,"C","\u2102"),ae(ne,se,be,"H","\u210d"),ae(ie,se,be,"H","\u210d"),ae(ne,se,be,"N","\u2115"),ae(ie,se,be,"N","\u2115"),ae(ne,se,be,"P","\u2119"),ae(ie,se,be,"P","\u2119"),ae(ne,se,be,"Q","\u211a"),ae(ie,se,be,"Q","\u211a"),ae(ne,se,be,"R","\u211d"),ae(ie,se,be,"R","\u211d"),ae(ne,se,be,"Z","\u2124"),ae(ie,se,be,"Z","\u2124"),ae(ne,oe,ue,"h","\u210e"),ae(ie,oe,ue,"h","\u210e");for(var qe="",Ce=0;Ce<52;Ce++){var Ie=Ae.charAt(Ce);ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56320+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56372+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56424+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56580+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56684+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56736+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56788+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56840+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56944+Ce)),ae(ie,oe,be,Ie,qe),Ce<26&&(ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56632+Ce)),ae(ie,oe,be,Ie,qe),ae(ne,oe,ue,Ie,qe=String.fromCharCode(55349,56476+Ce)),ae(ie,oe,be,Ie,qe))}ae(ne,oe,ue,"k",qe=String.fromCharCode(55349,56668)),ae(ie,oe,be,"k",qe);for(var Re=0;Re<10;Re++){var He=Re.toString();ae(ne,oe,ue,He,qe=String.fromCharCode(55349,57294+Re)),ae(ie,oe,be,He,qe),ae(ne,oe,ue,He,qe=String.fromCharCode(55349,57314+Re)),ae(ie,oe,be,He,qe),ae(ne,oe,ue,He,qe=String.fromCharCode(55349,57324+Re)),ae(ie,oe,be,He,qe),ae(ne,oe,ue,He,qe=String.fromCharCode(55349,57334+Re)),ae(ie,oe,be,He,qe)}for(var Ee="\xd0\xde\xfe",Ne=0;Ne<3;Ne++){var Oe=Ee.charAt(Ne);ae(ne,oe,ue,Oe,Oe),ae(ie,oe,be,Oe,Oe)}var De=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],Le=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Pe=function(e,t,r){if(re[r][e]){var a=re[r][e].replace;a&&(e=a)}return{value:e,metrics:J(e,t,r)}},Fe=function(e,t,r,a,n){var i,o=Pe(e,t,r),s=o.metrics;if(e=o.value,s){var l=s.italic;("text"===r||a&&"mathit"===a.font)&&(l=0),i=new Y(e,s.height,s.depth,l,s.skew,s.width,n)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+r+"'"),i=new Y(e,0,0,0,0,0,n);if(a){i.maxFontSize=a.sizeMultiplier,a.style.isTight()&&i.classes.push("mtight");var h=a.getColor();h&&(i.style.color=h)}return i},Ve=function(e,t,r,a){return void 0===a&&(a=[]),"boldsymbol"===r.font&&Pe(e,"Main-Bold",t).metrics?Fe(e,"Main-Bold",t,r,a.concat(["mathbf"])):"\\"===e||"main"===re[t][e].font?Fe(e,"Main-Regular",t,r,a):Fe(e,"AMS-Regular",t,r,a.concat(["amsrm"]))},Ge=function(e,t,r){var n=e.mode,i=e.text,o=["mord"],s="math"===n||"text"===n&&t.font,l=s?t.font:t.fontFamily,h="",m="";if(55349===i.charCodeAt(0)&&([h,m]=((e,t)=>{var r=1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536,n="math"===t?0:1;if(119808<=r&&r<120484){var i=Math.floor((r-119808)/26);return[De[i][2],De[i][n]]}if(120782<=r&&r<=120831){var o=Math.floor((r-120782)/10);return[Le[o][2],Le[o][n]]}if(120485===r||120486===r)return[De[0][2],De[0][n]];if(1204860)return Fe(i,h,n,t,o.concat(m));if(l){var c,u;if("boldsymbol"===l){var p=function(e,t,r,a,n){return"textord"!==n&&Pe(e,"Math-BoldItalic",t).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}}(i,n,0,0,r);c=p.fontName,u=[p.fontClass]}else s?(c=et[l].fontName,u=[l]):(c=Qe(l,t.fontWeight,t.fontShape),u=[l,t.fontWeight,t.fontShape]);if(Pe(i,c,n).metrics)return Fe(i,c,n,t,o.concat(u));if(ye.hasOwnProperty(i)&&"Typewriter"===c.slice(0,10)){for(var d=[],g=0;g{if(O(e.classes)!==O(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||0!==e.italic&&e.hasClass("mathnormal"))return!1;if(1===e.classes.length){var r=e.classes[0];if("mbin"===r||"mord"===r)return!1}for(var a of Object.keys(e.style))if(e.style[a]!==t.style[a])return!1;for(var n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},Xe=e=>{for(var t=0;tt&&(t=i.height),i.depth>r&&(r=i.depth),i.maxFontSize>a&&(a=i.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=a},We=function(e,t,r,a){var n=new V(e,t,r,a);return Ye(n),n},je=(e,t,r,a)=>new V(e,t,r,a),_e=function(e,t,r){var a=We([e],[],t);return a.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),a.style.borderBottomWidth=N(a.height),a.maxFontSize=1,a},$e=function(e){var t=new C(e);return Ye(t),t},Ze=function(e,t){return e instanceof C?We([],[e],t):e},Ke=function(e,t){for(var{children:r,depth:a}=function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],a=-t[0].shift-t[0].elem.depth,n=a,i=1;i{var r=We(["mspace"],[],t),a=E(e,t);return r.style.marginRight=N(a),r},Qe=function(e,t,r){var a="";switch(e){case"amsrm":a="AMS";break;case"textrm":a="Main";break;case"textsf":a="SansSerif";break;case"texttt":a="Typewriter";break;default:a=e}return a+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},et={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},tt={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},rt=function(e,t){var[r,a,n]=tt[e],i=new j(r),o=new W([i],{width:N(a),height:N(n),style:"width:"+N(a),viewBox:"0 0 "+1e3*a+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),s=je(["overlay"],[o],t);return s.height=n,s.style.height=N(n),s.style.width=N(a),s},at={number:3,unit:"mu"},nt={number:4,unit:"mu"},it={number:5,unit:"mu"},ot={mord:{mop:at,mbin:nt,mrel:it,minner:at},mop:{mord:at,mop:at,mrel:it,minner:at},mbin:{mord:nt,mop:nt,mopen:nt,minner:nt},mrel:{mord:it,mop:it,mopen:it,minner:it},mopen:{},mclose:{mop:at,mbin:nt,mrel:it,minner:at},mpunct:{mord:at,mop:at,mrel:it,mopen:at,mclose:at,mpunct:at,minner:at},minner:{mord:at,mop:at,mbin:nt,mrel:it,mopen:at,mpunct:at,minner:at}},st={mord:{mop:at},mop:{mord:at,mop:at},mbin:{},mrel:{},mopen:{},mclose:{mop:at},mpunct:{},minner:{mop:at}},lt={},ht={},mt={};function ct(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:void 0===a.allowedInMath||a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},l=0;l{var r=t.classes[0],a=e.classes[0];"mbin"===r&&ft.has(a)?t.classes[0]="mord":"mbin"===a&>.has(r)&&(e.classes[0]="mord")},{node:m},c,u),xt(n,(e,t)=>{var r,a,n=St(t),i=St(e),o=n&&i?e.hasClass("mtight")?null==(r=st[n])?void 0:r[i]:null==(a=ot[n])?void 0:a[i]:null;if(o)return Je(o,l)},{node:m},c,u),n},xt=function(e,t,r,a,n){a&&e.push(a);for(var i=0;ir=>{e.splice(t+1,0,r),i++})(i)}}a&&e.pop()},wt=function(e){return e instanceof C||e instanceof G||e instanceof V&&e.hasClass("enclosing")?e:null},kt=function(e,t){var r=wt(e);if(r){var a=r.children;if(a.length){if("right"===t)return kt(a[a.length-1],"right");if("left"===t)return kt(a[0],"left")}}return e},St=function(e,t){if(!e)return null;t&&(e=kt(e,t));var r=e.classes[0];return bt[r]||null},zt=function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return We(t.concat(r))},Mt=function(e,t,r){if(!e)return We();if(ht[e.type]){var n=ht[e.type](e,t);if(r&&t.size!==r.size){n=We(t.sizingClasses(r),[n],t);var i=t.sizeMultiplier/r.sizeMultiplier;n.height*=i,n.depth*=i}return n}throw new a("Got group of unknown type: '"+e.type+"'")};function At(e,t){var r=We(["base"],e,t),a=We(["strut"]);return a.style.height=N(r.height+r.depth),r.depth&&(a.style.verticalAlign=N(-r.depth)),r.children.unshift(a),r}function Tt(e,t){var r=null;1===e.length&&"tag"===e[0].type&&(r=e[0].tag,e=e[0].body);var a,n=yt(e,t,"root");2===n.length&&n[1].hasClass("tag")&&(a=n.pop());for(var i,o=[],s=[],l=0;l0&&(o.push(At(s,t)),s=[]),o.push(n[l]));s.length>0&&o.push(At(s,t)),r?((i=At(yt(r,t,!0),t)).classes=["tag"],o.push(i)):a&&o.push(a);var m=We(["katex-html"],o);if(m.setAttribute("aria-hidden","true"),i){var c=i.children[0];c.style.height=N(m.height+m.depth),m.depth&&(c.style.verticalAlign=N(-m.depth))}return m}function Bt(e){return new C(e)}class qt{constructor(e,t,r){this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=O(this.classes));for(var r=0;r0&&(e+=' class ="'+l(O(this.classes))+'"'),e+=">";for(var r=0;r"}toText(){return this.children.map(e=>e.toText()).join("")}}class Ct{constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return l(this.toText())}toText(){return this.text}}class It{constructor(e){this.width=e,this.character=e>=.05555&&e<=.05556?"\u200a":e>=.1666&&e<=.1667?"\u2009":e>=.2222&&e<=.2223?"\u2005":e>=.2777&&e<=.2778?"\u2005\u200a":e>=-.05556&&e<=-.05555?"\u200a\u2063":e>=-.1667&&e<=-.1666?"\u2009\u2063":e>=-.2223&&e<=-.2222?"\u205f\u2063":e>=-.2778&&e<=-.2777?"\u2005\u2063":null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",N(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var Rt=new Set(["\\imath","\\jmath"]),Ht=new Set(["mrow","mtable"]),Et=function(e,t,r){return!re[t][e]||!re[t][e].replace||55349===e.charCodeAt(0)||ye.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=re[t][e].replace),new Ct(e)},Nt=function(e){return 1===e.length?e[0]:new qt("mrow",e)},Ot=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var r=t.font;if(!r||"mathnormal"===r)return null;var a=e.mode;if("mathit"===r)return"italic";if("boldsymbol"===r)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===r)return"bold";if("mathbb"===r)return"double-struck";if("mathsfit"===r)return"sans-serif-italic";if("mathfrak"===r)return"fraktur";if("mathscr"===r||"mathcal"===r)return"script";if("mathsf"===r)return"sans-serif";if("mathtt"===r)return"monospace";var n=e.text;if(Rt.has(n))return null;if(re[a][n]){var i=re[a][n].replace;i&&(n=i)}return J(n,et[r].fontName,a)?et[r].variant:null};function Dt(e){if(!e)return!1;if("mi"===e.type&&1===e.children.length){var t=e.children[0];return t instanceof Ct&&"."===t.text}if("mo"===e.type&&1===e.children.length&&"true"===e.getAttribute("separator")&&"0em"===e.getAttribute("lspace")&&"0em"===e.getAttribute("rspace")){var r=e.children[0];return r instanceof Ct&&","===r.text}return!1}var Lt=function(e,t,r){if(1===e.length){var a=Ft(e[0],t);return r&&a instanceof qt&&"mo"===a.type&&(a.setAttribute("lspace","0em"),a.setAttribute("rspace","0em")),[a]}for(var n,i=[],o=0;o=1&&("mn"===n.type||Dt(n))){var l=s.children[0];l instanceof qt&&"mn"===l.type&&(l.children=[...n.children,...l.children],i.pop())}else if("mi"===n.type&&1===n.children.length){var h=n.children[0];if(h instanceof Ct&&"\u0338"===h.text&&("mo"===s.type||"mi"===s.type||"mn"===s.type)){var m=s.children[0];m instanceof Ct&&m.text.length>0&&(m.text=m.text.slice(0,1)+"\u0338"+m.text.slice(1),i.pop())}}}i.push(s),n=s}return i},Pt=function(e,t,r){return Nt(Lt(e,t,r))},Ft=function(e,t){if(!e)return new qt("mrow");if(mt[e.type])return mt[e.type](e,t);throw new a("Got group of unknown type: '"+e.type+"'")};function Vt(e,t,r,a,n){var i,o=Lt(e,r);i=1===o.length&&o[0]instanceof qt&&Ht.has(o[0].type)?o[0]:new qt("mrow",o);var s=new qt("annotation",[new Ct(t)]);s.setAttribute("encoding","application/x-tex");var l=new qt("semantics",[i,s]),h=new qt("math",[l]);return h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&h.setAttribute("display","block"),We([n?"katex":"katex-mathml"],[h])}var Gt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ut=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Xt=function(e,t){return t.size<2?e:Gt[e-1][t.size-1]};class Yt{constructor(e){this.style=e.style,this.color=e.color,this.size=e.size||Yt.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ut[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(t,e),new Yt(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Xt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ut[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Xt(Yt.BASESIZE,e);return this.size===t&&this.textSize===Yt.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Yt.BASESIZE?["sizing","reset-size"+this.size,"size"+Yt.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=function(e){var t;if(!Q[t=e>=5?0:e>=3?1:2]){var r=Q[t]={cssEmPerMu:Z.quad[t]/18};for(var a in Z)Z.hasOwnProperty(a)&&(r[a]=Z[a][t])}return Q[t]}(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Yt.BASESIZE=6;var Wt=function(e){return new Yt({style:e.displayMode?S.DISPLAY:S.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},jt=function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=We(r,[e])}return e},_t={widehat:"^",widecheck:"\u02c7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23df",overbrace:"\u23de",underbracket:"\u23b5",overbracket:"\u23b4",overgroup:"\u23e0",undergroup:"\u23e1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21d2",xRightarrow:"\u21d2",overleftharpoon:"\u21bc",xleftharpoonup:"\u21bc",overrightharpoon:"\u21c0",xrightharpoonup:"\u21c0",xLeftarrow:"\u21d0",xLeftrightarrow:"\u21d4",xhookleftarrow:"\u21a9",xhookrightarrow:"\u21aa",xmapsto:"\u21a6",xrightharpoondown:"\u21c1",xleftharpoondown:"\u21bd",xrightleftharpoons:"\u21cc",xleftrightharpoons:"\u21cb",xtwoheadleftarrow:"\u219e",xtwoheadrightarrow:"\u21a0",xlongequal:"=",xtofrom:"\u21c4",xrightleftarrows:"\u21c4",xrightequilibrium:"\u21cc",xleftequilibrium:"\u21cb","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},$t=function(e){var t=new qt("mo",[new Ct(_t[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},Zt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Kt=new Set(["widehat","widecheck","widetilde","utilde"]),Jt=function(e,t){var{span:r,minWidth:a,height:n}=function(){var r=4e5,a=e.label.slice(1);if(Kt.has(a)){var n,i,o,s=e,l="ordgroup"===s.base.type?s.base.body.length:1;if(l>5)"widehat"===a||"widecheck"===a?(n=420,r=2364,o=.42,i=a+"4"):(n=312,r=2340,o=.34,i="tilde4");else{var h=[1,1,2,2,3,3][l];"widehat"===a||"widecheck"===a?(r=[0,1062,2364,2364,2364][h],n=[0,239,300,360,420][h],o=[0,.24,.3,.3,.36,.42][h],i=a+h):(r=[0,600,1033,2339,2340][h],n=[0,260,286,306,312][h],o=[0,.26,.286,.3,.306,.34][h],i="tilde"+h)}var m=new j(i),c=new W([m],{width:"100%",height:N(o),viewBox:"0 0 "+r+" "+n,preserveAspectRatio:"none"});return{span:je([],[c],t),minWidth:0,height:o}}var u,p,d=[],g=Zt[a],[f,v,b]=g,y=b/1e3,x=f.length;if(1===x)u=["hide-tail"],p=[g[3]];else if(2===x)u=["halfarrow-left","halfarrow-right"],p=["xMinYMin","xMaxYMin"];else{if(3!==x)throw new Error("Correct katexImagesData or update code here to support\n "+x+" children.");u=["brace-left","brace-center","brace-right"],p=["xMinYMin","xMidYMin","xMaxYMin"]}for(var w=0;w0&&(r.style.minWidth=N(a)),r};function Qt(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function er(e){var t=tr(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function tr(e){return e&&("atom"===e.type||te.hasOwnProperty(e.type))?e:null}var rr=e=>{return e instanceof Y?e:((t=e)instanceof V||t instanceof G||t instanceof C)&&1===e.children.length?rr(e.children[0]):void 0;var t},ar=(e,t)=>{var r,a,n;e&&"supsub"===e.type?(r=(a=Qt(e.base,"accent")).base,e.base=r,n=function(e){if(e instanceof V)return e;throw new Error("Expected span but got "+String(e)+".")}(Mt(e,t)),e.base=a):r=(a=Qt(e,"accent")).base;var i,o,s=Mt(r,t.havingCrampedStyle()),l=0;a.isShifty&&c(r)&&(l=null!=(i=null==(o=rr(s))?void 0:o.skew)?i:0);var h,m="\\c"===a.label,u=m?s.height+s.depth:Math.min(s.height,t.fontMetrics().xHeight);if(a.isStretchy)h=Jt(a,t),h=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:h,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+N(2*l)+")",marginLeft:N(2*l)}:void 0}]});else{var p,d;"\\vec"===a.label?(p=rt("vec",t),d=tt.vec[1]):(p=function(e){if(e instanceof Y)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}(p=Ge({type:"textord",mode:a.mode,text:a.label},t,"textord")),p.italic=0,d=p.width,m&&(u+=p.depth)),h=We(["accent-body"],[p]);var g="\\textcircled"===a.label;g&&(h.classes.push("accent-full"),u=s.height);var f=l;g||(f-=d/2),h.style.left=N(f),"\\textcircled"===a.label&&(h.style.top=".2em"),h=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-u},{type:"elem",elem:h}]})}var v=We(["mord","accent"],[h],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},nr=(e,t)=>{var r=e.isStretchy?$t(e.label):new qt("mo",[Et(e.label,e.mode)]),a=new qt("mover",[Ft(e.base,t),r]);return a.setAttribute("accent","true"),a},ir=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ct({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(e,t)=>{var r=pt(t[0]),a=!ir.test(e.funcName),n=!a||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:a,isShifty:n,base:r}},htmlBuilder:ar,mathmlBuilder:nr}),ct({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(e,t)=>{var r=t[0],a=e.parser.mode;return"math"===a&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},htmlBuilder:ar,mathmlBuilder:nr}),ct({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:a,base:n}},htmlBuilder:(e,t)=>{var r=Mt(e.base,t),a=Jt(e,t),n="\\utilde"===e.label?.12:0,i=Ke({positionType:"top",positionData:r.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return We(["mord","accentunder"],[i],t)},mathmlBuilder:(e,t)=>{var r=$t(e.label),a=new qt("munder",[Ft(e.base,t),r]);return a.setAttribute("accentunder","true"),a}});var or=e=>{var t=new qt("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};function sr(e,t){var r=yt(e.body,t,!0);return We([e.mclass],r,t)}function lr(e,t){var r,a=Lt(e.body,t);return"minner"===e.mclass?r=new qt("mpadded",a):"mord"===e.mclass?e.isCharacterBox?(r=a[0]).type="mi":r=new qt("mi",a):(e.isCharacterBox?(r=a[0]).type="mo":r=new qt("mo",a),"mbin"===e.mclass?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):"mpunct"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):"mopen"===e.mclass||"mclose"===e.mclass?(r.attributes.lspace="0em",r.attributes.rspace="0em"):"minner"===e.mclass&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}ct({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a,funcName:n}=e;return{type:"xArrow",mode:a.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,a=t.style,n=t.havingStyle(a.sup()),i=Ze(Mt(e.body,n,t),t),o="\\x"===e.label.slice(0,2)?"x":"cd";i.classes.push(o+"-arrow-pad"),e.below&&(n=t.havingStyle(a.sub()),(r=Ze(Mt(e.below,n,t),t)).classes.push(o+"-arrow-pad"));var s,l=Jt(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,m=-t.fontMetrics().axisHeight-.5*l.height-.111;if((i.depth>.25||"\\xleftequilibrium"===e.label)&&(m-=i.depth),r){var c=-t.fontMetrics().axisHeight+r.height+.5*l.height+.111;s=Ke({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h},{type:"elem",elem:r,shift:c}]})}else s=Ke({positionType:"individualShift",children:[{type:"elem",elem:i,shift:m},{type:"elem",elem:l,shift:h}]});return s.children[0].children[0].children[1].classes.push("svg-align"),We(["mrel","x-arrow"],[s],t)},mathmlBuilder(e,t){var r,a=$t(e.label);if(a.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var n=or(Ft(e.body,t));if(e.below){var i=or(Ft(e.below,t));r=new qt("munderover",[a,i,n])}else r=new qt("mover",[a,n])}else if(e.below){var o=or(Ft(e.below,t));r=new qt("munder",[a,o])}else r=or(),r=new qt("mover",[a,r]);return r}}),ct({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+a.slice(5),body:dt(n),isCharacterBox:c(n)}},htmlBuilder:sr,mathmlBuilder:lr});var hr=e=>{var t="ordgroup"===e.type&&e.body.length?e.body[0]:e;return"atom"!==t.type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family};ct({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:hr(t[0]),body:dt(t[1]),isCharacterBox:c(t[1])}}}),ct({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var r,{parser:a,funcName:n}=e,i=t[1],o=t[0];r="\\stackrel"!==n?hr(i):"mrel";var s={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==n,body:dt(i)},l={type:"supsub",mode:o.mode,base:s,sup:"\\underset"===n?null:o,sub:"\\underset"===n?o:null};return{type:"mclass",mode:a.mode,mclass:r,body:[l],isCharacterBox:c(l)}},htmlBuilder:sr,mathmlBuilder:lr}),ct({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:hr(t[0]),body:dt(t[0])}},htmlBuilder(e,t){var r=yt(e.body,t,!0),a=We([e.mclass],r,t);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(e,t){var r=Lt(e.body,t),a=new qt("mstyle",r);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var mr={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},cr=()=>({type:"styling",body:[],mode:"math",style:"display"}),ur=e=>"textord"===e.type&&"@"===e.text,pr=(e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t;function dr(e,t,r){var a=mr[e];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(a,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var n={type:"atom",text:a,mode:"math",family:"rel"},i={type:"ordgroup",mode:"math",body:[r.callFunction("\\\\cdleft",[t[0]],[]),r.callFunction("\\Big",[n],[]),r.callFunction("\\\\cdright",[t[1]],[])]};return r.callFunction("\\\\cdparent",[i],[]);case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return r.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}ct({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"cdlabel",mode:r.mode,side:a.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),a=Ze(Mt(e.label,r,t),t);return a.classes.push("cd-label-"+e.side),a.style.bottom=N(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(e,t){var r=new qt("mrow",[Ft(e.label,t)]);return(r=new qt("mpadded",[r])).setAttribute("width","0"),"left"===e.side&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),(r=new qt("mstyle",[r])).setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}}),ct({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=Ze(Mt(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder:(e,t)=>new qt("mrow",[Ft(e.fragment,t)])}),ct({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Qt(t[0],"ordgroup").body,i="",o=0;o=1114111)throw new a("\\@char with invalid code point "+i);return l<=65535?s=String.fromCharCode(l):(l-=65536,s=String.fromCharCode(55296+(l>>10),56320+(1023&l))),{type:"textord",mode:r.mode,text:s}}});var gr=(e,t)=>{var r=yt(e.body,t.withColor(e.color),!1);return $e(r)},fr=(e,t)=>{var r=Lt(e.body,t.withColor(e.color)),a=new qt("mstyle",r);return a.setAttribute("mathcolor",e.color),a};ct({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,a=Qt(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:a,body:dt(n)}},htmlBuilder:gr,mathmlBuilder:fr}),ct({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:a}=e,n=Qt(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var i=r.parseExpression(!0,a);return{type:"color",mode:r.mode,color:n,body:i}},htmlBuilder:gr,mathmlBuilder:fr}),ct({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:a}=e,n="["===a.gullet.future().text?a.parseSizeGroup(!0):null,i=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:i,size:n&&Qt(n,"size").value}},htmlBuilder(e,t){var r=We(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=N(E(e.size,t)))),r},mathmlBuilder(e,t){var r=new qt("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",N(E(e.size,t)))),r}});var vr={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},br=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new a("Expected a control sequence",e);return t},yr=(e,t,r,a)=>{var n=e.gullet.macros.get(r.text);null==n&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,a)};ct({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(vr[n.text])return"\\global"!==r&&"\\\\globallong"!==r||(n.text=vr[n.text]),Qt(t.parseFunction(),"internal");throw new a("Invalid token after macro prefix",n)}}),ct({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new a("Expected a control sequence",n);for(var o,s=0,l=[[]];"{"!==t.gullet.future().text;)if("#"===(n=t.gullet.popToken()).text){if("{"===t.gullet.future().text){o=t.gullet.future(),l[s].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new a('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==s+1)throw new a('Argument number "'+n.text+'" out of order');s++,l.push([])}else{if("EOF"===n.text)throw new a("Expected a macro definition");l[s].push(n.text)}var{tokens:h}=t.gullet.consumeArg();return o&&h.unshift(o),"\\edef"!==r&&"\\xdef"!==r||(h=t.gullet.expandTokens(h)).reverse(),t.gullet.macros.set(i,{tokens:h,numArgs:s,delimiters:l},r===vr[r]),{type:"internal",mode:t.mode}}}),ct({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=br(t.gullet.popToken());t.gullet.consumeSpaces();var n=(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text&&(t=e.gullet.popToken()),t})(t);return yr(t,a,n,"\\\\globallet"===r),{type:"internal",mode:t.mode}}}),ct({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,a=br(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return yr(t,a,i,"\\\\globalfuture"===r),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});var xr=function(e,t,r){var a=J(re.math[e]&&re.math[e].replace||e,t,r);if(!a)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return a},wr=function(e,t,r,a){var n=r.havingBaseStyle(t),i=We(a.concat(n.sizingClasses(r)),[e],r),o=n.sizeMultiplier/r.sizeMultiplier;return i.height*=o,i.depth*=o,i.maxFontSize=n.sizeMultiplier,i},kr=function(e,t,r){var a=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/a.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=N(n),e.height-=n,e.depth+=n},Sr=function(e,t,r,a,n,i){var o=function(e,t,r,a){return Fe(e,"Size"+t+"-Regular",r,a)}(e,t,n,a),s=wr(We(["delimsizing","size"+t],[o],a),S.TEXT,a,i);return r&&kr(s,a,S.TEXT),s},zr=function(e,t,r){return{type:"elem",elem:We(["delimsizinginner","Size1-Regular"===t?"delim-size1":"delim-size4"],[We([],[Fe(e,t,r)])])}},Mr=function(e,t,r){var a=$["Size4-Regular"][e.charCodeAt(0)]?$["Size4-Regular"][e.charCodeAt(0)][4]:$["Size1-Regular"][e.charCodeAt(0)][4],n=new j("inner",function(e,t){switch(e){case"\u239c":return T("M291 0 H417 V"+t+" H291z");case"\u2223":return T("M145 0 H188 V"+t+" H145z");case"\u2225":return T("M145 0 H188 V"+t+" H145z")+T("M367 0 H410 V"+t+" H367z");case"\u239f":return T("M457 0 H583 V"+t+" H457z");case"\u23a2":return T("M319 0 H403 V"+t+" H319z");case"\u23a5":return T("M263 0 H347 V"+t+" H263z");case"\u23aa":return T("M384 0 H504 V"+t+" H384z");case"\u23d0":return T("M312 0 H355 V"+t+" H312z");case"\u2016":return T("M257 0 H300 V"+t+" H257z")+T("M478 0 H521 V"+t+" H478z");default:return""}}(e,Math.round(1e3*t))),i=new W([n],{width:N(a),height:N(t),style:"width:"+N(a),viewBox:"0 0 "+1e3*a+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=je([],[i],r);return o.height=t,o.style.height=N(t),o.style.width=N(a),{type:"elem",elem:o}},Ar={type:"kern",size:-.008},Tr=new Set(["|","\\lvert","\\rvert","\\vert"]),Br=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),qr=function(e,t,r,a,n,i){var o,s,l,h,m="",c=0;o=l=h=e,s=null;var u="Size1-Regular";"\\uparrow"===e?l=h="\u23d0":"\\Uparrow"===e?l=h="\u2016":"\\downarrow"===e?o=l="\u23d0":"\\Downarrow"===e?o=l="\u2016":"\\updownarrow"===e?(o="\\uparrow",l="\u23d0",h="\\downarrow"):"\\Updownarrow"===e?(o="\\Uparrow",l="\u2016",h="\\Downarrow"):Tr.has(e)?(l="\u2223",m="vert",c=333):Br.has(e)?(l="\u2225",m="doublevert",c=556):"["===e||"\\lbrack"===e?(o="\u23a1",l="\u23a2",h="\u23a3",u="Size4-Regular",m="lbrack",c=667):"]"===e||"\\rbrack"===e?(o="\u23a4",l="\u23a5",h="\u23a6",u="Size4-Regular",m="rbrack",c=667):"\\lfloor"===e||"\u230a"===e?(l=o="\u23a2",h="\u23a3",u="Size4-Regular",m="lfloor",c=667):"\\lceil"===e||"\u2308"===e?(o="\u23a1",l=h="\u23a2",u="Size4-Regular",m="lceil",c=667):"\\rfloor"===e||"\u230b"===e?(l=o="\u23a5",h="\u23a6",u="Size4-Regular",m="rfloor",c=667):"\\rceil"===e||"\u2309"===e?(o="\u23a4",l=h="\u23a5",u="Size4-Regular",m="rceil",c=667):"("===e||"\\lparen"===e?(o="\u239b",l="\u239c",h="\u239d",u="Size4-Regular",m="lparen",c=875):")"===e||"\\rparen"===e?(o="\u239e",l="\u239f",h="\u23a0",u="Size4-Regular",m="rparen",c=875):"\\{"===e||"\\lbrace"===e?(o="\u23a7",s="\u23a8",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\}"===e||"\\rbrace"===e?(o="\u23ab",s="\u23ac",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lgroup"===e||"\u27ee"===e?(o="\u23a7",h="\u23a9",l="\u23aa",u="Size4-Regular"):"\\rgroup"===e||"\u27ef"===e?(o="\u23ab",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\lmoustache"===e||"\u23b0"===e?(o="\u23a7",h="\u23ad",l="\u23aa",u="Size4-Regular"):"\\rmoustache"!==e&&"\u23b1"!==e||(o="\u23ab",h="\u23a9",l="\u23aa",u="Size4-Regular");var p=xr(o,u,n),d=p.height+p.depth,g=xr(l,u,n),f=g.height+g.depth,v=xr(h,u,n),b=v.height+v.depth,y=0,x=1;if(null!==s){var w=xr(s,u,n);y=w.height+w.depth,x=2}var k=d+b+y,z=k+Math.max(0,Math.ceil((t-k)/(x*f)))*x*f,M=a.fontMetrics().axisHeight;r&&(M*=a.sizeMultiplier);var A=z/2-M,T=[];if(m.length>0){var B=z-d-b,q=Math.round(1e3*z),C=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v1759 h347 v-84\nH403z M403 1759 V0 H319 V1759 v"+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v1759 H0 v84 H347z\nM347 1759 V0 H263 V1759 v"+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M188 15 H145 v585 v"+t+" v585 h43z\nM367 15 v585 v"+t+" v585 c2.667,10,9.667,15,21,15\nc10,0,16.667,-5,20,-15 v-585 v"+-t+" v-585 c-2.667,-10,-9.667,-15,-21,-15\nc-10,0,-16.667,5,-20,15z M410 15 H367 v585 v"+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+" v1715 h263 v84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+" v1799 H0 v-84 H319z\nMM319 602 V0 H403 V602 v"+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+" v602 h84z\nM403 1759 V0 H319 V1759 v"+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+" v602 h84z\nM347 1759 V0 h-84 V1759 v"+t+" v602 h84z";case"lparen":return"M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1\nc-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,\n-36,557 l0,"+(t+84)+"c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,\n949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9\nc0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,\n-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189\nl0,-"+(t+92)+"c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,\n-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z";case"rparen":return"M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,\n63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5\nc11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,"+(t+9)+"\nc-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664\nc-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11\nc0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17\nc242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558\nl0,-"+(t+144)+"c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,\n-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z";default:throw new Error("Unknown stretchy delimiter.")}}(m,Math.round(1e3*B)),I=new j(m,C),R=N(c/1e3),H=N(q/1e3),E=new W([I],{width:R,height:H,viewBox:"0 0 "+c+" "+q}),O=je([],[E],a);O.height=q/1e3,O.style.width=R,O.style.height=H,T.push({type:"elem",elem:O})}else{if(T.push(zr(h,u,n)),T.push(Ar),null===s){var D=z-d-b+.016;T.push(Mr(l,D,a))}else{var L=(z-d-b-y)/2+.016;T.push(Mr(l,L,a)),T.push(Ar),T.push(zr(s,u,n)),T.push(Ar),T.push(Mr(l,L,a))}T.push(Ar),T.push(zr(o,u,n))}var P=a.havingBaseStyle(S.TEXT),F=Ke({positionType:"bottom",positionData:A,children:T});return wr(We(["delimsizing","mult"],[F],P),S.TEXT,a,i)},Cr=.08,Ir=function(e,t,r,a,n){var i=function(e,t,r){t*=1e3;var a="";switch(e){case"sqrtMain":a=function(e,t){return"M95,"+(622+e+t)+"\nc-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14\nc0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54\nc44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10\ns173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429\nc69,-144,104.5,-217.7,106.5,-221\nl"+e/2.075+" -"+e+"\nc5.3,-9.3,12,-14,20,-14\nH400000v"+(40+e)+"H845.2724\ns-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7\nc-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z\nM"+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,B);break;case"sqrtSize1":a=function(e,t){return"M263,"+(601+e+t)+"c0.7,0,18,39.7,52,119\nc34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120\nc340,-704.7,510.7,-1060.3,512,-1067\nl"+e/2.084+" -"+e+"\nc4.7,-7.3,11,-11,19,-11\nH40000v"+(40+e)+"H1012.3\ns-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232\nc-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1\ns-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26\nc-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,B);break;case"sqrtSize2":a=function(e,t){return"M983 "+(10+e+t)+"\nl"+e/3.13+" -"+e+"\nc4,-6.7,10,-10,18,-10 H400000v"+(40+e)+"\nH1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7\ns-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744\nc-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30\nc26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722\nc56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5\nc53.7,-170.3,84.5,-266.8,92.5,-289.5z\nM"+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"}(t,B);break;case"sqrtSize3":a=function(e,t){return"M424,"+(2398+e+t)+"\nc-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514\nc0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20\ns-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121\ns209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081\nl"+e/4.223+" -"+e+"c4,-6.7,10,-10,18,-10 H400000\nv"+(40+e)+"H1014.6\ns-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185\nc-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2z M"+(1001+e)+" "+t+"\nh400000v"+(40+e)+"h-400000z"}(t,B);break;case"sqrtSize4":a=function(e,t){return"M473,"+(2713+e+t)+"\nc339.3,-1799.3,509.3,-2700,510,-2702 l"+e/5.298+" -"+e+"\nc3.3,-7.3,9.3,-11,18,-11 H400000v"+(40+e)+"H1017.7\ns-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9\nc-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200\nc0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26\ns76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,\n606zM"+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"}(t,B);break;case"sqrtTall":a=function(e,t,r){return"M702 "+(e+t)+"H400000"+(40+e)+"\nH742v"+(r-54-t-e)+"l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1\nh-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170\nc-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667\n219 661 l218 661zM702 "+t+"H400000v"+(40+e)+"H742z"}(t,B,r)}return a}(e,a,r),o=new j(e,i),s=new W([o],{width:"400em",height:N(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return je(["hide-tail"],[s],n)},Rr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),Hr=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1"]),Er=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),Nr=[0,1.2,1.8,2.4,3],Or=function(e,t,r,n,i){if("<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),Rr.has(e)||Er.has(e))return Sr(e,t,!1,r,n,i);if(Hr.has(e))return qr(e,Nr[t],!1,r,n,i);throw new a("Illegal delimiter: '"+e+"'")},Dr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Lr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"stack"}],Pr=[{type:"small",style:S.SCRIPTSCRIPT},{type:"small",style:S.SCRIPT},{type:"small",style:S.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Fr=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},Vr=function(e,t,r,a){for(var n=Math.min(2,3-a.style.size);nt)return i}return r[r.length-1]},Gr=function(e,t,r,a,n,i){var o;"<"===e||"\\lt"===e||"\u27e8"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"\u27e9"!==e||(e="\\rangle"),o=Er.has(e)?Dr:Rr.has(e)?Pr:Lr;var s=Vr(e,t,o,a);return"small"===s.type?function(e,t,r,a,n,i){var o=Fe(e,"Main-Regular",n,a),s=wr(o,t,a,i);return r&&kr(s,a,t),s}(e,s.style,r,a,n,i):"large"===s.type?Sr(e,s.size,r,a,n,i):qr(e,t,r,a,n,i)},Ur=function(e,t,r,a,n,i){var o=a.fontMetrics().axisHeight*a.sizeMultiplier,s=5/a.fontMetrics().ptPerEm,l=Math.max(t-o,r+o),h=Math.max(l/500*901,2*l-s);return Gr(e,h,!0,a,n,i)},Xr={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Yr=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230a","\u230b","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27e8","\\rangle","\u27e9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27ee","\u27ef","\\lmoustache","\\rmoustache","\u23b0","\u23b1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);function Wr(e,t){var r=tr(e);if(r&&Yr.has(r.text))return r;throw new a(r?"Invalid delimiter '"+r.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function jr(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ct({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(e,t)=>{var r=Wr(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Xr[e.funcName].size,mclass:Xr[e.funcName].mclass,delim:r.text}},htmlBuilder:(e,t)=>"."===e.delim?We([e.mclass]):Or(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];"."!==e.delim&&t.push(Et(e.delim,e.mode));var r=new qt("mo",t);"mopen"===e.mclass||"mclose"===e.mclass?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var a=N(Nr[e.size]);return r.setAttribute("minsize",a),r.setAttribute("maxsize",a),r}}),ct({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new a("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Wr(t[0],e).text,color:r}}}),ct({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Wr(t[0],e),a=e.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var i=Qt(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:r.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,t)=>{jr(e);for(var r,a,n=yt(e.body,t,!0,["mopen","mclose"]),i=0,o=0,s=!1,l=0;l{jr(e);var r=Lt(e.body,t);if("."!==e.left){var a=new qt("mo",[Et(e.left,e.mode)]);a.setAttribute("fence","true"),r.unshift(a)}if("."!==e.right){var n=new qt("mo",[Et(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return Nt(r)}}),ct({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var r=Wr(t[0],e);if(!e.parser.leftrightDepth)throw new a("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var r;if("."===e.delim)r=zt(t,[]);else{r=Or(e.delim,1,t,e.mode,[]);var a={delim:e.delim,options:t};r.isMiddle=a}return r},mathmlBuilder:(e,t)=>{var r="\\vert"===e.delim||"|"===e.delim?Et("|","text"):Et(e.delim,e.mode),a=new qt("mo",[r]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var _r=(e,t)=>{var r,a,n,i=Ze(Mt(e.body,t),t),o=e.label.slice(1),s=t.sizeMultiplier,l=0,h=c(e.body);if("sout"===o)(r=We(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/s,l=-.5*t.fontMetrics().xHeight;else if("phase"===o){var m=E({number:.6,unit:"pt"},t),u=E({number:.35,unit:"ex"},t);s/=t.havingBaseSizing().sizeMultiplier;var p=i.height+i.depth+m+u;i.style.paddingLeft=N(p/2+m);var d=Math.floor(1e3*p*s),g="M400000 "+(a=d)+" H0 L"+a/2+" 0 l65 45 L145 "+(a-80)+" H400000z",f=new W([new j("phase",g)],{width:"400em",height:N(d/1e3),viewBox:"0 0 400000 "+d,preserveAspectRatio:"xMinYMin slice"});(r=je(["hide-tail"],[f],t)).style.height=N(p),l=i.depth+m+u}else{/cancel/.test(o)?h||i.classes.push("cancel-pad"):"angl"===o?i.classes.push("anglpad"):i.classes.push("boxpad");var v=0,b=0,y=0;/box/.test(o)?(y=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),b=v=t.fontMetrics().fboxsep+("colorbox"===o?0:y)):"angl"===o?(v=4*(y=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),b=Math.max(0,.25-i.depth)):b=v=h?.2:0,r=function(e,t,r,a,n){var i,o=e.height+e.depth+r+a;if(/fbox|color|angl/.test(t)){if(i=We(["stretchy",t],[],n),"fbox"===t){var s=n.color&&n.getColor();s&&(i.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new _({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&l.push(new _({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new W(l,{width:"100%",height:N(o)});i=je([],[h],n)}return i.height=o,i.style.height=N(o),i}(i,o,v,b,t),/fbox|boxed|fcolorbox/.test(o)?(r.style.borderStyle="solid",r.style.borderWidth=N(y)):"angl"===o&&.049!==y&&(r.style.borderTopWidth=N(y),r.style.borderRightWidth=N(y)),l=i.depth+b,e.backgroundColor&&(r.style.backgroundColor=e.backgroundColor,e.borderColor&&(r.style.borderColor=e.borderColor))}if(e.backgroundColor)n=Ke({positionType:"individualShift",children:[{type:"elem",elem:r,shift:l},{type:"elem",elem:i,shift:0}]});else{var x=/cancel|phase/.test(o)?["svg-align"]:[];n=Ke({positionType:"individualShift",children:[{type:"elem",elem:i,shift:0},{type:"elem",elem:r,shift:l,wrapperClasses:x}]})}return/cancel/.test(o)&&(n.height=i.height,n.depth=i.depth),/cancel/.test(o)&&!h?We(["mord","cancel-lap"],[n],t):We(["mord"],[n],t)},$r=(e,t)=>{var r=0,a=new qt(e.label.includes("colorbox")?"mpadded":"menclose",[Ft(e.body,t)]);switch(e.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*r+"pt"),a.setAttribute("height","+"+2*r+"pt"),a.setAttribute("lspace",r+"pt"),a.setAttribute("voffset",r+"pt"),"\\fcolorbox"===e.label){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);a.setAttribute("style","border: "+N(n)+" solid "+e.borderColor)}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&a.setAttribute("mathbackground",e.backgroundColor),a};ct({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Qt(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:i,body:o}},htmlBuilder:_r,mathmlBuilder:$r}),ct({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:a,funcName:n}=e,i=Qt(t[0],"color-token").color,o=Qt(t[1],"color-token").color,s=t[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:o,borderColor:i,body:s}},htmlBuilder:_r,mathmlBuilder:$r}),ct({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}}),ct({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:_r,mathmlBuilder:$r}),ct({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e;"math"===r.mode&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var n=t[0];return{type:"enclose",mode:r.mode,label:a,body:n}},htmlBuilder:_r,mathmlBuilder:$r}),ct({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});var Zr={};function Kr(e){for(var{type:t,names:r,props:a,handler:n,htmlBuilder:i,mathmlBuilder:o}=e,s={type:t,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},l=0;l{if(!e.parser.settings.displayMode)throw new a("{"+e.envName+"} can be used only in display mode.")},na=new Set(["gather","gather*"]);function ia(e){if(!e.includes("ed"))return!e.includes("*")}function oa(e,t,r){var{hskipBeforeAndAfter:n,addJot:i,cols:o,arraystretch:s,colSeparationType:l,autoTag:h,singleRow:m,emptySingleRow:c,maxNumCols:u,leqno:p}=t;if(e.gullet.beginGroup(),m||e.gullet.macros.set("\\cr","\\\\\\relax"),!s){var d=e.gullet.expandMacroAsText("\\arraystretch");if(null==d)s=1;else if(!(s=parseFloat(d))||s<0)throw new a("Invalid \\arraystretch: "+d)}e.gullet.beginGroup();var g=[],f=[g],v=[],b=[],y=null!=h?[]:void 0;function x(){h&&e.gullet.macros.set("\\@eqnsw","1",!0)}function w(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ta("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(Boolean(h)&&"1"===e.gullet.macros.get("\\@eqnsw")))}for(x(),b.push(ra(e));;){var k=e.parseExpression(!1,m?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var S={type:"ordgroup",mode:e.mode,body:k};r&&(S={type:"styling",mode:e.mode,style:r,body:[S]}),g.push(S);var z=e.fetch().text;if("&"===z){if(u&&g.length===u){if(m||l)throw new a("Too many tab characters: &",e.nextToken);e.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}e.consume()}else{if("\\end"===z){w(),1===g.length&&"styling"===S.type&&1===S.body.length&&"ordgroup"===S.body[0].type&&0===S.body[0].body.length&&(f.length>1||!c)&&f.pop(),b.length0&&(b+=.25),h.push({pos:b,isDashed:e[t]})}for(y(o[0]),r=0;r0&&(k<(T+=v)&&(k=T),T=0),e.addJot&&re))for(r=0;r=s)){var j,_,$=void 0;if(n>0||e.hskipBeforeAndAfter)0!==($=null!=(j=null==(_=V)?void 0:_.pregap)?j:u)&&((B=We(["arraycolsep"],[])).style.width=N($),R.push(B));var Z=[];for(r=0;r0){for(var ie=_e("hline",t,m),oe=_e("hdashline",t,m),se=[{type:"elem",elem:ne,shift:0}];h.length>0;){var le=h.pop(),he=le.pos-C;le.isDashed?se.push({type:"elem",elem:oe,shift:he}):se.push({type:"elem",elem:ie,shift:he})}ne=Ke({positionType:"individualShift",children:se})}if(0===H.length)return We(["mord"],[ne],t);var me=Ke({positionType:"individualShift",children:H}),ce=We(["tag"],[me],t);return $e([ne,ce])},ha={c:"center ",l:"left ",r:"right "},ma=function(e,t){for(var r=[],a=new qt("mtd",[],["mtr-glue"]),n=new qt("mtd",[],["mml-eqn-num"]),i=0;i0){var p=e.cols,d="",g=!1,f=0,v=p.length;"separator"===p[0].type&&(c+="top ",f=1),"separator"===p[p.length-1].type&&(c+="bottom ",v-=1);for(var b=f;b0?"left ":"",c+=z[z.length-1].length>0?"right ":"";for(var M=1;M0&&u&&(g=1),r[p]={type:"align",align:d,pregap:g,postgap:0}}return o.colSeparationType=u?"align":"alignat",o};Kr({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=(tr(t[0])?[t[0]]:Qt(t[0],"ordgroup").body).map(function(e){var t=er(e).text;if("lcr".includes(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new a("Unknown column alignment: "+t,e)}),n={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return oa(e.parser,n,sa(e.envName))},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if("*"===e.envName.charAt(e.envName.length-1)){var i=e.parser;if(i.consumeSpaces(),"["===i.fetch().text){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new a("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var o=oa(e.parser,n,sa(e.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[o],left:t[0],right:t[1],rightColor:void 0}:o},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t=oa(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=(tr(t[0])?[t[0]]:Qt(t[0],"ordgroup").body).map(function(e){var t=er(e).text;if("lc".includes(t))return{type:"align",align:t};throw new a("Unknown column alignment: "+t,e)});if(r.length>1)throw new a("{subarray} can contain only one column");var n={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},i=oa(e.parser,n,"script");if(i.body.length>0&&i.body[0].length>1)throw new a("{subarray} can contain only one column");return i},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t=oa(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},sa(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ca,htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){na.has(e.envName)&&aa(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:ia(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return oa(e.parser,t,"display")},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ca,htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){aa(e);var t={autoTag:ia(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return oa(e.parser,t,"display")},htmlBuilder:la,mathmlBuilder:ma}),Kr({type:"array",names:["CD"],props:{numArgs:0},handler:e=>(aa(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if("&"!==r&&"\\\\"!==r){if("\\end"===r){0===t[t.length-1].length&&t.pop();break}throw new a("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var n=[],i=[n],o=0;oAV".includes(m))throw new a('Expected one of "<>AV=|." after @',s[h]);for(var u=0;u<2;u++){for(var p=!0,d=h+1;d{var r=e.font,a=t.withFont(r);return Mt(e.body,a)},da=(e,t)=>{var r=e.font,a=t.withFont(r);return Ft(e.body,a)},ga={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};ct({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=pt(t[0]),i=a;return i in ga&&(i=ga[i]),{type:"font",mode:r.mode,font:i.slice(1),body:n}},htmlBuilder:pa,mathmlBuilder:da}),ct({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"mclass",mode:r.mode,mclass:hr(a),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:a}],isCharacterBox:c(a)}}}),ct({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a,breakOnTokenText:n}=e,{mode:i}=r,o=r.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+a.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},htmlBuilder:pa,mathmlBuilder:da});var fa=(e,t)=>t?{type:"styling",mode:e.mode,style:t,body:[e]}:e;ct({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var r,{parser:a,funcName:n}=e,i=t[0],o=t[1],s=null,l=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,s="(",l=")";break;case"\\\\bracefrac":r=!1,s="\\{",l="\\}";break;case"\\\\brackfrac":r=!1,s="[",l="]";break;default:throw new Error("Unrecognized genfrac command")}var h="\\cfrac"===n,m=null;return h||n.startsWith("\\d")?m="display":n.startsWith("\\t")&&(m="text"),fa({type:"genfrac",mode:a.mode,numer:i,denom:o,continued:h,hasBarLine:r,leftDelim:s,rightDelim:l,barSize:null},m)},htmlBuilder:(e,t)=>{var r,a=t.style,n=a.fracNum(),i=a.fracDen();r=t.havingStyle(n);var o=Mt(e.numer,r,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*c:7*c,d=t.fontMetrics().denom1):(m>0?(u=t.fontMetrics().num2,p=c):(u=t.fontMetrics().num3,p=3*c),d=t.fontMetrics().denom2),h){var x=t.fontMetrics().axisHeight;u-o.depth-(x+.5*m){var r=new qt("mfrac",[Ft(e.numer,t),Ft(e.denom,t)]);if(e.hasBarLine){if(e.barSize){var a=E(e.barSize,t);r.setAttribute("linethickness",N(a))}}else r.setAttribute("linethickness","0px");if(null!=e.leftDelim||null!=e.rightDelim){var n=[];if(null!=e.leftDelim){var i=new qt("mo",[new Ct(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),n.push(i)}if(n.push(r),null!=e.rightDelim){var o=new qt("mo",[new Ct(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),n.push(o)}return Nt(n)}return r}}),ct({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:r,funcName:a,token:n}=e;switch(a){case"\\over":t="\\frac";break;case"\\choose":t="\\binom";break;case"\\atop":t="\\\\atopfrac";break;case"\\brace":t="\\\\bracefrac";break;case"\\brack":t="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:r.mode,replaceWith:t,token:n}}});var va=["display","text","script","scriptscript"],ba=function(e){var t=null;return e.length>0&&(t="."===(t=e)?null:t),t};ct({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var r,{parser:a}=e,n=t[4],i=t[5],o=pt(t[0]),s="atom"===o.type&&"open"===o.family?ba(o.text):null,l=pt(t[1]),h="atom"===l.type&&"close"===l.family?ba(l.text):null,m=Qt(t[2],"size"),c=null;r=!!m.isBlank||(c=m.value).number>0;var u=null,p=t[3];if("ordgroup"===p.type){if(p.body.length>0){var d=Qt(p.body[0],"textord");u=va[Number(d.text)]}}else p=Qt(p,"textord"),u=va[Number(p.text)];return fa({type:"genfrac",mode:a.mode,numer:n,denom:i,continued:!1,hasBarLine:r,barSize:c,leftDelim:s,rightDelim:h},u)}}),ct({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:a,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Qt(t[0],"size").value,token:n}}}),ct({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0],i=Qt(t[1],"infix").size;if(!i)throw new Error("\\\\abovefrac expected size, but got "+String(i));var o=t[2],s=i.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:o,continued:!1,hasBarLine:s,barSize:i,leftDelim:null,rightDelim:null}}});var ya=(e,t)=>{var r,a,n=t.style;"supsub"===e.type?(r=e.sup?Mt(e.sup,t.havingStyle(n.sup()),t):Mt(e.sub,t.havingStyle(n.sub()),t),a=Qt(e.base,"horizBrace")):a=Qt(e,"horizBrace");var i,o=Mt(a.base,t.havingBaseStyle(S.DISPLAY)),s=Jt(a,t);if(a.isOver?(i=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:o},{type:"kern",size:.1},{type:"elem",elem:s}]})).children[0].children[0].children[1].classes.push("svg-align"):(i=Ke({positionType:"bottom",positionData:o.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:o}]})).children[0].children[0].children[0].classes.push("svg-align"),r){var l=We(["minner",a.isOver?"mover":"munder"],[i],t);i=a.isOver?Ke({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:r}]}):Ke({positionType:"bottom",positionData:l.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:l}]})}return We(["minner",a.isOver?"mover":"munder"],[i],t)};ct({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:a}=e;return{type:"horizBrace",mode:r.mode,label:a,isOver:a.includes("\\over"),base:t[0]}},htmlBuilder:ya,mathmlBuilder:(e,t)=>{var r=$t(e.label);return new qt(e.isOver?"mover":"munder",[Ft(e.base,t),r])}}),ct({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[1],n=Qt(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:dt(a)}:r.formatUnsupportedCmd("\\href")},htmlBuilder:(e,t)=>{var r=yt(e.body,t,!1);return function(e,t,r,a){var n=new G(e,t,r,a);return Ye(n),n}(e.href,[],r,t)},mathmlBuilder:(e,t)=>{var r=Pt(e.body,t);return r instanceof qt||(r=new qt("mrow",[r])),r.setAttribute("href",e.href),r}}),ct({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=Qt(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:a}))return r.formatUnsupportedCmd("\\url");for(var n=[],i=0;inew qt("mrow",Lt(e.body,t))}),ct({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(e,t)=>{var r,{parser:n,funcName:i,token:o}=e,s=Qt(t[0],"raw").string,l=t[1];n.settings.strict&&n.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h={};switch(i){case"\\htmlClass":h.class=s,r={command:"\\htmlClass",class:s};break;case"\\htmlId":h.id=s,r={command:"\\htmlId",id:s};break;case"\\htmlStyle":h.style=s,r={command:"\\htmlStyle",style:s};break;case"\\htmlData":for(var m=s.split(","),c=0;c{var r=yt(e.body,t,!1),a=["enclosing"];e.attributes.class&&a.push(...e.attributes.class.trim().split(/\s+/));var n=We(a,r,t);for(var i in e.attributes)"class"!==i&&e.attributes.hasOwnProperty(i)&&n.setAttribute(i,e.attributes[i]);return n},mathmlBuilder:(e,t)=>Pt(e.body,t)}),ct({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:dt(t[0]),mathml:dt(t[1])}},htmlBuilder:(e,t)=>{var r=yt(e.html,t,!1);return $e(r)},mathmlBuilder:(e,t)=>Pt(e.mathml,t)});var xa=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new a("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!H(r))throw new a("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ct({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},o={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Qt(r[0],"raw").string.split(","),m=0;m{var r=E(e.height,t),a=0;e.totalheight.number>0&&(a=E(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=E(e.width,t));var i={height:N(r+a)};n>0&&(i.width=N(n)),a>0&&(i.verticalAlign=N(-a));var o=new U(e.src,e.alt,i);return o.height=r,o.depth=a,o},mathmlBuilder:(e,t)=>{var r=new qt("mglyph",[]);r.setAttribute("alt",e.alt);var a=E(e.height,t),n=0;if(e.totalheight.number>0&&(n=E(e.totalheight,t)-a,r.setAttribute("valign",N(-n))),r.setAttribute("height",N(a+n)),e.width.number>0){var i=E(e.width,t);r.setAttribute("width",N(i))}return r.setAttribute("src",e.src),r}}),ct({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=Qt(t[0],"size");if(r.settings.strict){var i="m"===a[1],o="mu"===n.value.unit;i?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, not "+n.value.unit+" units"),"math"!==r.mode&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder:(e,t)=>Je(e.dimension,t),mathmlBuilder(e,t){var r=E(e.dimension,t);return new It(r)}}),ct({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:a.slice(5),body:n}},htmlBuilder:(e,t)=>{var r;"clap"===e.alignment?(r=We([],[Mt(e.body,t)]),r=We(["inner"],[r],t)):r=We(["inner"],[Mt(e.body,t)]);var a=We(["fix"],[]),n=We([e.alignment],[r,a],t),i=We(["strut"]);return i.style.height=N(n.height+n.depth),n.depth&&(i.style.verticalAlign=N(-n.depth)),n.children.unshift(i),n=We(["thinbox"],[n],t),We(["mord","vbox"],[n],t)},mathmlBuilder:(e,t)=>{var r=new qt("mpadded",[Ft(e.body,t)]);if("rlap"!==e.alignment){var a="llap"===e.alignment?"-1":"-0.5";r.setAttribute("lspace",a+"width")}return r.setAttribute("width","0px"),r}}),ct({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:a}=e,n=a.mode;a.switchMode("math");var i="\\("===r?"\\)":"$",o=a.parseExpression(!1,i);return a.expect(i),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:o}}}),ct({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new a("Mismatched "+e.funcName)}});var wa=(e,t)=>{switch(t.style.size){case S.DISPLAY.size:return e.display;case S.TEXT.size:return e.text;case S.SCRIPT.size:return e.script;case S.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ct({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:dt(t[0]),text:dt(t[1]),script:dt(t[2]),scriptscript:dt(t[3])}},htmlBuilder:(e,t)=>{var r=wa(e,t),a=yt(r,t,!1);return $e(a)},mathmlBuilder:(e,t)=>{var r=wa(e,t);return Pt(r,t)}});var ka=(e,t,r,a,n,i,o)=>{e=We([],[e]);var s,l,h,m=r&&c(r);if(t){var u=Mt(t,a.havingStyle(n.sup()),a);l={elem:u,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-u.depth)}}if(r){var p=Mt(r,a.havingStyle(n.sub()),a);s={elem:p,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-p.height)}}if(l&&s){var d=a.fontMetrics().bigOpSpacing5+s.elem.height+s.elem.depth+s.kern+e.depth+o;h=Ke({positionType:"bottom",positionData:d,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:N(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:N(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}else if(s){var g=e.height-o;h=Ke({positionType:"top",positionData:g,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:s.elem,marginLeft:N(-i)},{type:"kern",size:s.kern},{type:"elem",elem:e}]})}else{if(!l)return e;var f=e.depth+o;h=Ke({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:N(i)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]})}var v=[h];if(s&&0!==i&&!m){var b=We(["mspace"],[],a);b.style.marginRight=N(i),v.unshift(b)}return We(["mop","op-limits"],v,a)},Sa=new Set(["\\smallint"]),za=(e,t)=>{var r,a,n,i=!1;"supsub"===e.type?(r=e.sup,a=e.sub,n=Qt(e.base,"op"),i=!0):n=Qt(e,"op");var o,s=t.style,l=!1;if(s.size===S.DISPLAY.size&&n.symbol&&!Sa.has(n.name)&&(l=!0),n.symbol){var h=l?"Size2-Regular":"Size1-Regular",m="";if("\\oiint"!==n.name&&"\\oiiint"!==n.name||(m=n.name.slice(1),n.name="oiint"===m?"\\iint":"\\iiint"),o=Fe(n.name,h,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),m.length>0){var c=o.italic,u=rt(m+"Size"+(l?"2":"1"),t);o=Ke({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:u,shift:l?.08:0}]}),n.name="\\"+m,o.classes.unshift("mop"),o.italic=c}}else if(n.body){var p=yt(n.body,t,!0);1===p.length&&p[0]instanceof Y?(o=p[0]).classes[0]="mop":o=We(["mop"],p,t)}else{for(var d=[],g=1;g{var r;if(e.symbol)r=new qt("mo",[Et(e.name,e.mode)]),Sa.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new qt("mo",Lt(e.body,t));else{r=new qt("mi",[new Ct(e.name.slice(1))]);var a=new qt("mo",[Et("\u2061","text")]);r=e.parentIsSupSub?new qt("mrow",[r,a]):Bt([r,a])}return r},Aa={"\u220f":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22c0":"\\bigwedge","\u22c1":"\\bigvee","\u22c2":"\\bigcap","\u22c3":"\\bigcup","\u2a00":"\\bigodot","\u2a01":"\\bigoplus","\u2a02":"\\bigotimes","\u2a04":"\\biguplus","\u2a06":"\\bigsqcup"};ct({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220f","\u2210","\u2211","\u22c0","\u22c1","\u22c2","\u22c3","\u2a00","\u2a01","\u2a02","\u2a04","\u2a06"],props:{numArgs:0},handler:(e,t)=>{var{parser:r,funcName:a}=e,n=a;return 1===n.length&&(n=Aa[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:za,mathmlBuilder:Ma}),ct({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:dt(a)}},htmlBuilder:za,mathmlBuilder:Ma});var Ta={"\u222b":"\\int","\u222c":"\\iint","\u222d":"\\iiint","\u222e":"\\oint","\u222f":"\\oiint","\u2230":"\\oiiint"};ct({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:za,mathmlBuilder:Ma}),ct({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:za,mathmlBuilder:Ma}),ct({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222b","\u222c","\u222d","\u222e","\u222f","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,a=r;return 1===a.length&&(a=Ta[a]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:za,mathmlBuilder:Ma});var Ba=(e,t)=>{var r,a,n,i,o=!1;if("supsub"===e.type?(r=e.sup,a=e.sub,n=Qt(e.base,"operatorname"),o=!0):n=Qt(e,"operatorname"),n.body.length>0){for(var s=(n.body.map(e=>{var t="text"in e?e.text:void 0;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=yt(s,t.withFont("mathrm"),!0),h=0;h{var{parser:r,funcName:a}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:dt(n),alwaysHandleSupSub:"\\operatornamewithlimits"===a,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ba,mathmlBuilder:(e,t)=>{for(var r=Lt(e.body,t.withFont("mathrm")),a=!0,n=0;ne.toText()).join("");r=[new Ct(s)]}var l=new qt("mi",r);l.setAttribute("mathvariant","normal");var h=new qt("mo",[Et("\u2061","text")]);return e.parentIsSupSub?new qt("mrow",[l,h]):Bt([l,h])}}),Qr("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),ut({type:"ordgroup",htmlBuilder:(e,t)=>e.semisimple?$e(yt(e.body,t,!1)):We(["mord"],yt(e.body,t,!0),t),mathmlBuilder:(e,t)=>Pt(e.body,t,!0)}),ct({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,a=t[0];return{type:"overline",mode:r.mode,body:a}},htmlBuilder(e,t){var r=Mt(e.body,t.havingCrampedStyle()),a=_e("overline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]});return We(["mord","overline"],[i],t)},mathmlBuilder(e,t){var r=new qt("mo",[new Ct("\u203e")]);r.setAttribute("stretchy","true");var a=new qt("mover",[Ft(e.body,t),r]);return a.setAttribute("accent","true"),a}}),ct({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"phantom",mode:r.mode,body:dt(a)}},htmlBuilder:(e,t)=>{var r=yt(e.body,t.withPhantom(),!1);return $e(r)},mathmlBuilder:(e,t)=>{var r=Lt(e.body,t);return new qt("mphantom",r)}}),Qr("\\hphantom","\\smash{\\phantom{#1}}"),ct({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:r}=e,a=t[0];return{type:"vphantom",mode:r.mode,body:a}},htmlBuilder:(e,t)=>{var r=We(["inner"],[Mt(e.body,t.withPhantom())]),a=We(["fix"],[]);return We(["mord","rlap"],[r,a],t)},mathmlBuilder:(e,t)=>{var r=Lt(dt(e.body),t),a=new qt("mphantom",r),n=new qt("mpadded",[a]);return n.setAttribute("width","0px"),n}}),ct({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,a=Qt(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:a,body:n}},htmlBuilder(e,t){var r=Mt(e.body,t),a=E(e.dy,t);return Ke({positionType:"shift",positionData:-a,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new qt("mpadded",[Ft(e.body,t)]),a=e.dy.number+e.dy.unit;return r.setAttribute("voffset",a),r}}),ct({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}}),ct({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:a}=e,n=r[0],i=Qt(t[0],"size"),o=Qt(t[1],"size");return{type:"rule",mode:a.mode,shift:n&&Qt(n,"size").value,width:i.value,height:o.value}},htmlBuilder(e,t){var r=We(["mord","rule"],[],t),a=E(e.width,t),n=E(e.height,t),i=e.shift?E(e.shift,t):0;return r.style.borderRightWidth=N(a),r.style.borderTopWidth=N(n),r.style.bottom=N(i),r.width=a,r.height=n+i,r.depth=-i,r.maxFontSize=1.125*n*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=E(e.width,t),a=E(e.height,t),n=e.shift?E(e.shift,t):0,i=t.color&&t.getColor()||"black",o=new qt("mspace");o.setAttribute("mathbackground",i),o.setAttribute("width",N(r)),o.setAttribute("height",N(a));var s=new qt("mpadded",[o]);return n>=0?s.setAttribute("height",N(n)):(s.setAttribute("height",N(n)),s.setAttribute("depth",N(-n))),s.setAttribute("voffset",N(n)),s}});var Ca=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];ct({type:"sizing",names:Ca,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:Ca.indexOf(a)+1,body:i}},htmlBuilder:(e,t)=>{var r=t.havingSize(e.size);return qa(e.body,r,t)},mathmlBuilder:(e,t)=>{var r=t.havingSize(e.size),a=Lt(e.body,r),n=new qt("mstyle",a);return n.setAttribute("mathsize",N(r.sizeMultiplier)),n}}),ct({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,r)=>{var{parser:a}=e,n=!1,i=!1,o=r[0]&&Qt(r[0],"ordgroup");if(o)for(var s="",l=0;l{var r=We([],[Mt(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return We(["mord","smash"],[r],t);if(r.children)for(var a=0;a{var r=new qt("mpadded",[Ft(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r}}),ct({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:a}=e,n=r[0],i=t[0];return{type:"sqrt",mode:a.mode,body:i,index:n}},htmlBuilder(e,t){var r=Mt(e.body,t.havingCrampedStyle());0===r.height&&(r.height=t.fontMetrics().xHeight),r=Ze(r,t);var a=t.fontMetrics().defaultRuleThickness,n=a;t.style.idr.height+r.depth+i&&(i=(i+m-r.height-r.depth)/2);var c=s.height-r.height-i-l;r.style.paddingLeft=N(h);var u=Ke({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+c)},{type:"elem",elem:s},{type:"kern",size:l}]});if(e.index){var p=t.havingStyle(S.SCRIPTSCRIPT),d=Mt(e.index,p,t),g=.6*(u.height-u.depth),f=Ke({positionType:"shift",positionData:-g,children:[{type:"elem",elem:d}]}),v=We(["root"],[f]);return We(["mord","sqrt"],[v,u],t)}return We(["mord","sqrt"],[u],t)},mathmlBuilder(e,t){var{body:r,index:a}=e;return a?new qt("mroot",[Ft(r,t),Ft(a,t)]):new qt("msqrt",[Ft(r,t)])}});var Ia={display:S.DISPLAY,text:S.TEXT,script:S.SCRIPT,scriptscript:S.SCRIPTSCRIPT};ct({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:a,parser:n}=e,i=n.parseExpression(!0,r),o=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:o,body:i}},htmlBuilder(e,t){var r=Ia[e.style],a=t.havingStyle(r).withFont("");return qa(e.body,a,t)},mathmlBuilder(e,t){var r=Ia[e.style],a=t.havingStyle(r),n=Lt(e.body,a),i=new qt("mstyle",n),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return i.setAttribute("scriptlevel",o[0]),i.setAttribute("displaystyle",o[1]),i}});ut({type:"supsub",htmlBuilder(e,t){var r=function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===S.DISPLAY.size||r.alwaysHandleSupSub)?za:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===S.DISPLAY.size||r.limits)?Ba:null:"accent"===r.type?c(r.base)?ar:null:"horizBrace"===r.type&&!e.sub===r.isOver?ya:null:null}(e,t);if(r)return r(e,t);var a,n,i,{base:o,sup:s,sub:l}=e,h=Mt(o,t),m=t.fontMetrics(),u=0,p=0,d=o&&c(o);if(s){var g=t.havingStyle(t.style.sup());a=Mt(s,g,t),d||(u=h.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(l){var f=t.havingStyle(t.style.sub());n=Mt(l,f,t),d||(p=h.depth+f.fontMetrics().subDrop*f.sizeMultiplier/t.sizeMultiplier)}i=t.style===S.DISPLAY?m.sup1:t.style.cramped?m.sup3:m.sup2;var v,b=t.sizeMultiplier,y=N(.5/m.ptPerEm/b),x=null;if(n){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(h instanceof Y||w)&&(x=N(-h.italic))}if(a&&n){u=Math.max(u,i,a.depth+.25*m.xHeight),p=Math.max(p,m.sub2);var k=4*m.defaultRuleThickness;if(u-a.depth-(n.height-p)0&&(u+=z,p-=z)}v=Ke({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p,marginRight:y,marginLeft:x},{type:"elem",elem:a,shift:-u,marginRight:y}]})}else if(n){p=Math.max(p,m.sub1,n.height-.8*m.xHeight),v=Ke({positionType:"shift",positionData:p,children:[{type:"elem",elem:n,marginLeft:x,marginRight:y}]})}else{if(!a)throw new Error("supsub must have either sup or sub.");u=Math.max(u,i,a.depth+.25*m.xHeight),v=Ke({positionType:"shift",positionData:-u,children:[{type:"elem",elem:a,marginRight:y}]})}var M=St(h,"right")||"mord";return We([M],[h,We(["msupsub"],[v])],t)},mathmlBuilder(e,t){var r,a=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(a=!0,r=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var n,i=[Ft(e.base,t)];if(e.sub&&i.push(Ft(e.sub,t)),e.sup&&i.push(Ft(e.sup,t)),a)n=r?"mover":"munder";else if(e.sub)if(e.sup){var o=e.base;n=o&&"op"===o.type&&o.limits&&t.style===S.DISPLAY||o&&"operatorname"===o.type&&o.alwaysHandleSupSub&&(t.style===S.DISPLAY||o.limits)?"munderover":"msubsup"}else{var s=e.base;n=s&&"op"===s.type&&s.limits&&(t.style===S.DISPLAY||s.alwaysHandleSupSub)||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(s.limits||t.style===S.DISPLAY)?"munder":"msub"}else{var l=e.base;n=l&&"op"===l.type&&l.limits&&(t.style===S.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===S.DISPLAY)?"mover":"msup"}return new qt(n,i)}}),ut({type:"atom",htmlBuilder:(e,t)=>Ve(e.text,e.mode,t,["m"+e.family]),mathmlBuilder(e,t){var r=new qt("mo",[Et(e.text,e.mode)]);if("bin"===e.family){var a=Ot(e,t);"bold-italic"===a&&r.setAttribute("mathvariant",a)}else"punct"===e.family?r.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||r.setAttribute("stretchy","false");return r}});var Ra={mi:"italic",mn:"normal",mtext:"normal"};ut({type:"mathord",htmlBuilder:(e,t)=>Ge(e,t,"mathord"),mathmlBuilder(e,t){var r=new qt("mi",[Et(e.text,e.mode,t)]),a=Ot(e,t)||"italic";return a!==Ra[r.type]&&r.setAttribute("mathvariant",a),r}}),ut({type:"textord",htmlBuilder:(e,t)=>Ge(e,t,"textord"),mathmlBuilder(e,t){var r,a=Et(e.text,e.mode,t),n=Ot(e,t)||"normal";return r="text"===e.mode?new qt("mtext",[a]):/[0-9]/.test(e.text)?new qt("mn",[a]):"\\prime"===e.text?new qt("mo",[a]):new qt("mi",[a]),n!==Ra[r.type]&&r.setAttribute("mathvariant",n),r}});var Ha={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},Ea={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ut({type:"spacing",htmlBuilder(e,t){if(Ea.hasOwnProperty(e.text)){var r=Ea[e.text].className||"";if("text"===e.mode){var n=Ge(e,t,"textord");return n.classes.push(r),n}return We(["mspace",r],[Ve(e.text,e.mode,t)],t)}if(Ha.hasOwnProperty(e.text))return We(["mspace",Ha[e.text]],[],t);throw new a('Unknown type of space "'+e.text+'"')},mathmlBuilder(e,t){if(!Ea.hasOwnProperty(e.text)){if(Ha.hasOwnProperty(e.text))return new qt("mspace");throw new a('Unknown type of space "'+e.text+'"')}return new qt("mtext",[new Ct("\xa0")])}});var Na=()=>{var e=new qt("mtd",[]);return e.setAttribute("width","50%"),e};ut({type:"tag",mathmlBuilder(e,t){var r=new qt("mtable",[new qt("mtr",[Na(),new qt("mtd",[Pt(e.body,t)]),Na(),new qt("mtd",[Pt(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});var Oa={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Da={"\\textbf":"textbf","\\textmd":"textmd"},La={"\\textit":"textit","\\textup":"textup"},Pa=(e,t)=>{var r=e.font;return r?Oa[r]?t.withTextFontFamily(Oa[r]):Da[r]?t.withTextFontWeight(Da[r]):"\\emph"===r?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(La[r]):t};ct({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:a}=e,n=t[0];return{type:"text",mode:r.mode,body:dt(n),font:a}},htmlBuilder(e,t){var r=Pa(e,t),a=yt(e.body,r,!0);return We(["mord","text"],a,r)},mathmlBuilder(e,t){var r=Pa(e,t);return Pt(e.body,r)}}),ct({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Mt(e.body,t),a=_e("underline-line",t),n=t.fontMetrics().defaultRuleThickness,i=Ke({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:r}]});return We(["mord","underline"],[i],t)},mathmlBuilder(e,t){var r=new qt("mo",[new Ct("\u203e")]);r.setAttribute("stretchy","true");var a=new qt("munder",[Ft(e.body,t),r]);return a.setAttribute("accentunder","true"),a}}),ct({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=Mt(e.body,t),a=t.fontMetrics().axisHeight,n=.5*(r.height-a-(r.depth+a));return Ke({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new qt("mpadded",[Ft(e.body,t)],["vcenter"]);return new qt("mrow",[r])}}),ct({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new a("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=Fa(e),a=[],n=t.havingStyle(t.style.text()),i=0;ie.body.replace(/ /g,e.star?"\u2423":"\xa0"),Va=lt,Ga="[ \r\n\t]",Ua="(\\\\[a-zA-Z@]+)"+Ga+"*",Xa="[\u0300-\u036f]",Ya=new RegExp(Xa+"+$"),Wa="("+Ga+"+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-\u2027\u202a-\ud7ff\uf900-\uffff]"+Xa+"*|[\ud800-\udbff][\udc00-\udfff]"+Xa+"*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|"+Ua+"|\\\\[^\ud800-\udfff])";class ja{constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(Wa,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ta("EOF",new ea(this,t,t));var r=this.tokenRegex.exec(e);if(null===r||r.index!==t)throw new a("Unexpected character: '"+e[t]+"'",new ta(e[t],new ea(this,t,t+1)));var n=r[6]||r[3]||(r[2]?"\\ ":" ");if(14===this.catcodes[n]){var i=e.indexOf("\n",this.tokenRegex.lastIndex);return-1===i?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=i+1,this.lex()}return new ta(n,new ea(this,t,this.tokenRegex.lastIndex))}}class _a{constructor(e,t){void 0===e&&(e={}),void 0===t&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new a("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(void 0===r&&(r=!1),r){for(var a=0;a0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}null==t?delete this.current[e]:this.current[e]=t}}var $a=Jr;Qr("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),Qr("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),Qr("\\@firstoftwo",function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),Qr("\\@secondoftwo",function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),Qr("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return 1===t[0].length&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),Qr("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Qr("\\TextOrMath",function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var Za={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Qr("\\char",function(e){var t,r=e.popToken(),n=0;if("'"===r.text)t=8,r=e.popToken();else if('"'===r.text)t=16,r=e.popToken();else if("`"===r.text)if("\\"===(r=e.popToken()).text[0])n=r.text.charCodeAt(1);else{if("EOF"===r.text)throw new a("\\char` missing argument");n=r.text.charCodeAt(0)}else t=10;if(t){if(null==(n=Za[r.text])||n>=t)throw new a("Invalid base-"+t+" digit "+r.text);for(var i;null!=(i=Za[e.future().text])&&i{var i=e.consumeArg().tokens;if(1!==i.length)throw new a("\\newcommand's first argument must be a macro name");var o=i[0].text,s=e.isDefined(o);if(s&&!t)throw new a("\\newcommand{"+o+"} attempting to redefine "+o+"; use \\renewcommand");if(!s&&!r)throw new a("\\renewcommand{"+o+"} when command "+o+" does not yet exist; use \\newcommand");var l=0;if(1===(i=e.consumeArg().tokens).length&&"["===i[0].text){for(var h="",m=e.expandNextToken();"]"!==m.text&&"EOF"!==m.text;)h+=m.text,m=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new a("Invalid number of arguments: "+h);l=parseInt(h),i=e.consumeArg().tokens}return s&&n||e.macros.set(o,{tokens:i,numArgs:l}),""};Qr("\\newcommand",e=>Ka(e,!1,!0,!1)),Qr("\\renewcommand",e=>Ka(e,!0,!1,!1)),Qr("\\providecommand",e=>Ka(e,!0,!0,!0)),Qr("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join("")),""}),Qr("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join("")),""}),Qr("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Va[r],re.math[r],re.text[r]),""}),Qr("\\bgroup","{"),Qr("\\egroup","}"),Qr("~","\\nobreakspace"),Qr("\\lq","`"),Qr("\\rq","'"),Qr("\\aa","\\r a"),Qr("\\AA","\\r A"),Qr("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xa9}"),Qr("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Qr("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xae}"),Qr("\u212c","\\mathscr{B}"),Qr("\u2130","\\mathscr{E}"),Qr("\u2131","\\mathscr{F}"),Qr("\u210b","\\mathscr{H}"),Qr("\u2110","\\mathscr{I}"),Qr("\u2112","\\mathscr{L}"),Qr("\u2133","\\mathscr{M}"),Qr("\u211b","\\mathscr{R}"),Qr("\u212d","\\mathfrak{C}"),Qr("\u210c","\\mathfrak{H}"),Qr("\u2128","\\mathfrak{Z}"),Qr("\\Bbbk","\\Bbb{k}"),Qr("\\llap","\\mathllap{\\textrm{#1}}"),Qr("\\rlap","\\mathrlap{\\textrm{#1}}"),Qr("\\clap","\\mathclap{\\textrm{#1}}"),Qr("\\mathstrut","\\vphantom{(}"),Qr("\\underbar","\\underline{\\text{#1}}"),Qr("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}'),Qr("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Qr("\\ne","\\neq"),Qr("\u2260","\\neq"),Qr("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Qr("\u2209","\\notin"),Qr("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Qr("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Qr("\u225a","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225a}}"),Qr("\u225b","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225b}}"),Qr("\u225d","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225d}}"),Qr("\u225e","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225e}}"),Qr("\u225f","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225f}}"),Qr("\u27c2","\\perp"),Qr("\u203c","\\mathclose{!\\mkern-0.8mu!}"),Qr("\u220c","\\notni"),Qr("\u231c","\\ulcorner"),Qr("\u231d","\\urcorner"),Qr("\u231e","\\llcorner"),Qr("\u231f","\\lrcorner"),Qr("\xa9","\\copyright"),Qr("\xae","\\textregistered"),Qr("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),Qr("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),Qr("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),Qr("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),Qr("\\vdots","{\\varvdots\\rule{0pt}{15pt}}"),Qr("\u22ee","\\vdots"),Qr("\\varGamma","\\mathit{\\Gamma}"),Qr("\\varDelta","\\mathit{\\Delta}"),Qr("\\varTheta","\\mathit{\\Theta}"),Qr("\\varLambda","\\mathit{\\Lambda}"),Qr("\\varXi","\\mathit{\\Xi}"),Qr("\\varPi","\\mathit{\\Pi}"),Qr("\\varSigma","\\mathit{\\Sigma}"),Qr("\\varUpsilon","\\mathit{\\Upsilon}"),Qr("\\varPhi","\\mathit{\\Phi}"),Qr("\\varPsi","\\mathit{\\Psi}"),Qr("\\varOmega","\\mathit{\\Omega}"),Qr("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Qr("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),Qr("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Qr("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Qr("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Qr("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),Qr("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}"),Qr("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var Ja={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},Qa=new Set(["bin","rel"]);Qr("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Ja?t=Ja[r]:("\\not"===r.slice(0,4)||r in re.math&&Qa.has(re.math[r].group))&&(t="\\dotsb"),t});var en={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Qr("\\dotso",function(e){return e.future().text in en?"\\ldots\\,":"\\ldots"}),Qr("\\dotsc",function(e){var t=e.future().text;return t in en&&","!==t?"\\ldots\\,":"\\ldots"}),Qr("\\cdots",function(e){return e.future().text in en?"\\@cdots\\,":"\\@cdots"}),Qr("\\dotsb","\\cdots"),Qr("\\dotsm","\\cdots"),Qr("\\dotsi","\\!\\cdots"),Qr("\\dotsx","\\ldots\\,"),Qr("\\DOTSI","\\relax"),Qr("\\DOTSB","\\relax"),Qr("\\DOTSX","\\relax"),Qr("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Qr("\\,","\\tmspace+{3mu}{.1667em}"),Qr("\\thinspace","\\,"),Qr("\\>","\\mskip{4mu}"),Qr("\\:","\\tmspace+{4mu}{.2222em}"),Qr("\\medspace","\\:"),Qr("\\;","\\tmspace+{5mu}{.2777em}"),Qr("\\thickspace","\\;"),Qr("\\!","\\tmspace-{3mu}{.1667em}"),Qr("\\negthinspace","\\!"),Qr("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Qr("\\negthickspace","\\tmspace-{5mu}{.277em}"),Qr("\\enspace","\\kern.5em "),Qr("\\enskip","\\hskip.5em\\relax"),Qr("\\quad","\\hskip1em\\relax"),Qr("\\qquad","\\hskip2em\\relax"),Qr("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Qr("\\tag@paren","\\tag@literal{({#1})}"),Qr("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new a("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Qr("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Qr("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Qr("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Qr("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Qr("\\newline","\\\\\\relax"),Qr("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var tn=N($["Main-Regular"]["T".charCodeAt(0)][1]-.7*$["Main-Regular"]["A".charCodeAt(0)][1]);Qr("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+tn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Qr("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+tn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Qr("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Qr("\\@hspace","\\hskip #1\\relax"),Qr("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Qr("\\ordinarycolon",":"),Qr("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Qr("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Qr("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Qr("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Qr("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Qr("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Qr("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Qr("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Qr("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Qr("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Qr("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Qr("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Qr("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Qr("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Qr("\u2237","\\dblcolon"),Qr("\u2239","\\eqcolon"),Qr("\u2254","\\coloneqq"),Qr("\u2255","\\eqqcolon"),Qr("\u2a74","\\Coloneqq"),Qr("\\ratio","\\vcentcolon"),Qr("\\coloncolon","\\dblcolon"),Qr("\\colonequals","\\coloneqq"),Qr("\\coloncolonequals","\\Coloneqq"),Qr("\\equalscolon","\\eqqcolon"),Qr("\\equalscoloncolon","\\Eqqcolon"),Qr("\\colonminus","\\coloneq"),Qr("\\coloncolonminus","\\Coloneq"),Qr("\\minuscolon","\\eqcolon"),Qr("\\minuscoloncolon","\\Eqcolon"),Qr("\\coloncolonapprox","\\Colonapprox"),Qr("\\coloncolonsim","\\Colonsim"),Qr("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Qr("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Qr("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Qr("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Qr("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220c}}"),Qr("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Qr("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Qr("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Qr("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Qr("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Qr("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Qr("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Qr("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Qr("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Qr("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Qr("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Qr("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Qr("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Qr("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Qr("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Qr("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Qr("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Qr("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Qr("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228a}"),Qr("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2acb}"),Qr("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228b}"),Qr("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2acc}"),Qr("\\imath","\\html@mathml{\\@imath}{\u0131}"),Qr("\\jmath","\\html@mathml{\\@jmath}{\u0237}"),Qr("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27e6}}"),Qr("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27e7}}"),Qr("\u27e6","\\llbracket"),Qr("\u27e7","\\rrbracket"),Qr("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Qr("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Qr("\u2983","\\lBrace"),Qr("\u2984","\\rBrace"),Qr("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29b5}}"),Qr("\u29b5","\\minuso"),Qr("\\darr","\\downarrow"),Qr("\\dArr","\\Downarrow"),Qr("\\Darr","\\Downarrow"),Qr("\\lang","\\langle"),Qr("\\rang","\\rangle"),Qr("\\uarr","\\uparrow"),Qr("\\uArr","\\Uparrow"),Qr("\\Uarr","\\Uparrow"),Qr("\\N","\\mathbb{N}"),Qr("\\R","\\mathbb{R}"),Qr("\\Z","\\mathbb{Z}"),Qr("\\alef","\\aleph"),Qr("\\alefsym","\\aleph"),Qr("\\Alpha","\\mathrm{A}"),Qr("\\Beta","\\mathrm{B}"),Qr("\\bull","\\bullet"),Qr("\\Chi","\\mathrm{X}"),Qr("\\clubs","\\clubsuit"),Qr("\\cnums","\\mathbb{C}"),Qr("\\Complex","\\mathbb{C}"),Qr("\\Dagger","\\ddagger"),Qr("\\diamonds","\\diamondsuit"),Qr("\\empty","\\emptyset"),Qr("\\Epsilon","\\mathrm{E}"),Qr("\\Eta","\\mathrm{H}"),Qr("\\exist","\\exists"),Qr("\\harr","\\leftrightarrow"),Qr("\\hArr","\\Leftrightarrow"),Qr("\\Harr","\\Leftrightarrow"),Qr("\\hearts","\\heartsuit"),Qr("\\image","\\Im"),Qr("\\infin","\\infty"),Qr("\\Iota","\\mathrm{I}"),Qr("\\isin","\\in"),Qr("\\Kappa","\\mathrm{K}"),Qr("\\larr","\\leftarrow"),Qr("\\lArr","\\Leftarrow"),Qr("\\Larr","\\Leftarrow"),Qr("\\lrarr","\\leftrightarrow"),Qr("\\lrArr","\\Leftrightarrow"),Qr("\\Lrarr","\\Leftrightarrow"),Qr("\\Mu","\\mathrm{M}"),Qr("\\natnums","\\mathbb{N}"),Qr("\\Nu","\\mathrm{N}"),Qr("\\Omicron","\\mathrm{O}"),Qr("\\plusmn","\\pm"),Qr("\\rarr","\\rightarrow"),Qr("\\rArr","\\Rightarrow"),Qr("\\Rarr","\\Rightarrow"),Qr("\\real","\\Re"),Qr("\\reals","\\mathbb{R}"),Qr("\\Reals","\\mathbb{R}"),Qr("\\Rho","\\mathrm{P}"),Qr("\\sdot","\\cdot"),Qr("\\sect","\\S"),Qr("\\spades","\\spadesuit"),Qr("\\sub","\\subset"),Qr("\\sube","\\subseteq"),Qr("\\supe","\\supseteq"),Qr("\\Tau","\\mathrm{T}"),Qr("\\thetasym","\\vartheta"),Qr("\\weierp","\\wp"),Qr("\\Zeta","\\mathrm{Z}"),Qr("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Qr("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Qr("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Qr("\\bra","\\mathinner{\\langle{#1}|}"),Qr("\\ket","\\mathinner{|{#1}\\rangle}"),Qr("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Qr("\\Bra","\\left\\langle#1\\right|"),Qr("\\Ket","\\left|#1\\right\\rangle");var rn=e=>t=>{var r=t.consumeArg().tokens,a=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,o=t.macros.get("|"),s=t.macros.get("\\|");t.macros.beginGroup();var l=t=>r=>{e&&(r.macros.set("|",o),n.length&&r.macros.set("\\|",s));var i=t;!t&&n.length&&("|"===r.future().text&&(r.popToken(),i=!0));return{tokens:i?n:a,numArgs:0}};t.macros.set("|",l(!1)),n.length&&t.macros.set("\\|",l(!0));var h=t.consumeArg().tokens,m=t.expandTokens([...i,...h,...r]);return t.macros.endGroup(),{tokens:m.reverse(),numArgs:0}};Qr("\\bra@ket",rn(!1)),Qr("\\bra@set",rn(!0)),Qr("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),Qr("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),Qr("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),Qr("\\angln","{\\angl n}"),Qr("\\blue","\\textcolor{##6495ed}{#1}"),Qr("\\orange","\\textcolor{##ffa500}{#1}"),Qr("\\pink","\\textcolor{##ff00af}{#1}"),Qr("\\red","\\textcolor{##df0030}{#1}"),Qr("\\green","\\textcolor{##28ae7b}{#1}"),Qr("\\gray","\\textcolor{gray}{#1}"),Qr("\\purple","\\textcolor{##9d38bd}{#1}"),Qr("\\blueA","\\textcolor{##ccfaff}{#1}"),Qr("\\blueB","\\textcolor{##80f6ff}{#1}"),Qr("\\blueC","\\textcolor{##63d9ea}{#1}"),Qr("\\blueD","\\textcolor{##11accd}{#1}"),Qr("\\blueE","\\textcolor{##0c7f99}{#1}"),Qr("\\tealA","\\textcolor{##94fff5}{#1}"),Qr("\\tealB","\\textcolor{##26edd5}{#1}"),Qr("\\tealC","\\textcolor{##01d1c1}{#1}"),Qr("\\tealD","\\textcolor{##01a995}{#1}"),Qr("\\tealE","\\textcolor{##208170}{#1}"),Qr("\\greenA","\\textcolor{##b6ffb0}{#1}"),Qr("\\greenB","\\textcolor{##8af281}{#1}"),Qr("\\greenC","\\textcolor{##74cf70}{#1}"),Qr("\\greenD","\\textcolor{##1fab54}{#1}"),Qr("\\greenE","\\textcolor{##0d923f}{#1}"),Qr("\\goldA","\\textcolor{##ffd0a9}{#1}"),Qr("\\goldB","\\textcolor{##ffbb71}{#1}"),Qr("\\goldC","\\textcolor{##ff9c39}{#1}"),Qr("\\goldD","\\textcolor{##e07d10}{#1}"),Qr("\\goldE","\\textcolor{##a75a05}{#1}"),Qr("\\redA","\\textcolor{##fca9a9}{#1}"),Qr("\\redB","\\textcolor{##ff8482}{#1}"),Qr("\\redC","\\textcolor{##f9685d}{#1}"),Qr("\\redD","\\textcolor{##e84d39}{#1}"),Qr("\\redE","\\textcolor{##bc2612}{#1}"),Qr("\\maroonA","\\textcolor{##ffbde0}{#1}"),Qr("\\maroonB","\\textcolor{##ff92c6}{#1}"),Qr("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Qr("\\maroonD","\\textcolor{##ca337c}{#1}"),Qr("\\maroonE","\\textcolor{##9e034e}{#1}"),Qr("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Qr("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Qr("\\purpleC","\\textcolor{##aa87ff}{#1}"),Qr("\\purpleD","\\textcolor{##7854ab}{#1}"),Qr("\\purpleE","\\textcolor{##543b78}{#1}"),Qr("\\mintA","\\textcolor{##f5f9e8}{#1}"),Qr("\\mintB","\\textcolor{##edf2df}{#1}"),Qr("\\mintC","\\textcolor{##e0e5cc}{#1}"),Qr("\\grayA","\\textcolor{##f6f7f7}{#1}"),Qr("\\grayB","\\textcolor{##f0f1f2}{#1}"),Qr("\\grayC","\\textcolor{##e3e5e6}{#1}"),Qr("\\grayD","\\textcolor{##d6d8da}{#1}"),Qr("\\grayE","\\textcolor{##babec2}{#1}"),Qr("\\grayF","\\textcolor{##888d93}{#1}"),Qr("\\grayG","\\textcolor{##626569}{#1}"),Qr("\\grayH","\\textcolor{##3b3e40}{#1}"),Qr("\\grayI","\\textcolor{##21242c}{#1}"),Qr("\\kaBlue","\\textcolor{##314453}{#1}"),Qr("\\kaGreen","\\textcolor{##71B307}{#1}");var an={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class nn{constructor(e,t,r){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new _a($a,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new ja(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,a;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),({tokens:a,end:r}=this.consumeArg(["]"]))}else({tokens:a,start:t,end:r}=this.consumeArg());return this.pushToken(new ta("EOF",r.loc)),this.pushTokens(a),new ta("",ea.range(t,r))}consumeSpaces(){for(;;){if(" "!==this.future().text)break;this.stack.pop()}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var n,i=this.future(),o=0,s=0;do{if(n=this.popToken(),t.push(n),"{"===n.text)++o;else if("}"===n.text){if(-1===--o)throw new a("Extra }",n)}else if("EOF"===n.text)throw new a("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",n);if(e&&r)if((0===o||1===o&&"{"===e[s])&&n.text===e[s]){if(++s===e.length){t.splice(-s,s);break}}else s=0}while(0!==o||r);return"{"===i.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new a("The length of delimiters doesn't match the number of args!");for(var r=t[0],n=0;nthis.settings.maxExpand)throw new a("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new a("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,o=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;s>=0;--s){var l=i[s];if("#"===l.text){if(0===s)throw new a("Incomplete placeholder at end of macro body",l);if("#"===(l=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(l.text))throw new a("Not a valid argument number",l);i.splice(s,2,...o[+l.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(!1===this.expandOnce()){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ta(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(!1===this.expandOnce(!0)){var a=this.stack.pop();a.treatAsRelax&&(a.noexpand=!1,a.treatAsRelax=!1),t.push(a)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t?t.map(e=>e.text).join(""):t}_getExpansion(e){var t=this.macros.get(e);if(null==t)return t;if(1===e.length){var r=this.lexer.catcodes[e];if(null!=r&&13!==r)return}var a="function"==typeof t?t(this):t;if("string"==typeof a){var n=0;if(a.includes("#"))for(var i=a.replace(/##/g,"");i.includes("#"+(n+1));)++n;for(var o=new ja(a,this.settings),s=[],l=o.lex();"EOF"!==l.text;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:n}}return a}isDefined(e){return this.macros.has(e)||Va.hasOwnProperty(e)||re.math.hasOwnProperty(e)||re.text.hasOwnProperty(e)||an.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Va.hasOwnProperty(e)&&!Va[e].primitive}}var on=/^[\u208a\u208b\u208c\u208d\u208e\u2080\u2081\u2082\u2083\u2084\u2085\u2086\u2087\u2088\u2089\u2090\u2091\u2095\u1d62\u2c7c\u2096\u2097\u2098\u2099\u2092\u209a\u1d63\u209b\u209c\u1d64\u1d65\u2093\u1d66\u1d67\u1d68\u1d69\u1d6a]/,sn=Object.freeze({"\u208a":"+","\u208b":"-","\u208c":"=","\u208d":"(","\u208e":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1d62":"i","\u2c7c":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209a":"p","\u1d63":"r","\u209b":"s","\u209c":"t","\u1d64":"u","\u1d65":"v","\u2093":"x","\u1d66":"\u03b2","\u1d67":"\u03b3","\u1d68":"\u03c1","\u1d69":"\u03d5","\u1d6a":"\u03c7","\u207a":"+","\u207b":"-","\u207c":"=","\u207d":"(","\u207e":")","\u2070":"0","\xb9":"1","\xb2":"2","\xb3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1d2c":"A","\u1d2e":"B","\u1d30":"D","\u1d31":"E","\u1d33":"G","\u1d34":"H","\u1d35":"I","\u1d36":"J","\u1d37":"K","\u1d38":"L","\u1d39":"M","\u1d3a":"N","\u1d3c":"O","\u1d3e":"P","\u1d3f":"R","\u1d40":"T","\u1d41":"U","\u2c7d":"V","\u1d42":"W","\u1d43":"a","\u1d47":"b","\u1d9c":"c","\u1d48":"d","\u1d49":"e","\u1da0":"f","\u1d4d":"g","\u02b0":"h","\u2071":"i","\u02b2":"j","\u1d4f":"k","\u02e1":"l","\u1d50":"m","\u207f":"n","\u1d52":"o","\u1d56":"p","\u02b3":"r","\u02e2":"s","\u1d57":"t","\u1d58":"u","\u1d5b":"v","\u02b7":"w","\u02e3":"x","\u02b8":"y","\u1dbb":"z","\u1d5d":"\u03b2","\u1d5e":"\u03b3","\u1d5f":"\u03b4","\u1d60":"\u03d5","\u1d61":"\u03c7","\u1dbf":"\u03b8"}),ln={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030c":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030a":{text:"\\r",math:"\\mathring"},"\u030b":{text:"\\H"},"\u0327":{text:"\\c"}},hn={"\xe1":"a\u0301","\xe0":"a\u0300","\xe4":"a\u0308","\u01df":"a\u0308\u0304","\xe3":"a\u0303","\u0101":"a\u0304","\u0103":"a\u0306","\u1eaf":"a\u0306\u0301","\u1eb1":"a\u0306\u0300","\u1eb5":"a\u0306\u0303","\u01ce":"a\u030c","\xe2":"a\u0302","\u1ea5":"a\u0302\u0301","\u1ea7":"a\u0302\u0300","\u1eab":"a\u0302\u0303","\u0227":"a\u0307","\u01e1":"a\u0307\u0304","\xe5":"a\u030a","\u01fb":"a\u030a\u0301","\u1e03":"b\u0307","\u0107":"c\u0301","\u1e09":"c\u0327\u0301","\u010d":"c\u030c","\u0109":"c\u0302","\u010b":"c\u0307","\xe7":"c\u0327","\u010f":"d\u030c","\u1e0b":"d\u0307","\u1e11":"d\u0327","\xe9":"e\u0301","\xe8":"e\u0300","\xeb":"e\u0308","\u1ebd":"e\u0303","\u0113":"e\u0304","\u1e17":"e\u0304\u0301","\u1e15":"e\u0304\u0300","\u0115":"e\u0306","\u1e1d":"e\u0327\u0306","\u011b":"e\u030c","\xea":"e\u0302","\u1ebf":"e\u0302\u0301","\u1ec1":"e\u0302\u0300","\u1ec5":"e\u0302\u0303","\u0117":"e\u0307","\u0229":"e\u0327","\u1e1f":"f\u0307","\u01f5":"g\u0301","\u1e21":"g\u0304","\u011f":"g\u0306","\u01e7":"g\u030c","\u011d":"g\u0302","\u0121":"g\u0307","\u0123":"g\u0327","\u1e27":"h\u0308","\u021f":"h\u030c","\u0125":"h\u0302","\u1e23":"h\u0307","\u1e29":"h\u0327","\xed":"i\u0301","\xec":"i\u0300","\xef":"i\u0308","\u1e2f":"i\u0308\u0301","\u0129":"i\u0303","\u012b":"i\u0304","\u012d":"i\u0306","\u01d0":"i\u030c","\xee":"i\u0302","\u01f0":"j\u030c","\u0135":"j\u0302","\u1e31":"k\u0301","\u01e9":"k\u030c","\u0137":"k\u0327","\u013a":"l\u0301","\u013e":"l\u030c","\u013c":"l\u0327","\u1e3f":"m\u0301","\u1e41":"m\u0307","\u0144":"n\u0301","\u01f9":"n\u0300","\xf1":"n\u0303","\u0148":"n\u030c","\u1e45":"n\u0307","\u0146":"n\u0327","\xf3":"o\u0301","\xf2":"o\u0300","\xf6":"o\u0308","\u022b":"o\u0308\u0304","\xf5":"o\u0303","\u1e4d":"o\u0303\u0301","\u1e4f":"o\u0303\u0308","\u022d":"o\u0303\u0304","\u014d":"o\u0304","\u1e53":"o\u0304\u0301","\u1e51":"o\u0304\u0300","\u014f":"o\u0306","\u01d2":"o\u030c","\xf4":"o\u0302","\u1ed1":"o\u0302\u0301","\u1ed3":"o\u0302\u0300","\u1ed7":"o\u0302\u0303","\u022f":"o\u0307","\u0231":"o\u0307\u0304","\u0151":"o\u030b","\u1e55":"p\u0301","\u1e57":"p\u0307","\u0155":"r\u0301","\u0159":"r\u030c","\u1e59":"r\u0307","\u0157":"r\u0327","\u015b":"s\u0301","\u1e65":"s\u0301\u0307","\u0161":"s\u030c","\u1e67":"s\u030c\u0307","\u015d":"s\u0302","\u1e61":"s\u0307","\u015f":"s\u0327","\u1e97":"t\u0308","\u0165":"t\u030c","\u1e6b":"t\u0307","\u0163":"t\u0327","\xfa":"u\u0301","\xf9":"u\u0300","\xfc":"u\u0308","\u01d8":"u\u0308\u0301","\u01dc":"u\u0308\u0300","\u01d6":"u\u0308\u0304","\u01da":"u\u0308\u030c","\u0169":"u\u0303","\u1e79":"u\u0303\u0301","\u016b":"u\u0304","\u1e7b":"u\u0304\u0308","\u016d":"u\u0306","\u01d4":"u\u030c","\xfb":"u\u0302","\u016f":"u\u030a","\u0171":"u\u030b","\u1e7d":"v\u0303","\u1e83":"w\u0301","\u1e81":"w\u0300","\u1e85":"w\u0308","\u0175":"w\u0302","\u1e87":"w\u0307","\u1e98":"w\u030a","\u1e8d":"x\u0308","\u1e8b":"x\u0307","\xfd":"y\u0301","\u1ef3":"y\u0300","\xff":"y\u0308","\u1ef9":"y\u0303","\u0233":"y\u0304","\u0177":"y\u0302","\u1e8f":"y\u0307","\u1e99":"y\u030a","\u017a":"z\u0301","\u017e":"z\u030c","\u1e91":"z\u0302","\u017c":"z\u0307","\xc1":"A\u0301","\xc0":"A\u0300","\xc4":"A\u0308","\u01de":"A\u0308\u0304","\xc3":"A\u0303","\u0100":"A\u0304","\u0102":"A\u0306","\u1eae":"A\u0306\u0301","\u1eb0":"A\u0306\u0300","\u1eb4":"A\u0306\u0303","\u01cd":"A\u030c","\xc2":"A\u0302","\u1ea4":"A\u0302\u0301","\u1ea6":"A\u0302\u0300","\u1eaa":"A\u0302\u0303","\u0226":"A\u0307","\u01e0":"A\u0307\u0304","\xc5":"A\u030a","\u01fa":"A\u030a\u0301","\u1e02":"B\u0307","\u0106":"C\u0301","\u1e08":"C\u0327\u0301","\u010c":"C\u030c","\u0108":"C\u0302","\u010a":"C\u0307","\xc7":"C\u0327","\u010e":"D\u030c","\u1e0a":"D\u0307","\u1e10":"D\u0327","\xc9":"E\u0301","\xc8":"E\u0300","\xcb":"E\u0308","\u1ebc":"E\u0303","\u0112":"E\u0304","\u1e16":"E\u0304\u0301","\u1e14":"E\u0304\u0300","\u0114":"E\u0306","\u1e1c":"E\u0327\u0306","\u011a":"E\u030c","\xca":"E\u0302","\u1ebe":"E\u0302\u0301","\u1ec0":"E\u0302\u0300","\u1ec4":"E\u0302\u0303","\u0116":"E\u0307","\u0228":"E\u0327","\u1e1e":"F\u0307","\u01f4":"G\u0301","\u1e20":"G\u0304","\u011e":"G\u0306","\u01e6":"G\u030c","\u011c":"G\u0302","\u0120":"G\u0307","\u0122":"G\u0327","\u1e26":"H\u0308","\u021e":"H\u030c","\u0124":"H\u0302","\u1e22":"H\u0307","\u1e28":"H\u0327","\xcd":"I\u0301","\xcc":"I\u0300","\xcf":"I\u0308","\u1e2e":"I\u0308\u0301","\u0128":"I\u0303","\u012a":"I\u0304","\u012c":"I\u0306","\u01cf":"I\u030c","\xce":"I\u0302","\u0130":"I\u0307","\u0134":"J\u0302","\u1e30":"K\u0301","\u01e8":"K\u030c","\u0136":"K\u0327","\u0139":"L\u0301","\u013d":"L\u030c","\u013b":"L\u0327","\u1e3e":"M\u0301","\u1e40":"M\u0307","\u0143":"N\u0301","\u01f8":"N\u0300","\xd1":"N\u0303","\u0147":"N\u030c","\u1e44":"N\u0307","\u0145":"N\u0327","\xd3":"O\u0301","\xd2":"O\u0300","\xd6":"O\u0308","\u022a":"O\u0308\u0304","\xd5":"O\u0303","\u1e4c":"O\u0303\u0301","\u1e4e":"O\u0303\u0308","\u022c":"O\u0303\u0304","\u014c":"O\u0304","\u1e52":"O\u0304\u0301","\u1e50":"O\u0304\u0300","\u014e":"O\u0306","\u01d1":"O\u030c","\xd4":"O\u0302","\u1ed0":"O\u0302\u0301","\u1ed2":"O\u0302\u0300","\u1ed6":"O\u0302\u0303","\u022e":"O\u0307","\u0230":"O\u0307\u0304","\u0150":"O\u030b","\u1e54":"P\u0301","\u1e56":"P\u0307","\u0154":"R\u0301","\u0158":"R\u030c","\u1e58":"R\u0307","\u0156":"R\u0327","\u015a":"S\u0301","\u1e64":"S\u0301\u0307","\u0160":"S\u030c","\u1e66":"S\u030c\u0307","\u015c":"S\u0302","\u1e60":"S\u0307","\u015e":"S\u0327","\u0164":"T\u030c","\u1e6a":"T\u0307","\u0162":"T\u0327","\xda":"U\u0301","\xd9":"U\u0300","\xdc":"U\u0308","\u01d7":"U\u0308\u0301","\u01db":"U\u0308\u0300","\u01d5":"U\u0308\u0304","\u01d9":"U\u0308\u030c","\u0168":"U\u0303","\u1e78":"U\u0303\u0301","\u016a":"U\u0304","\u1e7a":"U\u0304\u0308","\u016c":"U\u0306","\u01d3":"U\u030c","\xdb":"U\u0302","\u016e":"U\u030a","\u0170":"U\u030b","\u1e7c":"V\u0303","\u1e82":"W\u0301","\u1e80":"W\u0300","\u1e84":"W\u0308","\u0174":"W\u0302","\u1e86":"W\u0307","\u1e8c":"X\u0308","\u1e8a":"X\u0307","\xdd":"Y\u0301","\u1ef2":"Y\u0300","\u0178":"Y\u0308","\u1ef8":"Y\u0303","\u0232":"Y\u0304","\u0176":"Y\u0302","\u1e8e":"Y\u0307","\u0179":"Z\u0301","\u017d":"Z\u030c","\u1e90":"Z\u0302","\u017b":"Z\u0307","\u03ac":"\u03b1\u0301","\u1f70":"\u03b1\u0300","\u1fb1":"\u03b1\u0304","\u1fb0":"\u03b1\u0306","\u03ad":"\u03b5\u0301","\u1f72":"\u03b5\u0300","\u03ae":"\u03b7\u0301","\u1f74":"\u03b7\u0300","\u03af":"\u03b9\u0301","\u1f76":"\u03b9\u0300","\u03ca":"\u03b9\u0308","\u0390":"\u03b9\u0308\u0301","\u1fd2":"\u03b9\u0308\u0300","\u1fd1":"\u03b9\u0304","\u1fd0":"\u03b9\u0306","\u03cc":"\u03bf\u0301","\u1f78":"\u03bf\u0300","\u03cd":"\u03c5\u0301","\u1f7a":"\u03c5\u0300","\u03cb":"\u03c5\u0308","\u03b0":"\u03c5\u0308\u0301","\u1fe2":"\u03c5\u0308\u0300","\u1fe1":"\u03c5\u0304","\u1fe0":"\u03c5\u0306","\u03ce":"\u03c9\u0301","\u1f7c":"\u03c9\u0300","\u038e":"\u03a5\u0301","\u1fea":"\u03a5\u0300","\u03ab":"\u03a5\u0308","\u1fe9":"\u03a5\u0304","\u1fe8":"\u03a5\u0306","\u038f":"\u03a9\u0301","\u1ffa":"\u03a9\u0300"};class mn{constructor(e,t){this.mode="math",this.gullet=new nn(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new a("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ta("}")),this.gullet.pushTokens(e);var r=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,r}parseExpression(e,t){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var a=this.fetch();if(mn.endOfExpression.has(a.text))break;if(t&&a.text===t)break;if(e&&Va[a.text]&&Va[a.text].infix)break;var n=this.parseAtom(t);if(!n)break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r=-1,n=0;n=128))return null;this.settings.strict&&(A(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),i={type:"textord",mode:"text",loc:ea.range(e),text:t}}if(this.consume(),o)for(var c=0;c{t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","source":"@site/docs/reference/scripts/create-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/create-record","permalink":"/reference/scripts/create-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Get a Record","permalink":"/reference/scripts/get-record"},"next":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"}}');var s=t(199),c=t(2560);const o={},i="Procedure: Create a Record",a={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-a-record",children:"Procedure: Create a Record"})}),"\n",(0,s.jsx)(r.p,{children:"The simplest write: take the request body, save it as a record, and return the URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Create a new ",(0,s.jsx)(r.a,{href:"/reference/lua/record-api",children:(0,s.jsx)(r.code,{children:"Record"})})," instance from the target collection, populated with the fields from the request body."]}),"\n",(0,s.jsxs)(r.li,{children:["Call ",(0,s.jsx)(r.code,{children:"r:save()"}),", which creates the record on the caller's PDS and indexes it locally."]}),"\n",(0,s.jsx)(r.li,{children:"Return the AT URI and CID of the newly created record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }\'\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed."})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},2560:(e,r,t)=>{t.d(r,{R:()=>o,x:()=>i});var n=t(63);const s={},c=n.createContext(s);function o(e){const r=n.useContext(c);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43880f7a.a0c8f815.js b/assets/js/43880f7a.a0c8f815.js deleted file mode 100644 index 8c598a5..0000000 --- a/assets/js/43880f7a.a0c8f815.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6590],{1572(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","source":"@site/docs/reference/scripts/create-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/create-record","permalink":"/reference/scripts/create-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Get a Record","permalink":"/reference/scripts/get-record"},"next":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"}}');var s=t(4848),c=t(8453);const o={},i="Procedure: Create a Record",a={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-a-record",children:"Procedure: Create a Record"})}),"\n",(0,s.jsx)(r.p,{children:"The simplest write: take the request body, save it as a record, and return the URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Create a new ",(0,s.jsx)(r.a,{href:"/guides/scripting#record-api",children:(0,s.jsx)(r.code,{children:"Record"})})," instance from the target collection, populated with the fields from the request body."]}),"\n",(0,s.jsxs)(r.li,{children:["Call ",(0,s.jsx)(r.code,{children:"r:save()"}),", which creates the record on the caller's PDS and indexes it locally."]}),"\n",(0,s.jsx)(r.li,{children:"Return the AT URI and CID of the newly created record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }\'\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed."})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>o,x:()=>i});var n=t(6540);const s={},c=n.createContext(s);function o(e){const r=n.useContext(c);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4419.f68c49e6.js b/assets/js/4419.f68c49e6.js new file mode 100644 index 0000000..980eea6 --- /dev/null +++ b/assets/js/4419.f68c49e6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4419],{9324:(e,t,n)=>{e.exports=n(9482)},9482:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;n(3924).default.install();const s=n(8604);i(n(8604),t);class a extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=a;class o extends s.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=o,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)}},3924:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0});const r=n(8604);class i extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}i.emptyBuffer=new Uint8Array(0);class s{constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class a{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const o=new TextEncoder,l=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(o.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console:console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function c(){return l}!function(e){e.install=function(){r.RAL.install(l)}}(c||(c={})),t.default=c},8604:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const r=n(7257);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(5969);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(3816);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=n(1523);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const o=n(9505);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return o.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return o.CancellationToken}});const l=n(8493);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return l.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return l.SharedArrayReceiverStrategy}});const c=n(8303);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return c.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return c.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return c.ReadableStreamMessageReader}});const u=n(9016);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=n(8113);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const p=n(9626);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}});const f=n(5455);t.RAL=f.default},9505:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(5455),i=n(9830),s=n(1523);var a;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(a||(t.CancellationToken=a={}));const o=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class l{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=a.None}}},9626:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(5455),i=n(9830),s=n(7257),a=n(5969),o=n(1523),l=n(9505);var c,u,d,p,f,h,m,g,y,T,R,v,$,E,C,A,S,k,b;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(c||(c={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u||(t.ProgressToken=u={})),function(e){e.type=new s.NotificationType("$/progress")}(d||(d={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(p||(p={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(f||(t.Trace=f={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(h||(t.TraceValues=h={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(f||(t.Trace=f={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new s.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new s.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class w extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,w.prototype)}}t.ConnectionError=w,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(R||(t.ConnectionStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(v||(t.IdCancellationReceiverStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}($||(t.RequestCancellationReceiverStrategy=$={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new l.CancellationTokenSource}),e.is=function(e){return v.is(e)||$.is(e)}}(E||(t.CancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(c.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(C||(t.CancellationSenderStrategy=C={})),function(e){e.Message=Object.freeze({receiver:E.Message,sender:C.Message}),e.is=function(e){const t=e;return t&&E.is(t.receiver)&&C.is(t.sender)}}(A||(t.CancellationStrategy=A={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(S||(t.MessageStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&(A.is(t.cancellationStrategy)||R.is(t.connectionStrategy)||S.is(t.messageStrategy))}}(k||(t.ConnectionOptions=k={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(b||(b={})),t.createMessageConnection=function(e,n,h,R){const $=void 0!==h?h:t.NullLogger;let E=0,C=0,k=0;const N="2.0";let x;const I=new Map;let O;const _=new Map,P=new Map;let L,D,M=new a.LinkedMap,F=new Map,j=new Set,q=new Map,z=f.Off,U=m.Text,K=b.New;const G=new o.Emitter,W=new o.Emitter,B=new o.Emitter,V=new o.Emitter,H=new o.Emitter,Y=R&&R.cancellationStrategy?R.cancellationStrategy:A.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e,t){var n;s.Message.isRequest(t)?e.set(X(t.id),t):s.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++k).toString():"res-"+n.toString(),t):e.set("not-"+(++C).toString(),t)}function Z(e){}function J(){return K===b.Listening}function ee(){return K===b.Closed}function te(){return K===b.Disposed}function ne(){K!==b.New&&K!==b.Listening||(K=b.Closed,W.fire(void 0))}function re(){L||0===M.size||(L=(0,r.default)().timer.setImmediate(()=>{L=void 0,function(){if(0===M.size)return;const e=M.shift();try{const t=R?.messageStrategy;S.is(t)?t.handleMessage(e,ie):ie(e)}finally{re()}}()}))}function ie(e){s.Message.isRequest(e)?function(e){if(te())return;function t(t,r,i){const a={jsonrpc:N,id:e.id};t instanceof s.ResponseError?a.error=t.toJson():a.result=void 0===t?null:t,oe(a,r,i),n.write(a).catch(()=>$.error("Sending response failed."))}function r(t,r,i){const s={jsonrpc:N,id:e.id,error:t.toJson()};oe(s,r,i),n.write(s).catch(()=>$.error("Sending response failed."))}function a(t,r,i){void 0===t&&(t=null);const s={jsonrpc:N,id:e.id,result:t};oe(s,r,i),n.write(s).catch(()=>$.error("Sending response failed."))}!function(e){if(z===f.Off||!D)return;if(U===m.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${ae(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const o=I.get(e.method);let l,c;o&&(l=o.type,c=o.handler);const u=Date.now();if(c||x){const n=e.id??String(Date.now()),o=v.is(Y.receiver)?Y.receiver.createCancellationTokenSource(n):Y.receiver.createCancellationTokenSource(e);null!==e.id&&j.has(e.id)&&o.cancel(),null!==e.id&&q.set(n,o);try{let d;if(c)if(void 0===e.params){if(void 0!==l&&0!==l.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${l.numberOfParams} params but received none.`),e.method,u);d=c(o.token)}else if(Array.isArray(e.params)){if(void 0!==l&&l.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=c(...e.params,o.token)}else{if(void 0!==l&&l.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=c(e.params,o.token)}else x&&(d=x(e.method,e.params,o.token));const p=d;d?p.then?p.then(r=>{q.delete(n),t(r,e.method,u)},t=>{q.delete(n),t instanceof s.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(q.delete(n),t(d,e.method,u)):(q.delete(n),a(d,e.method,u))}catch(d){q.delete(n),d instanceof s.ResponseError?t(d,e.method,u):d&&i.string(d.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${d.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):s.Message.isNotification(e)?function(e){if(te())return;let t,n;if(e.method===c.type.method){const t=e.params.id;return j.delete(t),void le(e)}{const r=_.get(e.method);r&&(n=r.handler,t=r.type)}if(n||O)try{if(le(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&$.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&u.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&$.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&$.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&$.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else O&&O(e.method,e.params)}catch(r){r.message?$.error(`Notification handler '${e.method}' failed with message: ${r.message}`):$.error(`Notification handler '${e.method}' failed unexpectedly.`)}else B.fire(e)}(e):s.Message.isResponse(e)?function(e){if(te())return;if(null===e.id)e.error?$.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):$.error("Received response message without id. No further error information provided.");else{const n=e.id,r=F.get(n);if(function(e,t){if(z===f.Off||!D)return;if(U===m.Text){let n;if(z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?n=`Error data: ${ae(e.error.data)}\n\n`:e.result?n=`Result: ${ae(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else D.log(`Received response ${e.id} without active response promise.`,n)}else ce("receive-response",e)}(e,r),void 0!==r){F.delete(n);try{if(e.error){const t=e.error;r.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(t){t.message?$.error(`Response handler '${r.method}' failed with message: ${t.message}`):$.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void $.error("Received empty message.");$.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=F.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError(function(e){G.fire([e,void 0,void 0])}),n.onClose(ne),n.onError(function(e){G.fire(e)});const se=e=>{try{if(s.Message.isNotification(e)&&e.method===c.type.method){const t=e.params.id,r=X(t),i=M.get(r);if(s.Message.isRequest(i)){const s=R?.connectionStrategy,a=s&&s.cancelUndispatched?s.cancelUndispatched(i,Z):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return M.delete(r),q.delete(t),a.id=i.id,oe(a,e.method,Date.now()),void n.write(a).catch(()=>$.error("Sending response for canceled message failed."))}const a=q.get(t);if(void 0!==a)return a.cancel(),void le(e);j.add(t)}Q(M,e)}finally{re()}};function ae(e){if(null!=e)switch(z){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}function oe(e,t,n){if(z!==f.Off&&D)if(U===m.Text){let r;z!==f.Verbose&&z!==f.Compact||(e.error&&e.error.data?r=`Error data: ${ae(e.error.data)}\n\n`:e.result?r=`Result: ${ae(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else ce("send-response",e)}function le(e){if(z!==f.Off&&D&&e.method!==y.type.method)if(U===m.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${ae(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!D||z===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(n)}function ue(){if(ee())throw new w(T.Closed,"Connection is closed.");if(te())throw new w(T.Disposed,"Connection is disposed.")}function de(e){return void 0===e?null:e}function pe(e){return null===e?void 0:e}function fe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function he(e,t){switch(e){case s.ParameterStructures.auto:return fe(t)?pe(t):[de(t)];case s.ParameterStructures.byName:if(!fe(t))throw new Error("Received parameters by name but param is not an object literal.");return pe(t);case s.ParameterStructures.byPosition:return[de(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function me(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=he(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,a;if(ue(),i.string(e)){r=e;const n=t[0];let i=0,o=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(i=1,o=n);let l=t.length;const c=l-i;switch(c){case 0:a=void 0;break;case 1:a=he(o,t[i]);break;default:if(o===s.ParameterStructures.byName)throw new Error(`Received ${c} parameters for 'by Name' notification parameter structure.`);a=t.slice(i,l).map(e=>de(e))}}else{const n=t;r=e.method,a=me(e,n)}const o={jsonrpc:N,method:r,params:a};return function(e){if(z!==f.Off&&D)if(U===m.Text){let t;z!==f.Verbose&&z!==f.Compact||(t=e.params?`Params: ${ae(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(o),n.write(o).catch(e=>{throw $.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return ue(),i.func(e)?O=e:t&&(i.string(e)?(n=e,_.set(e,{type:void 0,handler:t})):(n=e.method,_.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?_.delete(n):O=void 0}}},onProgress:(e,t,n)=>{if(P.has(t))throw new Error(`Progress handler for token ${t} already registered`);return P.set(t,n),{dispose:()=>{P.delete(t)}}},sendProgress:(e,t,n)=>ge.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:V.event,sendRequest:(e,...t)=>{let r,a,o;if(ue(),function(){if(!J())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let c=0,u=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(c=1,u=n);let d=t.length;l.CancellationToken.is(i)&&(d-=1,o=i);const p=d-c;switch(p){case 0:a=void 0;break;case 1:a=he(u,t[c]);break;default:if(u===s.ParameterStructures.byName)throw new Error(`Received ${p} parameters for 'by Name' request parameter structure.`);a=t.slice(c,d).map(e=>de(e))}}else{const n=t;r=e.method,a=me(e,n);const i=e.numberOfParams;o=l.CancellationToken.is(n[i])?n[i]:void 0}const c=E++;let u;o&&(u=o.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(ge,c);return void 0===e?($.log(`Received no promise from cancellation strategy when cancelling id ${c}`),Promise.resolve()):e.catch(()=>{$.log(`Sending cancellation messages for id ${c} failed`)})}));const d={jsonrpc:N,id:c,method:r,params:a};return function(e){if(z!==f.Off&&D)if(U===m.Text){let t;z!==f.Verbose&&z!==f.Compact||!e.params||(t=`Params: ${ae(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(d),new Promise(async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(c),u?.dispose()},reject:e=>{t(e),Y.sender.cleanup(c),u?.dispose()}};try{await n.write(d),F.set(c,i)}catch(a){throw $.error("Sending request failed."),i.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,a.message?a.message:"Unknown reason")),a}})},onRequest:(e,t)=>{ue();let n=null;return p.is(e)?(n=void 0,x=e):i.string(e)?(n=null,void 0!==t&&(n=e,I.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,I.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?I.delete(n):x=void 0)}}},hasPendingResponse:()=>F.size>0,trace:async(e,t,n)=>{let r=!1,s=m.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,s=n.traceFormat||m.Text)),z=e,U=s,D=z===f.Off?void 0:t,!r||ee()||te()||await ge.sendNotification(g.type,{value:f.toString(e)})},onError:G.event,onClose:W.event,onUnhandledNotification:B.event,onDispose:H.event,end:()=>{n.end()},dispose:()=>{if(te())return;K=b.Disposed,H.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of F.values())e.reject(t);F=new Map,q=new Map,j=new Set,M=new a.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(J())throw new w(T.AlreadyListening,"Connection is already listening")}(),K=b.Listening,e.listen(se)},inspect:()=>{(0,r.default)().console.log("inspect")}};return ge.onNotification(y.type,e=>{if(z===f.Off||!D)return;const t=z===f.Verbose||z===f.Compact;D.log(e.message,t?e.verbose:void 0)}),ge.onNotification(d.type,e=>{const t=P.get(e.token);t?t(e.value):V.fire(e)}),ge}},3816:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},1523:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(5455);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=a._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=a,a._noop=function(){}},9830:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))}},5969:(e,t)=>{var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i;t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},8113:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,i=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},8303:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(5455),i=n(9830),s=n(1523),a=n(9046);var o,l;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(o||(t.MessageReader=o={}));class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=c,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=(0,r.default)().applicationJson.decoder,a.set(s.name,s)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:s,contentTypeDecoders:a}}}(l||(l={}));t.ReadableStreamMessageReader=class extends c{constructor(e,t){super(),this.readable=e,this.options=l.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new a.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},9016:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(5455),i=n(9830),s=n(9046),a=n(1523);var o,l;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(o||(t.MessageWriter=o={}));class c{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(l||(l={}));t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=l.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},7257:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(9830);var i,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i||(t.ErrorCodes=i={}));class a extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,a.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=a;class o{constructor(e){this.kind=e}static is(e){return e===o.auto||e===o.byName||e===o.byPosition}toString(){return this.kind}}t.ParameterStructures=o,o.auto=new o("auto"),o.byPosition=new o("byPosition"),o.byName=new o("byName");class l{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return o.auto}}t.AbstractMessageSignature=l;t.RequestType0=class extends l{constructor(e){super(e,0)}};t.RequestType=class extends l{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends l{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends l{constructor(e){super(e,2)}};t.RequestType3=class extends l{constructor(e){super(e,3)}};t.RequestType4=class extends l{constructor(e){super(e,4)}};t.RequestType5=class extends l{constructor(e){super(e,5)}};t.RequestType6=class extends l{constructor(e){super(e,6)}};t.RequestType7=class extends l{constructor(e){super(e,7)}};t.RequestType8=class extends l{constructor(e){super(e,8)}};t.RequestType9=class extends l{constructor(e){super(e,9)}};t.NotificationType=class extends l{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends l{constructor(e){super(e,0)}};t.NotificationType1=class extends l{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends l{constructor(e){super(e,2)}};t.NotificationType3=class extends l{constructor(e){super(e,3)}};t.NotificationType4=class extends l{constructor(e){super(e,4)}};t.NotificationType5=class extends l{constructor(e){super(e,5)}};t.NotificationType6=class extends l{constructor(e){super(e,6)}};t.NotificationType7=class extends l{constructor(e){super(e,7)}};t.NotificationType8=class extends l{constructor(e){super(e,8)}};t.NotificationType9=class extends l{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(s||(t.Message=s={}))},5455:(e,t)=>{let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},9046:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(5455);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},8493:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9505);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={}));t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class s{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class a{constructor(e){this.token=new s(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new a(t)}}},5758:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=n(9324);i(n(9324),t),i(n(2688),t),t.createProtocolConnection=function(e,t,n,r){return(0,s.createMessageConnection)(e,t,n,r)}},2688:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(9482),t),i(n(7854),t),i(n(7874),t),i(n(6178),t);var s,a=n(718);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return a.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(s||(t.LSPErrorCodes=s={}))},718:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(9482);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},7874:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(9482);var i;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(i||(t.MessageDirection=i={}));t.RegistrationType=class{constructor(e){this.method=e}};class s extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=a;class o extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=o;class l extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=l},6563:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(7874);var i,s,a;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyPrepareRequest=i={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyIncomingCallsRequest=s={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.CallHierarchyOutgoingCallsRequest=a={}))},8102:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(7874);var i,s;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DocumentColorRequest=i={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.ColorPresentationRequest=s={}))},2826:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(7874);var i;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ConfigurationRequest=i={}))},3776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DeclarationRequest=i={}))},6961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(9482),i=n(9568),s=n(7874);var a,o,l,c,u;!function(e){e.is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)}}(a||(t.DiagnosticServerCancellationData=a={})),function(e){e.Full="full",e.Unchanged="unchanged"}(o||(t.DocumentDiagnosticReportKind=o={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(l||(t.DocumentDiagnosticRequest=l={})),function(e){e.method="workspace/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.WorkspaceDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType0(e.method)}(u||(t.DiagnosticRefreshRequest=u={}))},7826:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(7874);var i,s,a,o,l,c,u;!function(e){e.file="file",e.folder="folder"}(i||(t.FileOperationPatternKind=i={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WillCreateFilesRequest=s={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(a||(t.DidCreateFilesNotification=a={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.WillRenameFilesRequest=o={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(l||(t.DidRenameFilesNotification=l={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidDeleteFilesNotification=c={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(u||(t.WillDeleteFilesRequest=u={}))},9136:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(7874);var i,s;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.FoldingRangeRequest=i={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.FoldingRangeRefreshRequest=s={}))},9764:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ImplementationRequest=i={}))},5894:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(7874);var i,s,a;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintRequest=i={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.InlayHintResolveRequest=s={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(a||(t.InlayHintRefreshRequest=a={}))},4789:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineCompletionRequest=i={}))},886:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(7874);var i,s;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineValueRequest=i={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlineValueRefreshRequest=s={}))},6178:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(7874),i=n(7854),s=n(9568),a=n(9764);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return a.ImplementationRequest}});const o=n(5615);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return o.TypeDefinitionRequest}});const l=n(9641);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return l.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return l.DidChangeWorkspaceFoldersNotification}});const c=n(2826);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return c.ConfigurationRequest}});const u=n(8102);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const d=n(9136);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const p=n(3776);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return p.DeclarationRequest}});const f=n(9469);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const h=n(137);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return h.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return h.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return h.WorkDoneProgressCancelNotification}});const m=n(6563);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(5922);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(1942);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const T=n(6802);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return T.LinkedEditingRangeRequest}});const R=n(7826);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return R.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return R.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return R.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return R.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return R.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return R.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return R.WillDeleteFilesRequest}});const v=n(6413);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return v.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return v.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return v.MonikerRequest}});const $=n(1567);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return $.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return $.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return $.TypeHierarchySupertypesRequest}});const E=n(886);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return E.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return E.InlineValueRefreshRequest}});const C=n(5894);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return C.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return C.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return C.InlayHintRefreshRequest}});const A=n(6961);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return A.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return A.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return A.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return A.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return A.DiagnosticRefreshRequest}});const S=n(7071);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return S.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return S.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return S.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return S.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return S.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return S.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return S.DidCloseNotebookDocumentNotification}});const k=n(4789);var b,w,N,x,I,O,_,P,L,D,M,F,j,q,z,U,K,G,W,B,V,H,Y,X,Q,Z,J,ee,te,ne,re,ie,se,ae,oe,le,ce,ue,de,pe,fe,he,me,ge,ye,Te,Re,ve,$e,Ee,Ce,Ae,Se,ke,be,we,Ne,xe,Ie,Oe,_e,Pe,Le,De,Me;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return k.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return s.string(t)||s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(b||(t.TextDocumentFilter=b={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}(w||(t.NotebookDocumentFilter=w={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||w.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(N||(t.NotebookCellTextDocumentFilter=N={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!b.is(t)&&!N.is(t))return!1;return!0}}(x||(t.DocumentSelector=x={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(I||(t.RegistrationRequest=I={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(O||(t.UnregistrationRequest=O={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(_||(t.ResourceOperationKind=_={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(P||(t.FailureHandlingKind=P={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(L||(t.PositionEncodingKind=L={})),function(e){e.hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0}}(D||(t.StaticRegistrationOptions=D={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||x.is(t.documentSelector))}}(M||(t.TextDocumentRegistrationOptions=M={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(j||(t.InitializeRequest=j={})),function(e){e.unknownProtocolVersion=1}(q||(t.InitializeErrorCodes=q={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(z||(t.InitializedNotification=z={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(U||(t.ShutdownRequest=U={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(K||(t.ExitNotification=K={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(G||(t.DidChangeConfigurationNotification=G={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(W||(t.MessageType=W={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(B||(t.ShowMessageNotification=B={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(V||(t.ShowMessageRequest=V={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(H||(t.LogMessageNotification=H={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(Y||(t.TelemetryEventNotification=Y={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Q||(t.DidOpenTextDocumentNotification=Q={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(Z||(t.TextDocumentContentChangeEvent=Z={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(J||(t.DidChangeTextDocumentNotification=J={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(re||(t.WillSaveTextDocumentNotification=re={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(ae||(t.FileChangeType=ae={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)}}(oe||(t.RelativePattern=oe={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(le||(t.WatchKind=le={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(ce||(t.PublishDiagnosticsNotification=ce={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ue||(t.CompletionTriggerKind=ue={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(pe||(t.CompletionResolveRequest=pe={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(fe||(t.HoverRequest=fe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(he||(t.SignatureHelpTriggerKind=he={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.DefinitionRequest=ge={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.ReferencesRequest=ye={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.DocumentHighlightRequest=Te={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.DocumentSymbolRequest=Re={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.CodeActionRequest=ve={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}($e||(t.CodeActionResolveRequest=$e={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.WorkspaceSymbolRequest=Ee={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.WorkspaceSymbolResolveRequest=Ce={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ae||(t.CodeLensRequest=Ae={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.CodeLensResolveRequest=Se={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(ke||(t.CodeLensRefreshRequest=ke={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.DocumentLinkRequest=be={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(we||(t.DocumentLinkResolveRequest=we={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentFormattingRequest=Ne={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(xe||(t.DocumentRangeFormattingRequest=xe={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ie||(t.DocumentRangesFormattingRequest=Ie={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.DocumentOnTypeFormattingRequest=Oe={})),function(e){e.Identifier=1}(_e||(t.PrepareSupportDefaultBehavior=_e={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Pe||(t.RenameRequest=Pe={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.PrepareRenameRequest=Le={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.ExecuteCommandRequest=De={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Me||(t.ApplyWorkspaceEditRequest=Me={}))},6802:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.LinkedEditingRangeRequest=i={}))},6413:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(7874);var i,s,a;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(i||(t.UniquenessLevel=i={})),function(e){e.$import="import",e.$export="export",e.local="local"}(s||(t.MonikerKind=s={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.MonikerRequest=a={}))},7071:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(7854),i=n(9568),s=n(7874);var a,o,l,c,u,d,p,f,h,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(a||(t.NotebookCellKind=a={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}}(o||(t.ExecutionSummary=o={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),s=Array.isArray(n);if(r!==s)return!1;if(r&&s){if(e.length!==n.length)return!1;for(let r=0;r{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const r=n(9482),i=n(7874);var s,a,o;!function(e){e.type=new r.ProgressType,e.is=function(t){return t===e.type}}(s||(t.WorkDoneProgress=s={})),function(e){e.method="window/workDoneProgress/create",e.messageDirection=i.MessageDirection.serverToClient,e.type=new i.ProtocolRequestType(e.method)}(a||(t.WorkDoneProgressCreateRequest=a={})),function(e){e.method="window/workDoneProgress/cancel",e.messageDirection=i.MessageDirection.clientToServer,e.type=new i.ProtocolNotificationType(e.method)}(o||(t.WorkDoneProgressCancelNotification=o={}))},9469:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/selectionRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.SelectionRangeRequest=i={}))},5922:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const r=n(7874);var i,s,a,o,l,c;!function(e){e.Relative="relative"}(i||(t.TokenFormat=i={})),function(e){e.method="textDocument/semanticTokens",e.type=new r.RegistrationType(e.method)}(s||(t.SemanticTokensRegistrationType=s={})),function(e){e.method="textDocument/semanticTokens/full",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(a||(t.SemanticTokensRequest=a={})),function(e){e.method="textDocument/semanticTokens/full/delta",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(o||(t.SemanticTokensDeltaRequest=o={})),function(e){e.method="textDocument/semanticTokens/range",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.registrationMethod=s.method}(l||(t.SemanticTokensRangeRequest=l={})),function(e){e.method="workspace/semanticTokens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(c||(t.SemanticTokensRefreshRequest=c={}))},1942:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const r=n(7874);var i;!function(e){e.method="window/showDocument",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ShowDocumentRequest=i={}))},5615:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const r=n(7874);var i;!function(e){e.method="textDocument/typeDefinition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeDefinitionRequest=i={}))},1567:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(7874);var i,s,a;!function(e){e.method="textDocument/prepareTypeHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.TypeHierarchyPrepareRequest=i={})),function(e){e.method="typeHierarchy/supertypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.TypeHierarchySupertypesRequest=s={})),function(e){e.method="typeHierarchy/subtypes",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.TypeHierarchySubtypesRequest=a={}))},9641:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const r=n(7874);var i,s;!function(e){e.method="workspace/workspaceFolders",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(i||(t.WorkspaceFoldersRequest=i={})),function(e){e.method="workspace/didChangeWorkspaceFolders",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(s||(t.DidChangeWorkspaceFoldersNotification=s={}))},9568:(e,t)=>{function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},9720:(e,t,n)=>{function r(e){return e.charCodeAt(0)}function i(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t];e[t]=!0}function a(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function o(){throw Error("Internal Error - Should never get here!")}function l(e){return"Character"===e.type}n.d(t,{z:()=>g,H:()=>m});const c=[];for(let y=r("0");y<=r("9");y++)c.push(y);const u=[r("_")].concat(c);for(let y=r("a");y<=r("z");y++)u.push(y);for(let y=r("A");y<=r("Z");y++)u.push(y);const d=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r("\xa0"),r("\u1680"),r("\u2000"),r("\u2001"),r("\u2002"),r("\u2003"),r("\u2004"),r("\u2005"),r("\u2006"),r("\u2007"),r("\u2008"),r("\u2009"),r("\u200a"),r("\u2028"),r("\u2029"),r("\u202f"),r("\u205f"),r("\u3000"),r("\ufeff")],p=/[0-9a-fA-F]/,f=/[0-9]/,h=/[1-9]/;class m{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}a(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return o()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;a(t)}if(!0!==e||void 0!==t)return a(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),a(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):o()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=c;break;case"D":e=c,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=u;break;case"W":e=u,t=!0}return a(e)?{type:"Set",value:e,complement:t}:o()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r("\f");break;case"n":e=r("\n");break;case"r":e=r("\r");break;case"t":e=r("\t");break;case"v":e=r("\v")}return a(e)?{type:"Character",value:e}:o()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();t.type;if(l(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();n.type;if(l(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class g{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}},4808:(e,t,n)=>{n.d(t,{f:()=>c});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.Bg,l);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}(0,r.K2)(c,"createRadarServices")},131:(e,t,n)=>{n.d(t,{b:()=>c});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.d$,l);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(c,"createGitGraphServices")},8210:(e,t,n)=>{n.d(t,{S:()=>u});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},l=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){if("ARCH_ICON"===e.name)return t.replace(/[()]/g,"").trim();if("ARCH_TEXT_ICON"===e.name)return t.replace(/["()]/g,"");if("ARCH_TITLE"===e.name){let e=t.replace(/^\[|]$/g,"").trim();return(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,'"').replace(/\\'/g,"'")),e.trim()}}},c={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")}};function u(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.wV,c);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(u,"createArchitectureServices")},643:(e,t,n)=>{n.d(t,{f:()=>u});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},l=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},c={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")}};function u(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.D_,c);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(u,"createPieServices")},6575:(e,t,n)=>{n.d(t,{J:()=>c});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.dg{static{(0,r.K2)(this,"WardleyValueConverter")}runCustomConverter(e,t,n){if("LINK_LABEL"===e.name.toUpperCase())return t.substring(1).trim()}},l={parser:{ValueConverter:(0,r.K2)(()=>new o,"ValueConverter")}};function c(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.Xr,l);return t.ServiceRegistry.register(n),{shared:t,Wardley:n}}(0,r.K2)(c,"createWardleyServices")},7997:(e,t,n)=>{n.d(t,{$:()=>c});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.p5,l);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(c,"createPacketServices")},3580:(e,t,n)=>{n.d(t,{mR:()=>fi,dg:()=>di,wV:()=>ti,Tm:()=>pi,d$:()=>ni,FZ:()=>ri,sr:()=>ei,p5:()=>ii,D_:()=>si,Bg:()=>ai,CZ:()=>li,XE:()=>oi,Xr:()=>ci,K2:()=>A});var r=n(5393),i=n(1831),s=n(9110),a=n(3053),o=n(55),l=n(6550);const c={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},u={AstReflection:()=>new a.QX};function d(e){const t=function(){const e=(0,s.WQ)((0,i.u)(o.D),u),t=(0,s.WQ)((0,i.t)({shared:e}),c);return e.ServiceRegistry.register(t),t}(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,l.r.parse(`memory:/${n.name??"grammar"}.langium`)),n}var p,f,h,m,g,y,T,R,v,$=n(9071),E=n(7788),C=Object.defineProperty,A=(e,t)=>C(e,"name",{value:t,configurable:!0});(p||(p={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(h||(h={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(T||(T={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/},(R||(R={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,STRING2:/"[^"]*"|'[^']*'/},(v||(v={})).Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \t]+[A-Za-z(][A-Za-z0-9_()&]*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/};p.Terminals,f.Terminals,h.Terminals,m.Terminals,g.Terminals,y.Terminals,R.Terminals,T.Terminals,v.Terminals;var S="Accelerator",k="name",b="x",w="y",N="Anchor",x="evolution",I="name",O="visibility",_="Annotation",P="number",L="text",D="x",M="y",F="Annotations",j="x",q="y",z="Architecture",U="accDescr",K="accTitle",G="edges",W="groups",B="junctions",V="services",H="title";A(function(e){return Lr.isInstance(e,z)},"isArchitecture");var Y="Axis",X="label",Q="name",Z="Branch",J="name",ee="order";A(function(e){return Lr.isInstance(e,Z)},"isBranch");var te="Checkout",ne="branch",re="CherryPicking",ie="id",se="parent",ae="tags",oe="ClassDefStatement",le="className",ce="styleText",ue="Commit",de="id",pe="message",fe="tags",he="type";A(function(e){return Lr.isInstance(e,ue)},"isCommit");var me="Component",ge="decorator",ye="evolution",Te="inertia",Re="label",ve="name",$e="visibility",Ee="Curve",Ce="entries",Ae="label",Se="name",ke="Deaccelerator",be="name",we="x",Ne="y",xe="Decorator",Ie="strategy",Oe="Direction",_e="accDescr",Pe="accTitle",Le="dir",De="statements",Me="title",Fe="Edge",je="lhsDir",qe="lhsGroup",ze="lhsId",Ue="lhsInto",Ke="rhsDir",Ge="rhsGroup",We="rhsId",Be="rhsInto",Ve="title",He="Entry",Ye="axis",Xe="value",Qe="Evolution",Ze="stages",Je="EvolutionStage",et="boundary",tt="name",nt="secondName",rt="Evolve",it="component",st="target",at="GitGraph",ot="accDescr",lt="accTitle",ct="statements",ut="title";A(function(e){return Lr.isInstance(e,at)},"isGitGraph");var dt="Group",pt="icon",ft="id",ht="in",mt="title",gt="Info",yt="accDescr",Tt="accTitle",Rt="title";A(function(e){return Lr.isInstance(e,gt)},"isInfo");var vt="Item",$t="classSelector",Et="name",Ct="Junction",At="id",St="in",kt="Label",bt="negX",wt="negY",Nt="offsetX",xt="offsetY",It="Leaf",Ot="classSelector",_t="name",Pt="value",Lt="Link",Dt="arrow",Mt="from",Ft="fromPort",jt="linkLabel",qt="to",zt="toPort",Ut="Merge",Kt="branch",Gt="id",Wt="tags",Bt="type";A(function(e){return Lr.isInstance(e,Ut)},"isMerge");var Vt="Note",Ht="evolution",Yt="text",Xt="visibility",Qt="Option",Zt="name",Jt="value",en="Packet",tn="accDescr",nn="accTitle",rn="blocks",sn="title";A(function(e){return Lr.isInstance(e,en)},"isPacket");var an="PacketBlock",on="bits",ln="end",cn="label",un="start";A(function(e){return Lr.isInstance(e,an)},"isPacketBlock");var dn="Pie",pn="accDescr",fn="accTitle",hn="sections",mn="showData",gn="title";A(function(e){return Lr.isInstance(e,dn)},"isPie");var yn="PieSection",Tn="label",Rn="value";A(function(e){return Lr.isInstance(e,yn)},"isPieSection");var vn="Pipeline",$n="components",En="parent",Cn="PipelineComponent",An="evolution",Sn="label",kn="name",bn="Radar",wn="accDescr",Nn="accTitle",xn="axes",In="curves",On="options",_n="title",Pn="Section",Ln="classSelector",Dn="name",Mn="Service",Fn="icon",jn="iconText",qn="id",zn="in",Un="title",Kn="Size",Gn="height",Wn="width",Bn="Statement",Vn="Treemap",Hn="accDescr",Yn="accTitle",Xn="title",Qn="TreemapRows";A(function(e){return Lr.isInstance(e,Vn)},"isTreemap");var Zn="TreemapRow",Jn="indent",er="item",tr="TreeNode",nr="indent",rr="name",ir="TreeView",sr="accDescr",ar="accTitle",or="nodes",lr="title",cr="Wardley",ur="accDescr",dr="accelerators",pr="accTitle",fr="anchors",hr="annotation",mr="annotations",gr="components",yr="deaccelerators",Tr="evolution",Rr="evolves",vr="links",$r="notes",Er="pipelines",Cr="size",Ar="title";A(function(e){return Lr.isInstance(e,cr)},"isWardley");var Sr,kr,br,wr,Nr,xr,Ir,Or,_r,Pr=class extends r.kD{constructor(){super(...arguments),this.types={Accelerator:{name:S,properties:{name:{name:k},x:{name:b},y:{name:w}},superTypes:[]},Anchor:{name:N,properties:{evolution:{name:x},name:{name:I},visibility:{name:O}},superTypes:[]},Annotation:{name:_,properties:{number:{name:P},text:{name:L},x:{name:D},y:{name:M}},superTypes:[]},Annotations:{name:F,properties:{x:{name:j},y:{name:q}},superTypes:[]},Architecture:{name:z,properties:{accDescr:{name:U},accTitle:{name:K},edges:{name:G,defaultValue:[]},groups:{name:W,defaultValue:[]},junctions:{name:B,defaultValue:[]},services:{name:V,defaultValue:[]},title:{name:H}},superTypes:[]},Axis:{name:Y,properties:{label:{name:X},name:{name:Q}},superTypes:[]},Branch:{name:Z,properties:{name:{name:J},order:{name:ee}},superTypes:[Bn]},Checkout:{name:te,properties:{branch:{name:ne}},superTypes:[Bn]},CherryPicking:{name:re,properties:{id:{name:ie},parent:{name:se},tags:{name:ae,defaultValue:[]}},superTypes:[Bn]},ClassDefStatement:{name:oe,properties:{className:{name:le},styleText:{name:ce}},superTypes:[]},Commit:{name:ue,properties:{id:{name:de},message:{name:pe},tags:{name:fe,defaultValue:[]},type:{name:he}},superTypes:[Bn]},Component:{name:me,properties:{decorator:{name:ge},evolution:{name:ye},inertia:{name:Te,defaultValue:!1},label:{name:Re},name:{name:ve},visibility:{name:$e}},superTypes:[]},Curve:{name:Ee,properties:{entries:{name:Ce,defaultValue:[]},label:{name:Ae},name:{name:Se}},superTypes:[]},Deaccelerator:{name:ke,properties:{name:{name:be},x:{name:we},y:{name:Ne}},superTypes:[]},Decorator:{name:xe,properties:{strategy:{name:Ie}},superTypes:[]},Direction:{name:Oe,properties:{accDescr:{name:_e},accTitle:{name:Pe},dir:{name:Le},statements:{name:De,defaultValue:[]},title:{name:Me}},superTypes:[at]},Edge:{name:Fe,properties:{lhsDir:{name:je},lhsGroup:{name:qe,defaultValue:!1},lhsId:{name:ze},lhsInto:{name:Ue,defaultValue:!1},rhsDir:{name:Ke},rhsGroup:{name:Ge,defaultValue:!1},rhsId:{name:We},rhsInto:{name:Be,defaultValue:!1},title:{name:Ve}},superTypes:[]},Entry:{name:He,properties:{axis:{name:Ye,referenceType:Y},value:{name:Xe}},superTypes:[]},Evolution:{name:Qe,properties:{stages:{name:Ze,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:Je,properties:{boundary:{name:et},name:{name:tt},secondName:{name:nt}},superTypes:[]},Evolve:{name:rt,properties:{component:{name:it},target:{name:st}},superTypes:[]},GitGraph:{name:at,properties:{accDescr:{name:ot},accTitle:{name:lt},statements:{name:ct,defaultValue:[]},title:{name:ut}},superTypes:[]},Group:{name:dt,properties:{icon:{name:pt},id:{name:ft},in:{name:ht},title:{name:mt}},superTypes:[]},Info:{name:gt,properties:{accDescr:{name:yt},accTitle:{name:Tt},title:{name:Rt}},superTypes:[]},Item:{name:vt,properties:{classSelector:{name:$t},name:{name:Et}},superTypes:[]},Junction:{name:Ct,properties:{id:{name:At},in:{name:St}},superTypes:[]},Label:{name:kt,properties:{negX:{name:bt,defaultValue:!1},negY:{name:wt,defaultValue:!1},offsetX:{name:Nt},offsetY:{name:xt}},superTypes:[]},Leaf:{name:It,properties:{classSelector:{name:Ot},name:{name:_t},value:{name:Pt}},superTypes:[vt]},Link:{name:Lt,properties:{arrow:{name:Dt},from:{name:Mt},fromPort:{name:Ft},linkLabel:{name:jt},to:{name:qt},toPort:{name:zt}},superTypes:[]},Merge:{name:Ut,properties:{branch:{name:Kt},id:{name:Gt},tags:{name:Wt,defaultValue:[]},type:{name:Bt}},superTypes:[Bn]},Note:{name:Vt,properties:{evolution:{name:Ht},text:{name:Yt},visibility:{name:Xt}},superTypes:[]},Option:{name:Qt,properties:{name:{name:Zt},value:{name:Jt,defaultValue:!1}},superTypes:[]},Packet:{name:en,properties:{accDescr:{name:tn},accTitle:{name:nn},blocks:{name:rn,defaultValue:[]},title:{name:sn}},superTypes:[]},PacketBlock:{name:an,properties:{bits:{name:on},end:{name:ln},label:{name:cn},start:{name:un}},superTypes:[]},Pie:{name:dn,properties:{accDescr:{name:pn},accTitle:{name:fn},sections:{name:hn,defaultValue:[]},showData:{name:mn,defaultValue:!1},title:{name:gn}},superTypes:[]},PieSection:{name:yn,properties:{label:{name:Tn},value:{name:Rn}},superTypes:[]},Pipeline:{name:vn,properties:{components:{name:$n,defaultValue:[]},parent:{name:En}},superTypes:[]},PipelineComponent:{name:Cn,properties:{evolution:{name:An},label:{name:Sn},name:{name:kn}},superTypes:[]},Radar:{name:bn,properties:{accDescr:{name:wn},accTitle:{name:Nn},axes:{name:xn,defaultValue:[]},curves:{name:In,defaultValue:[]},options:{name:On,defaultValue:[]},title:{name:_n}},superTypes:[]},Section:{name:Pn,properties:{classSelector:{name:Ln},name:{name:Dn}},superTypes:[vt]},Service:{name:Mn,properties:{icon:{name:Fn},iconText:{name:jn},id:{name:qn},in:{name:zn},title:{name:Un}},superTypes:[]},Size:{name:Kn,properties:{height:{name:Gn},width:{name:Wn}},superTypes:[]},Statement:{name:Bn,properties:{},superTypes:[]},TreeNode:{name:tr,properties:{indent:{name:nr},name:{name:rr}},superTypes:[]},TreeView:{name:ir,properties:{accDescr:{name:sr},accTitle:{name:ar},nodes:{name:or,defaultValue:[]},title:{name:lr}},superTypes:[]},Treemap:{name:Vn,properties:{accDescr:{name:Hn},accTitle:{name:Yn},title:{name:Xn},TreemapRows:{name:Qn,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Zn,properties:{indent:{name:Jn},item:{name:er}},superTypes:[]},Wardley:{name:cr,properties:{accDescr:{name:ur},accelerators:{name:dr,defaultValue:[]},accTitle:{name:pr},anchors:{name:fr,defaultValue:[]},annotation:{name:hr,defaultValue:[]},annotations:{name:mr,defaultValue:[]},components:{name:gr,defaultValue:[]},deaccelerators:{name:yr,defaultValue:[]},evolution:{name:Tr},evolves:{name:Rr,defaultValue:[]},links:{name:vr,defaultValue:[]},notes:{name:$r,defaultValue:[]},pipelines:{name:Er,defaultValue:[]},size:{name:Cr},title:{name:Ar}},superTypes:[]}}}static{A(this,"MermaidAstReflection")}},Lr=new Pr,Dr=A(()=>Sr??(Sr=d('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Mr=A(()=>kr??(kr=d('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),Fr=A(()=>br??(br=d('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),jr=A(()=>wr??(wr=d('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),qr=A(()=>Nr??(Nr=d('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),zr=A(()=>xr??(xr=d('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),Ur=A(()=>Ir??(Ir=d('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),Kr=A(()=>Or??(Or=d('{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@9"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n * Converted from treemap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}')),"TreeViewGrammarGrammar"),Gr=A(()=>_r??(_r=d('{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"--\x3e"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+\'[^\']*\'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z][A-Za-z0-9_()&]*(?:[ \\\\t]+[A-Za-z(][A-Za-z0-9_()&]*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"WardleyGrammarGrammar"),Wr={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Br={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vr={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Hr={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Yr={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Xr={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Qr={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Zr={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Jr={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ei={AstReflection:A(()=>new Pr,"AstReflection")},ti={Grammar:A(()=>Dr(),"Grammar"),LanguageMetaData:A(()=>Wr,"LanguageMetaData"),parser:{}},ni={Grammar:A(()=>Mr(),"Grammar"),LanguageMetaData:A(()=>Br,"LanguageMetaData"),parser:{}},ri={Grammar:A(()=>Fr(),"Grammar"),LanguageMetaData:A(()=>Vr,"LanguageMetaData"),parser:{}},ii={Grammar:A(()=>jr(),"Grammar"),LanguageMetaData:A(()=>Hr,"LanguageMetaData"),parser:{}},si={Grammar:A(()=>qr(),"Grammar"),LanguageMetaData:A(()=>Yr,"LanguageMetaData"),parser:{}},ai={Grammar:A(()=>zr(),"Grammar"),LanguageMetaData:A(()=>Xr,"LanguageMetaData"),parser:{}},oi={Grammar:A(()=>Ur(),"Grammar"),LanguageMetaData:A(()=>Qr,"LanguageMetaData"),parser:{}},li={Grammar:A(()=>Kr(),"Grammar"),LanguageMetaData:A(()=>Zr,"LanguageMetaData"),parser:{}},ci={Grammar:A(()=>Gr(),"Grammar"),LanguageMetaData:A(()=>Jr,"LanguageMetaData"),parser:{}},ui={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},di=class extends $.d{static{A(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=ui[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},pi=class extends di{static{A(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},fi=class extends E.Q{static{A(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends fi{static{A(this,"CommonTokenBuilder")}})},8746:(e,t,n)=>{n.d(t,{v:()=>c});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},l={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function c(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.FZ,l);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(c,"createInfoServices")},7065:(e,t,n)=>{n.d(t,{d:()=>f});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},l=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,c=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,n){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=l.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function u(e){const t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){const e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}(0,r.K2)(u,"registerValidationChecks");var d=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let n;for(const r of e.TreemapRows)r.item&&(void 0===n&&void 0===r.indent?n=0:(void 0===r.indent||void 0!==n&&n>=parseInt(r.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},p={parser:{TokenBuilder:(0,r.K2)(()=>new o,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")},validation:{TreemapValidator:(0,r.K2)(()=>new d,"TreemapValidator")}};function f(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.XE,p);return t.ServiceRegistry.register(n),u(n),{shared:t,Treemap:n}}(0,r.K2)(f,"createTreemapServices")},3018:(e,t,n)=>{n.d(t,{I:()=>u});var r=n(3580),i=n(55),s=n(9110),a=n(1831),o=class extends r.dg{static{(0,r.K2)(this,"TreeViewValueConverter")}runCustomConverter(e,t,n){return"INDENTATION"===e.name?t?.length||0:"STRING2"===e.name?t.substring(1,t.length-1):void 0}},l=class extends r.mR{static{(0,r.K2)(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new l,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new o,"ValueConverter")}};function u(e=i.D){const t=(0,s.WQ)((0,a.u)(e),r.sr),n=(0,s.WQ)((0,a.t)({shared:t}),r.CZ,c);return t.ServiceRegistry.register(n),{shared:t,TreeView:n}}(0,r.K2)(u,"createTreeViewServices")},4419:(e,t,n)=>{n.d(t,{qg:()=>a});n(7065),n(6575),n(131),n(8746),n(7997),n(643),n(3018),n(8210),n(4808);var r=n(3580),i={},s={info:(0,r.K2)(async()=>{const{createInfoServices:e}=await n.e(6194).then(n.bind(n,6194)),t=e().Info.parser.LangiumParser;i.info=t},"info"),packet:(0,r.K2)(async()=>{const{createPacketServices:e}=await n.e(646).then(n.bind(n,646)),t=e().Packet.parser.LangiumParser;i.packet=t},"packet"),pie:(0,r.K2)(async()=>{const{createPieServices:e}=await n.e(2613).then(n.bind(n,4994)),t=e().Pie.parser.LangiumParser;i.pie=t},"pie"),treeView:(0,r.K2)(async()=>{const{createTreeViewServices:e}=await n.e(7508).then(n.bind(n,7508)),t=e().TreeView.parser.LangiumParser;i.treeView=t},"treeView"),architecture:(0,r.K2)(async()=>{const{createArchitectureServices:e}=await n.e(3718).then(n.bind(n,3718)),t=e().Architecture.parser.LangiumParser;i.architecture=t},"architecture"),gitGraph:(0,r.K2)(async()=>{const{createGitGraphServices:e}=await n.e(4541).then(n.bind(n,4541)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t},"gitGraph"),radar:(0,r.K2)(async()=>{const{createRadarServices:e}=await n.e(4574).then(n.bind(n,4574)),t=e().Radar.parser.LangiumParser;i.radar=t},"radar"),treemap:(0,r.K2)(async()=>{const{createTreemapServices:e}=await n.e(6370).then(n.bind(n,6370)),t=e().Treemap.parser.LangiumParser;i.treemap=t},"treemap"),wardley:(0,r.K2)(async()=>{const{createWardleyServices:e}=await n.e(8227).then(n.bind(n,8227)),t=e().Wardley.parser.LangiumParser;i.wardley=t},"wardley")};async function a(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new o(r);return r.value}(0,r.K2)(a,"parse");var o=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>`Lexer error on line ${void 0===e.line||isNaN(e.line)?"?":e.line}, column ${void 0===e.column||isNaN(e.column)?"?":e.column}: ${e.message}`).join("\n")} ${e.parserErrors.map(e=>`Parse error on line ${void 0===e.token.startLine||isNaN(e.token.startLine)?"?":e.token.startLine}, column ${void 0===e.token.startColumn||isNaN(e.token.startColumn)?"?":e.token.startColumn}: ${e.message}`).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},7087:(e,t,n)=>{function r(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}n.d(t,{ak:()=>f,mT:()=>on,LT:()=>xe,jr:()=>cn,T6:()=>Mt,JG:()=>ye,wL:()=>s,c$:()=>l,Y2:()=>d,$P:()=>c,Cy:()=>u,Pp:()=>p,BK:()=>h,PW:()=>he,my:()=>_e,jk:()=>He,Sk:()=>Te,G:()=>Oe});class i{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}}class s extends i{constructor(e){super([]),this.idx=1,Object.assign(this,g(e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class a extends i{constructor(e){super(e.definition),this.orgText="",Object.assign(this,g(e))}}class o extends i{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,g(e))}}class l extends i{constructor(e){super(e.definition),this.idx=1,Object.assign(this,g(e))}}class c extends i{constructor(e){super(e.definition),this.idx=1,Object.assign(this,g(e))}}class u extends i{constructor(e){super(e.definition),this.idx=1,Object.assign(this,g(e))}}class d extends i{constructor(e){super(e.definition),this.idx=1,Object.assign(this,g(e))}}class p extends i{constructor(e){super(e.definition),this.idx=1,Object.assign(this,g(e))}}class f extends i{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Object.assign(this,g(e))}}class h{constructor(e){this.idx=1,Object.assign(this,g(e))}accept(e){e.visit(this)}}function m(e){function t(e){return e.map(m)}if(e instanceof s){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return"string"==typeof e.label&&(t.label=e.label),t}if(e instanceof o)return{type:"Alternative",definition:t(e.definition)};if(e instanceof l)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof c)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:m(new h({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof p)return{type:"RepetitionWithSeparator",idx:e.idx,separator:m(new h({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof d)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof f)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof h){const t={type:"Terminal",name:e.terminalType.name,label:(n=e.terminalType,"string"==typeof(r=n).LABEL&&""!==r.LABEL?n.LABEL:n.name),idx:e.idx};"string"==typeof e.label&&(t.terminalLabel=e.label);const i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=i instanceof RegExp?i.source:i),t}if(e instanceof a)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match");var n,r}function g(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}class y{visit(e){const t=e;switch(t.constructor){case s:return this.visitNonTerminal(t);case o:return this.visitAlternative(t);case l:return this.visitOption(t);case c:return this.visitRepetitionMandatory(t);case u:return this.visitRepetitionMandatoryWithSeparator(t);case p:return this.visitRepetitionWithSeparator(t);case d:return this.visitRepetition(t);case f:return this.visitAlternation(t);case h:return this.visitTerminal(t);case a:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function T(e,t=[]){return!!(e instanceof l||e instanceof d||e instanceof p)||(e instanceof f?e.definition.some(e=>T(e,t)):!(e instanceof s&&t.includes(e))&&(e instanceof i&&(e instanceof s&&t.push(e),e.definition.every(e=>T(e,t)))))}function R(e){if(e instanceof s)return"SUBRULE";if(e instanceof l)return"OPTION";if(e instanceof f)return"OR";if(e instanceof c)return"AT_LEAST_ONE";if(e instanceof u)return"AT_LEAST_ONE_SEP";if(e instanceof p)return"MANY_SEP";if(e instanceof d)return"MANY";if(e instanceof h)return"CONSUME";throw Error("non exhaustive match")}class v{walk(e,t=[]){e.definition.forEach((n,r)=>{const i=e.definition.slice(r+1);if(n instanceof s)this.walkProdRef(n,i,t);else if(n instanceof h)this.walkTerminal(n,i,t);else if(n instanceof o)this.walkFlat(n,i,t);else if(n instanceof l)this.walkOption(n,i,t);else if(n instanceof c)this.walkAtLeastOne(n,i,t);else if(n instanceof u)this.walkAtLeastOneSep(n,i,t);else if(n instanceof p)this.walkManySep(n,i,t);else if(n instanceof d)this.walkMany(n,i,t);else{if(!(n instanceof f))throw Error("non exhaustive match");this.walkOr(n,i,t)}})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=$(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new l({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=$(e,t,n);this.walk(e,r)}walkOr(e,t,n){const r=t.concat(n);e.definition.forEach(e=>{const t=new o({definition:[e]});this.walk(t,r)})}}function $(e,t,n){return[new l({definition:[new h({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function E(e){if(e instanceof s)return E(e.referencedRule);if(e instanceof h)return[e.terminalType];if(function(e){return e instanceof o||e instanceof l||e instanceof d||e instanceof c||e instanceof u||e instanceof p||e instanceof h||e instanceof a}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,a=!0;for(;s&&a;)r=n[i],a=T(r),t=t.concat(E(r)),i+=1,s=n.length>i;return[...new Set(t)]}(e);if(function(e){return e instanceof f}(e))return function(e){const t=e.definition.map(e=>E(e));return[...new Set(t.flat())]}(e);throw Error("non exhaustive match")}const C="_~IN~_";class A extends v{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+C+this.topProd.name);var i,s;const a=t.concat(n),l=E(new o({definition:a}));this.follows[r]=l}}var S=n(9720);function k(e){console&&console.error&&console.error(`Error: ${e}`)}function b(e){console&&console.warn&&console.warn(`Warning: ${e}`)}let w={};const N=new S.H;function x(e){const t=e.toString();if(w.hasOwnProperty(t))return w[t];{const e=N.pattern(t);return w[t]=e,e}}const I="Complement Sets are not supported for first char optimization",O='Unable to use "first char" lexer optimizations:\n';function _(e,t=!1){try{const t=x(e);return P(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===I)t&&b(`${O}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),k(`${O}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function P(e,t,n){switch(e.type){case"Disjunction":for(let i=0;i{if("number"==typeof e)L(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)L(e,t,n);else{for(let e=r.from;e<=r.to&&e=te){const e=r.from>=te?r.from:te,n=r.to,i=re(e),s=re(n);for(let r=i;r<=s;r++)t[r]=r}}}});break;case"Group":P(s.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==s.quantifier&&0===s.quantifier.atLeast;if("Group"===s.type&&!1===M(s)||"Group"!==s.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return Object.values(t)}function L(e,t,n){const r=re(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=re(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=re(e.charCodeAt(0));t[n]=n}}}(e,t)}function D(e,t){return e.value.find(e=>{if("number"==typeof e)return t.includes(e);{const n=e;return void 0!==t.find(e=>n.from<=e&&e<=n.to)}})}function M(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(Array.isArray(e.value)?e.value.every(M):M(e.value))}class F extends S.z{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===D(e,this.targetCharCodes)&&(this.found=!0):void 0!==D(e,this.targetCharCodes)&&(this.found=!0)}}function j(e,t){if(t instanceof RegExp){const n=x(t),r=new F(e);return r.visit(n),r.found}for(const n of t){const t=n.charCodeAt(0);if(e.includes(t))return!0}return!1}const q="PATTERN",z="defaultMode",U="modes";function K(e,t){const n=(t=Object.assign({safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()},t)).tracer;let r;n("initCharCodeToOptimizedIndexMap",()=>{!function(){if(0===ne.length){ne=new Array(65536);for(let e=0;e<65536;e++)ne[e]=e>255?255+~~(e/255):e}}()}),n("Reject Lexer.NA",()=>{r=e.filter(e=>e[q]!==ye.NA)});let i,s,a,o,l,c,u,d,p,f,h,m=!1;n("Transform Patterns",()=>{m=!1,i=r.map(e=>{const t=e[q];if(t instanceof RegExp){const e=t.source;return 1!==e.length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"].includes(e[1])?V(t):e[1]:e}if("function"==typeof t)return m=!0,{exec:t};if("object"==typeof t)return m=!0,t;if("string"==typeof t){if(1===t.length)return t;{const e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&");return V(new RegExp(e))}}throw Error("non exhaustive match")})}),n("misc mapping",()=>{s=r.map(e=>e.tokenTypeIdx),a=r.map(e=>{const t=e.GROUP;if(t!==ye.SKIPPED){if("string"==typeof t)return t;if(void 0===t)return!1;throw Error("non exhaustive match")}}),o=r.map(e=>{const t=e.LONGER_ALT;if(t){return Array.isArray(t)?t.map(e=>r.indexOf(e)):[r.indexOf(t)]}}),l=r.map(e=>e.PUSH_MODE),c=r.map(e=>Object.hasOwn(e,"POP_MODE"))}),n("Line Terminator Handling",()=>{const e=J(t.lineTerminatorCharacters);u=r.map(e=>!1),"onlyOffset"!==t.positionTracking&&(u=r.map(t=>Object.hasOwn(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===Z(t,e)&&j(e,t.PATTERN)))}),n("Misc Mapping #2",()=>{d=r.map(Y),p=i.map(X),f=r.reduce((e,t)=>{const n=t.GROUP;return"string"==typeof n&&n!==ye.SKIPPED&&(e[n]=[]),e},{}),h=i.map((e,t)=>({pattern:i[t],longerAlt:o[t],canLineTerminator:u[t],isCustom:d[t],short:p[t],group:a[t],push:l[t],pop:c[t],tokenTypeIdx:s[t],tokenType:r[t]}))});let g=!0,y=[];return t.safeMode||n("First Char Optimization",()=>{y=r.reduce((e,n,r)=>{if("string"==typeof n.PATTERN){const t=re(n.PATTERN.charCodeAt(0));ee(e,t,h[r])}else if(Array.isArray(n.START_CHARS_HINT)){let t;n.START_CHARS_HINT.forEach(n=>{const i=re("string"==typeof n?n.charCodeAt(0):n);t!==i&&(t=i,ee(e,i,h[r]))})}else if(n.PATTERN instanceof RegExp)if(n.PATTERN.unicode)g=!1,t.ensureOptimizations&&k(`${O}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const i=_(n.PATTERN,t.ensureOptimizations);0===i.length&&(g=!1),i.forEach(t=>{ee(e,t,h[r])})}else t.ensureOptimizations&&k(`${O}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),g=!1;return e},[])}),{emptyGroups:f,patternIdxToConfig:h,charCodeToPatternIdxToConfig:y,hasCustom:m,canBeOptimized:g}}function G(e,t){let n=[];const r=function(e){const t=e.filter(e=>!Object.hasOwn(e,q)),n=t.map(e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:me.MISSING_PATTERN,tokenTypes:[e]})),r=e.filter(e=>!t.includes(e));return{errors:n,valid:r}}(e);n=n.concat(r.errors);const i=function(e){const t=e.filter(e=>{const t=e[q];return!(t instanceof RegExp||"function"==typeof t||Object.hasOwn(t,"exec")||"string"==typeof t)}),n=t.map(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:me.INVALID_PATTERN,tokenTypes:[e]})),r=e.filter(e=>!t.includes(e));return{errors:n,valid:r}}(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(function(e){let t=[];const n=e.filter(e=>e[q]instanceof RegExp);return t=t.concat(function(e){class t extends S.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=e.filter(e=>{const n=e.PATTERN;try{const e=x(n),r=new t;return r.visit(e),r.found}catch(r){return W.test(n.source)}}),r=n.map(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:me.EOI_ANCHOR_FOUND,tokenTypes:[e]}));return r}(n)),t=t.concat(function(e){class t extends S.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=e.filter(e=>{const n=e.PATTERN;try{const e=x(n),r=new t;return r.visit(e),r.found}catch(r){return B.test(n.source)}}),r=n.map(e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:me.SOI_ANCHOR_FOUND,tokenTypes:[e]}));return r}(n)),t=t.concat(function(e){const t=e.filter(e=>{const t=e[q];return t instanceof RegExp&&(t.multiline||t.global)}),n=t.map(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:me.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}));return n}(n)),t=t.concat(function(e){const t=[];let n=e.map(n=>e.reduce((e,r)=>(n.PATTERN.source!==r.PATTERN.source||t.includes(r)||r.PATTERN===ye.NA||(t.push(r),e.push(r)),e),[]));n=n.filter(Boolean);const r=n.filter(e=>e.length>1).map(e=>{const t=e.map(e=>e.name);return{message:`The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:me.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}});return r}(n)),t=t.concat(function(e){const t=e.filter(e=>e.PATTERN.test("")),n=t.map(e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:me.EMPTY_MATCH_PATTERN,tokenTypes:[e]}));return n}(n)),t}(s)),n=n.concat(function(e){const t=e.filter(e=>{if(!Object.hasOwn(e,"GROUP"))return!1;const t=e.GROUP;return t!==ye.SKIPPED&&t!==ye.NA&&!("string"==typeof t)}),n=t.map(e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:me.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}));return n}(s)),n=n.concat(function(e,t){const n=e.filter(e=>void 0!==e.PUSH_MODE&&!t.includes(e.PUSH_MODE)),r=n.map(e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:me.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}));return r}(s,t)),n=n.concat(function(e){const t=[],n=e.reduce((e,t,n)=>{const r=t.PATTERN;return r===ye.NA||("string"==typeof r?e.push({str:r,idx:n,tokenType:t}):r instanceof RegExp&&(i=r,void 0===[".","\\","[","]","|","^","$","(",")","?","*","+","{"].find(e=>-1!==i.source.indexOf(e)))&&e.push({str:r.source,idx:n,tokenType:t})),e;var i},[]);return e.forEach((e,r)=>{n.forEach(({str:n,idx:i,tokenType:s})=>{if(r${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:me.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}})}),t}(s)),n}const W=/[^\\][$]/;const B=/[^\\[][\^]|^\^/;function V(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function H(e,t,n){const r=[];let i=!1;const s=Object.values(e.modes||{}).flat().filter(Boolean).filter(e=>e[q]!==ye.NA),a=J(n);return t&&s.forEach(e=>{const t=Z(e,a);if(!1!==t){const n=function(e,t){if(t.issue===me.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===me.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else Object.hasOwn(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):j(a,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:me.NO_LINE_BREAKS_FLAGS}),r}function Y(e){const t=e.PATTERN;if(t instanceof RegExp)return!1;if("function"==typeof t)return!0;if(Object.hasOwn(t,"exec"))return!0;if("string"==typeof t)return!1;throw Error("non exhaustive match")}function X(e){return"string"==typeof e&&1===e.length&&e.charCodeAt(0)}const Q={test:function(e){const t=e.length;for(let n=this.lastIndex;n"string"==typeof e?e.charCodeAt(0):e)}function ee(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const te=256;let ne=[];function re(e){return ee.CATEGORIES).flat().filter(Boolean);const e=n.filter(e=>!t.includes(e));t=t.concat(e),0===e.length?r=!1:n=e}return t}(e);!function(e){e.forEach(e=>{var t;de(e)||(le[oe]=e,e.tokenTypeIdx=oe++),pe(e)&&!Array.isArray(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),pe(e)||(e.CATEGORIES=[]),t=e,Object.hasOwn(null!=t?t:{},"categoryMatches")||(e.categoryMatches=[]),function(e){return Object.hasOwn(null!=e?e:{},"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})})}(t),function(e){e.forEach(e=>{ue([],e)})}(t),function(e){e.forEach(e=>{e.categoryMatches=[],Object.keys(e.categoryMatchesMap).forEach(t=>{e.categoryMatches.push(le[t].tokenTypeIdx)})})}(t),t.forEach(e=>{e.isParent=e.categoryMatches.length>0})}function ue(e,t){e.forEach(e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(n=>{const r=e.concat(t);r.includes(n)||ue(r,n)})}function de(e){return Object.hasOwn(null!=e?e:{},"tokenTypeIdx")}function pe(e){return Object.hasOwn(null!=e?e:{},"CATEGORIES")}function fe(e){return Object.hasOwn(null!=e?e:{},"tokenTypeIdx")}const he={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i,s)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var me;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(me||(me={}));const ge={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:he,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(ge);class ye{constructor(e,t=ge){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=ie(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object.assign({},ge,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===ge.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Q;else if(this.config.lineTerminatorCharacters===ge.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:z}:(i=!1,n=Object.assign({},e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return Object.hasOwn(e,z)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+z+"> property in its definition\n",type:me.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,U)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:me.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,U)&&Object.hasOwn(e,z)&&!Object.hasOwn(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${z}: <${e.defaultMode}>which does not exist\n`,type:me.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,U)&&Object.keys(e.modes).forEach(n=>{const r=e.modes[n];r.forEach((e,i)=>{void 0===e?t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,type:me.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(e,"LONGER_ALT")&&(Array.isArray(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT]).forEach(i=>{void 0===i||r.includes(i)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${e.name}> outside of mode <${n}>\n`,type:me.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(H(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([e,t])=>{n.modes[e]=t.filter(e=>void 0!==e)});const s=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([e,n])=>{this.TRACE_INIT(`Mode: <${e}> processing`,()=>{if(this.modes.push(e),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(G(n,s))}),0===this.lexerDefinitionErrors.length){let r;ce(n),this.TRACE_INIT("analyzeTokenTypes",()=>{r=K(n,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[e]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[e]=r.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[e]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){const e=this.lexerDefinitionErrors.map(e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}this.lexerDefinitionWarning.forEach(e=>{b(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(i&&(this.handleModes=()=>{}),!1===this.trackStartLines&&(this.computeNewColumn=e=>e),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=()=>{}),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=Object.entries(this.canModeBeOptimized).reduce((e,[t,n])=>(!1===n&&e.push(t),e),[]);if(t.ensureOptimizations&&e.length>0)throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{w={}}),this.TRACE_INIT("toFastProperties",()=>{r(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){const e=this.lexerDefinitionErrors.map(e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,s,a,o,l,c,u,d,p,f,h,m,g;const y=e,T=y.length;let R=0,v=0;const $=this.hasCustom?0:Math.floor(e.length/10),E=new Array($),C=[];let A=this.trackStartLines?1:void 0,S=this.trackStartLines?1:void 0;const k=function(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(!Array.isArray(r))throw Error("non exhaustive match");t[n]=[]}),t}(this.emptyGroups),b=this.trackStartLines,w=this.config.lineTerminatorsPattern;let N=0,x=[],I=[];const O=[],_=[];Object.freeze(_);let P=!1;const L=e=>{if(1===O.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{O.pop();const e=O.at(-1);x=this.patternIdxToConfig[e],I=this.charCodeToPatternIdxToConfig[e],N=x.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;P=!(!I||!t)}};function D(e){O.push(e),I=this.charCodeToPatternIdxToConfig[e],x=this.patternIdxToConfig[e],N=x.length,N=x.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;P=!(!I||!t)}let M;D.call(this,t);const F=this.config.recoveryEnabled;for(;Ro.length){o=s,u=s.length,l=c,M=t;break}}}break}}if(-1!==u){if(d=M.group,void 0!==d&&(o=null!==o?o:e.substring(R,R+u),p=M.tokenTypeIdx,f=this.createTokenInstance(o,R,p,M.tokenType,A,S,u),this.handlePayload(f,l),!1===d?v=this.addToken(E,v,f):k[d].push(f)),!0===b&&!0===M.canLineTerminator){let t,n,r=0;w.lastIndex=0;do{o=null!==o?o:e.substring(R,R+u),t=w.test(o),!0===t&&(n=w.lastIndex-1,r++)}while(!0===t);0!==r?(A+=r,S=u-n,this.updateTokenEndLineColumnLocation(f,d,n,r,A,S,u)):S=this.computeNewColumn(S,u)}else S=this.computeNewColumn(S,u);R+=u,this.handleModes(M,L,D,f)}else{const t=R,n=A,i=S;let s=!1===F;for(;!1===s&&R`Expecting ${Re(e)?`--\x3e ${Te(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",a="\nbut found: '"+t[0].image+"'";if(r)return s+r+a;return s+`one of these possible Token sequences:\n${e.reduce((e,t)=>e.concat(t),[]).map(e=>`[${e.map(e=>Te(e)).join(", ")}]`).map((e,t)=>` ${t+1}. ${e}`).join("\n")}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+t[0].image+"'";if(n)return i+n+s;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map(e=>`[${e.map(e=>Te(e)).join(",")}]`).join(" ,")}>`+s}};Object.freeze(_e);const Pe={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},Le={buildDuplicateFoundError(e,t){const n=e.name,r=t[0],i=r.idx,a=R(r),o=(l=r)instanceof h?l.terminalType.name:l instanceof s?l.nonTerminalName:"";var l;let c=`->${a}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=e.prefixPath.map(e=>Te(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=0===e.alternation.idx?"":e.alternation.idx,n=0===e.prefixPath.length;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n`;if(n)r+="These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n";else{r+=`<${e.prefixPath.map(e=>Te(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`}return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=R(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${e.leftRecursionPath.map(e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof a?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class De extends y{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:sn.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class Me extends v{constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){0===this.ruleStack.length?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class Fe extends Me{constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const e=t.concat(n),r=new o({definition:e});this.possibleTokTypes=E(r),this.found=!0}}}class je extends v{constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class qe extends je{walkMany(e,t,n){if(e.idx===this.occurrence){const e=t.concat(n)[0];this.result.isEndOfRule=void 0===e,e instanceof h&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}}class ze extends je{walkManySep(e,t,n){if(e.idx===this.occurrence){const e=t.concat(n)[0];this.result.isEndOfRule=void 0===e,e instanceof h&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}}class Ue extends je{walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){const e=t.concat(n)[0];this.result.isEndOfRule=void 0===e,e instanceof h&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}}class Ke extends je{walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){const e=t.concat(n)[0];this.result.isEndOfRule=void 0===e,e instanceof h&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}}function Ge(e,t,n=[]){n=[...n];let r=[],i=0;function a(s){const a=Ge(s.concat(e.slice(i+1)),t,n);return r.concat(a)}for(;n.length{0!==e.definition.length&&(r=a(e.definition))}),r;if(!(t instanceof h))throw Error("non exhaustive match");n.push(t.terminalType)}}i++}return r.push({partialPath:n,suffixDef:e.slice(i)}),r}function We(e,t,n,r){const i=[...n];i.push(e.name);const s=[...r];return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var Be;function Ve(e){if(e instanceof l||"Option"===e)return Be.OPTION;if(e instanceof d||"Repetition"===e)return Be.REPETITION;if(e instanceof c||"RepetitionMandatory"===e)return Be.REPETITION_MANDATORY;if(e instanceof u||"RepetitionMandatoryWithSeparator"===e)return Be.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof p||"RepetitionWithSeparator"===e)return Be.REPETITION_WITH_SEPARATOR;if(e instanceof f||"Alternation"===e)return Be.ALTERNATION;throw Error("non exhaustive match")}function He(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=Ve(r);return s===Be.ALTERNATION?rt(t,n,i):it(t,n,s,i)}function Ye(e,t,n,r){const i=e.length,s=e.every(e=>e.every(e=>1===e.length));if(t)return function(t){const r=t.map(e=>e.GATE);for(let s=0;se.flat()).reduce((e,t,n)=>(t.forEach(t=>{t.tokenTypeIdx in e||(e[t.tokenTypeIdx]=n),t.categoryMatches.forEach(t=>{Object.hasOwn(e,t)||(e[t]=n)})}),e),{});return function(){const e=this.LA_FAST(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length),i=e.length;if(r&&!n){const t=e.flat();if(1===t.length&&0===t[0].categoryMatches.length){const e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}{const e=t.reduce((e,t,n)=>(e[t.tokenTypeIdx]=!0,t.categoryMatches.forEach(t=>{e[t]=!0}),e),[]);return function(){const t=this.LA_FAST(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;nGe([e],1)),r=Je(n.length),i=n.map(e=>{const t={};return e.forEach(e=>{et(e.partialPath).forEach(e=>{t[e]=!0})}),t});let s=n;for(let a=1;a<=t;a++){const e=s;s=Je(e.length);for(let n=0;n{et(e.partialPath).forEach(e=>{i[n][e]=!0})})}}}}return r}function rt(e,t,n,r){const i=new Ze(e,Be.ALTERNATION,r);return t.accept(i),nt(i.result,n)}function it(e,t,n,r){const i=new Ze(e,n);t.accept(i);const s=i.result,a=new Qe(t,e,n).startWalking();return nt([new o({definition:s}),new o({definition:a})],r)}function st(e,t){e:for(let n=0;ne.every(e=>e.every(e=>0===e.categoryMatches.length)))}function ot(e,t,n,r){const i=e.flatMap(e=>function(e,t){const n=new ut;e.accept(n);const r=n.allProductions,i=Object.groupBy(r,lt),s=Object.fromEntries(Object.entries(i).filter(([e,t])=>t.length>1)),a=Object.values(s).map(n=>{const r=n[0],i=t.buildDuplicateFoundError(e,n),s=R(r),a={message:i,type:sn.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},o=ct(r);return o&&(a.parameter=o),a});return a}(e,n)),s=function(e,t,n){const r=[],i=t.map(e=>e.name);return e.forEach(e=>{const t=e.name;if(i.includes(t)){const i=n.buildNamespaceConflictError(e);r.push({message:i,type:sn.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}(e,t,n),a=e.flatMap(e=>function(e,t){const n=new ft;e.accept(n);const r=n.alternations.flatMap(n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:sn.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]);return r}(e,n)),o=e.flatMap(t=>function(e,t,n,r){const i=[],s=t.reduce((t,n)=>n.name===e.name?t+1:t,0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:sn.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,r,n));return i.concat(s,a,o)}function lt(e){return`${R(e)}_#_${e.idx}_#_${ct(e)}`}function ct(e){return e instanceof h?e.terminalType.name:e instanceof s?e.nonTerminalName:""}class ut extends y{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function dt(e,t,n,r=[]){const i=[],s=pt(t.definition);if(0===s.length)return[];{const t=e.name;s.includes(e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:sn.LEFT_RECURSION,ruleName:t});const a=r.concat([e]),o=s.filter(e=>!a.includes(e)).flatMap(t=>{const i=[...r];return i.push(t),dt(e,t,n,i)});return i.concat(o)}}function pt(e){let t=[];if(0===e.length)return t;const n=e[0];if(n instanceof s)t.push(n.referencedRule);else if(n instanceof o||n instanceof l||n instanceof c||n instanceof u||n instanceof p||n instanceof d)t=t.concat(pt(n.definition));else if(n instanceof f)t=n.definition.map(e=>pt(e.definition)).flat();else if(!(n instanceof h))throw Error("non exhaustive match");const r=T(n),i=e.length>1;if(r&&i){const n=e.slice(1);return t.concat(pt(n))}return t}class ft extends y{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function ht(e,t){const n=new ft;e.accept(n);return n.alternations.flatMap(n=>n.definition.slice(0,-1).flatMap((r,i)=>0===function(e,t,n,r){const i="EXIT_NONE_TERMINAL",m=[i],g="EXIT_ALTERNATIVE";let y=!1;const T=t.length,R=T-r-1,v=[],$=[];for($.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});0!==$.length;){const e=$.pop();if(e===g){y&&$.at(-1).idx<=R&&$.pop();continue}const r=e.def,E=e.idx,C=e.ruleStack,A=e.occurrenceStack;if(0===r.length)continue;const S=r[0];if(S===i){const e={idx:E,def:r.slice(1),ruleStack:C.slice(0,-1),occurrenceStack:A.slice(0,-1)};$.push(e)}else if(S instanceof h)if(E=0;t--){const e={idx:E,def:S.definition[t].definition.concat(r.slice(1)),ruleStack:C,occurrenceStack:A};$.push(e),$.push(g)}else if(S instanceof o)$.push({idx:E,def:S.definition.concat(r.slice(1)),ruleStack:C,occurrenceStack:A});else{if(!(S instanceof a))throw Error("non exhaustive match");$.push(We(S,E,C,A))}}return v}([r],[],se,1).length?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:sn.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function mt(e,t,n){const r=new ft;e.accept(r);let i=r.alternations;i=i.filter(e=>!0!==e.ignoreAmbiguities);const s=i.flatMap(r=>{const i=r.idx,s=r.maxLookahead||t,a=rt(i,e,s,r),o=function(e,t,n,r){const i=[],s=e.reduce((n,r,s)=>(!0===t.definition[s].ignoreAmbiguities||r.forEach(r=>{const a=[s];e.forEach((e,n)=>{s!==n&&st(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)}),a.length>1&&!st(i,r)&&(i.push(r),n.push({alts:a,path:r}))}),n),[]),a=s.map(e=>{const i=e.alts.map(e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:sn.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}});return a}(a,r,e,n),l=function(e,t,n,r){const i=e.reduce((e,t,n)=>{const r=t.map(e=>({idx:n,path:e}));return e.concat(r)},[]),s=i.flatMap(e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,a=e.path;return i.filter(e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}));var n,r}).map(e=>{const i=[e.idx+1,s+1],a=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:sn.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:a,alternatives:i}})});return s}(a,r,e,n);return o.concat(l)});return s}class gt extends y{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function yt(e){const t=Object.assign({errMsgProvider:Pe},e),n={};return e.rules.forEach(e=>{n[e.name]=e}),function(e,t){const n=new De(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}const Tt="MismatchedTokenException",Rt="NoViableAltException",vt="EarlyExitException",$t="NotAllInputParsedException",Et=[Tt,Rt,vt,$t];function Ct(e){return Et.includes(e.name)}Object.freeze(Et);class At extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class St extends At{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Tt}}class kt extends At{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Rt}}class bt extends At{constructor(e,t){super(e,t),this.name=$t}}class wt extends At{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=vt}}const Nt={},xt="InRuleRecoveryException";class It extends Error{constructor(e){super(e),this.name=xt}}function Ot(e,t,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(void 0===l){const e=this.getCurrRuleFullName();l=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[o]=l}let c=l.token,u=l.occurrence;const d=l.isEndOfRule;0===this.RULE_STACK_IDX&&d&&void 0===c&&(c=xe,u=1),void 0!==c&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(c,u,a)&&this.tryInRepetitionRecovery(e,t,n,c)}const _t=1024,Pt=1280,Lt=1536;function Dt(e,t,n){return n|t|e}class Mt{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:nn.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if(0===t.length){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return e.flatMap(e=>dt(e,e,Le))}validateEmptyOrAlternatives(e){return e.flatMap(e=>ht(e,Le))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(e=>mt(e,t,Le))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const r=[];return e.forEach(e=>{const i=new gt;e.accept(i),i.allProductions.forEach(i=>{const s=Ve(i),a=i.maxLookahead||t;if(0===it(i.idx,e,s,a)[0].flat().length){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:sn.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}(e,t,Le)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const a=rt(e,t,n);return s(a,r,at(a)?ae:se,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Ye)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const a=it(e,t,i,n),o=at(a)?ae:se;return s(a[0],o,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Ve(e.prodType),Xe)}}const Ft=new class extends y{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function jt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset"function"==typeof e[t]==!1),r=n.map(t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Gt.MISSING_METHOD,methodName:t}));return r.filter(Boolean)}(e,t);return n}(this,t);if(0!==e.length){const t=e.map(e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}var Gt;!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Gt||(Gt={}));const Wt={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Wt);const Bt=!0,Vt=Math.pow(2,8)-1,Ht=Ne({name:"RECORDING_PHASE_TOKEN",pattern:ye.NA});ce([Ht]);const Yt=Ie(Ht,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Yt);const Xt={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function Qt(e,t,n,r=!1){en(n);const i=this.recordingProdStack.at(-1),s="function"==typeof t?t:t.DEF,a=new e({definition:[],idx:n});return r&&(a.separator=t.SEP),Object.hasOwn(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),Wt}function Zt(e,t){en(t);const n=this.recordingProdStack.at(-1),r=!1===Array.isArray(e),i=!1===r?e:e.DEF,s=new f({definition:[],idx:t,ignoreAmbiguities:r&&!0===e.IGNORE_AMBIGUITIES});Object.hasOwn(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);const a=i.some(e=>"function"==typeof e.GATE);return s.hasPredicates=a,n.definition.push(s),i.forEach(e=>{const t=new o({definition:[]});s.definition.push(t),Object.hasOwn(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object.hasOwn(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Wt}function Jt(e){return 0===e?"":`${e}`}function en(e){if(e<0||e>Vt){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${Vt+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const tn=Ie(xe,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(tn);const nn=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:_e,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),rn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var sn,an;function on(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(sn||(sn={}));class ln{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{r(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),this.definedRulesNames.forEach(e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=yt({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(0===n.length&&!1===this.skipValidations){const n=function(e){var t;const n=null!==(t=e.errMsgProvider)&&void 0!==t?t:Le;return ot(e.rules,e.tokenTypes,n,e.grammarName)}({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:Le,grammarName:t}),r=(e={lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:t}).lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(e=>Object.assign({type:sn.CUSTOM_LOOKAHEAD_VALIDATION},e));this.definitionErrors=this.definitionErrors.concat(n,r)}var e}),0===this.definitionErrors.length&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=function(e){const t={};return e.forEach(e=>{const n=new A(e).startWalking();Object.assign(t,n)}),t}(Object.values(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!ln.DEFER_DEFINITION_ERRORS_HANDLING&&0!==this.definitionErrors.length)throw e=this.definitionErrors.map(e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initGastRecorder(t),n.initPerformanceTracer(t),Object.hasOwn(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=Object.hasOwn(t,"skipValidations")?t.skipValidations:nn.skipValidations}}ln.DEFER_DEFINITION_ERRORS_HANDLING=!1,an=ln,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,"recoveryEnabled")?e.recoveryEnabled:nn.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ot)}getTokenToInsert(e){const t=Ie(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[];let o=!1;const l=this.LA_FAST(1);let c=this.LA_FAST(1);const u=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),n=new St(t,l,this.LA(0));n.resyncedTokens=a.slice(0,-1),this.SAVE_ERROR(n)};for(;!o;){if(this.tokenMatcher(c,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,a))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA_FAST(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getNextPossibleTokenTypes(e){const t=e.ruleStack[0],n=this.getGAstProductions()[t];return new Fe(n,e).startWalking()}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new It("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(0===t.length)return!1;const n=this.LA_FAST(1);return void 0!==t.find(e=>this.tokenMatcher(n,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA_FAST(1),n=2;for(;;){const r=e.find(e=>Oe(t,e));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(0===this.RULE_STACK_IDX)return Nt;const e=this.currRuleShortName,t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK,n=this.RULE_STACK_IDX+1,r=new Array(n);for(let i=0;ithis.getFollowSetFromFollowKey(e)).flat()}getFollowSetFromFollowKey(e){if(e===Nt)return[xe];const t=e.ruleName+e.idxInCallingRule+C+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,xe)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA_FAST(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,n,r,i,s,a){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){const e=this.RULE_STACK_IDX+1,t=new Array(e);for(let n=0;n{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:a}=function(e){Ft.reset(),e.accept(Ft);const t=Ft.dslMethods;return Ft.reset(),t}(e);t.forEach(t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${R(t)}${n}`,()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=Dt(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),n.forEach(t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,R(t))}),r.forEach(t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,R(t))}),i.forEach(t=>{this.computeLookaheadFunc(e,t.idx,_t,"RepetitionMandatory",t.maxLookahead,R(t))}),s.forEach(t=>{this.computeLookaheadFunc(e,t.idx,Lt,"RepetitionMandatoryWithSeparator",t.maxLookahead,R(t))}),a.forEach(t=>{this.computeLookaheadFunc(e,t.idx,Pt,"RepetitionWithSeparator",t.maxLookahead,R(t))})})})}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),a=Dt(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(a,s)})}getKeyForAutomaticLookahead(e,t){return Dt(this.currRuleShortName,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,"nodeLocationTracking")?e.nodeLocationTracking:nn.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=qt,this.setNodeLocationFromNode=qt,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=jt,this.setNodeLocationFromNode=jt,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{}}else this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{}}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(void 0===this.baseCstVisitorConstructor){const e=Kt(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(void 0===this.baseCstVisitorWithDefaultsConstructor){const e=function(e,t,n){const r=function(){};zt(r,e+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return t.forEach(e=>{i[e]=Ut}),(r.prototype=i).constructor=r,r}(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):tn}LA_FAST(e){const t=this.currIdx+e;return this.tokVector[t]}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?tn:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=ae,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Array.isArray(e)){if(0===e.length)throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Array.isArray(e))this.tokensMap=e.reduce((e,t)=>(e[t.name]=t,e),{});else if(Object.hasOwn(e,"modes")&&Object.values(e.modes).flat().every(fe)){const t=Object.values(e.modes).flat(),n=[...new Set(t)];this.tokensMap=n.reduce((e,t)=>(e[t.name]=t,e),{})}else{if("object"!=typeof e||null===e)throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object.assign({},e)}this.tokensMap.EOF=xe;const n=(Object.hasOwn(e,"modes")?Object.values(e.modes).flat():Object.values(e)).every(e=>{var t;return 0==(null===(t=e.categoryMatches)||void 0===t?void 0:t.length)});this.tokenMatcher=n?ae:se,ce(Object.values(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=Object.hasOwn(n,"resyncEnabled")?n.resyncEnabled:rn.resyncEnabled,i=Object.hasOwn(n,"recoveryValueFunc")?n.recoveryValueFunc:rn.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let a;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,a=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(a){return this.invokeRuleCatch(a,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(a){return this.invokeRuleCatch(a,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(function(...t){this.onBeforeParse(e);try{return a.apply(this,t)}finally{this.onAfterParse(e)}},{ruleName:e,originalGrammarAction:t,coreRule:a})}invokeRuleCatch(e,t,n){const r=0===this.RULE_STACK_IDX,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Ct(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(_t,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,Be.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,_t,e,Ue)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Lt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Be.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;!0===this.tokenMatcher(this.LA_FAST(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Ke],t,Lt,e,Ke)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,qe,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(Pt,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA_FAST(1),i);for(;!0===this.tokenMatcher(this.LA_FAST(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,ze],t,Pt,e,ze)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Lt,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=Array.isArray(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.coreRule.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){throw Ct(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA_FAST(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(i){r=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new St(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){throw r.name===xt?n:r}}}saveRecogState(){const e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);const t=e.RULE_STACK;for(let n=0;n=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=n,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),xe)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let t=0;t${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:sn.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){var n;const r=null!==(n=e.coreRule)&&void 0!==n?n:e;return function(){this.isBackTrackingStack.push(1);const e=this.saveRecogState();try{return r.apply(this,t),!0}catch(n){if(Ct(n))return!1;throw n}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Object.values(this.gastProductionsCache).map(m)}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=Object.hasOwn(e,"errorMessageProvider")?e.errorMessageProvider:nn.errorMessageProvider}SAVE_ERROR(e){if(Ct(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return[...this._errors]}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=it(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));const a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new wt(a,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=rt(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let o=1;o<=this.maxLookahead;o++)i.push(this.LA(o));const s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new kt(a,this.LA(1),s))}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return tn}topLevelRuleRecord(e,t){try{const n=new a({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(r){throw n}throw n}}optionInternalRecord(e,t){return Qt.call(this,l,e,t)}atLeastOneInternalRecord(e,t){Qt.call(this,c,t,e)}atLeastOneSepFirstInternalRecord(e,t){Qt.call(this,u,t,e,Bt)}manyInternalRecord(e,t){Qt.call(this,d,t,e)}manySepFirstInternalRecord(e,t){Qt.call(this,p,t,e,Bt)}orInternalRecord(e,t){return Zt.call(this,e,t)}subruleInternalRecord(e,t,n){if(en(t),!e||!Object.hasOwn(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=this.recordingProdStack.at(-1),i=e.ruleName,a=new s({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?Xt:Wt}consumeInternalRecord(e,t,n){if(en(t),!de(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=this.recordingProdStack.at(-1),i=new h({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),Yt}},class{initPerformanceTracer(e){if(Object.hasOwn(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=nn.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=ie(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}].forEach(e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(an.prototype,n,r):an.prototype[n]=e.prototype[n]})});class cn extends ln{constructor(e,t=nn){const n=Object.assign({},t);n.outputCst=!1,super(e,n)}}},1831:(e,t,n)=>{n.d(t,{t:()=>Rn,u:()=>vn});var r=n(6511),i=n(3088),s=n(4012),a=n(3053);var o=n(7087),l=n(5623),c=n(8511);function u(e,t,n){return`${e.name}_${t}_${n}`}class d{constructor(e){this.target=e}isEpsilon(){return!1}}class p extends d{constructor(e,t){super(e),this.tokenType=t}}class f extends d{constructor(e){super(e)}isEpsilon(){return!0}}class h extends d{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function m(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;rg(e,t,n)),s=$(e,t,r,n,...i);return s}(e,t,n):n instanceof o.c$?function(e,t,n){const r=S(e,t,n,{type:1});v(e,r);const i=$(e,t,r,n,y(e,t,n));return function(e,t,n,r){const i=r.left,s=r.right;return A(i,s),e.decisionMap[u(t,"Option",n.idx)]=i,r}(e,t,n,i)}(e,t,n):n instanceof o.Y2?function(e,t,n){const r=S(e,t,n,{type:5});v(e,r);const i=$(e,t,r,n,y(e,t,n));return R(e,t,n,i)}(e,t,n):n instanceof o.Pp?function(e,t,n){const r=S(e,t,n,{type:5});v(e,r);const i=$(e,t,r,n,y(e,t,n)),s=E(e,t,n.separator,n);return R(e,t,n,i,s)}(e,t,n):n instanceof o.$P?function(e,t,n){const r=S(e,t,n,{type:4});v(e,r);const i=$(e,t,r,n,y(e,t,n));return T(e,t,n,i)}(e,t,n):n instanceof o.Cy?function(e,t,n){const r=S(e,t,n,{type:4});v(e,r);const i=$(e,t,r,n,y(e,t,n)),s=E(e,t,n.separator,n);return T(e,t,n,i,s)}(e,t,n):y(e,t,n)}function y(e,t,n){const r=(0,c.A)((0,l.A)(n.definition,n=>g(e,t,n)),e=>void 0!==e);return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function x(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}var I=n(6277),O=n(2877);const _=function(e,t){return(0,O.A)((0,l.A)(e,t),1)};var P=n(8529),L=n(7399);const D=function(e,t){return e&&e.length?(0,L.A)(e,(0,P.A)(t,2)):[]};var M=n(15),F=n(6327),j=n(7684),q=n(7074);function z(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class U{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=m(e.rules),this.dfas=function(e){const t=e.decisionStates.length,n=Array(t);for(let r=0;r(0,l.A)(e,e=>e[0]));if(W(p,!1)&&!i){const e=(0,q.A)(p,(e,t,n)=>((0,F.A)(t,t=>{t&&(e[t.tokenTypeIdx]=n,(0,F.A)(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){var n;const r=this.LA_FAST(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA_FAST(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new U,n=void 0===e?0:e.length;for(let i=0;i(0,l.A)(e,e=>e[0]));if(W(p)&&p[0][0]&&!i){const e=p[0],t=(0,M.A)(e);if(1===t.length&&(0,j.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===e}}{const e=(0,q.A)(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,F.A)(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA_FAST(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=B.call(this,s,d,K,a);return"object"!=typeof e&&0===e}}}function W(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function B(e,t,n,r){const i=e[t](n);let s=i.start;if(void 0===s){s=te(i,J(ne(i.atnStartState))),i.start=s}return V.apply(this,[i,s,n,r])}function V(e,t,n,r){let i=t,s=1;const a=[];let o=this.LA_FAST(s++);for(;;){let t=Q(i,o);if(void 0===t&&(t=H.apply(this,[e,i,o,s,n,r])),t===w)return X(a,i,o);if(!0===t.isAcceptState)return t.prediction;i=t,a.push(o),o=this.LA(s++)}}function H(e,t,n,r,i,s){const a=function(e,t,n){const r=new N,i=[];for(const a of e.elements){if(!1===n.is(a.alt))continue;if(7===a.state.type){i.push(a);continue}const e=a.state.transitions.length;for(let n=0;n0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const a of i)s.add(a);return s}(t.configs,n,i);if(0===a.size)return ee(e,t,n,w),w;let o=J(a);const l=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(a,i);if(void 0!==l)o.isAcceptState=!0,o.prediction=l,o.configs.uniqueAlt=l;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=x(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(a)){const t=(0,I.A)(a.alts);o.isAcceptState=!0,o.prediction=t,o.configs.uniqueAlt=t,Y.apply(this,[e,r,a.alts,s])}return o=ee(e,t,n,o),o}function Y(e,t,n,r){const i=[];for(let a=1;a<=t;a++)i.push(this.LA(a).tokenType);const s=e.atnStartState;r(function(e){const t=(0,l.A)(e.prefixPath,e=>(0,o.Sk)(e)).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof o.wL)return"SUBRULE";if(e instanceof o.c$)return"OPTION";if(e instanceof o.ak)return"OR";if(e instanceof o.$P)return"AT_LEAST_ONE";if(e instanceof o.Cy)return"AT_LEAST_ONE_SEP";if(e instanceof o.Pp)return"MANY_SEP";if(e instanceof o.Y2)return"MANY";if(e instanceof o.BK)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function X(e,t,n){const r=_(t.configs.elements,e=>e.state.transitions);return{actualToken:n,possibleTokenTypes:D(r.filter(e=>e instanceof p).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Q(e,t){return e.edges[t.tokenTypeIdx]}function Z(e,t){if(e instanceof p&&(0,o.G)(t,e.tokenType))return e.target}function J(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function ee(e,t,n,r){return r=te(e,r),t.edges[n.tokenTypeIdx]=r,r}function te(e,t){if(t===w)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function ne(e){const t=new N,n=e.transitions.length;for(let r=0;r0){const n=[...e.stack];re({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i=0&&t.content.splice(n,1)}}addHiddenNodes(e){const t=[];for(const s of e){const e=new ce(s.startOffset,s.image.length,(0,r.wf)(s),s.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,i=!1;if(n.content.length>0)n.content.push(...t);else{for(;n.container;){const e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infixName||(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===n?.content.length&&this.removeNode(n)}}class le{get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}}class ce extends le{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}}class ue extends le{constructor(){super(...arguments),this.content=new de(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class de extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,de.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class pe extends ue{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const fe=Symbol("Datatype");function he(e){return e.$type===fe}const me=e=>e.endsWith("\u200b")?e:e+"\u200b";class ge{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,n="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Ce(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new Ee(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class ye extends ge{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new oe,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=this.computeRuleType(e);let r;(0,a.NT)(e)&&(r=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(me(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),(0,a.s7)(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const t=e.name,n=new Map;for(let r=0;r0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,n){return r=>{const i=!this.isRecording()&&void 0!==e;if(i){const n={$type:e};this.stack.push(n),e===fe?n.value="":void 0!==t&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const n=e.startOffset;for(let r=0;rn)return t.splice(0,r)}return t.splice(0,t.length)}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:s}=this.getAssignment(n),o=this.current;if(i){const e=(0,a.wb)(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,s)}else if(he(o)){let e=r.image;(0,a.wb)(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let s,a;this.isRecording()||n||(s=this.nodeBuilder.buildCompositeNode(r));try{a=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(void 0!==a||n||(a=this.construct()),void 0!==a&&s&&s.length>0&&this.performSubruleAssignment(a,r,s))}}performSubruleAssignment(e,t,n){const{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(he(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode);this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);const r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):he(e)?this.converter.convert(e.value,e.$cstNode):((0,se.OP)(this.astReflection,e),e)}constructInfix(e,t){const n=e.parts;if(!Array.isArray(n)||0===n.length)return;const r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,s=-1;for(let h=0;hs?(s=n.precedence,i=h):n.precedence===s&&(n.rightAssoc||(i=h))}const a=r.slice(0,i),o=r.slice(i+1),l=n.slice(0,i+1),c=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:a},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},p=this.constructInfix(u,t),f=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:r[i],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=(0,se.XG)(e,a.wh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&(0,a._c)(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let a;switch(a="single"===i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):"multi"===i&&"string"==typeof n?this.linker.buildMultiReference(s,t,r,n):n,e){case"=":s[t]=a;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(a)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const t=e[r];void 0===t?e[r]=i:Array.isArray(t)&&Array.isArray(i)&&(i.push(...t),e[r]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class Te{buildMismatchTokenMessage(e){return o.my.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return o.my.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return o.my.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return o.my.buildEarlyExitMessage(e)}}class Re extends Te{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class ve extends ge{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(me(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const $e={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Re};class Ee extends o.jr{constructor(e,t){super(e,{...$e,lookaheadStrategy:t&&"maxLookahead"in t?new o.T6({maxLookahead:t.maxLookahead}):new G({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}}class Ce extends Ee{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}}var Ae=n(3394),Se=n(8361);function ke(e,t,n){return function(e,t){const n=(0,i.YV)(t,!1),r=(0,Se.Td)(t.rules).filter(a.s7).filter(e=>n.has(e));for(const i of r){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,we(t,i.definition))}const s=(0,Se.Td)(t.rules).filter(a.NT).filter(e=>n.has(e));for(const i of s)e.parser.rule(i,be(e,i))}({parser:t,tokens:n,ruleNames:new Map},e),t}function be(e,t){const n=t.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if((0,a.rE)(n))throw new Error("Cannot use terminal rule in infix expression");const r=t.operators.precedences.flatMap(e=>e.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,o);const l={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},c={...s,$container:o};o.elements.push(l,c);const u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,l)}));let d;return t=>{d??(d=_e(e,n)),e.parser.subrule(0,d,!1,s,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,c,t)}})}}function we(e,t,n=!1){let r;if((0,a.wb)(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if((0,a.ve)(t))r=function(e,t){const n=(0,i.Uz)(t);return()=>e.parser.action(n,t)}(e,t);else if((0,a.wh)(t))r=we(e,t.terminal);else if((0,a._c)(t))r=Ie(e,t);else if((0,a.$g)(t))r=function(e,t){const n=t.rule.ref;if((0,a.cM)(n)){const r=e.subrule++,i=(0,a.s7)(n)&&n.fragment,s=t.arguments.length>0?function(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:Ne(e.value)}));return t=>{const n={};for(const{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{const n=t.map(e=>Ne(e.value));return t=>{const r={};for(let i=0;i({});let o;return a=>{o??(o=_e(e,n)),e.parser.subrule(r,o,i,t,s(a))}}if((0,a.rE)(n)){const r=e.consume++,i=Pe(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new Ae.WB(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);(0,Ae.dr)(n)}(e,t);else if((0,a.jp)(t))r=function(e,t){if(1===t.elements.length)return we(e,t.elements[0]);{const n=[];for(const i of t.elements){const t={ALT:we(e,i,!0)},r=xe(i);r&&(t.GATE=Ne(r)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}(e,t);else if((0,a.cY)(t))r=function(e,t){if(1===t.elements.length)return we(e,t.elements[0]);const n=[];for(const o of t.elements){const t={ALT:we(e,o,!0)},r=xe(o);r&&(t.GATE=Ne(r)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=t=>e.parser.alternatives(r,n.map((n,s)=>{const a={ALT:()=>!0},o=e.parser;a.ALT=()=>{if(n.ALT(t),!o.isRecording()){const e=i(r,o);o.unorderedGroups.get(e)||o.unorderedGroups.set(e,[]);const t=o.unorderedGroups.get(e);void 0===t?.[s]&&(t[s]=!0)}};const l=n.GATE;return a.GATE=l?()=>l(t):()=>{const e=o.unorderedGroups.get(i(r,o));return!e?.[s]},a})),a=Oe(e,xe(t),s,"*");return t=>{a(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if((0,a.IZ)(t))r=function(e,t){const n=t.elements.map(t=>we(e,t));return e=>n.forEach(t=>t(e))}(e,t);else{if(!(0,a.FO)(t))throw new Ae.WB(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,o.LT,t)}}return Oe(e,n?void 0:xe(t),r,t.cardinality)}function Ne(e){if((0,a.RP)(e)){const t=Ne(e.left),n=Ne(e.right);return e=>t(e)||n(e)}if((0,a.Tu)(e)){const t=Ne(e.left),n=Ne(e.right);return e=>t(e)&&n(e)}if((0,a.Ct)(e)){const t=Ne(e.value);return e=>!t(e)}if((0,a.TF)(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if((0,a.Cz)(e)){const t=Boolean(e.true);return()=>t}(0,Ae.dr)(e)}function xe(e){if((0,a.IZ)(e))return e.guardCondition}function Ie(e,t,n=t.terminal){if(n){if((0,a.$g)(n)&&(0,a.s7)(n.rule.ref)){const r=n.rule.ref,i=e.subrule++;let s;return n=>{s??(s=_e(e,r)),e.parser.subrule(i,s,!1,t,n)}}if((0,a.$g)(n)&&(0,a.rE)(n.rule.ref)){const r=e.consume++,i=Pe(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if((0,a.wb)(n)){const r=e.consume++,i=Pe(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=(0,i.U5)(t.type.ref),r=n?.terminal;if(!r)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(t.type.ref));return Ie(e,t,r)}}function Oe(e,t,n,r){const i=t&&Ne(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,o.mT)(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:(0,o.mT)(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}(0,Ae.dr)(r)}function _e(e,t){const n=function(e,t){if((0,a.cM)(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!(0,a.s7)(r);){if((0,a.IZ)(r)||(0,a.jp)(r)||(0,a.cY)(r)){i=r.elements.indexOf(n).toString()+":"+i}n=r,r=r.$container}return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function Pe(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function Le(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer,r=new ye(e);return ke(t,r,n.definition)}(e);return t.finalize(),t}var De=n(7788),Me=n(9071),Fe=n(9505),je=n(5393);let qe=0,ze=10;const Ue=Symbol("OperationCancelled");function Ke(e){return e===Ue}async function Ge(e){if(e===Fe.CancellationToken.None)return;const t=performance.now();if(t-qe>=ze&&(qe=t,await new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}),qe=performance.now()),e.isCancellationRequested)throw Ue}class We{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}}class Be{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e)if(Be.isIncremental(n)){const e=Qe(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let a=this._lineOffsets;const o=Ye(n.text,!1,t);if(s-i===o.length)for(let n=0,c=o.length;ne?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&Xe(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var Ve;function He(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);He(r,t),He(i,t);let s=0,a=0,o=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Ze(e){const t=Qe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Be(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Be)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=He(t.map(Ze),(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let i=0;const s=[];for(const a of r){const t=e.offsetAt(a.range.start);if(ti&&s.push(n.substring(i,t)),a.newText.length&&s.push(a.newText),i=e.offsetAt(a.range.end)}return s.push(n.substr(i)),s.join("")}}(Ve||(Ve={}));var Je,et,tt=n(6550);!function(e){e.basename=tt.A.basename,e.dirname=tt.A.dirname,e.extname=tt.A.extname,e.joinPath=tt.A.joinPath,e.resolvePath=tt.A.resolvePath;const t="object"==typeof process&&"win32"===process?.platform;e.equals=function(e,t){return e?.toString()===t?.toString()},e.relative=function(e,n){const r="string"==typeof e?tt.r.parse(e).path:e.path,i="string"==typeof n?tt.r.parse(n).path:n.path,s=r.split("/").filter(e=>e.length>0),a=i.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),s[0]!==a[0])return i.substring(1)}let o=0;for(;o({name:e.name,uri:Je.joinPath(tt.r.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(Je.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const n=e.split("/");"/"===e.charAt(e.length-1)&&n.pop();let r=this.root;for(const i of n){let e=r.children.get(i);if(!e){if(!t)return;e={name:i,children:new Map,parent:r},r.children.set(i,e)}r=e}return r}collectValues(e){const t=[];e.element&&t.push(e.element);for(const n of e.children.values())t.push(...this.collectValues(n));return t}}!function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"}(et||(et={}));class rt{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Fe.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t=t??tt.r.parse(e.uri),Fe.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Fe.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if("string"==typeof t){const r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{const r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if("string"==typeof t){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:et.Parsed,references:[],textDocument:n};else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:et.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){const n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=et.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r;return()=>r??(r=Ve.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??""))}}class it{constructor(e){this.documentTrie=new nt,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return(0,Se.Td)(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,et.Changed),n}deleteDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=et.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){const t=e.toString(),n=this.documentTrie.findAll(t);for(const r of n)r.state=et.Changed;return this.documentTrie.delete(t),n}}const st=Symbol("RefResolving");class at{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Fe.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,se.jm)(e.parseResult.value))await Ge(t),(0,se.DM)(r).forEach(t=>{const i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(const n of(0,se.jm)(e.parseResult.value))await Ge(t),(0,se.DM)(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const n=e.reference;if("_ref"in n&&void 0===n._ref){n._ref=st;try{const t=this.getCandidate(e);if((0,je.Zl)(t))n._ref=t;else{n._nodeDescription=t;const r=this.loadAstNode(t);n._ref=r??this.createLinkingError(e,t)}}catch(r){console.error(`An error occurred while resolving reference to '${n.$refText}':`,r);const t=r.message??String(r);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`}}t.references.push(n)}else if("_items"in n&&void 0===n._items){n._items=st;try{const t=this.getCandidates(e),r=[];if((0,je.Zl)(t))n._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(r){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`},n._items=[]}t.references.push(n)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_ref:void 0,get ref(){if((0,je.ng)(this._ref))return this._ref;if((0,je.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=st;const n=(0,se.cQ)(e).$document,r=i.getLinkedNode({reference:s,container:e,property:t});if(r.error&&n&&n.state0?void 0:this._linkingError=i.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if((0,je.Zl)(t))return{error:t};const n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const n=(0,se.cQ)(e.container).$document;n&&n.state(0,a._c)(e)&&e.isMulti)}findDeclarations(e){if(e){const t=(0,i.Rp)(e),n=e.astNode;if(t&&n){const r=n[t.feature];if((0,je.A_)(r)||(0,je.Dm)(r))return(0,se.tC)(r);if(Array.isArray(r))for(const t of r)if(((0,je.A_)(t)||(0,je.Dm)(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return(0,se.tC)(t)}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||(0,r.pO)(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n)for(const r of(0,se.DM)(n))if((0,je.Dm)(r.reference)&&r.reference.items.some(t=>t.ref===e))return r.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),n=[];for(const r of t){const e=this.nameProvider.getNameNode(r)??r.$cstNode;e&&n.push(e)}return n}findReferences(e,t){const n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>Je.equals(e.sourceUri,t.documentUri))),n.push(...r),(0,Se.Td)(n)}getSelfReferences(e){const t=this.getSelfNodes(e),n=[];for(const i of t){const e=this.nameProvider.getNameNode(i);if(e){const t=(0,se.YE)(i),s=this.nodeLocator.getAstNodePath(i);n.push({sourceUri:t.uri,sourcePath:s,targetUri:t.uri,targetPath:s,segment:(0,r.SX)(e),local:!0})}}return n}}class ct{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return Se.iD.sum((0,Se.Td)(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?(0,Se.Td)(t):Se.B5}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,Se.Td)(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return(0,Se.Td)(this.map.keys())}values(){return(0,Se.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,Se.Td)(this.map.entries())}}class ut{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class dt{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Fe.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=se.VN,r=Fe.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const s of n(e))await Ge(r),this.addExportedSymbol(s,i,t);return i}addExportedSymbol(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Fe.CancellationToken.None){const n=e.parseResult.value,r=new ct;for(const i of(0,se.Uo)(n))await Ge(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class pt{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return n||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}}class ft{constructor(e,t,n){this.elements=new ct,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(const r of e){const e=this.caseInsensitive?r.name.toLowerCase():r.name;this.elements.add(e,r)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];return n||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||0===n.length)&&this.outerScope?(0,Se.Td)(n).concat(this.outerScope.getElements(e)):(0,Se.Td)(n)}getAllElements(){let e=(0,Se.Td)(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class ht{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class mt extends ht{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class gt extends ht{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class yt extends mt{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class Tt{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new yt(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=(0,se.YE)(e.container).localSymbols;if(r){let i=e.container;do{r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--)i=this.createScope(t[s],i);return i}createScope(e,t,n){return new pt((0,Se.Td)(e),t,n)}createScopeForNodes(e,t,n){const r=(0,Se.Td)(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new pt(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new ft(this.indexManager.allElements(e)))}}function Rt(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class vt{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),s=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=(0,se.YE)(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:s,uriConverter:a}){if(!this.ignoreProperties.has(e)){if((0,je.A_)(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const t=(0,se.YE)(e);let n="";this.currentDocument&&this.currentDocument!==t&&(n=a?a(t.uri,e):t.uri.toString());return{$ref:`${n}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:t.error?.message??"Could not resolve reference",$refText:r}}if((0,je.Dm)(t)){const e=n?t.$refText:void 0,r=[];for(const n of t.items){const e=n.ref,t=(0,se.YE)(n.ref);let i="";this.currentDocument&&this.currentDocument!==t&&(i=a?a(t.uri,e):t.uri.toString());const s=this.astNodeLocator.getAstNodePath(e);r.push(`${i}#${s}`)}return{$refs:r,$refText:e}}if((0,je.ng)(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!n?.$textRegion||(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??(n={...t}),n.$sourceText=t.$cstNode?.text),s){n??(n={...t});const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(r=>{const s=(0,i.Bd)(e.$cstNode,r).map(t);0!==s.length&&(n[r]=s)}),e}}linkNode(e,t,n,r,i,s){for(const[o,l]of Object.entries(e))if(Array.isArray(l))for(let r=0;r{await this.handleException(()=>e.call(t,n,r,i),"An error occurred during validation",r,n)}}async handleException(e,t,n,r){try{await e()}catch(i){if(Ke(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);n("error",`${t}: ${i instanceof Error?i.message:String(i)}`,{node:r})}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=(0,Se.Td)(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,n){return async(r,i,s,a)=>{await this.handleException(()=>e.call(n,r,i,s,a),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const St=Object.freeze({validateNode:!0,validateChildren:!0});class kt{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Fe.CancellationToken.None){const r=e.parseResult,i=[];if(await Ge(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===xt.LexingError))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===xt.ParsingError))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===xt.LinkingError))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Ke(s))throw s;console.error("An error occurred during validation:",s)}return await Ge(n),i}processLexingErrors(e,t,n){const r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const i of r){const e=i.severity??"error",n={severity:wt(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:Nt(e),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,n){for(const i of e.parserErrors){let e;if(isNaN(i.token.startOffset)){if("previousToken"in i){const t=i.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=(0,r.wf)(i.token);if(e){const n={severity:wt("error"),range:e,message:i.message,data:Et(xt.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.info.container,range:r.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:xt.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=Fe.CancellationToken.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Fe.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const s of i)await Ge(r),await s(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Fe.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const s=(0,se.jm)(e).iterator();for(const e of s){i.startSubTask(e.$type);const a=this.validateSingleNodeOptions(e,t);if(a.validateNode)try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}a.validateChildren||s.prune()}}finally{i.stop()}}else{const i=(0,se.jm)(e).iterator();for(const e of i){await Ge(r);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}s.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return St}async validateAstAfter(e,t,n,r=Fe.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const s of i)await Ge(r),await s(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:bt(n),severity:wt(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function bt(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=(0,i.qO)(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=(0,i.SS)(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function wt(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function Nt(e){switch(e){case"error":return Et(xt.LexingError);case"warning":return Et(xt.LexingWarning);case"info":return Et(xt.LexingInfo);case"hint":return Et(xt.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var xt;!function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(xt||(xt={}));class It{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){const i=n??(0,se.YE)(e);t??(t=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${s} has no name.`);let a;const o=()=>a??(a=(0,r.SX)(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:t,get nameSegment(){return o()},selectionSegment:(0,r.SX)(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class Ot{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Fe.CancellationToken.None){const n=[],r=e.parseResult.value;for(const i of(0,se.jm)(r))await Ge(t),(0,se.DM)(i).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let n=[];(0,je.A_)(t)&&t.$nodeDescription?n=[t.$nodeDescription]:(0,je.Dm)(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const i=(0,se.YE)(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),a=[],o=(0,r.SX)(t.$refNode);for(const r of n)a.push({sourceUri:i,sourcePath:s,targetUri:r.documentUri,targetPath:r.path,segment:o,local:Je.equals(r.documentUri,i)});return a}}class _t{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return s?.[i]}return e[t]},e)}}var Pt=n(1523);class Lt{constructor(e){this._ready=new We,this.onConfigurationSectionUpdateEmitter=new Pt.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var Dt,Mt=n(5758);!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(Dt||(Dt={}));class Ft{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new ct,this.documentPhaseListeners=new ct,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=et.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Fe.CancellationToken.None){for(const r of e){const e=r.uri.toString();if(r.state===et.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(r,et.IndexedReferences);else if("object"==typeof t.validation){const n=this.findMissingValidationCategories(r,t);n.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(e)?.result}),r.state=et.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=et.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Fe.CancellationToken.None){this.currentState=et.Changed;const r=[];for(const o of t){const e=this.langiumDocuments.deleteDocuments(o);for(const t of e)r.push(t.uri),this.cleanUpDeleted(t)}const i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const o of i){let e=this.langiumDocuments.getDocument(o);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},o),e.state=et.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,et.Changed)}const s=(0,Se.Td)(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>this.resetToState(e,et.ComputedScopes)),await this.emitUpdate(i,r),await Ge(n);const a=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state=1}findMissingValidationCategories(e,t){const n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set,s=void 0===t||!0===t.validation?r:"object"==typeof t.validation?t.validation.categories??r:[];return(0,Se.Td)(s).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t=0&&!this.hasTextDocument(e[n]);)n--;tvoid 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Dt.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case et.Changed:case et.Parsed:this.indexManager.removeContent(e.uri);case et.IndexedContent:e.localSymbols=void 0;case et.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case et.Linked:this.indexManager.removeReferences(e.uri);case et.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case et.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=et.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,et.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,et.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,et.ComputedScopes,n,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,n)});const r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,et.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,et.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));const i=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(i,et.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(const s of e)s.statee.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),Dt.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Dt.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&"path"in t?r=t:n=t,n??(n=Fe.CancellationToken.None),r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){const r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Ue):this.currentState>=e&&e>r.state?Promise.reject(new Mt.ResponseError(Mt.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${et[r.state]}, requiring ${et[e]}, but workspace state is already ${et[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{const s=this.onDocumentPhase(e,e=>{Je.equals(e.uri,t)&&(s.dispose(),a.dispose(),r(e.uri))}),a=n.onCancellationRequested(()=>{s.dispose(),a.dispose(),i(Ue)})}):Promise.reject(new Mt.ResponseError(Mt.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Ue):new Promise((n,r)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),n()}),s=t.onCancellationRequested(()=>{i.dispose(),s.dispose(),r(Ue)})})}async notifyDocumentPhase(e,t,n){const r=this.documentPhaseListeners.get(t).slice();for(const s of r)try{await Ge(n),await s(e,n)}catch(i){if(!Ke(i))throw i}}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t).slice();for(const i of r)await Ge(n),await i(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i="object"==typeof r.validation?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);const s=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const a=this.buildState.get(e.uri.toString());a&&(a.result??(a.result={}),a.result.validationChecks?a.result.validationChecks=(0,Se.Td)(a.result.validationChecks).concat(i.categories).distinct().toArray():a.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class jt{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new gt,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=(0,se.YE)(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Je.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),(0,Se.Td)(r)}allElements(e,t){let n=(0,Se.Td)(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Fe.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Fe.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some(e=>!e.local&&t.has(e.targetUri.toString()))}}class qt{constructor(e){this.initialBuildOptions={},this._ready=new We,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Fe.CancellationToken.None){const n=await this.performStartup(e);await Ge(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);const r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));const i=(0,Se.Td)(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const n=await this.langiumDocuments.getOrCreateDocument(e);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return tt.r.parse(e.uri)}async traverseFolder(e,t){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=Je.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}class zt{buildUnexpectedCharactersMessage(e,t,n,r,i){return o.PW.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return o.PW.buildUnableToPopLexerModeMessage(e)}}const Ut={mode:"full"};class Kt{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Wt(t)?Object.values(t):t,r="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new o.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=Ut){const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Wt(e))return e;const t=Gt(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}}function Gt(e){return e&&"modes"in e&&"defaultMode"in e}function Wt(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!Gt(e)}function Bt(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=ae.Position.create(0,0));const s=function(e){const t=[];let n=e.position.line,r=e.position.character;for(let i=0;i=o.length){if(t.length>0){const e=ae.Position.create(n,r);t.push({type:"break",content:"",range:ae.Range.create(e,e)})}}else{Ht.lastIndex=l;const e=Ht.exec(o);if(e){const i=e[0],s=e[1],a=ae.Position.create(n,r+l),c=ae.Position.create(n,r+l+i.length);t.push({type:"tag",content:s,range:ae.Range.create(a,c)}),l+=i.length,l=Jt(o,l)}if(l0&&"break"===t[t.length-1].type)return t.slice(0,-1);return t}({lines:Vt(e),position:i,options:on(r)});return function(e){const t=ae.Position.create(e.position.line,e.position.character);if(0===e.tokens.length)return new cn([],ae.Range.create(t,t));const n=[];for(;e.index0&&i.push({type:"text",content:t.substring(s,e),range:ae.Range.create(ae.Position.create(n,s+r),ae.Position.create(n,e+r))});let l=a.length+1;const c=o[1];if(i.push({type:"inline-tag",content:c,range:ae.Range.create(ae.Position.create(n,s+l+r),ae.Position.create(n,s+l+c.length+r))}),l+=c.length,4===o.length){l+=o[2].length;const e=o[3];i.push({type:"text",content:e,range:ae.Range.create(ae.Position.create(n,s+l+r),ae.Position.create(n,s+l+e.length+r))})}else i.push({type:"text",content:"",range:ae.Range.create(ae.Position.create(n,s+l+r),ae.Position.create(n,s+l+r))});s=e+o[0].length}const a=t.substring(s);a.length>0&&i.push({type:"text",content:a,range:ae.Range.create(ae.Position.create(n,s+r),ae.Position.create(n,s+r+a.length))})}return i}const Qt=/\S/,Zt=/\s*$/;function Jt(e,t){const n=e.substring(t).match(Qt);return n?t+n.index:e.length}function en(e){const t=e.match(Zt);if(t&&"number"==typeof t.index)return t.index}function tn(e,t){const n=e.tokens[e.index];return"tag"===n.type?sn(e,!1):"text"===n.type||"inline-tag"===n.type?nn(e):(function(e,t){if(t){const n=new pn("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function nn(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(rn(e)),r=t,t=e.tokens[e.index];return new dn(i,ae.Range.create(n.range.start,r.range.end))}function rn(e){return"inline-tag"===e.tokens[e.index].type?sn(e,!0):an(e)}function sn(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===i?.type){if(t){const i=an(e);return new un(r,new dn([i],i.range),t,ae.Range.create(n.range.start,i.range.end))}{const i=nn(e);return new un(r,i,t,ae.Range.create(n.range.start,i.range.end))}}{const e=n.range;return new un(r,new dn([],e),t,e)}}function an(e){const t=e.tokens[e.index++];return new pn(t.content,t.range)}function on(e){if(!e)return on({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:ln(t,!0),end:ln(n,!1),line:ln(r,!0)}}function ln(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?(0,s.Nt)(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class cn{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=fn(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=fn(t)+r}return t.trim()}}class un{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){if("linkplain"===e||"linkcode"===e||"link"===e){const r=t.indexOf(" ");let i=t;if(r>0){const e=Jt(t,r);i=t.substring(e),t=t.substring(0,r)}("linkcode"===e||"link"===e&&"code"===n.link)&&(i=`\`${i}\``);const s=n.renderLink?.(t,i)??function(e,t){try{return tt.r.parse(e,!0),`[${t}](${e})`}catch{return e}}(t,i);return s}return}(this.name,t,e??{});if("string"==typeof n)return n}let n="";"italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class dn{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class pn{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function fn(e){return e.endsWith("\n")?"\n":"\n\n"}class hn{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e,t){const n=on(t),r=Vt(e);if(0===r.length)return!1;const i=r[0],s=r[r.length-1],a=n.start,o=n.end;return Boolean(a?.exec(i))&&Boolean(o?.exec(s))}(t)){return Bt(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}}documentationLinkRenderer(e,t,n){const r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){const e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const n=(0,se.YE)(e).localSymbols;if(!n)return;let r=e;do{const e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}class mn{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return function(e){return"string"==typeof e.$comment}(e)?e.$comment:(0,r.v)(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class gn{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}}class yn{constructor(){this.previousTokenSource=new Fe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=(qe=performance.now(),new Fe.CancellationTokenSource);return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=Fe.CancellationToken.None){const r=new We,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(r){Ke(r)?t.resolve(void 0):t.reject(r)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class Tn{constructor(e){this.grammarElementIdMap=new ut,this.tokenTypeIdMap=new ut,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,n=new Map;for(const r of(0,se.jm)(e))t.set(r,{});if(e.$cstNode)for(const i of(0,r.NS)(e.$cstNode))n.set(i,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const n of i)(0,je.ng)(n)?e.push(this.dehydrateAstNode(n,t)):(0,je.A_)(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else(0,je.ng)(i)?n[r]=this.dehydrateAstNode(i,t):(0,je.A_)(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return(0,je.br)(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),(0,je.mD)(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):(0,je.FC)(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const r of(0,se.jm)(e))t.set(r,{});let i;if(e.$cstNode)for(const s of(0,r.NS)(e.$cstNode)){let e;"fullText"in s?(e=new pe(s.fullText),i=e):"content"in s?e=new ue:"tokenType"in s&&(e=this.hydrateCstLeafNode(s)),e&&(n.set(s,e),e.root=i)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const s of i)(0,je.ng)(s)?e.push(this.setParent(this.hydrateAstNode(s,t),n)):(0,je.A_)(s)?e.push(this.hydrateReference(s,n,r,t)):e.push(s)}else(0,je.ng)(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):(0,je.A_)(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),(0,je.mD)(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,a=e.endLine,o=e.endColumn,l=e.hidden;return new ce(n,r,{start:{line:i,character:s},end:{line:a,character:o}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of(0,se.jm)(this.grammar))(0,a.r1)(t)&&this.grammarElementIdMap.set(t,e++)}}function Rn(e){return{documentation:{CommentProvider:e=>new mn(e),DocumentationProvider:e=>new hn(e)},parser:{AsyncParser:e=>new gn(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const r of n.rules)(0,a.rE)(r)&&(0,i.eb)(r)&&(0,s.lU)((0,i.S)(r))&&t.push(r.name);return{multilineCommentRules:t,nameRegexp:r.El}}(e),LangiumParser:e=>Le(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new ve(e);return ke(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new Me.d,TokenBuilder:()=>new De.Q,Lexer:e=>new Kt(e),ParserErrorMessageProvider:()=>new Re,LexerErrorMessageProvider:()=>new zt},workspace:{AstNodeLocator:()=>new _t,AstNodeDescriptionProvider:e=>new It(e),ReferenceDescriptionProvider:e=>new Ot(e)},references:{Linker:e=>new at(e),NameProvider:()=>new ot,ScopeProvider:e=>new Tt(e),ScopeComputation:e=>new dt(e),References:e=>new lt(e)},serializer:{Hydrator:e=>new Tn(e),JsonSerializer:e=>new vt(e)},validation:{DocumentValidator:e=>new kt(e),ValidationRegistry:e=>new At(e)},shared:()=>e.shared}}function vn(e){return{ServiceRegistry:e=>new $t(e),workspace:{LangiumDocuments:e=>new it(e),LangiumDocumentFactory:e=>new rt(e),DocumentBuilder:e=>new Ft(e),IndexManager:e=>new jt(e),WorkspaceManager:e=>new qt(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new yn,ConfigurationProvider:e=>new Lt(e)},profilers:{}}}},9110:(e,t,n)=>{var r;function i(e,t,n,r,i,s,o,l,u){return a([e,t,n,r,i,s,o,l,u].reduce(c,{}))}n.d(t,{WQ:()=>i}),function(e){e.merge=(e,t)=>c(c({},e),t)}(r||(r={}));const s=Symbol("isProxy");function a(e,t){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===s||l(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(l(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const o=Symbol();function l(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===o)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const s=n[t];e[t]=o;try{e[t]="function"==typeof s?s(r):a(s,r)}catch(i){throw e[t]=i instanceof Error?i:void 0,i}return e[t]}}function c(e,t){if(t)for(const[n,r]of Object.entries(t))if(null!=r)if("object"==typeof r){const t=e[n];e[n]=c("object"==typeof t&&null!==t?t:{},r)}else e[n]=r;return e}},3053:(e,t,n)=>{n.d(t,{$g:()=>be,Bg:()=>C,Ct:()=>ue,Cz:()=>$,D8:()=>Ne,FO:()=>O,Fy:()=>_e,GL:()=>le,IZ:()=>K,Mz:()=>rt,NT:()=>V,O4:()=>je,QX:()=>ot,RP:()=>x,S2:()=>ee,SP:()=>W,TF:()=>ge,Tu:()=>k,Xj:()=>We,_c:()=>w,cM:()=>o,cY:()=>tt,fG:()=>Se,jp:()=>f,lF:()=>Ke,r1:()=>s,rE:()=>ze,s7:()=>Te,vd:()=>Ce,ve:()=>d,wb:()=>ne,wh:()=>R,z2:()=>at});var r=n(5393);const i={$type:"AbstractElement",cardinality:"cardinality"};function s(e){return lt.isInstance(e,i.$type)}const a={$type:"AbstractParserRule"};function o(e){return lt.isInstance(e,a.$type)}const l="AbstractRule";const c="AbstractType";const u={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function d(e){return lt.isInstance(e,u.$type)}const p={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function f(e){return lt.isInstance(e,p.$type)}const h="ArrayLiteral",m="elements";const g="ArrayType",y="elementType";const T={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function R(e){return lt.isInstance(e,T.$type)}const v={$type:"BooleanLiteral",true:"true"};function $(e){return lt.isInstance(e,v.$type)}const E={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function C(e){return lt.isInstance(e,E.$type)}const A="Condition";const S={$type:"Conjunction",left:"left",right:"right"};function k(e){return lt.isInstance(e,S.$type)}const b={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function w(e){return lt.isInstance(e,b.$type)}const N={$type:"Disjunction",left:"left",right:"right"};function x(e){return lt.isInstance(e,N.$type)}const I={$type:"EndOfFile",cardinality:"cardinality"};function O(e){return lt.isInstance(e,I.$type)}const _="Grammar",P="imports",L="interfaces",D="isDeclared",M="name",F="rules",j="types";const q="GrammarImport",z="path";const U={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function K(e){return lt.isInstance(e,U.$type)}const G={$type:"InferredType",name:"name"};function W(e){return lt.isInstance(e,G.$type)}const B={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function V(e){return lt.isInstance(e,B.$type)}const H="InfixRuleOperatorList",Y="associativity",X="operators";const Q="InfixRuleOperators",Z="precedences";const J={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function ee(e){return lt.isInstance(e,J.$type)}const te={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function ne(e){return lt.isInstance(e,te.$type)}const re="NamedArgument",ie="calledByName",se="parameter",ae="value";const oe={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function le(e){return lt.isInstance(e,oe.$type)}const ce={$type:"Negation",value:"value"};function ue(e){return lt.isInstance(e,ce.$type)}const de="NumberLiteral",pe="value";const fe="Parameter",he="name";const me={$type:"ParameterReference",parameter:"parameter"};function ge(e){return lt.isInstance(e,me.$type)}const ye={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Te(e){return lt.isInstance(e,ye.$type)}const Re="ReferenceType",ve="isMulti",$e="referenceType";const Ee={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function Ce(e){return lt.isInstance(e,Ee.$type)}const Ae={$type:"ReturnType",name:"name"};function Se(e){return lt.isInstance(e,Ae.$type)}const ke={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function be(e){return lt.isInstance(e,ke.$type)}const we={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Ne(e){return lt.isInstance(e,we.$type)}const xe="StringLiteral",Ie="value";const Oe={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function _e(e){return lt.isInstance(e,Oe.$type)}const Pe="TerminalElement",Le="cardinality",De="lookahead",Me="parenthesized";const Fe={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function je(e){return lt.isInstance(e,Fe.$type)}const qe={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function ze(e){return lt.isInstance(e,qe.$type)}const Ue={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function Ke(e){return lt.isInstance(e,Ue.$type)}const Ge={$type:"Type",name:"name",type:"type"};function We(e){return lt.isInstance(e,Ge.$type)}const Be="TypeAttribute",Ve="defaultValue",He="isOptional",Ye="name",Xe="type";const Qe="TypeDefinition";const Ze="UnionType",Je="types";const et={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function tt(e){return lt.isInstance(e,et.$type)}const nt={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function rt(e){return lt.isInstance(e,nt.$type)}const it="ValueLiteral";const st={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function at(e){return lt.isInstance(e,st.$type)}class ot extends r.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i.$type,properties:{cardinality:{name:i.cardinality}},superTypes:[]},AbstractParserRule:{name:a.$type,properties:{},superTypes:[l,c]},AbstractRule:{name:l,properties:{},superTypes:[]},AbstractType:{name:c,properties:{},superTypes:[]},Action:{name:u.$type,properties:{cardinality:{name:u.cardinality},feature:{name:u.feature},inferredType:{name:u.inferredType},operator:{name:u.operator},type:{name:u.type,referenceType:c}},superTypes:[i.$type]},Alternatives:{name:p.$type,properties:{cardinality:{name:p.cardinality},elements:{name:p.elements,defaultValue:[]}},superTypes:[i.$type]},ArrayLiteral:{name:h,properties:{elements:{name:m,defaultValue:[]}},superTypes:[it]},ArrayType:{name:g,properties:{elementType:{name:y}},superTypes:[Qe]},Assignment:{name:T.$type,properties:{cardinality:{name:T.cardinality},feature:{name:T.feature},operator:{name:T.operator},predicate:{name:T.predicate},terminal:{name:T.terminal}},superTypes:[i.$type]},BooleanLiteral:{name:v.$type,properties:{true:{name:v.true,defaultValue:!1}},superTypes:[A,it]},CharacterRange:{name:E.$type,properties:{cardinality:{name:E.cardinality},left:{name:E.left},lookahead:{name:E.lookahead},parenthesized:{name:E.parenthesized,defaultValue:!1},right:{name:E.right}},superTypes:[Pe]},Condition:{name:A,properties:{},superTypes:[]},Conjunction:{name:S.$type,properties:{left:{name:S.left},right:{name:S.right}},superTypes:[A]},CrossReference:{name:b.$type,properties:{cardinality:{name:b.cardinality},deprecatedSyntax:{name:b.deprecatedSyntax,defaultValue:!1},isMulti:{name:b.isMulti,defaultValue:!1},terminal:{name:b.terminal},type:{name:b.type,referenceType:c}},superTypes:[i.$type]},Disjunction:{name:N.$type,properties:{left:{name:N.left},right:{name:N.right}},superTypes:[A]},EndOfFile:{name:I.$type,properties:{cardinality:{name:I.cardinality}},superTypes:[i.$type]},Grammar:{name:_,properties:{imports:{name:P,defaultValue:[]},interfaces:{name:L,defaultValue:[]},isDeclared:{name:D,defaultValue:!1},name:{name:M},rules:{name:F,defaultValue:[]},types:{name:j,defaultValue:[]}},superTypes:[]},GrammarImport:{name:q,properties:{path:{name:z}},superTypes:[]},Group:{name:U.$type,properties:{cardinality:{name:U.cardinality},elements:{name:U.elements,defaultValue:[]},guardCondition:{name:U.guardCondition},predicate:{name:U.predicate}},superTypes:[i.$type]},InferredType:{name:G.$type,properties:{name:{name:G.name}},superTypes:[c]},InfixRule:{name:B.$type,properties:{call:{name:B.call},dataType:{name:B.dataType},inferredType:{name:B.inferredType},name:{name:B.name},operators:{name:B.operators},parameters:{name:B.parameters,defaultValue:[]},returnType:{name:B.returnType,referenceType:c}},superTypes:[a.$type]},InfixRuleOperatorList:{name:H,properties:{associativity:{name:Y},operators:{name:X,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Q,properties:{precedences:{name:Z,defaultValue:[]}},superTypes:[]},Interface:{name:J.$type,properties:{attributes:{name:J.attributes,defaultValue:[]},name:{name:J.name},superTypes:{name:J.superTypes,defaultValue:[],referenceType:c}},superTypes:[c]},Keyword:{name:te.$type,properties:{cardinality:{name:te.cardinality},predicate:{name:te.predicate},value:{name:te.value}},superTypes:[i.$type]},NamedArgument:{name:re,properties:{calledByName:{name:ie,defaultValue:!1},parameter:{name:se,referenceType:fe},value:{name:ae}},superTypes:[]},NegatedToken:{name:oe.$type,properties:{cardinality:{name:oe.cardinality},lookahead:{name:oe.lookahead},parenthesized:{name:oe.parenthesized,defaultValue:!1},terminal:{name:oe.terminal}},superTypes:[Pe]},Negation:{name:ce.$type,properties:{value:{name:ce.value}},superTypes:[A]},NumberLiteral:{name:de,properties:{value:{name:pe}},superTypes:[it]},Parameter:{name:fe,properties:{name:{name:he}},superTypes:[]},ParameterReference:{name:me.$type,properties:{parameter:{name:me.parameter,referenceType:fe}},superTypes:[A]},ParserRule:{name:ye.$type,properties:{dataType:{name:ye.dataType},definition:{name:ye.definition},entry:{name:ye.entry,defaultValue:!1},fragment:{name:ye.fragment,defaultValue:!1},inferredType:{name:ye.inferredType},name:{name:ye.name},parameters:{name:ye.parameters,defaultValue:[]},returnType:{name:ye.returnType,referenceType:c}},superTypes:[a.$type]},ReferenceType:{name:Re,properties:{isMulti:{name:ve,defaultValue:!1},referenceType:{name:$e}},superTypes:[Qe]},RegexToken:{name:Ee.$type,properties:{cardinality:{name:Ee.cardinality},lookahead:{name:Ee.lookahead},parenthesized:{name:Ee.parenthesized,defaultValue:!1},regex:{name:Ee.regex}},superTypes:[Pe]},ReturnType:{name:Ae.$type,properties:{name:{name:Ae.name}},superTypes:[]},RuleCall:{name:ke.$type,properties:{arguments:{name:ke.arguments,defaultValue:[]},cardinality:{name:ke.cardinality},predicate:{name:ke.predicate},rule:{name:ke.rule,referenceType:l}},superTypes:[i.$type]},SimpleType:{name:we.$type,properties:{primitiveType:{name:we.primitiveType},stringType:{name:we.stringType},typeRef:{name:we.typeRef,referenceType:c}},superTypes:[Qe]},StringLiteral:{name:xe,properties:{value:{name:Ie}},superTypes:[it]},TerminalAlternatives:{name:Oe.$type,properties:{cardinality:{name:Oe.cardinality},elements:{name:Oe.elements,defaultValue:[]},lookahead:{name:Oe.lookahead},parenthesized:{name:Oe.parenthesized,defaultValue:!1}},superTypes:[Pe]},TerminalElement:{name:Pe,properties:{cardinality:{name:Le},lookahead:{name:De},parenthesized:{name:Me,defaultValue:!1}},superTypes:[i.$type]},TerminalGroup:{name:Fe.$type,properties:{cardinality:{name:Fe.cardinality},elements:{name:Fe.elements,defaultValue:[]},lookahead:{name:Fe.lookahead},parenthesized:{name:Fe.parenthesized,defaultValue:!1}},superTypes:[Pe]},TerminalRule:{name:qe.$type,properties:{definition:{name:qe.definition},fragment:{name:qe.fragment,defaultValue:!1},hidden:{name:qe.hidden,defaultValue:!1},name:{name:qe.name},type:{name:qe.type}},superTypes:[l]},TerminalRuleCall:{name:Ue.$type,properties:{cardinality:{name:Ue.cardinality},lookahead:{name:Ue.lookahead},parenthesized:{name:Ue.parenthesized,defaultValue:!1},rule:{name:Ue.rule,referenceType:qe.$type}},superTypes:[Pe]},Type:{name:Ge.$type,properties:{name:{name:Ge.name},type:{name:Ge.type}},superTypes:[c]},TypeAttribute:{name:Be,properties:{defaultValue:{name:Ve},isOptional:{name:He,defaultValue:!1},name:{name:Ye},type:{name:Xe}},superTypes:[]},TypeDefinition:{name:Qe,properties:{},superTypes:[]},UnionType:{name:Ze,properties:{types:{name:Je,defaultValue:[]}},superTypes:[Qe]},UnorderedGroup:{name:et.$type,properties:{cardinality:{name:et.cardinality},elements:{name:et.elements,defaultValue:[]}},superTypes:[i.$type]},UntilToken:{name:nt.$type,properties:{cardinality:{name:nt.cardinality},lookahead:{name:nt.lookahead},parenthesized:{name:nt.parenthesized,defaultValue:!1},terminal:{name:nt.terminal}},superTypes:[Pe]},ValueLiteral:{name:it,properties:{},superTypes:[]},Wildcard:{name:st.$type,properties:{cardinality:{name:st.cardinality},lookahead:{name:st.lookahead},parenthesized:{name:st.parenthesized,defaultValue:!1}},superTypes:[Pe]}}}}const lt=new ot},7788:(e,t,n)=>{n.d(t,{Q:()=>c});var r=n(7087),i=n(3053),s=n(6017),a=n(3088),o=n(4012),l=n(8361);class c{constructor(){this.diagnostics=[]}buildTokens(e,t){const n=(0,l.Td)((0,a.YV)(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(i.rE).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=(0,a.S)(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:n};return"function"==typeof n&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=(0,o.Yv)(t)?r.JG.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>{t.lastIndex=n;return t.exec(e)}}buildKeywordTokens(e,t,n){return e.filter(i.cM).flatMap(e=>(0,s.Uo)(e).filter(i.wb)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(n?.caseInsensitive)))}buildKeywordToken(e,t,n){const r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof r&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp((0,o.Nt)(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{const r=n?.PATTERN;return r?.source&&(0,o.PC)("^"+r.source+"$",e.value)&&t.push(n),t},[])}}},9071:(e,t,n)=>{n.d(t,{d:()=>a});var r,i=n(3053),s=n(3088);class a{convert(e,t){let n=t.grammarSource;if((0,i._c)(n)&&(n=(0,s.g4)(n)),(0,i.$g)(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case"INT":return r.convertInt(t);case"STRING":return r.convertString(t);case"ID":return r.convertID(t)}switch((0,s.P3)(e)?.toLowerCase()){case"number":return r.convertNumber(t);case"boolean":return r.convertBoolean(t);case"bigint":return r.convertBigint(t);case"date":return r.convertDate(t);default:return t}}}!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;r{function r(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function i(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"ref"in e}function s(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText&&"items"in e}function a(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function o(e){return"object"==typeof e&&null!==e&&"object"==typeof e.info&&"string"==typeof e.message}n.d(t,{A_:()=>i,Dm:()=>s,FC:()=>u,Nr:()=>a,Zl:()=>o,br:()=>d,kD:()=>l,mD:()=>c,ng:()=>r});class l{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=t.properties[e.property]?.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.types[e],i=!!r&&r.superTypes.some(e=>this.isSubtype(e,t));return n[t]=i,i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function c(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function u(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function d(e){return c(e)&&"string"==typeof e.fullText}},6017:(e,t,n)=>{n.d(t,{DM:()=>m,OP:()=>g,SD:()=>a,Uo:()=>p,VN:()=>d,XG:()=>o,YE:()=>l,cQ:()=>c,jm:()=>f,tC:()=>u});var r=n(5393),i=n(8361),s=n(6511);function a(e,t={}){for(const[n,i]of Object.entries(e))n.startsWith("$")||(Array.isArray(i)?i.forEach((i,s)=>{(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,i.$containerIndex=s,t.deep&&a(i,t))}):(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,t.deep&&a(i,t)))}function o(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function l(e){const t=c(e).$document;if(!t)throw new Error("AST node has no document.");return t}function c(e){for(;e.$container;)e=e.$container;return e}function u(e){return(0,r.A_)(e)?e.ref?[e.ref]:[]:(0,r.Dm)(e)?e.items.map(e=>e.ref):[]}function d(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=t?.range;return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexd(e,t))}function f(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!h(e,t.range)?new i.Vj(e,()=>[]):new i.Vj(e,e=>d(e,t),{includeRoot:!0})}function h(e,t){if(!t)return!0;const n=e.$cstNode?.range;return!!n&&(0,s.r4)(n,t)}function m(e){return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{n.d(t,{El:()=>d,NS:()=>a,SX:()=>c,pO:()=>o,r4:()=>u,v:()=>p,wf:()=>l});var r,i=n(5393),s=n(8361);function a(e){return new s.Vj(e,e=>(0,i.mD)(e)?e.content:[],{includeRoot:!0})}function o(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function l(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function c(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function u(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return r.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.liner.After}!function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"}(r||(r={}));const d=/^[\w\p{L}]$/u;function p(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}return}(e,!0);if(n&&f(n,t))return n;if((0,i.br)(e)){for(let n=e.content.findIndex(e=>!e.hidden)-1;n>=0;n--){const r=e.content[n];if(f(r,t))return r}}}}function f(e,t){return(0,i.FC)(e)&&t.includes(e.tokenType.name)}},3394:(e,t,n)=>{n.d(t,{WB:()=>r,dr:()=>i});class r extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function i(e,t="Error: Got unexpected value."){throw new Error(t)}},3088:(e,t,n)=>{n.d(t,{Bd:()=>f,P3:()=>S,Rp:()=>T,S:()=>k,SS:()=>g,U5:()=>R,Uz:()=>A,Xq:()=>$,YV:()=>c,eb:()=>p,g4:()=>d,qO:()=>h});var r=n(3394),i=n(3053),s=n(5393),a=n(6017),o=n(6511),l=n(4012);function c(e,t){const n=new Set,r=function(e){return e.rules.find(e=>i.s7(e)&&e.entry)}(e);if(!r)return new Set(e.rules);const s=[r].concat(function(e){return e.rules.filter(e=>i.rE(e)&&e.hidden)}(e));for(const i of s)u(i,n,t);const a=new Set;for(const o of e.rules)(n.has(o.name)||i.rE(o)&&o.hidden)&&a.add(o);return a}function u(e,t,n){t.add(e.name),(0,a.Uo)(e).forEach(e=>{if(i.$g(e)||n&&i.lF(e)){const r=e.rule.ref;r&&!t.has(r.name)&&u(r,t,n)}})}function d(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=R(e.type.ref);return t?.terminal}}function p(e){return e.hidden&&!(0,l.Yv)(k(e))}function f(e,t){return e&&t?m(e,t,e.astNode,!0):[]}function h(e,t,n){if(!e||!t)return;const r=m(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function m(e,t,n,r){if(!r){const n=(0,a.XG)(e.grammarSource,i.wh);if(n&&n.feature===t)return[e]}return(0,s.mD)(e)&&e.astNode===n?e.content.flatMap(e=>m(e,t,n,!1)):[]}function g(e,t,n){if(!e)return;const r=y(e,t,e?.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function y(e,t,n){if(e.astNode!==n)return[];if(i.wb(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=(0,o.NS)(e).iterator();let s;const a=[];do{if(s=r.next(),!s.done){const e=s.value;e.astNode===n?i.wb(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}}while(!s.done);return a}function T(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=(0,a.XG)(e.grammarSource,i.wh);if(t)return t;e=e.container}}function R(e){let t=e;return i.SP(t)&&(i.ve(t.$container)?t=t.$container.$container:i.cM(t.$container)?t=t.$container:(0,r.dr)(t.$container)),v(e,t,new Map)}function v(e,t,n){function r(t,r){let s;return(0,a.XG)(t,i.wh)||(s=v(r,r,n)),n.set(e,s),s}if(n.has(e))return n.get(e);n.set(e,void 0);for(const s of(0,a.Uo)(t)){if(i.wh(s)&&"name"===s.feature.toLowerCase())return n.set(e,s),s;if(i.$g(s)&&i.s7(s.rule.ref))return r(s,s.rule.ref);if(i.D8(s)&&s.typeRef?.ref)return r(s,s.typeRef.ref)}}function $(e){return E(e,new Set)}function E(e,t){if(t.has(e))return!0;t.add(e);for(const n of(0,a.Uo)(e))if(i.$g(n)){if(!n.rule.ref)return!1;if(i.s7(n.rule.ref)&&!E(n.rule.ref,t))return!1;if(i.NT(n.rule.ref))return!1}else{if(i.wh(n))return!1;if(i.ve(n))return!1}return Boolean(e.definition)}function C(e){if(!i.rE(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function A(e){if(i.cM(e))return i.s7(e)&&$(e)?e.name:C(e)??e.name;if(i.S2(e)||i.Xj(e)||i.fG(e))return e.name;if(i.ve(e)){const t=function(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return A(e.type.ref);return}(e);if(t)return t}else if(i.SP(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function S(e){return i.rE(e)?e.type?.name??"string":C(e)??e.name}function k(e){const t={s:!1,i:!1,u:!1},n=w(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(n,r)}const b=/[\s\S]/.source;function w(e,t){if(i.Fy(e))return x((a=e).elements.map(e=>w(e)).join("|"),{cardinality:a.cardinality,lookahead:a.lookahead,parenthesized:a.parenthesized,wrap:!1});if(i.O4(e))return x((s=e).elements.map(e=>w(e)).join(""),{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized,wrap:!1});if(i.Bg(e))return function(e){if(e.right)return x(`[${N(e.left)}-${N(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});return x(N(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}(e);if(i.lF(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return x(w(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(i.GL(e))return x(`(?!${w((r=e).terminal)})${b}*?`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.Mz(e))return x(`${b}*?${w((n=e).terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized});if(i.vd(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),x(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(i.z2(e))return x(b,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`);var n,r,s,a}function N(e){return(0,l.Nt)(e.value)}function x(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}},4012:(e,t,n)=>{n.d(t,{Nt:()=>d,PC:()=>p,TH:()=>i,Yv:()=>u,lU:()=>l});var r=n(9720);const i=/\r?\n/gm,s=new r.H;class a extends r.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=d(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}}const o=new a;function l(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),o.reset(e),o.visit(s.pattern(e)),o.multiline}catch{return!1}}const c="\f\n\r\t\v \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff".split("");function u(e){const t="string"==typeof e?new RegExp(e):e;return c.some(e=>t.test(e))}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;function i(){let e,s="";function a(e){s+=n.substr(r,e),r+=e}function o(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:o(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=r,e=e.exec(n)||[],o(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":a(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=r,e=e.exec(n),e?a(e[0].length):o(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":e=r,r+=3,i(),s+=n.substr(e,r-e);break;case"<":switch(n[r+3]){case"=":case"!":e=r,r+=4,i(),s+=n.substr(e,r-e);break;default:a(n.indexOf(">",r)-r+1),s+=i()+"|$)"}}else a(1),s+=i()+"|$)";break;case")":return++r,s;default:o(1)}return s}return new RegExp(i(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}},8361:(e,t,n)=>{n.d(t,{B5:()=>a,Rf:()=>o,Td:()=>l,Vj:()=>c,fq:()=>r,iD:()=>u});class r{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(e){return new r(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return o})}join(e=","){const t=this.iterator();let n,r="",s=!1;do{n=t.next(),n.done||(s&&(r+=e),r+=i(n.value)),s=!0}while(!n.done);return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new r(this.startFn,t=>{const{done:n,value:r}=this.nextFn(t);return n?o:{done:!1,value:e(r)}})}filter(e){return new r(this.startFn,t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return o})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new r(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!s(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return o})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new r(()=>({this:t.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!s(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return o})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new r(()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?o:this.nextFn(t.state)))}distinct(e){return new r(()=>({set:new Set,internalState:this.startFn()}),t=>{let n;do{if(n=this.nextFn(t.internalState),!n.done){const r=e?e(n.value):n.value;if(!t.set.has(r))return t.set.add(r),n}}while(!n.done);return o})}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter(e=>{const r=t?t(e):e;return!n.has(r)})}}function i(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function s(e){return!!e&&"function"==typeof e[Symbol.iterator]}const a=new r(()=>{},()=>o),o=Object.freeze({done:!0,value:void 0});function l(...e){if(1===e.length){const t=e[0];if(t instanceof r)return t;if(s(t))return new r(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new r(()=>({index:0}),e=>e.index1?new r(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return o})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var u;!function(e){e.sum=function(e){return e.reduce((e,t)=>e+t,0)},e.product=function(e){return e.reduce((e,t)=>e*t,0)},e.min=function(e){return e.reduce((e,t)=>Math.min(e,t))},e.max=function(e){return e.reduce((e,t)=>Math.max(e,t))}}(u||(u={}))},55:(e,t,n)=>{n.d(t,{D:()=>i});class r{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},5357:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(941);const i=function(e,t,n){for(var i=-1,s=e.length;++i{n.d(t,{A:()=>r});const r=function(e,t){return e{n.d(t,{A:()=>s});var r=n(3043),i=n(2839);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,function(e,r,i){s[++n]=t(e,r,i)}),s}},15:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(2877);const i=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},5623:(e,t,n)=>{n.d(t,{A:()=>o});var r=n(4017),i=n(8529),s=n(8367),a=n(8384);const o=function(e,t){return((0,a.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},6277:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(5357),i=n(5577),s=n(8539);const a=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},7854:(e,t,n)=>{var r,i,s,a,o,l,c,u,d,p,f,h,m,g,y,T,R,v,$,E,C,A,S,k,b,w,N,x,I,O,_,P,L,D,M,F,j,q,z,U,K,G,W,B,V,H,Y,X,Q,Z,J,ee,te,ne,re,ie,se,ae,oe,le,ce,ue,de,pe,fe,he,me,ge,ye,Te,Re,ve,$e,Ee,Ce,Ae,Se,ke;n.r(t),n.d(t,{AnnotatedTextEdit:()=>S,ChangeAnnotation:()=>C,ChangeAnnotationIdentifier:()=>A,CodeAction:()=>se,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>R,CodeLens:()=>ae,Color:()=>d,ColorInformation:()=>p,ColorPresentation:()=>f,Command:()=>$,CompletionItem:()=>K,CompletionItemKind:()=>M,CompletionItemLabelDetails:()=>U,CompletionItemTag:()=>j,CompletionList:()=>G,CreateFile:()=>b,DeleteFile:()=>N,Diagnostic:()=>v,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>T,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Y,DocumentLink:()=>le,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>xe,FoldingRange:()=>m,FoldingRangeKind:()=>h,FormattingOptions:()=>oe,Hover:()=>B,InlayHint:()=>Re,InlayHintKind:()=>ye,InlayHintLabelPart:()=>Te,InlineCompletionContext:()=>Se,InlineCompletionItem:()=>$e,InlineCompletionList:()=>Ee,InlineCompletionTriggerKind:()=>Ce,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>fe,InlineValueVariableLookup:()=>he,InsertReplaceEdit:()=>q,InsertTextFormat:()=>F,InsertTextMode:()=>z,Location:()=>c,LocationLink:()=>u,MarkedString:()=>W,MarkupContent:()=>D,MarkupKind:()=>L,OptionalVersionedTextDocumentIdentifier:()=>_,ParameterInformation:()=>V,Position:()=>o,Range:()=>l,RenameFile:()=>w,SelectedCompletionInfo:()=>Ae,SelectionRange:()=>ce,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>ue,SemanticTokens:()=>pe,SignatureInformation:()=>H,StringValue:()=>ve,SymbolInformation:()=>J,SymbolKind:()=>Q,SymbolTag:()=>Z,TextDocument:()=>Ie,TextDocumentEdit:()=>k,TextDocumentIdentifier:()=>I,TextDocumentItem:()=>P,TextEdit:()=>E,URI:()=>i,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>Ne,WorkspaceEdit:()=>x,WorkspaceFolder:()=>ke,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>a}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(a||(a={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.line)&&Oe.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,n,r){if(Oe.uinteger(e)&&Oe.uinteger(t)&&Oe.uinteger(n)&&Oe.uinteger(r))return{start:o.create(e,t),end:o.create(n,r)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(l||(l={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&l.is(t.range)&&(Oe.string(t.uri)||Oe.undefined(t.uri))}}(c||(c={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Oe.objectLiteral(t)&&l.is(t.targetRange)&&Oe.string(t.targetUri)&&l.is(t.targetSelectionRange)&&(l.is(t.originSelectionRange)||Oe.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.numberRange(t.red,0,1)&&Oe.numberRange(t.green,0,1)&&Oe.numberRange(t.blue,0,1)&&Oe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&l.is(t.range)&&d.is(t.color)}}(p||(p={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.undefined(t.textEdit)||E.is(t))&&(Oe.undefined(t.additionalTextEdits)||Oe.typedArray(t.additionalTextEdits,E.is))}}(f||(f={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(h||(h={})),function(e){e.create=function(e,t,n,r,i,s){const a={startLine:e,endLine:t};return Oe.defined(n)&&(a.startCharacter=n),Oe.defined(r)&&(a.endCharacter=r),Oe.defined(i)&&(a.kind=i),Oe.defined(s)&&(a.collapsedText=s),a},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.uinteger(t.startLine)&&Oe.uinteger(t.startLine)&&(Oe.undefined(t.startCharacter)||Oe.uinteger(t.startCharacter))&&(Oe.undefined(t.endCharacter)||Oe.uinteger(t.endCharacter))&&(Oe.undefined(t.kind)||Oe.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Oe.defined(t)&&c.is(t.location)&&Oe.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(T||(T={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.href)}}(R||(R={})),function(e){e.create=function(e,t,n,r,i,s){let a={range:e,message:t};return Oe.defined(n)&&(a.severity=n),Oe.defined(r)&&(a.code=r),Oe.defined(i)&&(a.source=i),Oe.defined(s)&&(a.relatedInformation=s),a},e.is=function(e){var t;let n=e;return Oe.defined(n)&&l.is(n.range)&&Oe.string(n.message)&&(Oe.number(n.severity)||Oe.undefined(n.severity))&&(Oe.integer(n.code)||Oe.string(n.code)||Oe.undefined(n.code))&&(Oe.undefined(n.codeDescription)||Oe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Oe.string(n.source)||Oe.undefined(n.source))&&(Oe.undefined(n.relatedInformation)||Oe.typedArray(n.relatedInformation,g.is))}}(v||(v={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Oe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.title)&&Oe.string(t.command)}}($||($={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.newText)&&l.is(t.range)}}(E||(E={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&Oe.string(t.label)&&(Oe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Oe.string(t.description)||void 0===t.description)}}(C||(C={})),function(e){e.is=function(e){const t=e;return Oe.string(t)}}(A||(A={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return E.is(t)&&(C.is(t.annotationId)||A.is(t.annotationId))}}(S||(S={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Oe.defined(t)&&_.is(t.textDocument)&&Array.isArray(t.edits)}}(k||(k={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}}(b||(b={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Oe.string(t.oldUri)&&Oe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Oe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Oe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Oe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Oe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Oe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||A.is(t.annotationId))}}(N||(N={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Oe.string(e.kind)?b.is(e)||w.is(e)||N.is(e):k.is(e)))}}(x||(x={}));class be{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(void 0===n?r=E.insert(e,t):A.is(n)?(i=n,r=S.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=S.insert(e,t,i)),this.edits.push(r),void 0!==i)return i}replace(e,t,n){let r,i;if(void 0===n?r=E.replace(e,t):A.is(n)?(i=n,r=S.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=S.replace(e,t,i)),this.edits.push(r),void 0!==i)return i}delete(e,t){let n,r;if(void 0===t?n=E.del(e):A.is(t)?(r=t,n=S.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=S.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class we{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(A.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class Ne{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new we(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(k.is(e)){const t=new be(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new be(e.changes[t]);this._textEditChanges[t]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(_.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new be(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new be(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new we,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(C.is(t)||A.is(t)?r=t:n=t,void 0===r?i=b.create(e,n):(s=A.is(r)?r:this._changeAnnotations.manage(r),i=b.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,s,a;if(C.is(n)||A.is(n)?i=n:r=n,void 0===i?s=w.create(e,t,r):(a=A.is(i)?i:this._changeAnnotations.manage(i),s=w.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(s),void 0!==a)return a}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(C.is(t)||A.is(t)?r=t:n=t,void 0===r?i=N.create(e,n):(s=A.is(r)?r:this._changeAnnotations.manage(r),i=N.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.integer(t.version)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&(null===t.version||Oe.integer(t.version))}}(_||(_={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.string(t.uri)&&Oe.string(t.languageId)&&Oe.integer(t.version)&&Oe.string(t.text)}}(P||(P={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(L||(L={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(e)&&L.is(t.kind)&&Oe.string(t.value)}}(D||(D={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(M||(M={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(j||(j={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Oe.string(t.newText)&&l.is(t.insert)&&l.is(t.replace)}}(q||(q={})),function(e){e.asIs=1,e.adjustIndentation=2}(z||(z={})),function(e){e.is=function(e){const t=e;return t&&(Oe.string(t.detail)||void 0===t.detail)&&(Oe.string(t.description)||void 0===t.description)}}(U||(U={})),function(e){e.create=function(e){return{label:e}}}(K||(K={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(G||(G={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Oe.string(t)||Oe.objectLiteral(t)&&Oe.string(t.language)&&Oe.string(t.value)}}(W||(W={})),function(e){e.is=function(e){let t=e;return!!t&&Oe.objectLiteral(t)&&(D.is(t.contents)||W.is(t.contents)||Oe.typedArray(t.contents,W.is))&&(void 0===e.range||l.is(e.range))}}(B||(B={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t,...n){let r={label:e};return Oe.defined(t)&&(r.documentation=t),Oe.defined(n)?r.parameters=n:r.parameters=[],r}}(H||(H={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){let n={range:e};return Oe.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(Z||(Z={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(J||(J={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,i,s){let a={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(a.children=s),a},e.is=function(e){let t=e;return t&&Oe.string(t.name)&&Oe.number(t.kind)&&l.is(t.range)&&l.is(t.selectionRange)&&(void 0===t.detail||Oe.string(t.detail))&&(void 0===t.deprecated||Oe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.typedArray(t.diagnostics,v.is)&&(void 0===t.only||Oe.typedArray(t.only,Oe.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(ie||(ie={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):$.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Oe.string(t.title)&&(void 0===t.diagnostics||Oe.typedArray(t.diagnostics,v.is))&&(void 0===t.kind||Oe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||$.is(t.command))&&(void 0===t.isPreferred||Oe.boolean(t.isPreferred))&&(void 0===t.edit||x.is(t.edit))}}(se||(se={})),function(e){e.create=function(e,t){let n={range:e};return Oe.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Oe.defined(t)&&l.is(t.range)&&(Oe.undefined(t.command)||$.is(t.command))}}(ae||(ae={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Oe.defined(t)&&Oe.uinteger(t.tabSize)&&Oe.boolean(t.insertSpaces)}}(oe||(oe={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Oe.defined(t)&&l.is(t.range)&&(Oe.undefined(t.target)||Oe.string(t.target))}}(le||(le={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Oe.objectLiteral(n)&&l.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(ce||(ce={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&Oe.string(t.text)}}(fe||(fe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&Oe.boolean(t.caseSensitiveLookup)&&(Oe.string(t.variableName)||void 0===t.variableName)}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&l.is(t.range)&&(Oe.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Oe.defined(t)&&l.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&(void 0===t.tooltip||Oe.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.location||c.is(t.location))&&(void 0===t.command||$.is(t.command))}}(Te||(Te={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Oe.objectLiteral(t)&&o.is(t.position)&&(Oe.string(t.label)||Oe.typedArray(t.label,Te.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Oe.typedArray(t.textEdits,E.is)&&(void 0===t.tooltip||Oe.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.paddingLeft||Oe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Oe.boolean(t.paddingRight))}}(Re||(Re={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}($e||($e={})),function(e){e.create=function(e){return{items:e}}}(Ee||(Ee={})),function(e){e.Invoked=0,e.Automatic=1}(Ce||(Ce={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Ae||(Ae={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Se||(Se={})),function(e){e.is=function(e){const t=e;return Oe.objectLiteral(t)&&i.is(t.uri)&&Oe.string(t.name)}}(ke||(ke={}));const xe=["\n","\r\n","\r"];var Ie,Oe;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let a=0,o=0,l=0;for(;a{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],a=e.offsetAt(n.range.start),o=e.offsetAt(n.range.end);if(!(o<=s))throw new Error("Overlapping edit");r=r.substring(0,a)+n.newText+r.substring(o,r.length),s=a}return r}}(Ie||(Ie={}));class _e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return o.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return o.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1{var r;n.d(t,{A:()=>s,r:()=>i}),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,a=0,o=0;o<=e.length;++o){if(o2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),s=o,a=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=o,a=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,o):r=e.slice(s+1,o),i=o-s-1;s=o,a=0}else 46===n&&-1!==a?++a:a=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var a;s>=0?a=arguments[s]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(r=a+"/"+r,i=47===a.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;ic){if(47===n.charCodeAt(o+d))return n.slice(o+d+1);if(0===d)return n.slice(o+d)}else a>c&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var p=e.charCodeAt(i+d);if(p!==n.charCodeAt(o+d))break;47===p&&(u=d)}var f="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(o+u):(o+=u,47===n.charCodeAt(o)&&++o,n.slice(o))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,a=e.length-1;a>=1;--a)if(47===(n=e.charCodeAt(a))){if(!s){i=a;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,a=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var o=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var c=e.charCodeAt(r);if(47===c){if(!a){i=r+1;break}}else-1===l&&(a=!1,l=r+1),o>=0&&(c===n.charCodeAt(o)?-1==--o&&(s=r):(o=-1,s=l))}return i===s?s=l:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!a){i=r+1;break}}else-1===s&&(a=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,a=0,o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(47!==l)-1===i&&(s=!1,i=o+1),46===l?-1===n?n=o:1!==a&&(a=1):-1!==n&&(a=-1);else if(!s){r=o+1;break}}return-1===n||-1===i||0===a||1===a&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var a=-1,o=0,l=-1,c=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===a?a=u:1!==d&&(d=1):-1!==a&&(d=-1);else if(!c){o=u+1;break}return-1===a||-1===l||0===d||1===d&&a===l-1&&a===o+1?-1!==l&&(n.base=n.name=0===o&&s?e.slice(1,l):e.slice(o,l)):(0===o&&s?(n.name=e.slice(1,a),n.base=e.slice(1,l)):(n.name=e.slice(o,a),n.base=e.slice(o,l)),n.ext=e.slice(a,l)),o>0?n.dir=e.slice(0,o-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};let s;if(n.r(i),n.d(i,{URI:()=>f,Utils:()=>b}),"object"==typeof process)s="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;s=e.indexOf("Windows")>=0}const a=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function c(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!o.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(l.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||u),this.query=r||u,this.fragment=i||u,c(this,s))}get fsPath(){return R(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===i?i=this.query:null===i&&(i=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new m(t,n,r,i,s)}static parse(e,t=!1){const n=p.exec(e);return n?new m(n[2]||u,C(n[4]||u),C(n[5]||u),C(n[7]||u),C(n[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(s&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new m("file",t,e,u,u)}static from(e){const t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return c(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===h?e.fsPath:null,t}}return e}}const h=s?1:void 0;class m extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=R(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(e,t,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||45===a||46===a||95===a||126===a||t&&47===a||n&&91===a||n&&93===a||n&&58===a)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=g[a];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function T(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s&&(n=n.replace(/\//g,"\\")),n}function v(e,t){const n=t?T:y;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=d,r+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2)){const e=a.charCodeAt(1);e>=65&&e<=90&&(a=`/${String.fromCharCode(e+32)}:${a.substr(3)}`)}else if(a.length>=2&&58===a.charCodeAt(1)){const e=a.charCodeAt(0);e>=65&&e<=90&&(a=`${String.fromCharCode(e+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=t?l:y(l,!1,!1)),r}function $(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+$(e.substr(3)):e}}const E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(E)?e.replace(E,e=>$(e)):e}var A=n(975);const S=A.posix||A,k="/";var b;!function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==k&&(n=k+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===k&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===k)return e;let t=S.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}}(b||(b={})),r=i})();const{URI:i,Utils:s}=r}}]); \ No newline at end of file diff --git a/assets/js/4456.d5a85b09.js b/assets/js/4456.d5a85b09.js new file mode 100644 index 0000000..ef38db5 --- /dev/null +++ b/assets/js/4456.d5a85b09.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4456],{4456:(e,t,n)=>{function o(e,{target:t=document.body}={}){if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const n=document.createElement("textarea"),o=document.activeElement;n.value=e,n.setAttribute("readonly",""),n.style.all="unset",n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.width="2em",n.style.height="2em",n.style.padding="0",n.style.border="none",n.style.outline="none",n.style.boxShadow="none",n.style.background="transparent",n.style.fontSize="12pt",n.style.whiteSpace="pre";const s=document.getSelection(),a=s.rangeCount>0&&s.getRangeAt(0);t.append(n),n.select(),n.selectionStart=0,n.selectionEnd=e.length;let l=!1;try{l=document.execCommand("copy")}catch{}return n.remove(),a&&(s.removeAllRanges(),s.addRange(a)),o&&o.focus(),l}n.r(t),n.d(t,{default:()=>o})}}]); \ No newline at end of file diff --git a/assets/js/4541.14cee742.js b/assets/js/4541.14cee742.js new file mode 100644 index 0000000..a285fc3 --- /dev/null +++ b/assets/js/4541.14cee742.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4541],{4541:(e,p,s)=>{s.d(p,{createGitGraphServices:()=>a.b});var a=s(131);s(3580)}}]); \ No newline at end of file diff --git a/assets/js/4574.095e876c.js b/assets/js/4574.095e876c.js new file mode 100644 index 0000000..081e777 --- /dev/null +++ b/assets/js/4574.095e876c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4574],{4574:(e,a,s)=>{s.d(a,{createRadarServices:()=>c.f});var c=s(4808);s(3580)}}]); \ No newline at end of file diff --git a/assets/js/4616.c38d0c4b.js b/assets/js/4616.c38d0c4b.js deleted file mode 100644 index fdc2641..0000000 --- a/assets/js/4616.c38d0c4b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4616],{9625(t,e,s){s.d(e,{A:()=>r});var i=s(797),n=s(451),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},4616(t,e,s){s.d(e,{Zk:()=>h,q7:()=>B,tM:()=>ot,u4:()=>rt});var i=s(9625),n=s(1152),r=s(45),o=s(3226),a=s(7633),c=s(797),l=function(){var t=(0,c.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,16],l=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],m=[1,23],f=[1,24],S=[1,26],b=[1,27],_=[1,28],k=[1,29],T=[1,30],E=[1,31],D=[1,32],x=[1,35],C=[1,36],$=[1,37],v=[1,38],I=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,c.K2)(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:b,37:_,38:k,41:T,45:E,48:D,51:x,52:C,53:$,54:v,57:I},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:a,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:b,37:_,38:k,41:T,45:E,48:D,51:x,52:C,53:$,54:v,57:I},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:u,57:I},t(A,[2,17]),t(w,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:b,37:_,38:k,41:T,45:E,48:D,51:x,52:C,53:$,54:v,57:I},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(L,[2,46]),t(L,[2,47]),t(A,[2,15]),t(A,[2,19]),t(w,n,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:b,37:_,38:k,41:T,45:E,48:D,51:x,52:C,53:$,54:v,57:I},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",l=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;r.push(m);var f=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(S,"lex");for(var b,_,k,T,E,D,x,C,$,v={};;){if(k=s[s.length-1],this.defaultActions[k]?T=this.defaultActions[k]:(null==b&&(b=S()),T=o[k]&&o[k][b]),void 0===T||!T.length||!T[0]){var I="";for(D in $=[],o[k])this.terminals_[D]&&D>2&&$.push("'"+this.terminals_[D]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:$})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+b);switch(T[0]){case 1:s.push(b),n.push(p.yytext),r.push(p.yylloc),s.push(T[1]),b=null,_?(b=_,_=null):(h=p.yyleng,a=p.yytext,l=p.yylineno,m=p.yylloc,d>0&&d--);break;case 2:if(x=this.productions_[T[1]][1],v.$=n[n.length-x],v._$={first_line:r[r.length-(x||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(x||1)].first_column,last_column:r[r.length-1].last_column},f&&(v._$.range=[r[r.length-(x||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[a,h,l,y.yy,T[1],n,r].concat(u))))return E;x&&(s=s.slice(0,-1*x*2),n=n.slice(0,-1*x),r=r.slice(0,-1*x)),s.push(this.productions_[T[1]][0]),n.push(v.$),r.push(v._$),C=o[s[s.length-2]][s[s.length-1]],s.push(C);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,s,i){switch(s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}}();function O(){this.yy={}}return R.lexer=N,(0,c.K2)(O,"Parser"),O.prototype=R,R.Parser=O,new O}();l.parser=l;var h=l,d="state",u="root",p="relation",y="default",g="divider",m="fill:none",f="fill: #333",S="text",b="normal",_="rect",k="rectWithTitle",T="divider",E="roundedWithTitle",D="statediagram",x=`${D}-state`,C="transition",$=`${C} note-edge`,v=`${D}-note`,I=`${D}-cluster`,A=`${D}-cluster-alt`,L="parent",w="note",R="----",N=`${R}${w}`,O=`${R}${L}`,K=(0,c.K2)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),B={getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,c.K2)(async function(t,e,s,l){c.Rm.info("REF0:"),c.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:d,layout:u}=(0,a.D7)();l.db.extract(l.db.getRootDocV2());const p=l.db.getData(),y=(0,i.A)(e,h);p.type=l.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,p.markers=["barb"],p.diagramId=e,await(0,r.XX)(p,y);try{("function"==typeof l.db.getLinks?l.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!s)return void c.Rm.warn("\u26a0\ufe0f Invalid or missing stateId from key:",JSON.stringify(e));const i=y.node()?.querySelectorAll("g");let n;if(i?.forEach(t=>{const e=t.textContent?.trim();e===s&&(n=t)}),!n)return void c.Rm.warn("\u26a0\ufe0f Could not find node matching text:",s);const r=n.parentNode;if(!r)return void c.Rm.warn("\u26a0\ufe0f Node has no parent, cannot wrap:",s);const o=document.createElementNS("http://www.w3.org/2000/svg","a"),a=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e)}r.replaceChild(o,n),o.appendChild(n),c.Rm.info("\ud83d\udd17 Wrapped node in
    tag for:",s,t.url)})}catch(g){c.Rm.error("\u274c Error injecting clickable links:",g)}o._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,l.db.getDiagramTitle()),(0,n.P)(y,8,D,d?.useMaxWidth??!0)},"draw"),getDir:K},F=new Map,Y=0;function P(t="",e=0,s="",i=R){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,c.K2)(P,"stateDomId");var G=(0,c.K2)((t,e,s,i,n,r,o,l)=>{c.Rm.trace("items",e),e.forEach(e=>{switch(e.stmt){case d:case y:V(t,e,s,i,n,r,o,l);break;case p:{V(t,e.state1,s,i,n,r,o,l),V(t,e.state2,s,i,n,r,o,l);const c={id:"edge"+Y,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:m,labelStyle:"",label:a.Y2.sanitizeText(e.description??"",(0,a.D7)()),arrowheadStyle:f,labelpos:"c",labelType:S,thickness:b,classes:C,look:o};n.push(c),Y++}}})},"setupDoc"),j=(0,c.K2)((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function z(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function M(t){return t?.classes?.join(" ")??""}function U(t){return t?.styles??[]}(0,c.K2)(z,"insertOrUpdateNode"),(0,c.K2)(M,"getClassesFromDbInfo"),(0,c.K2)(U,"getStylesFromDbInfo");var V=(0,c.K2)((t,e,s,i,n,r,o,l)=>{const h=e.id,d=s.get(h),u=M(d),p=U(d),D=(0,a.D7)();if(c.Rm.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=_;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==y&&(s=e.type),F.get(h)||F.set(h,{id:h,shape:s,description:a.Y2.sanitizeText(h,D),cssClasses:`${u} ${x}`,cssStyles:p});const d=F.get(h);e.description&&(Array.isArray(d.description)?(d.shape=k,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=k,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=_,d.description=e.description),d.description=a.Y2.sanitizeTextOrArray(d.description,D)),1===d.description?.length&&d.shape===k&&("group"===d.type?d.shape=E:d.shape=_),!d.type&&e.doc&&(c.Rm.info("Setting cluster for XCX",h,j(e)),d.type="group",d.isGroup=!0,d.dir=j(e),d.shape=e.type===g?T:E,d.cssClasses=`${d.cssClasses} ${I} ${r?A:""}`);const C={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:P(h,Y),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:o};if(C.shape===T&&(C.label=""),t&&"root"!==t.id&&(c.Rm.trace("Setting node ",h," to be child of its parent ",t.id),C.parentId=t.id),C.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,cssClasses:v,cssStyles:[],cssCompiledStyles:[],id:h+N+"-"+Y,domId:P(h,Y,w),type:d.type,isGroup:"group"===d.type,padding:D.flowchart?.padding,look:o,position:e.note.position},s=h+O,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+O,domId:P(h,Y,L),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};Y++,r.id=s,t.parentId=s,z(i,r,l),z(i,t,l),z(i,C,l);let a=h,c=t.id;"left of"===e.note.position&&(a=t.id,c=h),n.push({id:a+"-"+c,start:a,end:c,arrowhead:"none",arrowTypeEnd:"",style:m,labelStyle:"",classes:$,arrowheadStyle:f,labelpos:"c",labelType:S,thickness:b,look:o})}else z(i,C,l)}e.doc&&(c.Rm.trace("Adding nodes children "),G(e,e.doc,s,i,n,!r,o,l))},"dataFetcher"),W=(0,c.K2)(()=>{F.clear(),Y=0},"reset"),X="[*]",H="start",J="[*]",q="end",Z="color",Q="fill",tt="bgFill",et=",",st=(0,c.K2)(()=>new Map,"newClassesList"),it=(0,c.K2)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),nt=(0,c.K2)(t=>JSON.parse(JSON.stringify(t)),"clone"),rt=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=st(),this.documents={root:it()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=a.iN,this.setAccTitle=a.SV,this.getAccDescription=a.m7,this.setAccDescription=a.EI,this.setDiagramTitle=a.ke,this.getDiagramTitle=a.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,c.K2)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case d:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case p:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=(0,a.D7)();W(),V(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.Rm.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===p)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===d&&(e.id===X?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==u&&e.stmt!==d||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===g){const t=nt(r);t.doc=nt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:d,id:(0,o.$C)(),type:"divider",doc:nt(n)};i.push(nt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:u,stmt:u},{id:u,stmt:u,doc:this.rootDoc},!0),{id:u,doc:this.rootDoc}}addState(t,e=y,s=void 0,i=void 0,n=void 0,r=void 0,o=void 0,l=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.Rm.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:d,id:h,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]});if(i){c.Rm.info("Setting state description",h,i);(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))}if(n){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=n,t.note.text=a.Y2.sanitizeText(t.note.text,(0,a.D7)())}if(r){c.Rm.info("Setting state classes",h,r);(Array.isArray(r)?r:[r]).forEach(t=>this.setCssClass(h,t.trim()))}if(o){c.Rm.info("Setting state styles",h,o);(Array.isArray(o)?o:[o]).forEach(t=>this.setStyle(h,t.trim()))}if(l){c.Rm.info("Setting state styles",h,o);(Array.isArray(l)?l:[l]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.documents={root:it()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=st(),t||(this.links=new Map,(0,a.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.Rm.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.Rm.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===X?(this.startEndCount++,`${H}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=y){return t===X?H:e}endIdIfNeeded(t=""){return t===J?(this.startEndCount++,`${q}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=y){return t===J?q:e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),r=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(r,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:a.Y2.sanitizeText(s,(0,a.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),r=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(r,o),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:s?a.Y2.sanitizeText(s,(0,a.D7)()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(a.Y2.sanitizeText(i,(0,a.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(et).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Z).exec(t)){const t=e.replace(Q,tt).replace(Z,Q);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,a.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:K(this.getRootDocV2())}}getConfig(){return(0,a.D7)().state}},ot=(0,c.K2)(t=>`\ndefs #statediagram-barbEnd {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: 1;\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n`,"getStyles")},1152(t,e,s){s.d(e,{P:()=>r});var i=s(7633),n=s(797),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:c,height:l,x:h,y:d}=o(t,e);(0,i.a$)(t,l,c,r);const u=a(h,d,c,l,e);t.attr("viewBox",u),n.Rm.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),a=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")}}]); \ No newline at end of file diff --git a/assets/js/4640.54289f4a.js b/assets/js/4640.54289f4a.js new file mode 100644 index 0000000..824482c --- /dev/null +++ b/assets/js/4640.54289f4a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4640],{2528:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(8894).K2)(r,"populateCommonDb")},4640:(t,e,a)=>{a.d(e,{diagram:()=>z});var r=a(6417),n=a(2528),i=a(2101),s=a(5691),o=a(8894),l=a(4419),c={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},d={axes:[],curves:[],options:c},g=structuredClone(d),p=s.UI.radar,u=(0,o.K2)(()=>(0,i.$t)({...p,...(0,s.zj)().radar}),"getConfig"),h=(0,o.K2)(()=>g.axes,"getAxes"),x=(0,o.K2)(()=>g.curves,"getCurves"),m=(0,o.K2)(()=>g.options,"getOptions"),$=(0,o.K2)(t=>{g.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),f=(0,o.K2)(t=>{g.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:y(t.entries)}))},"setCurves"),y=(0,o.K2)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=h();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const a=t.find(t=>t.axis?.$refText===e.name);if(void 0===a)throw new Error("Missing entry for axis "+e.label);return a.value})},"computeCurveEntries"),v={getAxes:h,getCurves:x,getOptions:m,setAxes:$,setCurves:f,setOptions:(0,o.K2)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});g.options={showLegend:e.showLegend?.value??c.showLegend,ticks:e.ticks?.value??c.ticks,max:e.max?.value??c.max,min:e.min?.value??c.min,graticule:e.graticule?.value??c.graticule}},"setOptions"),getConfig:u,clear:(0,o.K2)(()=>{(0,s.IU)(),g=structuredClone(d)},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI},w=(0,o.K2)(t=>{(0,n.S)(t,v);const{axes:e,curves:a,options:r}=t;v.setAxes(e),v.setCurves(a),v.setOptions(r)},"populate"),b={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("radar",t);o.Rm.debug(e),w(e)},"parse")},C=(0,o.K2)((t,e,a,n)=>{const i=n.db,s=i.getAxes(),o=i.getCurves(),l=i.getOptions(),c=i.getConfig(),d=i.getDiagramTitle(),g=(0,r.D)(e),p=M(g,c),u=l.max??Math.max(...o.map(t=>Math.max(...t.entries))),h=l.min,x=Math.min(c.width,c.height)/2;K(p,s,x,l.ticks,l.graticule),L(p,s,x,c),T(p,s,o,h,u,l.graticule,c),O(p,o,l.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),M=(0,o.K2)((t,e)=>{const a=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,i=e.marginTop+e.height/2;return(0,s.a$)(t,r,a,e.useMaxWidth??!0),t.attr("viewBox",`0 0 ${a} ${r}`),t.append("g").attr("transform",`translate(${n}, ${i})`)},"drawFrame"),K=(0,o.K2)((t,e,a,r,n)=>{if("circle"===n)for(let i=0;i{const a=2*e*Math.PI/n-Math.PI/2;return`${s*Math.cos(a)},${s*Math.sin(a)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),L=(0,o.K2)((t,e,a,r)=>{const n=e.length;for(let i=0;i{if(e.entries.length!==o)return;const c=e.entries.map((t,e)=>{const a=2*Math.PI*e/o-Math.PI/2,i=k(t,r,n,l);return{x:i*Math.cos(a),y:i*Math.sin(a)}});"circle"===i?t.append("path").attr("d",A(c,s.curveTension)).attr("class",`radarCurve-${a}`):"polygon"===i&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${a}`)})}function k(t,e,a,r){return r*(Math.min(Math.max(t,e),a)-e)/(a-e)}function A(t,e){const a=t.length;let r=`M${t[0].x},${t[0].y}`;for(let n=0;n{const r=t.append("g").attr("transform",`translate(${n}, ${i+20*a})`);r.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${a}`),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,o.K2)(T,"drawCurves"),(0,o.K2)(k,"relativeRadius"),(0,o.K2)(A,"closedRoundCurve"),(0,o.K2)(O,"drawLegend");var S={draw:C},I=(0,o.K2)((t,e)=>{let a="";for(let r=0;r{const e=(0,s.P$)(),a=(0,s.zj)(),r=(0,i.$t)(e,a.themeVariables);return{themeVariables:r,radarOptions:(0,i.$t)(r.radar,t)}},"buildRadarStyleOptions"),z={parser:b,db:v,renderer:S,styles:(0,o.K2)(({radar:t}={})=>{const{themeVariables:e,radarOptions:a}=D(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${I(e,a)}\n\t`},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/4732.37c818cd.js b/assets/js/4732.37c818cd.js deleted file mode 100644 index a97f888..0000000 --- a/assets/js/4732.37c818cd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4732],{4732(e,p,s){s.d(p,{createTreemapServices:()=>a.d});var a=s(8562);s(808)}}]); \ No newline at end of file diff --git a/assets/js/4802.c2bb0f45.js b/assets/js/4802.c2bb0f45.js deleted file mode 100644 index d9c40cb..0000000 --- a/assets/js/4802.c2bb0f45.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4802],{4802(e,r,t){t.d(r,{diagram:()=>i});var a=t(4616),s=(t(9625),t(1152),t(45),t(5164),t(8698),t(5894),t(3245),t(2387),t(92),t(3226),t(7633),t(797)),i={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/49330316.c05e31ae.js b/assets/js/49330316.c05e31ae.js new file mode 100644 index 0000000..1ee1d53 --- /dev/null +++ b/assets/js/49330316.c05e31ae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6922],{7715:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>t,contentTitle:()=>c,default:()=>o,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"reference/admin/labelers","title":"Admin API: Labelers","description":"Manage external labeler subscriptions. See the Labelers guide for background.","source":"@site/docs/reference/admin/labelers.md","sourceDirName":"reference/admin","slug":"/reference/admin/labelers","permalink":"/reference/admin/labelers","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Users","permalink":"/reference/admin/users"},"next":{"title":"Instance Settings","permalink":"/reference/admin/settings"}}');var d=n(199),l=n(2560);const i={},c="Admin API: Labelers",t={},a=[{value:"Add a labeler",id:"add-a-labeler",level:2},{value:"List labelers",id:"list-labelers",level:2},{value:"Update a labeler",id:"update-a-labeler",level:2},{value:"Delete a labeler",id:"delete-a-labeler",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s.header,{children:(0,d.jsx)(s.h1,{id:"admin-api-labelers",children:"Admin API: Labelers"})}),"\n",(0,d.jsxs)(s.p,{children:["Manage external labeler subscriptions. See the ",(0,d.jsx)(s.a,{href:"/guides/labelers",children:"Labelers guide"})," for background."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(s.h2,{id:"add-a-labeler",children:"Add a labeler"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"POST /admin/labelers\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"labelers:create"})," permission."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/labelers \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "did": "did:plc:ar7c4by46qjdydhdevvrndac" }\'\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"did"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"yes"}),(0,d.jsx)(s.td,{children:"The labeler's atproto DID"})]})})]}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"201 Created"})," (empty body)"]}),"\n",(0,d.jsx)(s.h2,{id:"list-labelers",children:"List labelers"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"GET /admin/labelers\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"labelers:read"})," permission."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl http://localhost:3000/admin/labelers -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-json",children:'[\n {\n "did": "did:plc:ar7c4by46qjdydhdevvrndac",\n "status": "active",\n "cursor": 1234,\n "created_at": "2026-03-15T00:00:00Z",\n "updated_at": "2026-03-15T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsxs)(s.tbody,{children:[(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"did"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"The labeler's DID"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"status"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsxs)(s.td,{children:[(0,d.jsx)(s.code,{children:"active"})," or ",(0,d.jsx)(s.code,{children:"paused"})]})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"cursor"})}),(0,d.jsx)(s.td,{children:"number|null"}),(0,d.jsx)(s.td,{children:"Last processed event cursor (null if never synced)"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"created_at"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"ISO 8601 creation timestamp"})]}),(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"updated_at"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"ISO 8601 last-updated timestamp"})]})]})]}),"\n",(0,d.jsx)(s.h2,{id:"update-a-labeler",children:"Update a labeler"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"PATCH /admin/labelers/{did}\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"labelers:create"})," permission."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X PATCH http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "paused" }\'\n'})}),"\n",(0,d.jsxs)(s.table,{children:[(0,d.jsx)(s.thead,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.th,{children:"Field"}),(0,d.jsx)(s.th,{children:"Type"}),(0,d.jsx)(s.th,{children:"Required"}),(0,d.jsx)(s.th,{children:"Description"})]})}),(0,d.jsx)(s.tbody,{children:(0,d.jsxs)(s.tr,{children:[(0,d.jsx)(s.td,{children:(0,d.jsx)(s.code,{children:"status"})}),(0,d.jsx)(s.td,{children:"string"}),(0,d.jsx)(s.td,{children:"yes"}),(0,d.jsxs)(s.td,{children:["New status: ",(0,d.jsx)(s.code,{children:"active"})," or ",(0,d.jsx)(s.code,{children:"paused"})]})]})})]}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(s.h2,{id:"delete-a-labeler",children:"Delete a labeler"}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{children:"DELETE /admin/labelers/{did}\n"})}),"\n",(0,d.jsxs)(s.p,{children:["Requires ",(0,d.jsx)(s.code,{children:"labelers:delete"})," permission. Removes the subscription and all labels emitted by this labeler."]}),"\n",(0,d.jsx)(s.pre,{children:(0,d.jsx)(s.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(s.p,{children:[(0,d.jsx)(s.strong,{children:"Response"}),": ",(0,d.jsx)(s.code,{children:"204 No Content"})]})]})}function o(e={}){const{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,d.jsx)(s,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}},2560:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>c});var r=n(63);const d={},l=r.createContext(d);function i(e){const s=r.useContext(l);return r.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),r.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4981.a26c6f29.js b/assets/js/4981.a26c6f29.js deleted file mode 100644 index 5bb3ff1..0000000 --- a/assets/js/4981.a26c6f29.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4981],{4981(t,e,a){a.d(e,{diagram:()=>Pt});var n=a(2875),i=a(3226),r=a(7633),s=a(797),l=a(451),o=a(6750),h=function(){var t=(0,s.K2)(function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a},"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],r=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],p=[1,67],u=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],q=[1,82],V=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,s.K2)(function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let t={};t[r[l-1].trim()]=r[l].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:p,40:u,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:q,77:V,79:G,80:J},{35:86,75:81,76:q,77:V,79:G,80:J},{35:87,75:81,76:q,77:V,79:G,80:J},{35:88,75:81,76:q,77:V,79:G,80:J},{35:89,75:81,76:q,77:V,79:G,80:J},{35:90,75:81,76:q,77:V,79:G,80:J},{35:91,75:81,76:q,77:V,79:G,80:J},{35:92,75:81,76:q,77:V,79:G,80:J},{35:93,75:81,76:q,77:V,79:G,80:J},{35:94,75:81,76:q,77:V,79:G,80:J},{35:95,75:81,76:q,77:V,79:G,80:J},{35:96,75:81,76:q,77:V,79:G,80:J},{35:97,75:81,76:q,77:V,79:G,80:J},{35:98,75:81,76:q,77:V,79:G,80:J},{35:99,75:81,76:q,77:V,79:G,80:J},{35:100,75:81,76:q,77:V,79:G,80:J},{35:101,75:81,76:q,77:V,79:G,80:J},{35:102,75:81,76:q,77:V,79:G,80:J},{35:103,75:81,76:q,77:V,79:G,80:J},{35:104,75:81,76:q,77:V,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:q,77:V,79:G,80:J},{35:106,75:81,76:q,77:V,79:G,80:J},{35:107,75:81,76:q,77:V,79:G,80:J},{35:108,75:81,76:q,77:V,79:G,80:J},{35:109,75:81,76:q,77:V,79:G,80:J},{35:110,75:81,76:q,77:V,79:G,80:J},{35:111,75:81,76:q,77:V,79:G,80:J},{35:112,75:81,76:q,77:V,79:G,80:J},{35:113,75:81,76:q,77:V,79:G,80:J},{35:114,75:81,76:q,77:V,79:G,80:J},{35:115,75:81,76:q,77:V,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:q,77:V,79:G,80:J},{35:120,75:81,76:q,77:V,79:G,80:J},{35:121,75:81,76:q,77:V,79:G,80:J},{35:122,75:81,76:q,77:V,79:G,80:J},{35:123,75:81,76:q,77:V,79:G,80:J},{35:124,75:81,76:q,77:V,79:G,80:J},{35:125,75:81,76:q,77:V,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:r}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:r,34:l,36:o,37:h,38:d,39:p,40:u,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:q,77:V,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,a=[0],n=[],i=[null],r=[],l=this.table,o="",c=0,h=0,d=0,p=r.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;r.push(f);var b=u.options&&u.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){a.length=a.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,s.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v="";for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(u.yytext),r.push(u.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},b&&(T._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,r].concat(p))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),r=r.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),r.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0},"parse")},rt=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,s.K2)(function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function st(){this.yy={}}return it.lexer=rt,(0,s.K2)(st,"Parser"),st.prototype=it,it.Parser=st,new st}();h.parser=h;var d,p=h,u=[],y=[""],g="global",f="",b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],x=[],_="",m=!1,E=4,S=2,A=(0,s.K2)(function(){return d},"getC4Type"),C=(0,s.K2)(function(t){let e=(0,r.jZ)(t,(0,r.D7)());d=e},"setC4Type"),w=(0,s.K2)(function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=x.find(t=>t.from===e&&t.to===a);if(h?c=h:x.push(c),c.type=t,c.from=e,c.to=a,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==r)c.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]={text:e}}else c.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]=e}else c.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=H()},"addRel"),k=(0,s.K2)(function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={};const o=u.find(t=>t.alias===e);if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=g,l.wrap=H()},"addPersonOrSystem"),O=(0,s.K2)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=H(),o.typeC4Shape={text:t},o.parentBoundary=g},"addContainer"),T=(0,s.K2)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=u.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=H(),o.typeC4Shape={text:t},o.parentBoundary=g},"addComponent"),v=(0,s.K2)(function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=g,r.wrap=H(),f=g,g=t,y.push(f)},"addPersonOrSystemBoundary"),R=(0,s.K2)(function(t,e,a,n,i){if(null===t||null===e)return;let r={};const s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),r.label=null==e?{text:""}:{text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=g,r.wrap=H(),f=g,g=t,y.push(f)},"addContainerBoundary"),D=(0,s.K2)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={};const c=b.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,b.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=g,o.wrap=H(),f=g,g=e,y.push(f)},"addDeploymentNode"),N=(0,s.K2)(function(){g=f,y.pop(),f=y.pop(),y.push(f)},"popBoundaryParseStack"),P=(0,s.K2)(function(t,e,a,n,i,r,s,l,o,c,h){let d=u.find(t=>t.alias===e);if(void 0!==d||(d=b.find(t=>t.alias===e),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shadowing=r;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shape=s;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}},"updateElStyle"),B=(0,s.K2)(function(t,e,a,n,i,r,s){const l=x.find(t=>t.from===e&&t.to===a);if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r);if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}},"updateRelStyle"),I=(0,s.K2)(function(t,e,a){let n=E,i=S;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(E=n),i>=1&&(S=i)},"updateLayoutConfig"),M=(0,s.K2)(function(){return E},"getC4ShapeInRow"),j=(0,s.K2)(function(){return S},"getC4BoundaryInRow"),K=(0,s.K2)(function(){return g},"getCurrentBoundaryParse"),L=(0,s.K2)(function(){return f},"getParentBoundaryParse"),Y=(0,s.K2)(function(t){return null==t?u:u.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),U=(0,s.K2)(function(t){return u.find(e=>e.alias===t)},"getC4Shape"),F=(0,s.K2)(function(t){return Object.keys(Y(t))},"getC4ShapeKeys"),X=(0,s.K2)(function(t){return null==t?b:b.filter(e=>e.parentBoundary===t)},"getBoundaries"),z=X,W=(0,s.K2)(function(){return x},"getRels"),Q=(0,s.K2)(function(){return _},"getTitle"),$=(0,s.K2)(function(t){m=t},"setWrap"),H=(0,s.K2)(function(){return m},"autoWrap"),q=(0,s.K2)(function(){u=[],b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f="",g="global",y=[""],x=[],y=[""],_="",m=!1,E=4,S=2},"clear"),V=(0,s.K2)(function(t){let e=(0,r.jZ)(t,(0,r.D7)());_=e},"setTitle"),G={addPersonOrSystem:k,addPersonOrSystemBoundary:v,addContainer:O,addContainerBoundary:R,addComponent:T,addDeploymentNode:D,popBoundaryParseStack:N,addRel:w,updateElStyle:P,updateRelStyle:B,updateLayoutConfig:I,autoWrap:H,setWrap:$,getC4ShapeArray:Y,getC4Shape:U,getC4ShapeKeys:F,getBoundaries:X,getBoundarys:z,getCurrentBoundaryParse:K,getParentBoundaryParse:L,getRels:W,getTitle:Q,getC4Type:A,getC4ShapeInRow:M,getC4BoundaryInRow:j,setAccTitle:r.SV,getAccTitle:r.iN,getAccDescription:r.m7,setAccDescription:r.EI,getConfig:(0,s.K2)(()=>(0,r.D7)().c4,"getConfig"),clear:q,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:V,setC4Type:C},J=(0,s.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),Z=(0,s.K2)(function(t,e,a,n,i,r){const s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let l=r.startsWith("data:image/png;base64")?r:(0,o.J)(r);s.attr("xlink:href",l)},"drawImage"),tt=(0,s.K2)((t,e,a)=>{const n=t.append("g");let i=0;for(let r of e){let t=r.textColor?r.textColor:"#444444",e=r.lineColor?r.lineColor:"#444444",s=r.offsetX?parseInt(r.offsetX):0,l=r.offsetY?parseInt(r.offsetY):0,o="";if(0===i){let t=n.append("line");t.attr("x1",r.startPoint.x),t.attr("y1",r.startPoint.y),t.attr("x2",r.endPoint.x),t.attr("y2",r.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==r.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+o+"#arrowend)"),i=-1}else{let t=n.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",r.startPoint.x).replaceAll("starty",r.startPoint.y).replaceAll("controlx",r.startPoint.x+(r.endPoint.x-r.startPoint.x)/2-(r.endPoint.x-r.startPoint.x)/4).replaceAll("controly",r.startPoint.y+(r.endPoint.y-r.startPoint.y)/2).replaceAll("stopx",r.endPoint.x).replaceAll("stopy",r.endPoint.y)),"rel_b"!==r.type&&t.attr("marker-end","url("+o+"#arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+o+"#arrowend)")}let c=a.messageFont();pt(a)(r.label.text,n,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+s,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+l,r.label.width,r.label.height,{fill:t},c),r.techn&&""!==r.techn.text&&(c=a.messageFont(),pt(a)("["+r.techn.text+"]",n,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+s,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+a.messageFontSize+5+l,Math.max(r.label.width,r.techn.width),r.techn.height,{fill:t,"font-style":"italic"},c))}},"drawRels"),et=(0,s.K2)(function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};J(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=s,pt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=s,pt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=s,pt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),at=(0,s.K2)(function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=r,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},J(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=dt(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Z(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,pt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.techn&&""!==e.techn?.text?pt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&""!==e.type.text&&pt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=s,pt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height},"drawC4Shape"),nt=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),rt=(0,s.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),st=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),lt=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),ot=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ct=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),ht=(0,s.K2)(function(t){const e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),dt=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),pt=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,s,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:p}=c,u=t.split(r.Y2.lineBreakRegex);for(let r=0;r=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>ft)&&(e=this.nextData.startx+t.margin+xt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},mt(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},mt=(0,s.K2)(function(t){(0,r.hH)(xt,t),t.fontFamily&&(xt.personFontFamily=xt.systemFontFamily=xt.messageFontFamily=t.fontFamily),t.fontSize&&(xt.personFontSize=xt.systemFontSize=xt.messageFontSize=t.fontSize),t.fontWeight&&(xt.personFontWeight=xt.systemFontWeight=xt.messageFontWeight=t.fontWeight)},"setConf"),Et=(0,s.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),St=(0,s.K2)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),At=(0,s.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function Ct(t,e,a,n,s){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,s,n),e[t].textLines=e[t].text.split(r.Y2.lineBreakRegex).length,e[t].width=s,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(r.Y2.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(const r of a)e[t].width=Math.max((0,i.Un)(r,n),e[t].width),s=(0,i.ru)(r,n),e[t].height=e[t].height+s}}(0,s.K2)(Ct,"calcC4ShapeTextWH");var wt=(0,s.K2)(function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=xt.c4ShapeMargin-35;let n=e.wrap&&xt.wrap,r=St(xt);r.fontSize=r.fontSize+2,r.fontWeight="bold",Ct("label",e,n,r,(0,i.Un)(e.label.text,r)),ut.drawBoundary(t,e,xt)},"drawBoundary"),kt=(0,s.K2)(function(t,e,a,n){let r=0;for(const s of n){r=0;const n=a[s];let l=Et(xt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("\xab"+n.typeC4Shape.text+"\xbb",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=xt.c4ShapePadding,r=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=r,r=n.image.Y+n.image.height);let o=n.wrap&&xt.wrap,c=xt.width-2*xt.c4ShapePadding,h=Et(xt,n.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",Ct("label",n,o,h,c),n.label.Y=r+8,r=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]",Ct("type",n,o,Et(xt,n.typeC4Shape.text),c),n.type.Y=r+5,r=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]",Ct("techn",n,o,Et(xt,n.techn.text),c),n.techn.Y=r+5,r=n.techn.Y+n.techn.height}let d=r,p=n.label.width;if(n.descr&&""!==n.descr.text){Ct("descr",n,o,Et(xt,n.typeC4Shape.text),c),n.descr.Y=r+20,r=n.descr.Y+n.descr.height,p=Math.max(n.label.width,n.descr.width),d=r-5*n.descr.textLines}p+=xt.c4ShapePadding,n.width=Math.max(n.width||xt.width,p,xt.width),n.height=Math.max(n.height||xt.height,d,xt.height),n.margin=n.margin||xt.c4ShapeMargin,t.insert(n),ut.drawC4Shape(e,n,xt)}t.bumpLastMargin(xt.c4ShapeMargin)},"drawC4ShapeArray"),Ot=class{static{(0,s.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Tt=(0,s.K2)(function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-r),h=c/o,d=t.height/t.width,p=null;return n==r&&ai?p=new Ot(a,l):a==i&&nr&&(p=new Ot(s,n)),a>i&&n=h?new Ot(a,l+h*t.width/2):new Ot(s-o/c*t.height/2,n+t.height):a=h?new Ot(a+t.width,l+h*t.width/2):new Ot(s+o/c*t.height/2,n+t.height):ar?p=d>=h?new Ot(a+t.width,l-h*t.width/2):new Ot(s+t.height/2*o/c,n):a>i&&n>r&&(p=d>=h?new Ot(a,l-t.width/2*h):new Ot(s-t.height/2*o/c,n)),p},"getIntersectPoint"),vt=(0,s.K2)(function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Tt(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Tt(e,a)}},"getIntersectPoints"),Rt=(0,s.K2)(function(t,e,a,n){let r=0;for(let s of e){r+=1;let t=s.wrap&&xt.wrap,e=At(xt);"C4Dynamic"===n.db.getC4Type()&&(s.label.text=r+": "+s.label.text);let l=(0,i.Un)(s.label.text,e);Ct("label",s,t,e,l),s.techn&&""!==s.techn.text&&(l=(0,i.Un)(s.techn.text,e),Ct("techn",s,t,e,l)),s.descr&&""!==s.descr.text&&(l=(0,i.Un)(s.descr.text,e),Ct("descr",s,t,e,l));let o=a(s.from),c=a(s.to),h=vt(o,c);s.startPoint=h.startPoint,s.endPoint=h.endPoint}ut.drawRels(t,e,xt)},"drawRels");function Dt(t,e,a,n,i){let r=new _t(i);r.data.widthLimit=a.data.widthLimit/Math.min(bt,n.length);for(let[s,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&xt.wrap,c=St(xt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",Ct("label",l,o,c,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",Ct("type",l,o,St(xt),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=St(xt);t.fontSize=t.fontSize-2,Ct("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%bt===0){let t=a.data.startx+xt.diagramMarginX,e=a.data.stopy+xt.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+xt.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&kt(r,t,h,d),e=l.alias;let p=i.db.getBoundaries(e);p.length>0&&Dt(t,e,r,p,i),"global"!==l.alias&&wt(t,l,r),a.data.stopy=Math.max(r.data.stopy+xt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+xt.c4ShapeMargin,a.data.stopx),yt=Math.max(yt,a.data.stopx),gt=Math.max(gt,a.data.stopy)}}(0,s.K2)(Dt,"drawInsideBoundary");var Nt={drawPersonOrSystemArray:kt,drawBoundary:wt,setConf:mt,draw:(0,s.K2)(function(t,e,a,n){xt=(0,r.D7)().c4;const i=(0,r.D7)().securityLevel;let o;"sandbox"===i&&(o=(0,l.Ltv)("#i"+e));const c="sandbox"===i?(0,l.Ltv)(o.nodes()[0].contentDocument.body):(0,l.Ltv)("body");let h=n.db;n.db.setWrap(xt.wrap),ft=h.getC4ShapeInRow(),bt=h.getC4BoundaryInRow(),s.Rm.debug(`C:${JSON.stringify(xt,null,2)}`);const d="sandbox"===i?c.select(`[id="${e}"]`):(0,l.Ltv)(`[id="${e}"]`);ut.insertComputerIcon(d),ut.insertDatabaseIcon(d),ut.insertClockIcon(d);let p=new _t(n);p.setData(xt.diagramMarginX,xt.diagramMarginX,xt.diagramMarginY,xt.diagramMarginY),p.data.widthLimit=screen.availWidth,yt=xt.diagramMarginX,gt=xt.diagramMarginY;const u=n.db.getTitle();Dt(d,"",p,n.db.getBoundaries(""),n),ut.insertArrowHead(d),ut.insertArrowEnd(d),ut.insertArrowCrossHead(d),ut.insertArrowFilledHead(d),Rt(d,n.db.getRels(),n.db.getC4Shape,n),p.data.stopx=yt,p.data.stopy=gt;const y=p.data;let g=y.stopy-y.starty+2*xt.diagramMarginY;const f=y.stopx-y.startx+2*xt.diagramMarginX;u&&d.append("text").text(u).attr("x",(y.stopx-y.startx)/2-4*xt.diagramMarginX).attr("y",y.starty+xt.diagramMarginY),(0,r.a$)(d,g,f,xt.useMaxWidth);const b=u?60:0;d.attr("viewBox",y.startx-xt.diagramMarginX+" -"+(xt.diagramMarginY+b)+" "+f+" "+(g+b)),s.Rm.debug("models:",y)},"draw")},Pt={parser:p,db:G,renderer:Nt,styles:(0,s.K2)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:(0,s.K2)(({c4:t,wrap:e})=>{Nt.setConf(t),G.setWrap(e)},"init")}},2875(t,e,a){a.d(e,{CP:()=>h,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>l,m:()=>o,tk:()=>s});var n=a(7633),i=a(797),r=a(6750),s=(0,i.K2)((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const n in e.attrs)a.attr(n,e.attrs[n]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,i.K2)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};s(t,a).lower()},"drawBackgroundRect"),o=(0,i.K2)((t,e)=>{const a=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i},"drawText"),c=(0,i.K2)((t,e,a,n)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const s=(0,r.J)(n);i.attr("xlink:href",s)},"drawImage"),h=(0,i.K2)((t,e,a,n)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const s=(0,r.J)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),d=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}}]); \ No newline at end of file diff --git a/assets/js/4a041602.56376067.js b/assets/js/4a041602.56376067.js new file mode 100644 index 0000000..c2cc653 --- /dev/null +++ b/assets/js/4a041602.56376067.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2605],{6776:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"sdk/oauth-client","title":"OAuth Client","description":"The core OAuth client handles DPoP key provisioning, session registration, and session restoration against a HappyView instance. It\'s platform-agnostic \u2014 you provide a CryptoAdapter and optional StorageAdapter for your environment.","source":"@site/docs/sdk/oauth-client.md","sourceDirName":"sdk","slug":"/sdk/oauth-client","permalink":"/sdk/oauth-client","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lex Agent","permalink":"/sdk/lex-agent"},"next":{"title":"Browser Client","permalink":"/sdk/oauth-client-browser"}}');var r=t(199),i=t(2560);const o={},a="OAuth Client",d={},c=[{value:"Installation",id:"installation",level:2},{value:"Setup",id:"setup",level:2},{value:"DPoP key provisioning",id:"dpop-key-provisioning",level:2},{value:"Session registration",id:"session-registration",level:2},{value:"Making authenticated requests",id:"making-authenticated-requests",level:2},{value:"Session restoration",id:"session-restoration",level:2},{value:"Logout",id:"logout",level:2},{value:"Adapters",id:"adapters",level:2},{value:"CryptoAdapter",id:"cryptoadapter",level:3},{value:"StorageAdapter",id:"storageadapter",level:3},{value:"Error handling",id:"error-handling",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"oauth-client",children:"OAuth Client"})}),"\n",(0,r.jsxs)(n.p,{children:["The core OAuth client handles DPoP key provisioning, session registration, and session restoration against a HappyView instance. It's platform-agnostic \u2014 you provide a ",(0,r.jsx)(n.code,{children:"CryptoAdapter"})," and optional ",(0,r.jsx)(n.code,{children:"StorageAdapter"})," for your environment."]}),"\n",(0,r.jsxs)(n.p,{children:["If you're building a browser app, use the ",(0,r.jsx)(n.a,{href:"/sdk/oauth-client-browser",children:"Browser Client"})," instead. It wraps this package with Web Crypto, localStorage, and a complete OAuth redirect flow."]}),"\n",(0,r.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"npm install @happyview/oauth-client\n"})}),"\n",(0,r.jsx)(n.h2,{id:"setup",children:"Setup"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'import { HappyViewOAuthClient } from "@happyview/oauth-client";\n\nconst client = new HappyViewOAuthClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n clientSecret: "hvs_your_secret", // optional, for confidential clients\n crypto: myCryptoAdapter,\n storage: myStorageAdapter, // optional, defaults to in-memory\n});\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"clientSecret"})," parameter makes this a ",(0,r.jsx)(n.strong,{children:"confidential client"}),". Omit it for public clients (browser apps), which use PKCE instead. See ",(0,r.jsx)(n.a,{href:"/getting-started/authentication#api-clients-confidential-vs-public",children:"Authentication \u2014 API clients"})," for details."]}),"\n",(0,r.jsx)(n.h2,{id:"dpop-key-provisioning",children:"DPoP key provisioning"}),"\n",(0,r.jsxs)(n.p,{children:["Request a DPoP keypair from the HappyView instance. This is the first step of the ",(0,r.jsx)(n.a,{href:"/getting-started/authentication#dpop-key-provisioning-for-third-party-apps",children:"DPoP key provisioning flow"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"const { provisionId, dpopKey, pkceVerifier } =\n await client.provisionDpopKey();\n"})}),"\n",(0,r.jsxs)(n.p,{children:["For public clients, ",(0,r.jsx)(n.code,{children:"pkceVerifier"})," is included and must be passed back when registering the session. For confidential clients it will be ",(0,r.jsx)(n.code,{children:"undefined"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the returned ",(0,r.jsx)(n.code,{children:"dpopKey"})," (a private JWK) as your DPoP keypair during your atproto OAuth flow with the user's PDS."]}),"\n",(0,r.jsx)(n.h2,{id:"session-registration",children:"Session registration"}),"\n",(0,r.jsx)(n.p,{children:"After completing OAuth authorization with the user's PDS, register the session with HappyView:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'const session = await client.registerSession({\n provisionId,\n pkceVerifier, // required for public clients\n did: "did:plc:abc123",\n accessToken: tokens.access_token,\n refreshToken: tokens.refresh_token,\n scopes: "atproto",\n pdsUrl: "https://bsky.social",\n issuer: tokens.iss,\n dpopKey,\n});\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The returned ",(0,r.jsx)(n.code,{children:"HappyViewSession"})," is ready to make authenticated requests. The session data is also persisted to the ",(0,r.jsx)(n.code,{children:"StorageAdapter"})," for later restoration."]}),"\n",(0,r.jsx)(n.h2,{id:"making-authenticated-requests",children:"Making authenticated requests"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"HappyViewSession.fetchHandler"})," works like ",(0,r.jsx)(n.code,{children:"fetch"})," but automatically attaches DPoP proof, authorization, and client key headers:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'// Relative path \u2014 prepends the HappyView instance URL\nconst response = await session.fetchHandler(\n "/xrpc/com.example.getStuff?limit=10",\n { method: "GET" },\n);\n\n// Absolute URL \u2014 used as-is\nconst response = await session.fetchHandler(\n "https://other-service.example.com/xrpc/test.method",\n { method: "GET" },\n);\n'})}),"\n",(0,r.jsx)(n.h2,{id:"session-restoration",children:"Session restoration"}),"\n",(0,r.jsx)(n.p,{children:"Restore a previously stored session without re-authenticating:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'// Restore the last active session\nconst session = await client.restore();\n\n// Restore a specific user\'s session\nconst session = await client.restoreSession("did:plc:abc123");\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Returns ",(0,r.jsx)(n.code,{children:"null"})," if no stored session is found."]}),"\n",(0,r.jsx)(n.h2,{id:"logout",children:"Logout"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'await client.deleteSession("did:plc:abc123");\n'})}),"\n",(0,r.jsx)(n.p,{children:"This deletes the session from both HappyView and local storage."}),"\n",(0,r.jsx)(n.h2,{id:"adapters",children:"Adapters"}),"\n",(0,r.jsx)(n.h3,{id:"cryptoadapter",children:"CryptoAdapter"}),"\n",(0,r.jsx)(n.p,{children:"Implement this interface for your platform's cryptographic primitives:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"interface CryptoAdapter {\n generatePkceVerifier(): Promise;\n computePkceChallenge(verifier: string): Promise;\n signEs256(privateKey: JsonWebKey, payload: Uint8Array): Promise;\n sha256(data: Uint8Array): Promise;\n getRandomValues(length: number): Uint8Array;\n}\n"})}),"\n",(0,r.jsx)(n.h3,{id:"storageadapter",children:"StorageAdapter"}),"\n",(0,r.jsx)(n.p,{children:"Implement this interface to persist sessions:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:"interface StorageAdapter {\n get(key: string): Promise;\n set(key: string, value: string): Promise;\n delete(key: string): Promise;\n}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["If no ",(0,r.jsx)(n.code,{children:"StorageAdapter"})," is provided, sessions are stored in memory and won't survive page reloads or process restarts."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["The built-in ",(0,r.jsx)(n.code,{children:"MemoryStorage"})," is exported for testing. In production, always provide a persistent storage adapter."]})}),"\n",(0,r.jsx)(n.h2,{id:"error-handling",children:"Error handling"}),"\n",(0,r.jsxs)(n.p,{children:["All errors extend ",(0,r.jsx)(n.code,{children:"HappyViewError"}),":"]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Error"}),(0,r.jsx)(n.th,{children:"When"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ApiError"})}),(0,r.jsxs)(n.td,{children:["HappyView API returned a non-OK response (has ",(0,r.jsx)(n.code,{children:"status"})," and ",(0,r.jsx)(n.code,{children:"body"}),")"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"AuthenticationError"})}),(0,r.jsx)(n.td,{children:"Authentication failed (default status 401)"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"InvalidStateError"})}),(0,r.jsx)(n.td,{children:"Missing or invalid OAuth state"})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"TokenExchangeError"})}),(0,r.jsxs)(n.td,{children:["Token exchange with the PDS failed (has ",(0,r.jsx)(n.code,{children:"status"})," and ",(0,r.jsx)(n.code,{children:"body"}),")"]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"ResolutionError"})}),(0,r.jsx)(n.td,{children:"Handle or DID resolution failed"})]})]})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'import { ApiError } from "@happyview/oauth-client";\n\ntry {\n await client.registerSession(params);\n} catch (err) {\n if (err instanceof ApiError) {\n console.error(`API error ${err.status}:`, err.body);\n }\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(63);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5043.2bc13b96.js b/assets/js/5043.2bc13b96.js new file mode 100644 index 0000000..aaf8c5b --- /dev/null +++ b/assets/js/5043.2bc13b96.js @@ -0,0 +1,2 @@ +/*! For license information please see 5043.2bc13b96.js.LICENSE.txt */ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5043],{9374:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},9627:(t,e,r)=>{"use strict";e.J=function(t){if(!t)return i.BLANK_URL;var e,r=a(t.trim());do{e=(r=a(r=o(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var s=r;if(!s)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(s))return s;var n=s.trimStart(),l=n.match(i.urlSchemeRegex);if(!l)return s;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=n.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var d=new URL(c);return d.protocol=d.protocol.toLowerCase(),d.hostname=d.hostname.toLowerCase(),d.toString()}return c};var i=r(9374);function o(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function a(t){try{return decodeURIComponent(t)}catch(e){return t}}},3930:function(t){t.exports=function(){"use strict";var t=1e3,e=6e4,r=36e5,i="millisecond",o="second",a="minute",s="hour",n="day",l="week",h="month",c="quarter",d="year",u="date",p="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,f=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},C={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(o,2,"0")},m:function t(e,r){if(e.date()1)return t(s[0])}else{var n=e.name;b[n]=e,o=n}return!i&&o&&(x=o),o||!i&&x},B=function(t,e){if(T(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new A(r)},w=C;w.l=S,w.i=T,w.w=function(t,e){return B(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var A=function(){function y(t){this.$L=S(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[k]=!0}var m=y.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(g);if(i){var o=i[2]-1||0,a=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],o,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return w},m.isValid=function(){return!(this.$d.toString()===p)},m.isSame=function(t,e){var r=B(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return B(t){"use strict";function i(t,e,r){if(t&&t.length){const[i,o]=e,a=Math.PI/180*r,s=Math.cos(a),n=Math.sin(a);for(const e of t){const[t,r]=e;e[0]=(t-i)*s-(r-o)*n+i,e[1]=(t-i)*n+(r-o)*s+o}}}function o(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,r,a=1){const s=r,n=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(s)for(const o of l)i(o,h,s);const c=function(t,e,r){const i=[];for(const c of t){const t=[...c];o(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const a=[];e=Math.max(e,.1);const s=[];for(const o of i)for(let t=0;tt.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return a;let n=[],l=s[0].ymin,h=0;for(;n.length||s.length;){if(s.length){let t=-1;for(let e=0;el);e++)t=e;s.splice(0,t+1).forEach(t=>{n.push({s:l,edge:t})})}if(n=n.filter(t=>!(t.edge.ymax<=l)),n.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&n.length>1)for(let t=0;t=n.length)break;const r=n[t].edge,i=n[e].edge;a.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,n.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return a}(l,n,a);if(s){for(const t of l)i(t,h,-s);!function(t,e,r){const o=[];t.forEach(t=>o.push(...t)),i(o,e,r)}(c,h,-s)}return c}function s(t,e){var r;const i=e.hachureAngle+90;let o=e.hachureGap;o<0&&(o=4*e.strokeWidth),o=Math.round(Math.max(o,.1));let s=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(s=o),a(t,o,i,s||1)}r.d(e,{A:()=>ot});class n{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=s(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends n{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=s(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,a=[],n=.5*r*Math.cos(o),h=.5*r*Math.sin(o);for(const[s,c]of i)l([s,c])&&a.push([[s[0]-n,s[1]+h],[...c]],[[s[0]+n,s[1]-h],[...c]]);return{type:"fillSketch",ops:this.renderLines(a,e)}}}class c extends n{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,i);return r.ops=r.ops.concat(o.ops),r}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=s(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);const a=i/4;for(const s of t){const t=l(s),n=t/i,h=Math.ceil(n)-1,c=t-h*i,d=(s[0][0]+s[1][0])/2-i/4,u=Math.min(s[0][1],s[1][1]);for(let s=0;s{const a=l(t),s=Math.floor(a/(r+i)),n=(a+i-s*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const d=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let l=0;l{const o=l(t),a=Math.round(o/(2*e));let s=t[0],n=t[1];s[0]>n[0]&&(s=t[1],n=t[0]);const h=Math.atan((n[1]-s[1])/(n[0]-s[0]));for(let l=0;li%2?t+r:t+e);a.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":a.push({key:"Q",data:[...n]}),e=n[2],r=n[3];break;case"q":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":a.push({key:"A",data:[...n]}),e=n[5],r=n[6];break;case"a":e+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],e,r]});break;case"H":a.push({key:"H",data:[...n]}),e=n[0];break;case"h":e+=n[0],a.push({key:"H",data:[e]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),e=n[2],r=n[3];break;case"s":{const t=n.map((t,i)=>i%2?t+r:t+e);a.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":a.push({key:"T",data:[...n]}),e=n[0],r=n[1];break;case"t":e+=n[0],r+=n[1],a.push({key:"T",data:[e,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),e=i,r=o}return a}function b(t){const e=[];let r="",i=0,o=0,a=0,s=0,n=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,o]=c,[a,s]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],o=c[5],n=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,o]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,o]});break;case"V":o=c[0],e.push({key:"L",data:[i,o]});break;case"S":{let t=0,a=0;"C"===r||"S"===r?(t=i+(i-n),a=o+(o-l)):(t=i,a=o),e.push({key:"C",data:[t,a,...c]}),n=c[0],l=c[1],i=c[2],o=c[3];break}case"T":{const[t,a]=c;let s=0,h=0;"Q"===r||"T"===r?(s=i+(i-n),h=o+(o-l)):(s=i,h=o);const d=i+2*(s-i)/3,u=o+2*(h-o)/3,p=t+2*(s-t)/3,g=a+2*(h-a)/3;e.push({key:"C",data:[d,u,p,g,t,a]}),n=s,l=h,i=t,o=a;break}case"Q":{const[t,r,a,s]=c,h=i+2*(t-i)/3,d=o+2*(r-o)/3,u=a+2*(t-a)/3,p=s+2*(r-s)/3;e.push({key:"C",data:[h,d,u,p,a,s]}),n=t,l=r,i=a,o=s;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),a=c[2],s=c[3],n=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,o,l,h,l,h]}),i=l,o=h):i===l&&o===h||(T(i,o,l,h,t,r,a,s,n).forEach(function(t){e.push({key:"C",data:t})}),i=l,o=h);break}case"Z":e.push({key:"Z",data:[]}),i=a,o=s}r=h}return e}function k(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function T(t,e,r,i,o,a,s,n,l,h){const c=(d=s,Math.PI*d/180);var d;let u=[],p=0,g=0,f=0,y=0;if(h)[p,g,f,y]=h;else{[t,e]=k(t,e,-c),[r,i]=k(r,i,-c);const s=(t-r)/2,h=(e-i)/2;let d=s*s/(o*o)+h*h/(a*a);d>1&&(d=Math.sqrt(d),o*=d,a*=d);const u=o*o,m=a*a,C=u*m-u*h*h-m*s*s,x=u*h*h+m*s*s,b=(n===l?-1:1)*Math.sqrt(Math.abs(C/x));f=b*o*h/a+(t+r)/2,y=b*-a*s/o+(e+i)/2,p=Math.asin(parseFloat(((e-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),tg&&(p-=2*Math.PI),!l&&g>p&&(g-=2*Math.PI)}let m=g-p;if(Math.abs(m)>120*Math.PI/180){const t=g,e=r,n=i;g=l&&g>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,u=T(r=f+o*Math.cos(g),i=y+a*Math.sin(g),e,n,o,a,s,0,l,[g,t,f,y])}m=g-p;const C=Math.cos(p),x=Math.sin(p),b=Math.cos(g),S=Math.sin(g),B=Math.tan(m/4),w=4/3*o*B,A=4/3*a*B,L=[t,e],v=[t+w*x,e-A*C],F=[r+w*S,i-A*b],M=[r,i];if(v[0]=2*L[0]-v[0],v[1]=2*L[1]-v[1],h)return[v,F,M].concat(u);{u=[v,F,M].concat(u);const t=[];for(let e=0;e2){const o=[];for(let e=0;e2*Math.PI&&(p=0,g=2*Math.PI);const f=2*Math.PI/l.curveStepCount,y=Math.min(f/2,(g-p)/2),m=W(y,h,c,d,u,p,g,1,l);if(!l.disableMultiStroke){const t=W(y,h,c,d,u,p,g,1.5,l);m.push(...t)}return s&&(n?m.push(...q(h,c,h+d*Math.cos(p),c+u*Math.sin(p),l),...q(h,c,h+d*Math.cos(g),c+u*Math.sin(g),l)):m.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+d*Math.cos(p),c+u*Math.sin(p)]})),{type:"path",ops:m}}function M(t,e){const r=b(x(C(t))),i=[];let o=[0,0],a=[0,0];for(const{key:s,data:n}of r)switch(s){case"M":a=[n[0],n[1]],o=[n[0],n[1]];break;case"L":i.push(...q(a[0],a[1],n[0],n[1],e)),a=[n[0],n[1]];break;case"C":{const[t,r,o,s,l,h]=n;i.push(...N(t,r,o,s,l,h,a,e)),a=[l,h];break}case"Z":i.push(...q(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]]}return{type:"path",ops:i}}function _(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+D(t,e),i[0][1]+D(t,e)]});for(let a=1;a500?.4:-.0016668*l+1.233334;let c=o.maxRandomnessOffset||0;c*c*100>n&&(c=l/10);const d=c/2,u=.2+.2*O(o);let p=o.bowing*o.maxRandomnessOffset*(i-e)/200,g=o.bowing*o.maxRandomnessOffset*(t-r)/200;p=D(p,o,h),g=D(g,o,h);const f=[],y=()=>D(d,o,h),m=()=>D(c,o,h),C=o.preserveVertices;return a&&(s?f.push({op:"move",data:[t+(C?0:y()),e+(C?0:y())]}):f.push({op:"move",data:[t+(C?0:D(c,o,h)),e+(C?0:D(c,o,h))]})),s?f.push({op:"bcurveTo",data:[p+t+(r-t)*u+y(),g+e+(i-e)*u+y(),p+t+2*(r-t)*u+y(),g+e+2*(i-e)*u+y(),r+(C?0:y()),i+(C?0:y())]}):f.push({op:"bcurveTo",data:[p+t+(r-t)*u+m(),g+e+(i-e)*u+m(),p+t+2*(r-t)*u+m(),g+e+2*(i-e)*u+m(),r+(C?0:m()),i+(C?0:m())]}),f}function R(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]),i.push([t[0][0]+D(e,r),t[0][1]+D(e,r)]);for(let o=1;o3){const a=[],s=1-r.curveTightness;o.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+21&&o.push(r)):o.push(r),o.push(t[e+3])}else{const i=.5,a=t[e+0],s=t[e+1],n=t[e+2],l=t[e+3],h=Y(a,s,i),c=Y(s,n,i),d=Y(n,l,i),u=Y(h,c,i),p=Y(c,d,i),g=Y(u,p,i);X([a,h,u,g],0,r,o),X([g,p,d,l],0,r,o)}var a,s;return o}function V(t,e){return Z(t,0,t.length,e)}function Z(t,e,r,i,o){const a=o||[],s=t[e],n=t[r-1];let l=0,h=1;for(let c=e+1;cl&&(l=e,h=c)}return Math.sqrt(l)>i?(Z(t,e,h+1,i,a),Z(t,h,r,i,a)):(a.length||a.push(s),a.push(n)),a}function Q(t,e=.15,r){const i=[],o=(t.length-1)/3;for(let a=0;a0?Z(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,o){const a=this._o(o);return this._d("line",[B(t,e,r,i,a)],a)}rectangle(t,e,r,i,o){const a=this._o(o),s=[],n=function(t,e,r,i,o){return function(t,e){return w(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],o)}(t,e,r,i,a);if(a.fill){const o=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===a.fillStyle?s.push(_([o],a)):s.push(E([o],a))}return a.stroke!==J&&s.push(n),this._d("rectangle",s,a)}ellipse(t,e,r,i,o){const a=this._o(o),s=[],n=L(r,i,a),l=v(t,e,a,n);if(a.fill)if("solid"===a.fillStyle){const r=v(t,e,a,n).opset;r.type="fillPath",s.push(r)}else s.push(E([l.estimatedPoints],a));return a.stroke!==J&&s.push(l.opset),this._d("ellipse",s,a)}circle(t,e,r,i){const o=this.ellipse(t,e,r,r,i);return o.shape="circle",o}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[w(t,!1,r)],r)}arc(t,e,r,i,o,a,s=!1,n){const l=this._o(n),h=[],c=F(t,e,r,i,o,a,s,!0,l);if(s&&l.fill)if("solid"===l.fillStyle){const s=Object.assign({},l);s.disableMultiStroke=!0;const n=F(t,e,r,i,o,a,!0,!1,s);n.type="fillPath",h.push(n)}else h.push(function(t,e,r,i,o,a,s){const n=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=D(.01*h,s),c+=D(.01*c,s);let d=o,u=a;for(;d<0;)d+=2*Math.PI,u+=2*Math.PI;u-d>2*Math.PI&&(d=0,u=2*Math.PI);const p=(u-d)/s.curveStepCount,g=[];for(let f=d;f<=u;f+=p)g.push([n+h*Math.cos(f),l+c*Math.sin(f)]);return g.push([n+h*Math.cos(u),l+c*Math.sin(u)]),g.push([n,l]),E([g],s)}(t,e,r,i,o,a,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],o=A(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=A(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],o=t;if(o.length){const t="number"==typeof o[0][0]?[o]:o;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...Q(H([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...Q(H(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(o),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],o=w(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(_([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(o),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=r.fill&&"transparent"!==r.fill&&r.fill!==J,a=r.stroke!==J,s=!!(r.simplification&&r.simplification<1),n=function(t,e,r){const i=b(x(C(t))),o=[];let a=[],s=[0,0],n=[];const l=()=>{n.length>=4&&a.push(...Q(n,1)),n=[]},h=()=>{l(),a.length&&(o.push(a),a=[])};for(const{key:d,data:u}of i)switch(d){case"M":h(),s=[u[0],u[1]],a.push(s);break;case"L":l(),a.push([u[0],u[1]]);break;case"C":if(!n.length){const t=a.length?a[a.length-1]:s;n.push([t[0],t[1]])}n.push([u[0],u[1]]),n.push([u[2],u[3]]),n.push([u[4],u[5]]);break;case"Z":l(),a.push([s[0],s[1]])}if(h(),!r)return o;const c=[];for(const d of o){const t=V(d,r);t.length&&c.push(t)}return c}(t,0,s?4-4*(r.simplification||1):(1+r.roughness)/2),l=M(t,r);if(o)if("solid"===r.fillStyle)if(1===n.length){const e=M(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(_(n,r));else i.push(E(n,r));return a&&(s?n.forEach(t=>{i.push(w(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const o of e){let t=null;switch(o.type){case"path":t={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":t={d:this.opsToPath(o),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":t=this.fillSketch(o,r)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of e)switch(a.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,o),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,a,o,e),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const o of e.ops){const e="number"==typeof r&&r>=0?o.data.map(t=>+t.toFixed(r)):o.data;switch(o.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a),a}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a),a}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a),a}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o),o}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,o=i.createElementNS(rt,"g"),a=t.options.fixedDecimalPlaceDigits;for(const s of e){let e=null;switch(s.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(s,a)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,s,r)}e&&o.appendChild(e)}return o}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const o=t.createElementNS(rt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",i+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,o){const a=this.gen.line(t,e,r,i,o);return this.draw(a)}rectangle(t,e,r,i,o){const a=this.gen.rectangle(t,e,r,i,o);return this.draw(a)}ellipse(t,e,r,i,o){const a=this.gen.ellipse(t,e,r,i,o);return this.draw(a)}circle(t,e,r,i){const o=this.gen.circle(t,e,r,i);return this.draw(o)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,o,a,s=!1,n){const l=this.gen.arc(t,e,r,i,o,a,s,n);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var ot={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},9594:(t,e,r)=>{"use strict";function i(t){for(var e=[],r=1;ri})},8685:(t,e,r)=>{"use strict";r.d(e,{A:()=>nt});const{entries:i,setPrototypeOf:o,isFrozen:a,getPrototypeOf:s,getOwnPropertyDescriptor:n}=Object;let{freeze:l,seal:h,create:c}=Object,{apply:d,construct:u}="undefined"!=typeof Reflect&&Reflect;l||(l=function(t){return t}),h||(h=function(t){return t}),d||(d=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o1?e-1:0),i=1;i1?r-1:0),o=1;o2&&void 0!==arguments[2]?arguments[2]:C;o&&o(t,null);let i=e.length;for(;i--;){let o=e[i];if("string"==typeof o){const t=r(o);t!==o&&(a(e)||(e[i]=t),o=t)}t[o]=!0}return t}function M(t){for(let e=0;e/gm),G=h(/\$\{[\w\W]*/gm),U=h(/^data-[\-\w.\u00B7-\uFFFF]+$/),Y=h(/^aria-[\-\w]+$/),X=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),V=h(/^(?:\w+script|data):/i),Z=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Q=h(/^html$/i),J=h(/^[a-z][.\w]*(-[.\w]+)+$/i);var tt=Object.freeze({__proto__:null,ARIA_ATTR:Y,ATTR_WHITESPACE:Z,CUSTOM_ELEMENT:J,DATA_ATTR:U,DOCTYPE_NAME:Q,ERB_EXPR:H,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:V,MUSTACHE_EXPR:j,TMPLIT_EXPR:G});const et=1,rt=3,it=7,ot=8,at=9,st=function(){return"undefined"==typeof window?null:window};var nt=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:st();const r=e=>t(e);if(r.version="3.4.0",r.removed=[],!e||!e.document||e.document.nodeType!==at||!e.Element)return r.isSupported=!1,r;let{document:o}=e;const a=o,s=a.currentScript,{DocumentFragment:n,HTMLTemplateElement:h,Node:d,Element:u,NodeFilter:L,NamedNodeMap:v=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:M,DOMParser:j,trustedTypes:H}=e,G=u.prototype,U=E(G,"cloneNode"),Y=E(G,"remove"),V=E(G,"nextSibling"),Z=E(G,"childNodes"),J=E(G,"parentNode");if("function"==typeof h){const t=o.createElement("template");t.content&&t.content.ownerDocument&&(o=t.content.ownerDocument)}let nt,lt="";const{implementation:ht,createNodeIterator:ct,createDocumentFragment:dt,getElementsByTagName:ut}=o,{importNode:pt}=a;let gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof i&&"function"==typeof J&&ht&&void 0!==ht.createHTMLDocument;const{MUSTACHE_EXPR:ft,ERB_EXPR:yt,TMPLIT_EXPR:mt,DATA_ATTR:Ct,ARIA_ATTR:xt,IS_SCRIPT_OR_DATA:bt,ATTR_WHITESPACE:kt,CUSTOM_ELEMENT:Tt}=tt;let{IS_ALLOWED_URI:St}=tt,Bt=null;const wt=F({},[...$,...O,...I,...q,...R]);let At=null;const Lt=F({},[...z,...P,...W,...N]);let vt=Object.seal(c(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ft=null,Mt=null;const _t=Object.seal(c(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Et=!0,$t=!0,Ot=!1,It=!0,Dt=!1,qt=!0,Kt=!1,Rt=!1,zt=!1,Pt=!1,Wt=!1,Nt=!1,jt=!0,Ht=!1,Gt=!0,Ut=!1,Yt={},Xt=null;const Vt=F({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Zt=null;const Qt=F({},["audio","video","img","source","image","track"]);let Jt=null;const te=F({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",re="http://www.w3.org/2000/svg",ie="http://www.w3.org/1999/xhtml";let oe=ie,ae=!1,se=null;const ne=F({},[ee,re,ie],x);let le=F({},["mi","mo","mn","ms","mtext"]),he=F({},["annotation-xml"]);const ce=F({},["title","style","font","a","script"]);let de=null;const ue=["application/xhtml+xml","text/html"];let pe=null,ge=null;const fe=o.createElement("form"),ye=function(t){return t instanceof RegExp||t instanceof Function},me=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ge||ge!==t){if(t&&"object"==typeof t||(t={}),t=_(t),de=-1===ue.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,pe="application/xhtml+xml"===de?x:C,Bt=B(t,"ALLOWED_TAGS")?F({},t.ALLOWED_TAGS,pe):wt,At=B(t,"ALLOWED_ATTR")?F({},t.ALLOWED_ATTR,pe):Lt,se=B(t,"ALLOWED_NAMESPACES")?F({},t.ALLOWED_NAMESPACES,x):ne,Jt=B(t,"ADD_URI_SAFE_ATTR")?F(_(te),t.ADD_URI_SAFE_ATTR,pe):te,Zt=B(t,"ADD_DATA_URI_TAGS")?F(_(Qt),t.ADD_DATA_URI_TAGS,pe):Qt,Xt=B(t,"FORBID_CONTENTS")?F({},t.FORBID_CONTENTS,pe):Vt,Ft=B(t,"FORBID_TAGS")?F({},t.FORBID_TAGS,pe):_({}),Mt=B(t,"FORBID_ATTR")?F({},t.FORBID_ATTR,pe):_({}),Yt=!!B(t,"USE_PROFILES")&&t.USE_PROFILES,Et=!1!==t.ALLOW_ARIA_ATTR,$t=!1!==t.ALLOW_DATA_ATTR,Ot=t.ALLOW_UNKNOWN_PROTOCOLS||!1,It=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Dt=t.SAFE_FOR_TEMPLATES||!1,qt=!1!==t.SAFE_FOR_XML,Kt=t.WHOLE_DOCUMENT||!1,Pt=t.RETURN_DOM||!1,Wt=t.RETURN_DOM_FRAGMENT||!1,Nt=t.RETURN_TRUSTED_TYPE||!1,zt=t.FORCE_BODY||!1,jt=!1!==t.SANITIZE_DOM,Ht=t.SANITIZE_NAMED_PROPS||!1,Gt=!1!==t.KEEP_CONTENT,Ut=t.IN_PLACE||!1,St=t.ALLOWED_URI_REGEXP||X,oe=t.NAMESPACE||ie,le=t.MATHML_TEXT_INTEGRATION_POINTS||le,he=t.HTML_INTEGRATION_POINTS||he,vt=t.CUSTOM_ELEMENT_HANDLING||c(null),t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(vt.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ye(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(vt.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(vt.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Dt&&($t=!1),Wt&&(Pt=!0),Yt&&(Bt=F({},R),At=c(null),!0===Yt.html&&(F(Bt,$),F(At,z)),!0===Yt.svg&&(F(Bt,O),F(At,P),F(At,N)),!0===Yt.svgFilters&&(F(Bt,I),F(At,P),F(At,N)),!0===Yt.mathMl&&(F(Bt,q),F(At,W),F(At,N))),_t.tagCheck=null,_t.attributeCheck=null,t.ADD_TAGS&&("function"==typeof t.ADD_TAGS?_t.tagCheck=t.ADD_TAGS:(Bt===wt&&(Bt=_(Bt)),F(Bt,t.ADD_TAGS,pe))),t.ADD_ATTR&&("function"==typeof t.ADD_ATTR?_t.attributeCheck=t.ADD_ATTR:(At===Lt&&(At=_(At)),F(At,t.ADD_ATTR,pe))),t.ADD_URI_SAFE_ATTR&&F(Jt,t.ADD_URI_SAFE_ATTR,pe),t.FORBID_CONTENTS&&(Xt===Vt&&(Xt=_(Xt)),F(Xt,t.FORBID_CONTENTS,pe)),t.ADD_FORBID_CONTENTS&&(Xt===Vt&&(Xt=_(Xt)),F(Xt,t.ADD_FORBID_CONTENTS,pe)),Gt&&(Bt["#text"]=!0),Kt&&F(Bt,["html","head","body"]),Bt.table&&(F(Bt,["tbody"]),delete Ft.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw A('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');nt=t.TRUSTED_TYPES_POLICY,lt=nt.createHTML("")}else void 0===nt&&(nt=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:t=>t,createScriptURL:t=>t})}catch(a){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(H,s)),null!==nt&&"string"==typeof lt&&(lt=nt.createHTML(""));l&&l(t),ge=t}},Ce=F({},[...O,...I,...D]),xe=F({},[...q,...K]),be=function(t){y(r.removed,{element:t});try{J(t).removeChild(t)}catch(e){Y(t)}},ke=function(t,e){try{y(r.removed,{attribute:e.getAttributeNode(t),from:e})}catch(i){y(r.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(Pt||Wt)try{be(e)}catch(i){}else try{e.setAttribute(t,"")}catch(i){}},Te=function(t){let e=null,r=null;if(zt)t=""+t;else{const e=b(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===de&&oe===ie&&(t=''+t+"");const i=nt?nt.createHTML(t):t;if(oe===ie)try{e=(new j).parseFromString(i,de)}catch(s){}if(!e||!e.documentElement){e=ht.createDocument(oe,"template",null);try{e.documentElement.innerHTML=ae?lt:i}catch(s){}}const a=e.body||e.documentElement;return t&&r&&a.insertBefore(o.createTextNode(r),a.childNodes[0]||null),oe===ie?ut.call(e,Kt?"html":"body")[0]:Kt?e.documentElement:a},Se=function(t){return ct.call(t.ownerDocument||t,t,L.SHOW_ELEMENT|L.SHOW_COMMENT|L.SHOW_TEXT|L.SHOW_PROCESSING_INSTRUCTION|L.SHOW_CDATA_SECTION,null)},Be=function(t){return t instanceof M&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof v)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},we=function(t){return"function"==typeof d&&t instanceof d};function Ae(t,e,i){p(t,t=>{t.call(r,e,i,ge)})}const Le=function(t){let e=null;if(Ae(gt.beforeSanitizeElements,t,null),Be(t))return be(t),!0;const i=pe(t.nodeName);if(Ae(gt.uponSanitizeElement,t,{tagName:i,allowedTags:Bt}),qt&&t.hasChildNodes()&&!we(t.firstElementChild)&&w(/<[/\w!]/g,t.innerHTML)&&w(/<[/\w!]/g,t.textContent))return be(t),!0;if(qt&&t.namespaceURI===ie&&"style"===i&&we(t.firstElementChild))return be(t),!0;if(t.nodeType===it)return be(t),!0;if(qt&&t.nodeType===ot&&w(/<[/\w]/g,t.data))return be(t),!0;if(Ft[i]||!(_t.tagCheck instanceof Function&&_t.tagCheck(i))&&!Bt[i]){if(!Ft[i]&&Fe(i)){if(vt.tagNameCheck instanceof RegExp&&w(vt.tagNameCheck,i))return!1;if(vt.tagNameCheck instanceof Function&&vt.tagNameCheck(i))return!1}if(Gt&&!Xt[i]){const e=J(t)||t.parentNode,r=Z(t)||t.childNodes;if(r&&e){for(let i=r.length-1;i>=0;--i){const o=U(r[i],!0);o.__removalCount=(t.__removalCount||0)+1,e.insertBefore(o,V(t))}}}return be(t),!0}return t instanceof u&&!function(t){let e=J(t);e&&e.tagName||(e={namespaceURI:oe,tagName:"template"});const r=C(t.tagName),i=C(e.tagName);return!!se[t.namespaceURI]&&(t.namespaceURI===re?e.namespaceURI===ie?"svg"===r:e.namespaceURI===ee?"svg"===r&&("annotation-xml"===i||le[i]):Boolean(Ce[r]):t.namespaceURI===ee?e.namespaceURI===ie?"math"===r:e.namespaceURI===re?"math"===r&&he[i]:Boolean(xe[r]):t.namespaceURI===ie?!(e.namespaceURI===re&&!he[i])&&!(e.namespaceURI===ee&&!le[i])&&!xe[r]&&(ce[r]||!Ce[r]):!("application/xhtml+xml"!==de||!se[t.namespaceURI]))}(t)?(be(t),!0):"noscript"!==i&&"noembed"!==i&&"noframes"!==i||!w(/<\/no(script|embed|frames)/i,t.innerHTML)?(Dt&&t.nodeType===rt&&(e=t.textContent,p([ft,yt,mt],t=>{e=k(e,t," ")}),t.textContent!==e&&(y(r.removed,{element:t.cloneNode()}),t.textContent=e)),Ae(gt.afterSanitizeElements,t,null),!1):(be(t),!0)},ve=function(t,e,r){if(Mt[e])return!1;if(jt&&("id"===e||"name"===e)&&(r in o||r in fe))return!1;if($t&&!Mt[e]&&w(Ct,e));else if(Et&&w(xt,e));else if(_t.attributeCheck instanceof Function&&_t.attributeCheck(e,t));else if(!At[e]||Mt[e]){if(!(Fe(t)&&(vt.tagNameCheck instanceof RegExp&&w(vt.tagNameCheck,t)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(t))&&(vt.attributeNameCheck instanceof RegExp&&w(vt.attributeNameCheck,e)||vt.attributeNameCheck instanceof Function&&vt.attributeNameCheck(e,t))||"is"===e&&vt.allowCustomizedBuiltInElements&&(vt.tagNameCheck instanceof RegExp&&w(vt.tagNameCheck,r)||vt.tagNameCheck instanceof Function&&vt.tagNameCheck(r))))return!1}else if(Jt[e]);else if(w(St,k(r,kt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==T(r,"data:")||!Zt[t]){if(Ot&&!w(bt,k(r,kt,"")));else if(r)return!1}else;return!0},Fe=function(t){return"annotation-xml"!==t&&b(t,Tt)},Me=function(t){Ae(gt.beforeSanitizeAttributes,t,null);const{attributes:e}=t;if(!e||Be(t))return;const i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:At,forceKeepAttr:void 0};let o=e.length;for(;o--;){const s=e[o],{name:n,namespaceURI:l,value:h}=s,c=pe(n),d=h;let u="value"===n?d:S(d);if(i.attrName=c,i.attrValue=u,i.keepAttr=!0,i.forceKeepAttr=void 0,Ae(gt.uponSanitizeAttribute,t,i),u=i.attrValue,!Ht||"id"!==c&&"name"!==c||(ke(n,t),u="user-content-"+u),qt&&w(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,u)){ke(n,t);continue}if("attributename"===c&&b(u,"href")){ke(n,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr){ke(n,t);continue}if(!It&&w(/\/>/i,u)){ke(n,t);continue}Dt&&p([ft,yt,mt],t=>{u=k(u,t," ")});const g=pe(t.nodeName);if(ve(g,c,u)){if(nt&&"object"==typeof H&&"function"==typeof H.getAttributeType)if(l);else switch(H.getAttributeType(g,c)){case"TrustedHTML":u=nt.createHTML(u);break;case"TrustedScriptURL":u=nt.createScriptURL(u)}if(u!==d)try{l?t.setAttributeNS(l,n,u):t.setAttribute(n,u),Be(t)?be(t):f(r.removed)}catch(a){ke(n,t)}}else ke(n,t)}Ae(gt.afterSanitizeAttributes,t,null)},_e=function(t){let e=null;const r=Se(t);for(Ae(gt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)Ae(gt.uponSanitizeShadowNode,e,null),Le(e),Me(e),e.content instanceof n&&_e(e.content);Ae(gt.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,l=null;if(ae=!t,ae&&(t="\x3c!--\x3e"),"string"!=typeof t&&!we(t)){if("function"!=typeof t.toString)throw A("toString is not a function");if("string"!=typeof(t=t.toString()))throw A("dirty is not a string, aborting")}if(!r.isSupported)return t;if(Rt||me(e),r.removed=[],"string"==typeof t&&(Ut=!1),Ut){if(t.nodeName){const e=pe(t.nodeName);if(!Bt[e]||Ft[e])throw A("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof d)i=Te("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),o.nodeType===et&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!Pt&&!Dt&&!Kt&&-1===t.indexOf("<"))return nt&&Nt?nt.createHTML(t):t;if(i=Te(t),!i)return Pt?null:Nt?lt:""}i&&zt&&be(i.firstChild);const h=Se(Ut?t:i);for(;s=h.nextNode();)Le(s),Me(s),s.content instanceof n&&_e(s.content);if(Ut)return t;if(Pt){if(Dt){i.normalize();let t=i.innerHTML;p([ft,yt,mt],e=>{t=k(t,e," ")}),i.innerHTML=t}if(Wt)for(l=dt.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(At.shadowroot||At.shadowrootmode)&&(l=pt.call(a,l,!0)),l}let c=Kt?i.outerHTML:i.innerHTML;return Kt&&Bt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&w(Q,i.ownerDocument.doctype.name)&&(c="\n"+c),Dt&&p([ft,yt,mt],t=>{c=k(c,t," ")}),nt&&Nt?nt.createHTML(c):c},r.setConfig=function(){me(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Rt=!0},r.clearConfig=function(){ge=null,Rt=!1},r.isValidAttribute=function(t,e,r){ge||me({});const i=pe(t),o=pe(e);return ve(i,o,r)},r.addHook=function(t,e){"function"==typeof e&&y(gt[t],e)},r.removeHook=function(t,e){if(void 0!==e){const r=g(gt[t],e);return-1===r?void 0:m(gt[t],r,1)[0]}return f(gt[t])},r.removeHooks=function(t){gt[t]=[]},r.removeAllHooks=function(){gt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},4425:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(6063),o=r(7004);const a=class{constructor(){this.type=o.Z.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=o.Z.ALL}is(t){return this.type===t}};const s=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=o.Z.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:o}=t;void 0===e&&(t.h=i.A.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.A.channel.rgb2hsl(t,"s")),void 0===o&&(t.l=i.A.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:o}=t;void 0===e&&(t.r=i.A.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.A.channel.hsl2rgb(t,"g")),void 0===o&&(t.b=i.A.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(o.Z.HSL)||void 0===e?(this._ensureHSL(),i.A.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(o.Z.RGB)||void 0===e?(this._ensureRGB(),i.A.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(o.Z.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(o.Z.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},9404:(t,e,r)=>{"use strict";r.d(e,{A:()=>f});var i=r(4425),o=r(7004);const a={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(a.re);if(!e)return;const r=e[1],o=parseInt(r,16),s=r.length,n=s%4==0,l=s>4,h=l?1:17,c=l?8:4,d=n?0:-1,u=l?255:15;return i.A.set({r:(o>>c*(d+3)&u)*h,g:(o>>c*(d+2)&u)*h,b:(o>>c*(d+1)&u)*h,a:n?(o&u)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:a}=t;return a<1?`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}${o.Y[Math.round(255*a)]}`:`#${o.Y[Math.round(e)]}${o.Y[Math.round(r)]}${o.Y[Math.round(i)]}`}},s=a;var n=r(6063);const l={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return n.A.channel.clamp.h(.9*parseFloat(t));case"rad":return n.A.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return n.A.channel.clamp.h(360*parseFloat(t))}}return n.A.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,o,a,s,h,c]=r;return i.A.set({h:l._hue2deg(o),s:n.A.channel.clamp.s(parseFloat(a)),l:n.A.channel.clamp.l(parseFloat(s)),a:h?n.A.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:o}=t;return o<1?`hsla(${n.A.lang.round(e)}, ${n.A.lang.round(r)}%, ${n.A.lang.round(i)}%, ${o})`:`hsl(${n.A.lang.round(e)}, ${n.A.lang.round(r)}%, ${n.A.lang.round(i)}%)`}},h=l,c={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=c.colors[t];if(e)return s.parse(e)},stringify:t=>{const e=s.stringify(t);for(const r in c.colors)if(c.colors[r]===e)return r}},d=c,u={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const r=t.match(u.re);if(!r)return;const[,o,a,s,l,h,c,d,p]=r;return i.A.set({r:n.A.channel.clamp.r(a?2.55*parseFloat(o):parseFloat(o)),g:n.A.channel.clamp.g(l?2.55*parseFloat(s):parseFloat(s)),b:n.A.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:d?n.A.channel.clamp.a(p?parseFloat(d)/100:parseFloat(d)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`rgba(${n.A.lang.round(e)}, ${n.A.lang.round(r)}, ${n.A.lang.round(i)}, ${n.A.lang.round(o)})`:`rgb(${n.A.lang.round(e)}, ${n.A.lang.round(r)}, ${n.A.lang.round(i)})`}},p=u,g={format:{keyword:c,hex:s,rgb:u,rgba:u,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=s.parse(t)||p.parse(t)||h.parse(t)||d.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(o.Z.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?p.stringify(t):s.stringify(t)},f=g},7004:(t,e,r)=>{"use strict";r.d(e,{Y:()=>o,Z:()=>a});var i=r(6063);const o={};for(let s=0;s<=255;s++)o[s]=i.A.unit.dec2hex(s);const a={ALL:0,RGB:1,HSL:2}},4485:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6063),o=r(9404);const a=(t,e,r)=>{const a=o.A.parse(t),s=a[e],n=i.A.channel.clamp[e](s+r);return s!==n&&(a[e]=n),o.A.stringify(a)}},3854:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(6063),o=r(9404);const a=(t,e)=>{const r=o.A.parse(t);for(const o in e)r[o]=i.A.channel.clamp[o](e[o]);return o.A.stringify(r)}},5485:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(4485);const o=(t,e)=>(0,i.A)(t,"l",-e)},4713:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(6063),o=r(9404);const a=t=>{const{r:e,g:r,b:a}=o.A.parse(t),s=.2126*i.A.channel.toLinear(e)+.7152*i.A.channel.toLinear(r)+.0722*i.A.channel.toLinear(a);return i.A.lang.round(s)},s=t=>a(t)>=.5,n=t=>!s(t)},279:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(4485);const o=(t,e)=>(0,i.A)(t,"l",e)},9543:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(6063),o=r(4425),a=r(9404),s=r(3854);const n=(t,e,r=0,n=1)=>{if("number"!=typeof t)return(0,s.A)(t,{a:e});const l=o.A.set({r:i.A.channel.clamp.r(t),g:i.A.channel.clamp.g(e),b:i.A.channel.clamp.b(r),a:i.A.channel.clamp.a(n)});return a.A.stringify(l)}},6063:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});const i={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},o)=>{if(!e)return 2.55*r;t/=360,e/=100;const a=(r/=100)<.5?r*(1+e):r+e-r*e,s=2*r-a;switch(o){case"r":return 255*i.hue2rgb(s,a,t+1/3);case"g":return 255*i.hue2rgb(s,a,t);case"b":return 255*i.hue2rgb(s,a,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const o=Math.max(t,e,r),a=Math.min(t,e,r),s=(o+a)/2;if("l"===i)return 100*s;if(o===a)return 0;const n=o-a;if("s"===i)return 100*(s>.5?n/(2-o-a):n/(o+a));switch(o){case t:return 60*((e-r)/n+(ee>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},8266:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});const i=function(){this.__data__=[],this.size=0};var o=r(1751);const a=function(t,e){for(var r=t.length;r--;)if((0,o.A)(t[r][0],e))return r;return-1};var s=Array.prototype.splice;const n=function(t){var e=this.__data__,r=a(e,t);return!(r<0)&&(r==e.length-1?e.pop():s.call(e,r,1),--this.size,!0)};const l=function(t){var e=this.__data__,r=a(e,t);return r<0?void 0:e[r][1]};const h=function(t){return a(this.__data__,t)>-1};const c=function(t,e){var r=this.__data__,i=a(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var i=r(245),o=r(5380);const a=(0,i.A)(o.A,"Map")},3372:(t,e,r)=>{"use strict";r.d(e,{A:()=>S});const i=(0,r(245).A)(Object,"create");const o=function(){this.__data__=i?i(null):{},this.size=0};const a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e};var s=Object.prototype.hasOwnProperty;const n=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return s.call(e,t)?e[t]:void 0};var l=Object.prototype.hasOwnProperty;const h=function(t){var e=this.__data__;return i?void 0!==e[t]:l.call(e,t)};const c=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};function d(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{"use strict";r.d(e,{A:()=>a});var i=r(245),o=r(5380);const a=(0,i.A)(o.A,"Set")},3771:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var i=r(8266);const o=function(){this.__data__=new i.A,this.size=0};const a=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};const s=function(t){return this.__data__.get(t)};const n=function(t){return this.__data__.has(t)};var l=r(4904),h=r(3372);const c=function(t,e){var r=this.__data__;if(r instanceof i.A){var o=r.__data__;if(!l.A||o.length<199)return o.push([t,e]),this.size=++r.size,this;r=this.__data__=new h.A(o)}return r.set(t,e),this.size=r.size,this};function d(t){var e=this.__data__=new i.A(t);this.size=e.size}d.prototype.clear=o,d.prototype.delete=a,d.prototype.get=s,d.prototype.has=n,d.prototype.set=c;const u=d},8400:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(5380).A.Symbol},2391:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=r(5380).A.Uint8Array},3434:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});const i=function(t,e){for(var r=-1,i=Array(t);++r{"use strict";r.d(e,{A:()=>s});var i=r(9763),o=r(1751),a=Object.prototype.hasOwnProperty;const s=function(t,e,r){var s=t[e];a.call(t,e)&&(0,o.A)(s,r)&&(void 0!==r||e in t)||(0,i.A)(t,e,r)}},9763:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(10);const o=function(t,e,r){"__proto__"==e&&i.A?(0,i.A)(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},7759:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e,r,i){for(var o=-1,a=Object(e),s=i(e),n=s.length;n--;){var l=s[t?n:++o];if(!1===r(a[l],l,a))break}return e}}()},4227:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var i=r(8400),o=Object.prototype,a=o.hasOwnProperty,s=o.toString,n=i.A?i.A.toStringTag:void 0;const l=function(t){var e=a.call(t,n),r=t[n];try{t[n]=void 0;var i=!0}catch(l){}var o=s.call(t);return i&&(e?t[n]=r:delete t[n]),o};var h=Object.prototype.toString;const c=function(t){return h.call(t)};var d=i.A?i.A.toStringTag:void 0;const u=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":d&&d in Object(t)?l(t):c(t)}},7700:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(8656);const o=(0,r(5536).A)(Object.keys,Object);var a=Object.prototype.hasOwnProperty;const s=function(t){if(!(0,i.A)(t))return o(t);var e=[];for(var r in Object(t))a.call(t,r)&&"constructor"!=r&&e.push(r);return e}},6331:(t,e,r)=>{"use strict";r.d(e,{A:()=>s});var i=r(8539),o=r(3752),a=r(1368);const s=function(t,e){return(0,a.A)((0,o.A)(t,e,i.A),t+"")}},5354:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(e){return t(e)}}},2848:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2391);const o=function(t){var e=new t.constructor(t.byteLength);return new i.A(e).set(new i.A(t)),e}},781:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(5380),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===o?i.A.Buffer:void 0,n=s?s.allocUnsafe:void 0;const l=function(t,e){if(e)return t.slice();var r=t.length,i=n?n(r):new t.constructor(r);return t.copy(i),i}},2314:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=r(2848);const o=function(t,e){var r=e?(0,i.A)(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},2352:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r{"use strict";r.d(e,{A:()=>a});var i=r(7776),o=r(9763);const a=function(t,e,r,a){var s=!r;r||(r={});for(var n=-1,l=e.length;++n{"use strict";r.d(e,{A:()=>o});var i=r(245);const o=function(){try{var t=(0,i.A)(Object,"defineProperty");return t({},"",{}),t}catch(e){}}()},669:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i="object"==typeof global&&global&&global.Object===Object&&global},245:(t,e,r)=>{"use strict";r.d(e,{A:()=>C});var i=r(1121);const o=r(5380).A["__core-js_shared__"];var a,s=(a=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"";const n=function(t){return!!s&&s in t};var l=r(6138),h=r(2208),c=/^\[object .+?Constructor\]$/,d=Function.prototype,u=Object.prototype,p=d.toString,g=u.hasOwnProperty,f=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const y=function(t){return!(!(0,l.A)(t)||n(t))&&((0,i.A)(t)?f:c).test((0,h.A)(t))};const m=function(t,e){return null==t?void 0:t[e]};const C=function(t,e){var r=m(t,e);return y(r)?r:void 0}},4218:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=(0,r(5536).A)(Object.getPrototypeOf,Object)},6900:(t,e,r)=>{"use strict";r.d(e,{A:()=>S});var i=r(245),o=r(5380);const a=(0,i.A)(o.A,"DataView");var s=r(4904);const n=(0,i.A)(o.A,"Promise");var l=r(8722);const h=(0,i.A)(o.A,"WeakMap");var c=r(4227),d=r(2208),u="[object Map]",p="[object Promise]",g="[object Set]",f="[object WeakMap]",y="[object DataView]",m=(0,d.A)(a),C=(0,d.A)(s.A),x=(0,d.A)(n),b=(0,d.A)(l.A),k=(0,d.A)(h),T=c.A;(a&&T(new a(new ArrayBuffer(1)))!=y||s.A&&T(new s.A)!=u||n&&T(n.resolve())!=p||l.A&&T(new l.A)!=g||h&&T(new h)!=f)&&(T=function(t){var e=(0,c.A)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,d.A)(r):"";if(i)switch(i){case m:return y;case C:return u;case x:return p;case b:return g;case k:return f}return e});const S=T},5239:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(6138),o=Object.create;const a=function(){function t(){}return function(e){if(!(0,i.A)(e))return{};if(o)return o(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var s=r(4218),n=r(8656);const l=function(t){return"function"!=typeof t.constructor||(0,n.A)(t)?{}:a((0,s.A)(t))}},1310:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=/^(?:0|[1-9]\d*)$/;const o=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t{"use strict";r.d(e,{A:()=>n});var i=r(1751),o=r(2839),a=r(1310),s=r(6138);const n=function(t,e,r){if(!(0,s.A)(r))return!1;var n=typeof e;return!!("number"==n?(0,o.A)(r)&&(0,a.A)(e,r.length):"string"==n&&e in r)&&(0,i.A)(r[e],t)}},8656:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=Object.prototype;const o=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},9388:(t,e,r)=>{"use strict";r.d(e,{A:()=>n});var i=r(669),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,a=o&&"object"==typeof module&&module&&!module.nodeType&&module,s=a&&a.exports===o&&i.A.process;const n=function(){try{var t=a&&a.require&&a.require("util").types;return t||s&&s.binding&&s.binding("util")}catch(e){}}()},5536:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},3752:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});const i=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)};var o=Math.max;const a=function(t,e,r){return e=o(void 0===e?t.length-1:e,0),function(){for(var a=arguments,s=-1,n=o(a.length-e,0),l=Array(n);++s{"use strict";r.d(e,{A:()=>a});var i=r(669),o="object"==typeof self&&self&&self.Object===Object&&self;const a=i.A||o||Function("return this")()},1368:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(6569),o=r(10),a=r(8539);const s=o.A?function(t,e){return(0,o.A)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.A)(e),writable:!0})}:a.A;var n=Date.now;const l=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(s)},2208:(t,e,r)=>{"use strict";r.d(e,{A:()=>o});var i=Function.prototype.toString;const o=function(t){if(null!=t){try{return i.call(t)}catch(e){}try{return t+""}catch(e){}}return""}},6569:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return function(){return t}}},1751:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},8539:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return t}},6789:(t,e,r)=>{"use strict";r.d(e,{A:()=>h});var i=r(4227),o=r(9269);const a=function(t){return(0,o.A)(t)&&"[object Arguments]"==(0,i.A)(t)};var s=Object.prototype,n=s.hasOwnProperty,l=s.propertyIsEnumerable;const h=a(function(){return arguments}())?a:function(t){return(0,o.A)(t)&&n.call(t,"callee")&&!l.call(t,"callee")}},8384:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=Array.isArray},2839:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(1121),o=r(5801);const a=function(t){return null!=t&&(0,o.A)(t.length)&&!(0,i.A)(t)}},1220:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(2839),o=r(9269);const a=function(t){return(0,o.A)(t)&&(0,i.A)(t)}},3449:(t,e,r)=>{"use strict";r.d(e,{A:()=>l});var i=r(5380);const o=function(){return!1};var a="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=a&&"object"==typeof module&&module&&!module.nodeType&&module,n=s&&s.exports===a?i.A.Buffer:void 0;const l=(n?n.isBuffer:void 0)||o},7684:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var i=r(7700),o=r(6900),a=r(6789),s=r(8384),n=r(2839),l=r(3449),h=r(8656),c=r(9044),d=Object.prototype.hasOwnProperty;const u=function(t){if(null==t)return!0;if((0,n.A)(t)&&((0,s.A)(t)||"string"==typeof t||"function"==typeof t.splice||(0,l.A)(t)||(0,c.A)(t)||(0,a.A)(t)))return!t.length;var e=(0,o.A)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,h.A)(t))return!(0,i.A)(t).length;for(var r in t)if(d.call(t,r))return!1;return!0}},1121:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(4227),o=r(6138);const a=function(t){if(!(0,o.A)(t))return!1;var e=(0,i.A)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},5801:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6138:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},9269:(t,e,r)=>{"use strict";r.d(e,{A:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},9044:(t,e,r)=>{"use strict";r.d(e,{A:()=>d});var i=r(4227),o=r(5801),a=r(9269),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1;const n=function(t){return(0,a.A)(t)&&(0,o.A)(t.length)&&!!s[(0,i.A)(t)]};var l=r(5354),h=r(9388),c=h.A&&h.A.isTypedArray;const d=c?(0,l.A)(c):n},4538:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var i=r(3434),o=r(6138),a=r(8656);const s=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e};var n=Object.prototype.hasOwnProperty;const l=function(t){if(!(0,o.A)(t))return s(t);var e=(0,a.A)(t),r=[];for(var i in t)("constructor"!=i||!e&&n.call(t,i))&&r.push(i);return r};var h=r(2839);const c=function(t){return(0,h.A)(t)?(0,i.A)(t,!0):l(t)}},9881:(t,e,r)=>{"use strict";r.d(e,{A:()=>a});var i=r(3372);function o(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,o=e?e.apply(this,i):i[0],a=r.cache;if(a.has(o))return a.get(o);var s=t.apply(this,i);return r.cache=a.set(o,s)||a,s};return r.cache=new(o.Cache||i.A),r}o.Cache=i.A;const a=o},3765:(t,e,r)=>{"use strict";r.d(e,{A:()=>D});var i=r(3771),o=r(9763),a=r(1751);const s=function(t,e,r){(void 0!==r&&!(0,a.A)(t[e],r)||void 0===r&&!(e in t))&&(0,o.A)(t,e,r)};var n=r(7759),l=r(781),h=r(2314),c=r(2352),d=r(5239),u=r(6789),p=r(8384),g=r(1220),f=r(3449),y=r(1121),m=r(6138),C=r(4227),x=r(4218),b=r(9269),k=Function.prototype,T=Object.prototype,S=k.toString,B=T.hasOwnProperty,w=S.call(Object);const A=function(t){if(!(0,b.A)(t)||"[object Object]"!=(0,C.A)(t))return!1;var e=(0,x.A)(t);if(null===e)return!0;var r=B.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&S.call(r)==w};var L=r(9044);const v=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var F=r(1050),M=r(4538);const _=function(t){return(0,F.A)(t,(0,M.A)(t))};const E=function(t,e,r,i,o,a,n){var C=v(t,r),x=v(e,r),b=n.get(x);if(b)s(t,r,b);else{var k=a?a(C,x,r+"",t,e,n):void 0,T=void 0===k;if(T){var S=(0,p.A)(x),B=!S&&(0,f.A)(x),w=!S&&!B&&(0,L.A)(x);k=x,S||B||w?(0,p.A)(C)?k=C:(0,g.A)(C)?k=(0,c.A)(C):B?(T=!1,k=(0,l.A)(x,!0)):w?(T=!1,k=(0,h.A)(x,!0)):k=[]:A(x)||(0,u.A)(x)?(k=C,(0,u.A)(C)?k=_(C):(0,m.A)(C)&&!(0,y.A)(C)||(k=(0,d.A)(x))):T=!1}T&&(n.set(x,k),o(k,x,i,a,n),n.delete(x)),s(t,r,k)}};const $=function t(e,r,o,a,l){e!==r&&(0,n.A)(r,function(n,h){if(l||(l=new i.A),(0,m.A)(n))E(e,r,h,o,t,a,l);else{var c=a?a(v(e,h),n,h+"",e,r,l):void 0;void 0===c&&(c=n),s(e,h,c)}},M.A)};var O=r(6331),I=r(8045);const D=function(t){return(0,O.A)(function(e,r){var i=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,s&&(0,I.A)(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++i{"use strict";r.d(e,{XX:()=>d,q7:()=>u,sO:()=>c});var i=r(1562),o=r(5707),a=r(2101),s=r(5691),n=r(8894),l={common:s.Y2,getConfig:s.zj,insertCluster:o.U,insertEdge:i.Jo,insertEdgeLabel:i.jP,insertMarkers:i.g0,insertNode:o.on,interpolateToCurve:a.Ib,labelHelper:o.Zk,log:n.Rm,positionEdgeLabel:i.T_},h={},c=(0,n.K2)(t=>{for(const e of t)h[e.name]=e},"registerLayoutLoaders");(0,n.K2)(()=>{c([{name:"dagre",loader:(0,n.K2)(async()=>await Promise.all([r.e(156),r.e(1571),r.e(9808),r.e(5471)]).then(r.bind(r,5471)),"loader")},{name:"cose-bilkent",loader:(0,n.K2)(async()=>await Promise.all([r.e(9314),r.e(6101)]).then(r.bind(r,6101)),"loader")}])},"registerDefaultLayoutLoaders")();var d=(0,n.K2)(async(t,e)=>{if(!(t.layoutAlgorithm in h))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const l of t.nodes){const e=l.domId||l.id;l.domId=`${t.diagramId}-${e}`}const r=h[t.layoutAlgorithm],i=await r.loader(),{theme:o,themeVariables:a}=t.config,{useGradient:s,gradientStart:n,gradientStop:c}=a,d=e.attr("id");if(e.append("defs").append("filter").attr("id",`${d}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),e.append("defs").append("filter").attr("id",`${d}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+(o?.includes("dark")?"#FFFFFF":"#000000")),s){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return i.render(t,e,l,{algorithm:r.algorithm})},"render"),u=(0,n.K2)((t="",{fallback:e="dagre"}={})=>{if(t in h)return t;if(e in h)return n.Rm.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},6417:(t,e,r)=>{"use strict";r.d(e,{D:()=>s});var i=r(5691),o=r(8894),a=r(1485),s=(0,o.K2)(t=>{const{securityLevel:e}=(0,i.D7)();let r=(0,a.Ltv)("body");if("sandbox"===e){const e=(0,a.Ltv)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,a.Ltv)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},5707:(t,e,r)=>{"use strict";r.d(e,{DA:()=>b,IU:()=>F,U:()=>v,U7:()=>Me,U_:()=>Ee,Zk:()=>d,aP:()=>Le,gh:()=>_e,lC:()=>p,on:()=>Fe});var i=r(3276),o=r(4061),a=r(7127),s=r(2101),n=r(5691),l=r(8894),h=r(1485),c=r(1965),d=(0,l.K2)(async(t,e,r)=>{let o;const l=e.useHtmlLabels||(0,n._3)((0,n.D7)()?.htmlLabels);o=r||"node default";const c=t.insert("g").attr("class",o).attr("id",e.domId||e.id),d=c.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const p=!!e.icon||!!e.img,g="markdown"===e.labelType,f=await(0,a.GZ)(d,(0,n.jZ)((0,s.Sm)(u),(0,n.D7)()),{useHtmlLabels:l,width:e.width||(0,n.D7)().flowchart?.wrappingWidth,classes:g?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:p,markdown:g},(0,n.D7)());let y=f.getBBox();const m=(e?.padding??0)/2;if(l){const t=f.children[0],e=(0,h.Ltv)(f);await(0,i.X)(t,u),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return l?d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):d.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:c,bbox:y,halfPadding:m,label:d}},"labelHelper"),u=(0,l.K2)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,n.E)((0,n.D7)()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,a.GZ)(o,(0,n.jZ)((0,s.Sm)(e),(0,n.D7)()),{useHtmlLabels:i,width:r.width||(0,n.D7)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let c=l.getBBox();const d=r.padding/2;if((0,n.E)((0,n.D7)())){const t=l.children[0],e=(0,h.Ltv)(l);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):o.attr("transform","translate(0, "+-c.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:c,halfPadding:d,label:o}},"insertLabel"),p=(0,l.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),g=(0,l.K2)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function f(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function y(t,e,r,i,o,a){const s=[],n=r-t,l=i-e,h=n/a,c=2*Math.PI/h,d=e+l/2;for(let u=0;u<=50;u++){const e=t+u/50*n,r=d+o*Math.sin(c*(e-t));s.push({x:e,y:r})}return s}function m(t,e,r,i,o,a){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let h=0;h"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const o=e.find(t=>"none"!==t.getAttribute("fill")),a=e.find(t=>"none"!==t.getAttribute("stroke")),s=(0,l.K2)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(o){const t={fill:s(o,"fill"),"fill-opacity":s(o,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(a){const t={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}(0,l.K2)(f,"createPathFromPoints"),(0,l.K2)(y,"generateFullSineWavePoints"),(0,l.K2)(m,"generateCirclePoints"),(0,l.K2)(C,"mergePaths");var x=(0,l.K2)((t,e)=>{var r,i,o=t.x,a=t.y,s=e.x-o,n=e.y-a,l=t.width/2,h=t.height/2;return Math.abs(n)*l>Math.abs(s)*h?(n<0&&(h=-h),r=0===n?0:h*s/n,i=h):(s<0&&(l=-l),r=l,i=0===s?0:l*n/s),{x:o+r,y:a+i}},"intersectRect"),b=(0,l.K2)(async(t,e,r,i=!1,o=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const l=(0,n.D7)(),h=(0,n.E)(l);return await(0,a.GZ)(t,s,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},l)},"createLabel"),k=(0,l.K2)((t,e,r,i,o)=>["M",t+o,e,"H",t+r-o,"A",o,o,0,0,1,t+r,e+o,"V",e+i-o,"A",o,o,0,0,1,t+r-o,e+i,"H",t+o,"A",o,o,0,0,1,t,e+i-o,"V",e+o,"A",o,o,0,0,1,t+o,e,"Z"].join(" "),"createRoundedRectPathD"),T=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,n.D7)(),{themeVariables:s,handDrawnSeed:d}=r,{clusterBkg:u,clusterBorder:p}=s,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,o.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),T=(0,n.E)(r),S=C.insert("g").attr("class","cluster-label ");let B;B="markdown"===e.labelType?await(0,a.GZ)(S,e.label,{style:e.labelStyle,useHtmlLabels:T,isNode:!0,width:e.width}):await b(S,e.label,e.labelStyle||"",!1,!0);let w=B.getBBox();if((0,n.E)(r)){const t=B.children[0],e=(0,h.Ltv)(B);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const A=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;const L=e.height,v=e.x-A/2,F=e.y-L/2;let M;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(C),r=(0,o.Fr)(e,{roughness:.7,fill:u,stroke:p,fillWeight:3,seed:d}),i=t.path(k(v,F,A,L,0),r);M=C.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),M.select("path:nth-child(2)").attr("style",y.join(";")),M.select("path").attr("style",m.join(";").replace("fill","stroke"))}else M=C.insert("rect",":first-child"),M.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",v).attr("y",F).attr("width",A).attr("height",L);const{subGraphTitleTopMargin:_}=(0,i.O)(r);if(S.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+_})`),g){const t=S.select("span");t&&t.attr("style",g)}const E=M.node().getBBox();return e.offsetX=0,e.width=E.width,e.height=E.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:C,labelBBox:w}},"rect"),S=(0,l.K2)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return x(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),B=(0,l.K2)(async(t,e)=>{const r=(0,n.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:d}=i,u=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=u.insert("g",":first-child"),g=u.insert("g").attr("class","cluster-label");let f=u.append("rect");const y=await b(g,e.label,e.labelStyle,void 0,!0);let m=y.getBBox();if((0,n.E)(r)){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}const C=0*e.padding,T=C/2,S=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+C;e.width<=m.width+e.padding?e.diff=(S-e.width)/2-e.padding:e.diff=-e.padding;const B=e.height+C,w=e.height+C-m.height-6,A=e.x-S/2,L=e.y-B/2;e.width=S;const v=e.y-e.height/2-T+m.height+2;let F;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=c.A.svg(u),i=e.rx||e.ry?r.path(k(A,L,S,B,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:d,seed:o}):r.rectangle(A,L,S,B,{seed:o});F=u.insert(()=>i,":first-child");const n=r.rectangle(A,v,S,w,{fill:t?a:s,fillStyle:t?"hachure":"solid",stroke:d,seed:o});F=u.insert(()=>i,":first-child"),f=u.insert(()=>n)}else{F=p.insert("rect",":first-child");const t="outer";F.attr("class",t).attr("x",A).attr("y",L).attr("width",S).attr("height",B).attr("data-look",e.look),f.attr("class","inner").attr("x",A).attr("y",v).attr("width",S).attr("height",w)}g.attr("transform",`translate(${e.x-m.width/2}, ${L+1-((0,n.E)(r)?0:3)})`);const M=F.node().getBBox();return e.height=M.height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return x(e,t)},{cluster:u,labelBBox:m}},"roundedWithTitle"),w=(0,l.K2)(async(t,e)=>{l.Rm.info("Creating subgraph rect for ",e.id,e);const r=(0,n.D7)(),{themeVariables:s,handDrawnSeed:d}=r,{clusterBkg:u,clusterBorder:p}=s,{labelStyles:g,nodeStyles:f,borderStyles:y,backgroundStyles:m}=(0,o.GX)(e),C=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),b=(0,n.E)(r),T=C.insert("g").attr("class","cluster-label "),S=await(0,a.GZ)(T,e.label,{style:e.labelStyle,useHtmlLabels:b,isNode:!0,width:e.width});let B=S.getBBox();if((0,n.E)(r)){const t=S.children[0],e=(0,h.Ltv)(S);B=t.getBoundingClientRect(),e.attr("width",B.width),e.attr("height",B.height)}const w=e.width<=B.width+e.padding?B.width+e.padding:e.width;e.width<=B.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;const A=e.height,L=e.x-w/2,v=e.y-A/2;let F;if(l.Rm.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=c.A.svg(C),r=(0,o.Fr)(e,{roughness:.7,fill:u,stroke:p,fillWeight:4,seed:d}),i=t.path(k(L,v,w,A,e.rx),r);F=C.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child"),F.select("path:nth-child(2)").attr("style",y.join(";")),F.select("path").attr("style",m.join(";").replace("fill","stroke"))}else F=C.insert("rect",":first-child"),F.attr("style",f).attr("rx",e.rx).attr("ry",e.ry).attr("x",L).attr("y",v).attr("width",w).attr("height",A);const{subGraphTitleTopMargin:M}=(0,i.O)(r);if(T.attr("transform",`translate(${e.x-B.width/2}, ${e.y-e.height/2+M})`),g){const t=T.select("span");t&&t.attr("style",g)}const _=F.node().getBBox();return e.offsetX=0,e.width=_.width,e.height=_.height,e.offsetY=B.height-e.padding/2,e.intersect=function(t){return x(e,t)},{cluster:C,labelBBox:B}},"kanbanSection"),A={rect:T,squareRect:T,roundedWithTitle:B,noteGroup:S,divider:(0,l.K2)((t,e)=>{const r=(0,n.D7)(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:a}=i,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),l=s.insert("g",":first-child"),h=0*e.padding,d=e.width+h;e.diff=-e.padding;const u=e.height+h,p=e.x-d/2,g=e.y-u/2;let f;if(e.width=d,"handDrawn"===e.look){const t=c.A.svg(s).rectangle(p,g,d,u,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});f=s.insert(()=>t,":first-child")}else{f=l.insert("rect",":first-child");let t="outer";t=(e.look,"divider"),f.attr("class",t).attr("x",p).attr("y",g).attr("width",d).attr("height",u).attr("data-look",e.look)}const y=f.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return x(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:w},L=new Map,v=(0,l.K2)(async(t,e)=>{const r=e.shape||"rect",i=await A[r](t,e);return L.set(e.id,i),i},"insertCluster"),F=(0,l.K2)(()=>{L=new Map},"clear");function M(t,e){return t.intersect(e)}(0,l.K2)(M,"intersectNode");var _=M;function E(t,e,r,i){var o=t.x,a=t.y,s=o-i.x,n=a-i.y,l=Math.sqrt(e*e*n*n+r*r*s*s),h=Math.abs(e*r*s/l);i.x0}(0,l.K2)(D,"intersectLine"),(0,l.K2)(q,"sameSign");var K=D;function R(t,e,r){let i=t.x,o=t.y,a=[],s=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),n=Math.min(n,t.y)}):(s=Math.min(s,e.x),n=Math.min(n,e.y));let l=i-t.width/2-s,h=o-t.height/2-n;for(let c=0;c1&&a.sort(function(t,e){let i=t.x-r.x,o=t.y-r.y,a=Math.sqrt(i*i+o*o),s=e.x-r.x,n=e.y-r.y,l=Math.sqrt(s*s+n*n);return af,":first-child");return y.attr("class","anchor").attr("style",(0,s.KL)(h)),p(e,y),e.intersect=function(t){return l.Rm.info("Circle intersect",e,1,t),z.circle(e,1,t)},n}function W(t,e,r,i,o,a,s){const n=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/o,d=(i-e)/2/a,u=Math.sqrt(c**2+d**2);if(u>1)throw new Error("The given radii are too small to create an arc between the points.");const p=Math.sqrt(1-u**2),g=n+p*a*Math.sin(h)*(s?-1:1),f=l-p*o*Math.cos(h)*(s?-1:1),y=Math.atan2((e-f)/a,(t-g)/o);let m=Math.atan2((i-f)/a,(r-g)/o)-y;s&&m<0&&(m+=2*Math.PI),!s&&m>0&&(m-=2*Math.PI);const C=[];for(let x=0;x<20;x++){const t=y+x/19*m,e=g+o*Math.cos(t),r=f+a*Math.sin(t);C.push({x:e,y:r})}return C}function N(t,e,r){const[i,o]=[e,r].sort((t,e)=>e-t);return o*(1-Math.sqrt(1-(t/i/2)**2))}async function j(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,h=(0,l.K2)(t=>t+n,"calcTotalHeight"),u=(0,l.K2)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:y,bbox:m}=await d(t,e,g(e)),C=h(e?.height?e?.height:m.height),[x,b]=u(C),k=N(C,x,b),T=(e?.width?e?.width:m.width)+2*s+k-k,S=C,{cssStyles:B}=e,w=[{x:T/2,y:-S/2},{x:-T/2,y:-S/2},...W(-T/2,-S/2,-T/2,S/2,x,b,!1),{x:T/2,y:S/2},...W(T/2,S/2,T/2,-S/2,x,b,!0)],A=c.A.svg(y),L=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const v=f(w),F=A.path(v,L),M=y.insert(()=>F,":first-child");return M.attr("class","basic label-container outer-path"),B&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",B),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${x/2}, 0)`),p(e,M),e.intersect=function(t){return z.polygon(e,w,t)},y}function H(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,l.K2)(P,"anchor"),(0,l.K2)(W,"generateArcPoints"),(0,l.K2)(N,"calculateArcSagitta"),(0,l.K2)(j,"bowTieRect"),(0,l.K2)(H,"insertPolygonShape");async function G(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?28:a,n="neo"===e.look?24:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width??h.width)+("neo"===e.look?2*s:s+12),y=(e?.height??h.height)+("neo"===e.look?2*n:n),m=-y,C=[{x:12,y:m},{x:u,y:m},{x:u,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}];let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(C),a=t.path(i,r);x=l.insert(()=>a,":first-child").attr("transform",`translate(${-u/2}, ${y/2})`),b&&x.attr("style",b)}else x=H(l,u,y,C);return i&&x.attr("style",i),p(e,x),e.intersect=function(t){return z.polygon(e,C,t)},l}function U(t,e){const{nodeStyles:r}=(0,o.GX)(e);e.label="";const i=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(28,e.width??0),n=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}],l=c.A.svg(i),h=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const d=f(n),u=l.path(d,h),p=i.insert(()=>u,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),r&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return z.polygon(e,n,t)},i}async function Y(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;const{shapeSvg:n,bbox:h,halfPadding:u}=await d(t,e,g(e)),f=r?.padding??u,y="neo"===e.look?h.width/2+32:h.width/2+f;let m;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=t.circle(0,0,2*y,r);m=n.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,s.KL)(C))}else m=n.insert("circle",":first-child").attr("class","basic label-container").attr("style",a).attr("r",y).attr("cx",0).attr("cy",0);return p(e,m),e.calcIntersect=function(t,e){const r=t.width/2;return z.circle(t,r,e)},e.intersect=function(t){return l.Rm.info("Circle intersect",e,y,t),z.circle(e,y,t)},n}function X(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function V(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r,e.label="";const a=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:n}=e,h=c.A.svg(a),d=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const u=h.circle(0,0,2*s,d),f=X(s),y=h.path(f,d),m=a.insert(()=>u,":first-child");return m.insert(()=>y),m.attr("class","outer-path"),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",i),p(e,m),e.intersect=function(t){l.Rm.info("crossedCircle intersect",e,{radius:s,point:t});return z.circle(e,s,t)},a}function Z(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let h=0;hA,":first-child").attr("stroke-opacity",0),L.insert(()=>B,":first-child"),L.attr("class","text"),C&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${m}, 0)`),n.attr("transform",`translate(${-u/2+m-(s.x-(s.left??0))},${-y/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,L),e.intersect=function(t){return z.polygon(e,b,t)},a}function J(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let h=0;hA,":first-child").attr("stroke-opacity",0),L.insert(()=>B,":first-child"),L.attr("class","text"),C&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-m}, 0)`),n.attr("transform",`translate(${-u/2+(e.padding??0)/2-(s.x-(s.left??0))},${-y/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,L),e.intersect=function(t){return z.polygon(e,b,t)},a}function et(t,e,r,i=100,o=0,a=180){const s=[],n=o*Math.PI/180,l=(a*Math.PI/180-n)/(i-1);for(let h=0;hF,":first-child").attr("stroke-opacity",0),M.insert(()=>w,":first-child"),M.insert(()=>L,":first-child"),M.attr("class","text"),C&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",C),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(${m-m/4}, 0)`),n.attr("transform",`translate(${-u/2+(e.padding??0)/2-(s.x-(s.left??0))},${-y/2+(e.padding??0)/2-(s.y-(s.top??0))})`),p(e,M),e.intersect=function(t){return z.polygon(e,k,t)},a}async function it(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=Math.max(20,1.25*(h.width+2*s),e?.width??0),y=Math.max(5,h.height+2*n,e?.height??0),C=y/2,{cssStyles:x}=e,b=c.A.svg(l),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=u-C,S=y/4,B=[{x:T,y:0},{x:S,y:0},{x:0,y:y/2},{x:S,y:y},{x:T,y:y},...m(-T,-y/2,C,50,270,90)],w=f(B),A=b.path(w,k),L=l.insert(()=>A,":first-child");return L.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&L.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(${-u/2}, ${-y/2})`),p(e,L),e.intersect=function(t){return z.polygon(e,B,t)},l}(0,l.K2)(G,"card"),(0,l.K2)(U,"choice"),(0,l.K2)(Y,"circle"),(0,l.K2)(X,"createLine"),(0,l.K2)(V,"crossedCircle"),(0,l.K2)(Z,"generateCirclePoints"),(0,l.K2)(Q,"curlyBraceLeft"),(0,l.K2)(J,"generateCirclePoints"),(0,l.K2)(tt,"curlyBraceRight"),(0,l.K2)(et,"generateCirclePoints"),(0,l.K2)(rt,"curlyBraces"),(0,l.K2)(it,"curvedTrapezoid");var ot=(0,l.K2)((t,e,r,i,o,a)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),at=(0,l.K2)((t,e,r,i,o,a)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),st=(0,l.K2)((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function nt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,n="neo"===e.look?24:a,l="neo"===e.look?24:a;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-l,e.width<8&&(e.width=8);const r=t/2/(2.5+t/50);e.height=(e.height??0)-n-3*r,e.height<8&&(e.height=8)}const{shapeSvg:h,bbox:u,label:f}=await d(t,e,g(e)),y=(e.width?e.width:u.width)+l,m=y/2,C=m/(2.5+y/50),x=(e.height?e.height:u.height)+n+C;let b;const{cssStyles:k}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=at(0,0,y,x,m,C),i=st(0,C,y,x,m,C),a=(0,o.Fr)(e,{}),s=t.path(r,a),n=t.path(i,(0,o.Fr)(e,{fill:"none"}));b=h.insert(()=>n,":first-child"),b=h.insert(()=>s,":first-child"),b.attr("class","basic label-container"),k&&b.attr("style",k)}else{const t=ot(0,0,y,x,m,C);b=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",i)}return b.attr("label-offset-y",C),b.attr("transform",`translate(${-y/2}, ${-(x/2+C)})`),p(e,b),f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+(e.padding??0)/1.5-(u.y-(u.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?16:e.padding??0,{shapeSvg:n,bbox:l,label:h}=await d(t,e,g(e)),u=l.width+a,f=l.height+s,y=.2*f,m=-u/2,C=-f/2-y/2,{cssStyles:x}=e,b=c.A.svg(n),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=[{x:m,y:C+y},{x:-m,y:C+y},{x:-m,y:-C},{x:m,y:-C},{x:m,y:C},{x:-m,y:C},{x:-m,y:C+y}],S=b.polygon(T.map(t=>[t.x,t.y]),k),B=n.insert(()=>S,":first-child");return B.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),h.attr("transform",`translate(${m+(e.padding??0)/2-(l.x-(l.left??0))}, ${C+y+(e.padding??0)/2-(l.y-(l.top??0))})`),p(e,B),e.intersect=function(t){return z.rect(e,t)},n}async function ht(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e),a="neo"===e.look?12:5;e.labelStyle=r;const n=e.padding??0,h="neo"===e.look?16:n,{shapeSvg:u,bbox:f}=await d(t,e,g(e)),y=(e?.width?e?.width/2:f.width/2)+(h??0),m=y-a;let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(u),r=(0,o.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,o.Fr)(e,{roughness:.2,strokeWidth:1.5}),a=t.circle(0,0,2*y,r),n=t.circle(0,0,2*m,i);C=u.insert("g",":first-child"),C.attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(x)),C.node()?.appendChild(a),C.node()?.appendChild(n)}else{C=u.insert("g",":first-child");const t=C.insert("circle",":first-child"),e=C.insert("circle");C.attr("class","basic label-container").attr("style",i),t.attr("class","outer-circle").attr("style",i).attr("r",y).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",m).attr("cx",0).attr("cy",0)}return p(e,C),e.intersect=function(t){return l.Rm.info("DoubleCircle intersect",e,y,t),z.circle(e,y,t)},u}function ct(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.label="",e.labelStyle=i;const s=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,h=c.A.svg(s),{nodeBorder:d}=r,u=(0,o.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(u.roughness=0);const f=h.circle(0,0,14,u),y=s.insert(()=>f,":first-child");return y.selectAll("path").attr("style",`fill: ${d} !important;`),n&&n.length>0&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),p(e,y),e.intersect=function(t){l.Rm.info("filledCircle intersect",e,{radius:7,point:t});return z.circle(e,7,t)},s}(0,l.K2)(nt,"cylinder"),(0,l.K2)(lt,"dividedRectangle"),(0,l.K2)(ht,"doublecircle"),(0,l.K2)(ct,"filledCircle");async function dt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-s-s/2,e.width<10&&(e.width=10));const{shapeSvg:n,bbox:h,label:u}=await d(t,e,g(e)),y=(e?.width?e?.width:h.width)+(s??0),m=e?.height?e?.height:y+h.height,C=[{x:0,y:-m},{x:m,y:-m},{x:m/2,y:0}],{cssStyles:x}=e,b=c.A.svg(n),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=f(C),S=b.path(T,k),B=n.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",i),e.width=y,e.height=m,p(e,B),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-m/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,C,t),z.polygon(e,C,t)},n}function ut(t,e,{dir:r,config:{state:i,themeVariables:a}}){const{nodeStyles:s}=(0,o.GX)(e);e.label="";const n=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));const u=-1*h/2,f=-1*d/2,y=c.A.svg(n),m=(0,o.Fr)(e,{stroke:a.lineColor,fill:a.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=y.rectangle(u,f,h,d,m),x=n.insert(()=>C,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),p(e,x);const b=i?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return z.rect(e,t)},n}async function pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:n,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:Math.max(15,h.width))+2*a,y=(e?.height?e?.height:Math.max(10,h.height))+2*s,C=y/2,{cssStyles:x}=e,b=c.A.svg(n),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=[{x:-u/2,y:-y/2},{x:u/2-C,y:-y/2},...m(-u/2+C,0,C,50,90,270),{x:u/2-C,y:y/2},{x:-u/2,y:y/2}],S=f(T),B=b.path(S,k),w=n.insert(()=>B,":first-child");return w.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",i),p(e,w),e.intersect=function(t){l.Rm.info("Pill intersect",e,{radius:C,point:t});return z.polygon(e,T,t)},n}(0,l.K2)(dt,"flippedTriangle"),(0,l.K2)(ut,"forkJoin"),(0,l.K2)(pt,"halfRoundedRectangle");var gt=(0,l.K2)((t,e,r,i,o)=>[`M${t+o},${e}`,`L${t+r-o},${e}`,`L${t+r},${e-i/2}`,`L${t+r-o},${e-i}`,`L${t+o},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function ft(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e),a="neo"===e.look?3.5:4;e.labelStyle=r;const s=e.padding??0,n="neo"===e.look?70:s,l="neo"===e.look?32:s;if(e.width||e.height){const t=(e.height??0)/a;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-n}const{shapeSvg:h,bbox:u}=await d(t,e,g(e)),f=(e?.height?e?.height:u.height)+n,y=f/a,m=(e?.width?e?.width:u.width)+2*y+l,C=[{x:y,y:0},{x:m-y,y:0},{x:m,y:-f/2},{x:m-y,y:-f},{x:y,y:-f},{x:0,y:-f/2}];let x;const{cssStyles:b}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=gt(0,0,m,f,y),a=t.path(i,r);x=h.insert(()=>a,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),b&&x.attr("style",b)}else x=H(h,m,f,C);return i&&x.attr("style",i),e.width=m,e.height=f,p(e,x),e.intersect=function(t){return z.polygon(e,C,t)},h}async function yt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;const{shapeSvg:a}=await d(t,e,g(e)),s=Math.max(30,e?.width??0),n=Math.max(30,e?.height??0),{cssStyles:h}=e,u=c.A.svg(a),y=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=[{x:0,y:0},{x:s,y:0},{x:0,y:n},{x:s,y:n}],C=f(m),x=u.path(C,y),b=a.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",i),b.attr("transform",`translate(${-s/2}, ${-n/2})`),p(e,b),e.intersect=function(t){l.Rm.info("Pill intersect",e,{points:m});return z.polygon(e,m,t)},a}async function mt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;const n=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(n,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,label:m}=await d(t,e,"icon-shape default"),C="t"===e.pos,x=u,b=u,{nodeBorder:k}=r,{stylesMap:T}=(0,o.WW)(e),S=-b/2,B=-x/2,w=e.label?8:0,A=c.A.svg(f),L=(0,o.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");const v=A.rectangle(S,B,b,x,L),F=Math.max(b,y.width),M=x+y.height+w,_=A.rectangle(-F/2,-M/2,F,M,{...L,fill:"transparent",stroke:"none"}),E=f.insert(()=>v,":first-child"),$=f.insert(()=>_);if(e.icon){const t=f.append("g");t.html(`${await(0,a.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${C?y.height/2+w/2-o/2-n:-y.height/2-w/2-o/2-n})`),t.attr("style",`color: ${T.get("stroke")??k};`)}return m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${C?-M/2:M/2-y.height})`),E.attr("transform",`translate(0,${C?y.height/2+w/2:-y.height/2-w/2})`),p(e,$),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=C?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+w},{x:r+b/2,y:i-o/2+y.height+w},{x:r+b/2,y:i+o/2},{x:r-b/2,y:i+o/2},{x:r-b/2,y:i-o/2+y.height+w},{x:r-y.width/2,y:i-o/2+y.height+w}]:[{x:r-b/2,y:i-o/2},{x:r+b/2,y:i-o/2},{x:r+b/2,y:i-o/2+x},{x:r+y.width/2,y:i-o/2+x},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+x},{x:r-b/2,y:i-o/2+x}];return z.polygon(e,a,t)},f}async function Ct(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;const n=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(n,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,label:m}=await d(t,e,"icon-shape default"),C=e.label?8:0,x="t"===e.pos,{nodeBorder:b,mainBkg:k}=r,{stylesMap:T}=(0,o.WW)(e),S=c.A.svg(f),B=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const w=T.get("fill");B.stroke=w??k;const A=f.append("g");e.icon&&A.html(`${await(0,a.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const L=A.node().getBBox(),v=L.width,F=L.height,M=L.x,_=L.y,E=Math.max(v,F)*Math.SQRT2+40,$=S.circle(0,0,E,B),O=Math.max(E,y.width),I=E+y.height+C,D=S.rectangle(-O/2,-I/2,O,I,{...B,fill:"transparent",stroke:"none"}),q=f.insert(()=>$,":first-child"),K=f.insert(()=>D);return A.attr("transform",`translate(${-v/2-M},${x?y.height/2+C/2-F/2-_:-y.height/2-C/2-F/2-_})`),A.attr("style",`color: ${T.get("stroke")??b};`),m.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-I/2:I/2-y.height})`),q.attr("transform",`translate(0,${x?y.height/2+C/2:-y.height/2-C/2})`),p(e,K),e.intersect=function(t){l.Rm.info("iconSquare intersect",e,t);return z.rect(e,t)},f}async function xt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;const n=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(n,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,halfPadding:m,label:C}=await d(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,T=u+2*m,{nodeBorder:S,mainBkg:B}=r,{stylesMap:w}=(0,o.WW)(e),A=-T/2,L=-b/2,v=e.label?8:0,F=c.A.svg(f),M=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const _=w.get("fill");M.stroke=_??B;const E=F.path(k(A,L,T,b,5),M),$=Math.max(T,y.width),O=b+y.height+v,I=F.rectangle(-$/2,-O/2,$,O,{...M,fill:"transparent",stroke:"none"}),D=f.insert(()=>E,":first-child").attr("class","icon-shape2"),q=f.insert(()=>I);if(e.icon){const t=f.append("g");t.html(`${await(0,a.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${x?y.height/2+v/2-o/2-n:-y.height/2-v/2-o/2-n})`),t.attr("style",`color: ${w.get("stroke")??S};`)}return C.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-O/2:O/2-y.height})`),D.attr("transform",`translate(0,${x?y.height/2+v/2:-y.height/2-v/2})`),p(e,q),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=x?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+v},{x:r+T/2,y:i-o/2+y.height+v},{x:r+T/2,y:i+o/2},{x:r-T/2,y:i+o/2},{x:r-T/2,y:i-o/2+y.height+v},{x:r-y.width/2,y:i-o/2+y.height+v}]:[{x:r-T/2,y:i-o/2},{x:r+T/2,y:i-o/2},{x:r+T/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-T/2,y:i-o/2+b}];return z.polygon(e,a,t)},f}async function bt(t,e,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=(0,o.GX)(e);e.labelStyle=s;const n=e.assetHeight??48,h=e.assetWidth??48,u=Math.max(n,h),g=i?.wrappingWidth;e.width=Math.max(u,g??0);const{shapeSvg:f,bbox:y,halfPadding:m,label:C}=await d(t,e,"icon-shape default"),x="t"===e.pos,b=u+2*m,T=u+2*m,{nodeBorder:S,mainBkg:B}=r,{stylesMap:w}=(0,o.WW)(e),A=-T/2,L=-b/2,v=e.label?8:0,F=c.A.svg(f),M=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const _=w.get("fill");M.stroke=_??B;const E=F.path(k(A,L,T,b,.1),M),$=Math.max(T,y.width),O=b+y.height+v,I=F.rectangle(-$/2,-O/2,$,O,{...M,fill:"transparent",stroke:"none"}),D=f.insert(()=>E,":first-child"),q=f.insert(()=>I);if(e.icon){const t=f.append("g");t.html(`${await(0,a.WY)(e.icon,{height:u,width:u,fallbackPrefix:""})}`);const r=t.node().getBBox(),i=r.width,o=r.height,s=r.x,n=r.y;t.attr("transform",`translate(${-i/2-s},${x?y.height/2+v/2-o/2-n:-y.height/2-v/2-o/2-n})`),t.attr("style",`color: ${w.get("stroke")??S};`)}return C.attr("transform",`translate(${-y.width/2-(y.x-(y.left??0))},${x?-O/2:O/2-y.height})`),D.attr("transform",`translate(0,${x?y.height/2+v/2:-y.height/2-v/2})`),p(e,q),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=x?[{x:r-y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2},{x:r+y.width/2,y:i-o/2+y.height+v},{x:r+T/2,y:i-o/2+y.height+v},{x:r+T/2,y:i+o/2},{x:r-T/2,y:i+o/2},{x:r-T/2,y:i-o/2+y.height+v},{x:r-y.width/2,y:i-o/2+y.height+v}]:[{x:r-T/2,y:i-o/2},{x:r+T/2,y:i-o/2},{x:r+T/2,y:i-o/2+b},{x:r+y.width/2,y:i-o/2+b},{x:r+y.width/2/2,y:i+o/2},{x:r-y.width/2,y:i+o/2},{x:r-y.width/2,y:i-o/2+b},{x:r-T/2,y:i-o/2+b}];return z.polygon(e,a,t)},f}async function kt(t,e,{config:{flowchart:r}}){const i=new Image;i.src=e?.img??"",await i.decode();const a=Number(i.naturalWidth.toString().replace("px","")),s=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=a/s;const{labelStyles:n}=(0,o.GX)(e);e.labelStyle=n;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const u=Math.max(e.label?h??0:0,e?.assetWidth??a),g="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:u,f="on"===e.constraint?g/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(g,h??0);const{shapeSvg:y,bbox:m,label:C}=await d(t,e,"image-shape default"),x="t"===e.pos,b=-g/2,k=-f/2,T=e.label?8:0,S=c.A.svg(y),B=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const w=S.rectangle(b,k,g,f,B),A=Math.max(g,m.width),L=f+m.height+T,v=S.rectangle(-A/2,-L/2,A,L,{...B,fill:"none",stroke:"none"}),F=y.insert(()=>w,":first-child"),M=y.insert(()=>v);if(e.img){const t=y.append("image");t.attr("href",e.img),t.attr("width",g),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-g/2},${x?L/2-f:-L/2})`)}return C.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-f/2-m.height/2-T/2:f/2-m.height/2+T/2})`),F.attr("transform",`translate(0,${x?m.height/2+T/2:-m.height/2-T/2})`),p(e,M),e.intersect=function(t){if(l.Rm.info("iconSquare intersect",e,t),!e.label)return z.rect(e,t);const r=e.x??0,i=e.y??0,o=e.height??0;let a=[];a=x?[{x:r-m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2},{x:r+m.width/2,y:i-o/2+m.height+T},{x:r+g/2,y:i-o/2+m.height+T},{x:r+g/2,y:i+o/2},{x:r-g/2,y:i+o/2},{x:r-g/2,y:i-o/2+m.height+T},{x:r-m.width/2,y:i-o/2+m.height+T}]:[{x:r-g/2,y:i-o/2},{x:r+g/2,y:i-o/2},{x:r+g/2,y:i-o/2+f},{x:r+m.width/2,y:i-o/2+f},{x:r+m.width/2/2,y:i+o/2},{x:r-m.width/2,y:i+o/2},{x:r-m.width/2,y:i-o/2+f},{x:r-g/2,y:i-o/2+f}];return z.polygon(e,a,t)},y}async function Tt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,n="neo"===e.look?2*a:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=Math.max(h.width+2*(n??0),e?.width??0),y=Math.max(h.height+2*(s??0),e?.height??0),m=[{x:0,y:0},{x:u,y:0},{x:u+3*y/6,y:-y},{x:-3*y/6,y:-y}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),a=t.path(i,r);C=l.insert(()=>a,":first-child").attr("transform",`translate(${-u/2}, ${y/2})`),x&&C.attr("style",x)}else C=H(l,u,y,m);return i&&C.attr("style",i),e.width=u,e.height=y,p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},l}async function St(t,e,r){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;const{shapeSvg:n,bbox:l}=await d(t,e,g(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),u=Math.max(l.height+2*r.labelPaddingY,e?.height||0),f=-h/2,y=-u/2;let m,{rx:C,ry:x}=e;const{cssStyles:b}=e;if(r?.rx&&r.ry&&(C=r.rx,x=r.ry),"handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=C||x?t.path(k(f,y,h,u,C||0),r):t.rectangle(f,y,h,u,r);m=n.insert(()=>i,":first-child"),m.attr("class","basic label-container").attr("style",(0,s.KL)(b))}else m=n.insert("rect",":first-child"),m.attr("class","basic label-container").attr("style",a).attr("rx",(0,s.KL)(C)).attr("ry",(0,s.KL)(x)).attr("x",f).attr("y",y).attr("width",h).attr("height",u);return p(e,m),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},n}async function Bt(t,e){const{shapeSvg:r,bbox:i,label:o}=await d(t,e,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),o.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),p(e,a),e.intersect=function(t){return z.rect(e,t)},r}async function wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,n="neo"===e.look?2*a:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+s,y=(e?.width??h.width)+n,m=[{x:0,y:0},{x:y+3*u/6,y:0},{x:y,y:-u},{x:-3*u/6,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),a=t.path(i,r);C=l.insert(()=>a,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},l}async function At(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s=a,n="neo"===e.look?2*a:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+s,y=(e?.width??h.width)+n,m=[{x:-3*u/6,y:0},{x:y,y:0},{x:y+3*u/6,y:-u},{x:0,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),a=t.path(i,r);C=l.insert(()=>a,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},l}function Lt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.label="",e.labelStyle=r;const a=t.insert("g").attr("class",g(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,n=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),d=[{x:n,y:0},{x:0,y:h+3.5},{x:n-14,y:h+3.5},{x:0,y:2*h},{x:n,y:h-3.5},{x:14,y:h-3.5}],u=c.A.svg(a),y=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");const m=f(d),C=u.path(m,y),x=a.insert(()=>C,":first-child");return x.attr("class","outer-path"),s&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${n/2},${-h})`),p(e,x),e.intersect=function(t){l.Rm.info("lightningBolt intersect",e,t);return z.polygon(e,d,t)},a}(0,l.K2)(ft,"hexagon"),(0,l.K2)(yt,"hourglass"),(0,l.K2)(mt,"icon"),(0,l.K2)(Ct,"iconCircle"),(0,l.K2)(xt,"iconRounded"),(0,l.K2)(bt,"iconSquare"),(0,l.K2)(kt,"imageSquare"),(0,l.K2)(Tt,"inv_trapezoid"),(0,l.K2)(St,"drawRect"),(0,l.K2)(Bt,"labelRect"),(0,l.K2)(wt,"lean_left"),(0,l.K2)(At,"lean_right"),(0,l.K2)(Lt,"lightningBolt");var vt=(0,l.K2)((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`a${o},${a} 0,0,0 ${r},0`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Ft=(0,l.K2)((t,e,r,i,o,a,s)=>[`M${t},${e+a}`,`M${t+r},${e+a}`,`a${o},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${o},${a} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+a+s}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Mt=(0,l.K2)((t,e,r,i,o,a)=>[`M${t-r/2},${-i/2}`,`a${o},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function _t(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,n="neo"===e.look?16:a,l="neo"===e.look?24:a;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-n,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:u,label:f}=await d(t,e,g(e)),y=(e?.width?e?.width:u.width)+2*n,m=y/2,C=m/(2.5+y/50),x=(e?.height?e?.height:u.height)+C+2*l,b=.1*x;let k;const{cssStyles:T}=e;if("handDrawn"===e.look){const t=c.A.svg(h),r=Ft(0,0,y,x,m,C,b),i=Mt(0,C,y,x,m,C),a=(0,o.Fr)(e,{}),s=t.path(r,a),n=t.path(i,a);h.insert(()=>n,":first-child").attr("class","line"),k=h.insert(()=>s,":first-child"),k.attr("class","basic label-container"),T&&k.attr("style",T)}else{const t=vt(0,0,y,x,m,C,b);k=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(T)).attr("style",i)}return k.attr("label-offset-y",C),k.attr("transform",`translate(${-y/2}, ${-(x/2+C)})`),p(e,k),f.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${-u.height/2+C-(u.y-(u.top??0))})`),e.intersect=function(t){const r=z.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-C)){let o=C*C*(1-i*i/(m*m));o>0&&(o=Math.sqrt(o)),o=C-o,t.y-(e.y??0)>0&&(o=-o),r.y+=o}return r},h}async function Et(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e?.width?e?.width:h.width)+2*(s??0),m=(e?.height?e?.height:h.height)+2*(n??0),C="neo"===e.look?m/4:m/8,x=m+C,{cssStyles:b}=e,k=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:-f/2-f/2*.1,y:-x/2},{x:-f/2-f/2*.1,y:x/2},...y(-f/2-f/2*.1,x/2,f/2+f/2*.1,x/2,C,.8),{x:f/2+f/2*.1,y:-x/2},{x:-f/2-f/2*.1,y:-x/2},{x:-f/2,y:-x/2},{x:-f/2,y:x/2*1.1},{x:-f/2,y:-x/2}],B=k.polygon(S.map(t=>[t.x,t.y]),T),w=l.insert(()=>B,":first-child");return w.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-C/2})`),u.attr("transform",`translate(${-f/2+(e.padding??0)+f/2*.1/2-(h.x-(h.left??0))},${-m/2+(e.padding??0)-C/2-(h.y-(h.top??0))})`),p(e,w),e.intersect=function(t){return z.polygon(e,S,t)},l}async function $t(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s-2*l,10),e.height=Math.max((e?.height??0)-2*n-2*l,10));const{shapeSvg:h,bbox:u,label:y}=await d(t,e,g(e)),m=(e?.width?e?.width:u.width)+2*s+2*l-2*l,x=(e?.height?e?.height:u.height)+2*n+2*l-2*l,b=-m/2,k=-x/2,{cssStyles:T}=e,S=c.A.svg(h),B=(0,o.Fr)(e,{}),w=[{x:b-l,y:k+l},{x:b-l,y:k+x+l},{x:b+m-l,y:k+x+l},{x:b+m-l,y:k+x},{x:b+m,y:k+x},{x:b+m,y:k+x-l},{x:b+m+l,y:k+x-l},{x:b+m+l,y:k-l},{x:b+l,y:k-l},{x:b+l,y:k},{x:b,y:k},{x:b,y:k+l}],A=[{x:b,y:k+l},{x:b+m-l,y:k+l},{x:b+m-l,y:k+x},{x:b+m,y:k+x},{x:b+m,y:k},{x:b,y:k}];"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const L=f(w);let v=S.path(L,B);const F=f(A);let M=S.path(F,B);"handDrawn"!==e.look&&(v=C(v),M=C(M));const _=h.insert("g",":first-child");return _.insert(()=>v),_.insert(()=>M),_.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",T),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),y.attr("transform",`translate(${-u.width/2-l-(u.x-(u.left??0))}, ${-u.height/2+l-(u.y-(u.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,w,t)},h}async function Ot(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await d(t,e,g(e)),l=e.padding??0,h="neo"===e.look?16:l,u="neo"===e.look?12:l;let m=!0;(e.width||e.height)&&(m=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*u);const C=Math.max(s.width,e?.width??0)+2*h,x=Math.max(s.height,e?.height??0)+3*u,b="neo"===e.look?x/4:x/8,k=x+(m?b/2:-b/2),T=-C/2,S=-k/2,B=10,{cssStyles:w}=e,A=y(T-B,S+k+B,T+C-B,S+k+B,b,.8),L=A?.[A.length-1],v=[{x:T-B,y:S+B},{x:T-B,y:S+k+B},...A,{x:T+C-B,y:L.y-B},{x:T+C,y:L.y-B},{x:T+C,y:L.y-20},{x:T+C+B,y:L.y-20},{x:T+C+B,y:S-B},{x:T+B,y:S-B},{x:T+B,y:S},{x:T,y:S},{x:T,y:S+B}],F=[{x:T,y:S+B},{x:T+C-B,y:S+B},{x:T+C-B,y:L.y-B},{x:T+C,y:L.y-B},{x:T+C,y:S},{x:T,y:S}],M=c.A.svg(a),_=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const E=f(v),$=M.path(E,_),O=f(F),I=M.path(O,_),D=a.insert(()=>$,":first-child");return D.insert(()=>I),D.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",w),i&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-b/2})`),n.attr("transform",`translate(${-s.width/2-B-(s.x-(s.left??0))}, ${-s.height/2+B-b/2-(s.y-(s.top??0))})`),p(e,D),e.intersect=function(t){return z.polygon(e,v,t)},a}async function It(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;e.useHtmlLabels||(0,n.E)((0,n.zj)())||(e.centerLabel=!0);const{shapeSvg:s,bbox:l,label:h}=await d(t,e,g(e)),u=Math.max(l.width+2*(e.padding??0),e?.width??0),f=Math.max(l.height+2*(e.padding??0),e?.height??0),y=-u/2,m=-f/2,{cssStyles:C}=e,x=c.A.svg(s),b=(0,o.Fr)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");const k=x.rectangle(y,m,u,f,b),T=s.insert(()=>k,":first-child");return T.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",C),a&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",a),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),p(e,T),e.intersect=function(t){return z.rect(e,t)},s}(0,l.K2)(_t,"linedCylinder"),(0,l.K2)(Et,"linedWaveEdgedRect"),(0,l.K2)($t,"multiRect"),(0,l.K2)(Ot,"multiWaveEdgedRectangle"),(0,l.K2)(It,"note");var Dt=(0,l.K2)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function qt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await d(t,e,g(e)),n=s.width+(e.padding??0)+(s.height+(e.padding??0)),l=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}];let h;const{cssStyles:u}=e;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,o.Fr)(e,{}),i=Dt(0,0,n),s=t.path(i,r);h=a.insert(()=>s,":first-child").attr("transform",`translate(${-n/2+.5}, ${n/2})`),u&&h.attr("style",u)}else h=H(a,n,n,l),h.attr("transform",`translate(${-n/2+.5}, ${n/2})`);return i&&h.attr("style",i),p(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=z.polygon(t,i,e);return{x:o.x-.5,y:o.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},a}async function Kt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?21:a??0,n="neo"===e.look?12:a??0,{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),y=-((e?.width??h.width)+("neo"===e.look?2*s:s))/2,m=-((e?.height??h.height)+("neo"===e.look?2*n:n))/2,C=m/2,x=[{x:y+C,y:m},{x:y,y:0},{x:y+C,y:-m},{x:-y,y:-m},{x:-y,y:m}],{cssStyles:b}=e,k=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=f(x),B=k.path(S,T),w=l.insert(()=>B,":first-child");return w.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${-C/2},0)`),u.attr("transform",`translate(${-C/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,w),e.intersect=function(t){return z.polygon(e,x,t)},l}async function Rt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);let a;e.labelStyle=r,a=e.cssClasses?"node "+e.cssClasses:"node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),d=s.insert("g"),u=s.insert("g").attr("class","label").attr("style",i),g=e.description,f=e.label,y=await b(u,f,e.labelStyle,!0,!0);let m={width:0,height:0};if((0,n.E)((0,n.D7)())){const t=y.children[0],e=(0,h.Ltv)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.Rm.info("Text 2",g);const C=g||[],x=y.getBBox(),T=await b(u,Array.isArray(C)?C.join("
    "):C,e.labelStyle,!0,!0),S=T.children[0],B=(0,h.Ltv)(T);m=S.getBoundingClientRect(),B.attr("width",m.width),B.attr("height",m.height);const w=(e.padding||0)/2;(0,h.Ltv)(T).attr("transform","translate( "+(m.width>x.width?0:(x.width-m.width)/2)+", "+(x.height+w+5)+")"),(0,h.Ltv)(y).attr("transform","translate( "+(m.width(l.Rm.debug("Rough node insert CXC",i),a),":first-child"),M=s.insert(()=>(l.Rm.debug("Rough node insert CXC",i),i),":first-child")}else M=d.insert("rect",":first-child"),_=d.insert("line"),M.attr("class","outer title-state").attr("style",i).attr("x",-m.width/2-w).attr("y",-m.height/2-w).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),_.attr("class","divider").attr("x1",-m.width/2-w).attr("x2",m.width/2+w).attr("y1",-m.height/2-w+x.height+w).attr("y2",-m.height/2-w+x.height+w);return p(e,M),e.intersect=function(t){return z.rect(e,t)},s}async function zt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return St(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}(0,l.K2)(qt,"question"),(0,l.K2)(Kt,"rect_left_inv_arrow"),(0,l.K2)(Rt,"rectWithTitle"),(0,l.K2)(zt,"roundedRect");async function Pt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e?.width??h.width)+2*a+("neo"===e.look?8:16),y=(e?.height??h.height)+2*n,m=f-8,C=y,x=8-f/2,b=-y/2,{cssStyles:k}=e,T=c.A.svg(l),S=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const B=[{x:x,y:b},{x:x+m,y:b},{x:x+m,y:b+C},{x:x-8,y:b+C},{x:x-8,y:b},{x:x,y:b},{x:x,y:b+C}],w=T.polygon(B.map(t=>[t.x,t.y]),S),A=l.insert(()=>w,":first-child");return A.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),u.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,A),e.intersect=function(t){return z.rect(e,t)},l}async function Wt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*s,10),e.height=Math.max((e?.height??0)/1.5-2*n,10));const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),y=(e?.width?e?.width:h.width)+2*s,m=1.5*((e?.height?e?.height:h.height)+2*n)/1.5,C=-y/2,x=-m/2,{cssStyles:b}=e,k=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:C,y:x},{x:C,y:x+m},{x:C+y,y:x+m},{x:C+y,y:x-m/2}],B=f(S),w=k.path(B,T),A=l.insert(()=>w,":first-child");return A.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${m/4})`),u.attr("transform",`translate(${-y/2+(e.padding??0)-(h.x-(h.left??0))}, ${-m/4+(e.padding??0)-(h.y-(h.top??0))})`),p(e,A),e.intersect=function(t){return z.polygon(e,S,t)},l}async function Nt(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,o="neo"===e.look?12:r;return St(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:o})}async function jt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?20:a,n="neo"===e.look?12:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=h.height+("neo"===e.look?2*n:n),y=h.width+u/4+("neo"===e.look?2*s:s),C=u/2,{cssStyles:x}=e,b=c.A.svg(l),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=[{x:-y/2+C,y:-u/2},{x:y/2-C,y:-u/2},...m(-y/2+C,0,C,50,90,270),{x:y/2-C,y:u/2},...m(y/2-C,0,C,50,270,450)],S=f(T),B=b.path(S,k),w=l.insert(()=>B,":first-child");return w.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",i),p(e,w),e.intersect=function(t){return z.polygon(e,T,t)},l}async function Ht(t,e){return St(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function Gt(t,e,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i;const{cssStyles:s}=e,{lineColor:n,stateBorder:l,nodeBorder:h,nodeShadow:d}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const u=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),g=c.A.svg(u),f=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const y=g.circle(0,0,e.width,{...f,stroke:n,strokeWidth:2}),m=l??h,C=5*(e.width??0)/14,x=g.circle(0,0,C,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),b=u.insert(()=>y,":first-child");if(b.insert(()=>x),"handDrawn"!==e.look&&b.attr("class","outer-path"),s&&b.selectAll("path").attr("style",s),a&&b.selectAll("path").attr("style",a),e.width<25&&d&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${r})`)}return p(e,b),e.intersect=function(t){return z.circle(e,(e.width??0)/2,t)},u}function Ut(t,e,{config:{themeVariables:r}}){const{lineColor:i,nodeShadow:a}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n;if("handDrawn"===e.look){const t=c.A.svg(s).circle(0,0,e.width,(0,o.ue)(i));n=s.insert(()=>t),n.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else n=s.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&a&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${r})`)}return p(e,n),e.intersect=function(t){return z.circle(e,(e.width??7)/2,t)},s}(0,l.K2)(Pt,"shadedProcess"),(0,l.K2)(Wt,"slopedRect"),(0,l.K2)(Nt,"squareRect"),(0,l.K2)(jt,"stadium"),(0,l.K2)(Ht,"state"),(0,l.K2)(Gt,"stateEnd"),(0,l.K2)(Ut,"stateStart");async function Yt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e?.padding??8,n="neo"===e.look?28:a,l="neo"===e.look?12:a,{shapeSvg:h,bbox:u}=await d(t,e,g(e)),f=(e?.width??u.width)+16+n,y=(e?.height??u.height)+l,m=f-16,C=y,x=-f/2,b=-y/2,k=[{x:0,y:0},{x:m,y:0},{x:m,y:-C},{x:0,y:-C},{x:0,y:0},{x:-8,y:0},{x:m+8,y:0},{x:m+8,y:-C},{x:-8,y:-C},{x:-8,y:0}];if("handDrawn"===e.look){const t=c.A.svg(h),r=(0,o.Fr)(e,{}),i=t.rectangle(x,b,m+16,C,r),a=t.line(x+8,b,x+8,b+C,r),n=t.line(x+8+m,b,x+8+m,b+C,r);h.insert(()=>a,":first-child"),h.insert(()=>n,":first-child");const l=h.insert(()=>i,":first-child"),{cssStyles:d}=e;l.attr("class","basic label-container").attr("style",(0,s.KL)(d)),p(e,l)}else{const t=H(h,m,C,k);i&&t.attr("style",i),p(e,t)}return e.intersect=function(t){return z.polygon(e,k,t)},h}(0,l.K2)(Yt,"subroutine");async function Xt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*n,10),e.width=Math.max((e?.width??0)-2*s-.2*(e.height+2*n),10));const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height?e?.height:h.height)+2*n,y=.2*u,m=.2*u,C=(e?.width?e?.width:h.width)+2*s+y-y,x=u,b=-C/2,k=-x/2,{cssStyles:T}=e,S=c.A.svg(l),B=(0,o.Fr)(e,{}),w=[{x:b-y/2,y:k},{x:b+C+y/2,y:k},{x:b+C+y/2,y:k+x},{x:b-y/2,y:k+x}],A=[{x:b+C-y/2,y:k+x},{x:b+C+y/2,y:k+x},{x:b+C+y/2,y:k+x-m}];"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const L=f(w),v=S.path(L,B),F=f(A),M=S.path(F,{...B,fillStyle:"solid"}),_=l.insert(()=>M,":first-child");return _.insert(()=>v,":first-child"),_.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",T),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),p(e,_),e.intersect=function(t){return z.polygon(e,w,t)},l}async function Vt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,label:n}=await d(t,e,g(e)),l=Math.max(s.width+2*(e.padding??0),e?.width??0),h=Math.max(s.height+2*(e.padding??0),e?.height??0),u=h/8,m=.2*l,C=.2*h,x=h+u,{cssStyles:b}=e,k=c.A.svg(a),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:-l/2-l/2*.1,y:x/2},...y(-l/2-l/2*.1,x/2,l/2+l/2*.1,x/2,u,.8),{x:l/2+l/2*.1,y:-x/2},{x:-l/2-l/2*.1,y:-x/2}],B=-l/2+l/2*.1,w=-x/2-.4*C,A=[{x:B+l-m,y:1.3*(w+h)},{x:B+l,y:w+h-C},{x:B+l,y:.9*(w+h)},...y(B+l,1.25*(w+h),B+l-m,1.3*(w+h),.02*-h,.5)],L=f(S),v=k.path(L,T),F=f(A),M=k.path(F,{...T,fillStyle:"solid"}),_=a.insert(()=>M,":first-child");return _.insert(()=>v,":first-child"),_.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-u/2})`),n.attr("transform",`translate(${-l/2+(e.padding??0)-(s.x-(s.left??0))},${-h/2+(e.padding??0)-u/2-(s.y-(s.top??0))})`),p(e,_),e.intersect=function(t){return z.polygon(e,S,t)},a}async function Zt(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s}=await d(t,e,g(e)),n=Math.max(s.width+(e.padding??0),e?.width||0),l=Math.max(s.height+(e.padding??0),e?.height||0),h=-n/2,c=-l/2,u=a.insert("rect",":first-child");return u.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",n).attr("height",l),p(e,u),e.intersect=function(t){return z.rect(e,t)},a}(0,l.K2)(Xt,"taggedRect"),(0,l.K2)(Vt,"taggedWaveEdgedRectangle"),(0,l.K2)(Zt,"text");var Qt=(0,l.K2)((t,e,r,i,o,a)=>`M${t},${e}\n a${o},${a} 0,0,1 0,${-i}\n l${r},0\n a${o},${a} 0,0,1 0,${i}\n M${r},${-i}\n a${o},${a} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),Jt=(0,l.K2)((t,e,r,i,o,a)=>[`M${t},${e}`,`M${t+r},${e}`,`a${o},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${o},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),te=(0,l.K2)((t,e,r,i,o,a)=>[`M${t+r/2},${-i/2}`,`a${o},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function ee(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,n="neo"===e.look?12:a/2;if(e.width||e.height){const t=e.height??0;e.height=(e.height??0)-n,e.height<5&&(e.height=5);const r=t/2/(2.5+t/50);e.width=(e.width??0)-n-3*r,e.width<10&&(e.width=10)}const{shapeSvg:l,bbox:h,label:u}=await d(t,e,g(e)),f=(e.height?e.height:h.height)+n,y=f/2,m=y/(2.5+f/50),C=(e.width?e.width:h.width)+m+n,{cssStyles:x}=e;let b;if("handDrawn"===e.look){const t=c.A.svg(l),r=Jt(0,0,C,f,m,y),i=te(0,0,C,f,m,y),a=t.path(r,(0,o.Fr)(e,{})),s=t.path(i,(0,o.Fr)(e,{fill:"none"}));b=l.insert(()=>s,":first-child"),b=l.insert(()=>a,":first-child"),b.attr("class","basic label-container"),x&&b.attr("style",x)}else{const t=Qt(0,0,C,f,m,y);b=l.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)(x)).attr("style",i),b.attr("class","basic label-container outer-path"),x&&b.selectAll("path").attr("style",x),i&&b.selectAll("path").attr("style",i)}return b.attr("label-offset-x",m),b.attr("transform",`translate(${-C/2}, ${f/2} )`),u.attr("transform",`translate(${-h.width/2-m-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),p(e,b),e.intersect=function(t){const r=z.rect(e,t),i=r.y-(e.y??0);if(0!=y&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let o=m*m*(1-i*i/(y*y));0!=o&&(o=Math.sqrt(Math.abs(o))),o=m-o,t.x-(e.x??0)>0&&(o=-o),r.x+=o}return r},l}async function re(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s=(e.look,a),n="neo"===e.look?2*a:a,{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.height??h.height)+s,y=(e?.width??h.width)+n,m=[{x:-3*u/6,y:0},{x:y+3*u/6,y:0},{x:y,y:-u},{x:0,y:-u}];let C;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=c.A.svg(l),r=(0,o.Fr)(e,{}),i=f(m),a=t.path(i,r);C=l.insert(()=>a,":first-child").attr("transform",`translate(${-y/2}, ${u/2})`),x&&C.attr("style",x)}else C=H(l,y,u,m);return i&&C.attr("style",i),e.width=y,e.height=u,p(e,C),e.intersect=function(t){return z.polygon(e,m,t)},l}async function ie(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;(e.width||e.height)&&(e.height=(e.height??0)-2*n,e.height<5&&(e.height=5),e.width=(e.width??0)-2*s,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:h.width)+2*s,y=(e?.height?e?.height:h.height)+2*n,{cssStyles:m}=e,C=c.A.svg(l),x=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2*.8,y:-y/2},{x:u/2*.8,y:-y/2},{x:u/2,y:-y/2*.6},{x:u/2,y:y/2},{x:-u/2,y:y/2},{x:-u/2,y:-y/2*.6}],k=f(b),T=C.path(k,x),S=l.insert(()=>T,":first-child");return S.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),p(e,S),e.intersect=function(t){return z.polygon(e,b,t)},l}(0,l.K2)(ee,"tiltedCylinder"),(0,l.K2)(re,"trapezoid"),(0,l.K2)(ie,"trapezoidalPentagon");async function oe(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?2*a:a;(e.width||e.height)&&(e.width=((e?.width??0)-s)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:u,label:y}=await d(t,e,g(e)),m=(0,n._3)((0,n.D7)().flowchart?.htmlLabels),C=(e?.width?e?.width:u.width)+s,x=e?.height?e?.height:C+u.height,b=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:k}=e,T=c.A.svg(h),S=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const B=f(b),w=T.path(B,S),A=h.insert(()=>w,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return k&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",k),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),e.width=C,e.height=x,p(e,A),y.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))}, ${x/2-(u.height+(e.padding??0)/(m?2:1)-(u.y-(u.top??0)))})`),e.intersect=function(t){return l.Rm.info("Triangle intersect",e,b,t),z.polygon(e,b,t)},h}async function ae(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?12:a;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*s,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:u,label:m}=await d(t,e,g(e)),C=(e?.width?e?.width:u.width)+2*(s??0),x=(e?.height?e?.height:u.height)+2*(n??0),b="neo"===e.look?x/4:x/8,k=x+(l?b:-b),{cssStyles:T}=e,S=14-C,B=S>0?S/2:0,w=c.A.svg(h),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const L=[{x:-C/2-B,y:k/2},...y(-C/2-B,k/2,C/2+B,k/2,b,.8),{x:C/2+B,y:-k/2},{x:-C/2-B,y:-k/2}],v=f(L),F=w.path(v,A),M=h.insert(()=>F,":first-child");return M.attr("class","basic label-container outer-path"),T&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",T),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-b/2})`),m.attr("transform",`translate(${-C/2+(e.padding??0)-(u.x-(u.left??0))},${-x/2+(e.padding??0)-b-(u.y-(u.top??0))})`),p(e,M),e.intersect=function(t){return z.polygon(e,L,t)},h}async function se(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?16:a,n="neo"===e.look?20:a;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-n-t*(20/9)),e.width=e.width-2*s}const{shapeSvg:l,bbox:h}=await d(t,e,g(e)),u=(e?.width?e?.width:h.width)+2*s,m=(e?.height?e?.height:h.height)+n,C=m/8,x=m+2*C,{cssStyles:b}=e,k=c.A.svg(l),T=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const S=[{x:-u/2,y:x/2},...y(-u/2,x/2,u/2,x/2,C,1),{x:u/2,y:-x/2},...y(u/2,-x/2,-u/2,-x/2,C,-1)],B=f(S),w=k.path(B,T),A=l.insert(()=>w,":first-child");return A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),p(e,A),e.intersect=function(t){return z.polygon(e,S,t)},l}(0,l.K2)(oe,"triangle"),(0,l.K2)(ae,"waveEdgedRectangle"),(0,l.K2)(se,"waveRectangle");var ne=10;async function le(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-ne,10),e.height=Math.max((e?.height??0)-2*s-ne,10));const{shapeSvg:n,bbox:l,label:h}=await d(t,e,g(e)),u=(e?.width?e?.width:l.width)+2*a+ne,f=(e?.height?e?.height:l.height)+2*s+ne,y=u-ne,m=f-ne,C=-y/2,x=-m/2,{cssStyles:b}=e,k=c.A.svg(n),T=(0,o.Fr)(e,{}),S=[{x:C-ne,y:x-ne},{x:C-ne,y:x+m},{x:C+y,y:x+m},{x:C+y,y:x-ne}],B=`M${C-ne},${x-ne} L${C+y},${x-ne} L${C+y},${x+m} L${C-ne},${x+m} L${C-ne},${x-ne}\n M${C-ne},${x} L${C+y},${x}\n M${C},${x-ne} L${C},${x+m}`;"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const w=k.path(B,T),A=n.insert(()=>w,":first-child");return A.attr("transform","translate(5, 5)"),A.attr("class","basic label-container outer-path"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),p(e,A),e.intersect=function(t){return z.polygon(e,S,t)},n}(0,l.K2)(le,"windowPane");var he=new Set(["redux-color","redux-dark-color"]),ce=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function de(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:i,themeVariables:a}=(0,n.zj)(),{rowEven:l,rowOdd:d,nodeBorder:u,borderColorArray:f}=a;if("handDrawn"===e.look){const{themeVariables:r}=(0,n.zj)(),{background:i}=r,o={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await de(t,o)}const y=(0,n.zj)();e.useHtmlLabels=y.htmlLabels;let m=y.er?.diagramPadding??10,C=y.er?.entityPadding??6;const{cssStyles:x}=e,{labelStyles:b,nodeStyles:k}=(0,o.GX)(e);if(0===r.attributes.length&&e.label){const o={rx:0,ry:0,labelPaddingX:m,labelPaddingY:1.5*m,classes:""};(0,s.Un)(e.label,y)+2*o.labelPaddingX0){const t=B.width+2*m-(v+F+M+_);v+=t/O,F+=t/O,M>0&&(M+=t/O),_>0&&(_+=t/O)}const D=v+F+M+_,q=c.A.svg(S),K=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(K.roughness=0,K.fillStyle="solid");let R=0;L.length>0&&(R=L.reduce((t,e)=>t+(e?.rowHeight??0),0));const P=Math.max(I.width+2*m,e?.width||0,D),W=Math.max((R??0)+B.height,e?.height||0),N=-P/2,j=-W/2;if(S.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]),i.attr("class").includes("attribute-name")?a+=v:i.attr("class").includes("attribute-keys")?a+=v+F:i.attr("class").includes("attribute-comment")&&(a+=v+F+M))}i.attr("transform",`translate(${N+m/2+a}, ${s+j+B.height+C/2})`)}),S.select(".name").attr("transform","translate("+-B.width/2+", "+(j+C/2)+")"),null!=i&&he.has(i)){const t=r.colorIndex??0;S.attr("data-color-id","color-"+t%f.length)}const H=q.rectangle(N,j,P,W,K),G=S.insert(()=>H,":first-child").attr("class","outer-path").attr("style",x.join(""));A.push(0);for(const[o,s]of L.entries()){const t=(o+1)%2==0&&0!==s.yOffset,e=q.rectangle(N,B.height+j+s?.yOffset,P,s?.rowHeight,{...K,fill:t?l:d,stroke:u});S.insert(()=>e,"g.label").attr("style",x.join("")).attr("class","row-rect-"+(t?"even":"odd"))}const U=1e-4;let Y=pe(N,B.height+j,P+N,B.height+j,U),X=q.polygon(Y.map(t=>[t.x,t.y]),K);if(S.insert(()=>X).attr("class","divider"),Y=pe(v+N,B.height+j,v+N,W+j,U),X=q.polygon(Y.map(t=>[t.x,t.y]),K),S.insert(()=>X).attr("class","divider"),E){const t=v+F+N;Y=pe(t,B.height+j,t,W+j,U),X=q.polygon(Y.map(t=>[t.x,t.y]),K),S.insert(()=>X).attr("class","divider")}if($){const t=v+F+M+N;Y=pe(t,B.height+j,t,W+j,U),X=q.polygon(Y.map(t=>[t.x,t.y]),K),S.insert(()=>X).attr("class","divider")}for(const o of A){const t=B.height+j+o;Y=pe(N,t,P+N,t,U),X=q.polygon(Y.map(t=>[t.x,t.y]),K),S.insert(()=>X).attr("class","divider")}if(p(e,G),k&&"handDrawn"!==e.look)if(null!=i&&ce.has(i))S.selectAll("path").attr("style",k);else{const t=k.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");S.selectAll("path").attr("style",e??""),S.selectAll(".row-rect-even path").attr("style",k)}return e.intersect=function(t){return z.rect(e,t)},S}async function ue(t,e,r,i=0,o=0,l=[],c=""){const d=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",c);e!==(0,n.QO)(e)&&(e=(e=(0,n.QO)(e)).replaceAll("<","<").replaceAll(">",">"));const u=d.node().appendChild(await(0,a.GZ)(d,e,{width:(0,s.Un)(e,r)+100,style:c,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=u.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let p=u.getBBox();if((0,n._3)(r.htmlLabels)){const t=u.children[0];t.style.textAlign="start";const e=(0,h.Ltv)(u);p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}return p}function pe(t,e,r,i,o){return t===r?[{x:t-o/2,y:e},{x:t+o/2,y:e},{x:r+o/2,y:i},{x:r-o/2,y:i}]:[{x:t,y:e-o/2},{x:t,y:e+o/2},{x:r,y:i+o/2},{x:r,y:i-o/2}]}async function ge(t,e,r,i,o=r.class.padding??12){const a=i?0:3,s=t.insert("g").attr("class",g(e)).attr("id",e.domId||e.id);let n=null,l=null,h=null,c=null,d=0,u=0,p=0;if(n=s.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await fe(n,{text:`\xab${t}\xbb`},0);d=n.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await fe(l,e,0,["font-weight: bolder"]);const f=l.node().getBBox();u=f.height,h=s.insert("g").attr("class","members-group text");let y=0;for(const g of e.members){y+=await fe(h,g,y,[g.parseClassifier()])+a}p=h.node().getBBox().height,p<=0&&(p=o/2),c=s.insert("g").attr("class","methods-group text");let m=0;for(const g of e.methods){m+=await fe(c,g,m,[g.parseClassifier()])+a}let C=s.node().getBBox();if(null!==n){const t=n.node().getBBox();n.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-f.width/2}, ${d})`),C=s.node().getBBox(),h.attr("transform",`translate(0, ${d+u+2*o})`),C=s.node().getBBox(),c.attr("transform",`translate(0, ${d+u+(p?p+4*o:2*o)})`),C=s.node().getBBox(),{shapeSvg:s,bbox:C}}async function fe(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),c=(0,n.zj)();let d="useHtmlLabels"in e?e.useHtmlLabels:(0,n._3)(c.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!d&&u.startsWith("\\")&&(u=u.substring(1)),(0,n.Wi)(u)&&(d=!0);const p=await(0,a.GZ)(o,(0,n.oB)((0,s.Sm)(u)),{width:(0,s.Un)(u,c)+50,classes:"markdown-node-label",useHtmlLabels:d},c);let g,f=1;if(d){const t=p.children[0],e=(0,h.Ltv)(p);f=t.innerHTML.split("
    ").length,t.innerHTML.includes("")&&(f+=t.innerHTML.split("").length-1);const r=t.getElementsByTagName("img");if(r){const t=""===u.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function i(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,r=5,i=parseInt(t,10)*r+"px";e.style.minWidth=i,e.style.maxWidth=i}else e.style.width="100%";r(e)}(0,l.K2)(i,"setupImage"),setTimeout(()=>{e.complete&&i()}),e.addEventListener("error",i),e.addEventListener("load",i)})))}g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{i.includes("font-weight: bolder")&&(0,h.Ltv)(p).selectAll("tspan").attr("font-weight",""),f=p.children.length;const t=p.children[0];if(""===p.textContent||p.textContent.includes(">")){t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim();" "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))}"undefined"===t.textContent&&(t.textContent=""),g=p.getBBox()}return o.attr("transform","translate(0,"+(-g.height/(2*f)+r)+")"),g.height}async function ye(t,e){const r=(0,n.D7)(),{themeVariables:i}=r,{useGradient:a}=i,s=r.class.padding??12,l=s,d=e.useHtmlLabels??(0,n._3)(r.htmlLabels)??!0,u=e;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];const{shapeSvg:g,bbox:f}=await ge(t,e,r,d,l),{labelStyles:y,nodeStyles:m}=(0,o.GX)(e);e.labelStyle=y,e.cssStyles=u.styles||"";const C=u.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=C.replaceAll("!important","").split(";"));const x=0===u.members.length&&0===u.methods.length&&!r.class?.hideEmptyMembersBox,b=c.A.svg(g),k=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const T=Math.max(e.width??0,f.width);let S=Math.max(e.height??0,f.height);const B=(e.height??0)>f.height;0===u.members.length&&0===u.methods.length?S+=l:u.members.length>0&&0===u.methods.length&&(S+=2*l);const w=-T/2,A=-S/2;let L=x?2*s:0===u.members.length&&0===u.methods.length?-s:0;B&&(L=2*s);const v=b.rectangle(w-s,A-s-(x?s:0===u.members.length&&0===u.methods.length?-s/2:0),T+2*s,S+2*s+L,k),F=g.insert(()=>v,":first-child");F.attr("class","basic label-container outer-path");const M=F.node().getBBox(),_=g.select(".annotation-group").node().getBBox().height-(x?s/2:0)||0,E=g.select(".label-group").node().getBBox().height-(x?s/2:0)||0,$=g.select(".members-group").node().getBBox().height-(x?s/2:0)||0,O=(_+E+A+s-(A-s-(x?s:0===u.members.length&&0===u.methods.length?-s/2:0)))/2;if(g.selectAll(".text").each((t,e,i)=>{const o=(0,h.Ltv)(i[e]),a=o.attr("transform");let n=0;if(a){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);t&&(n=parseFloat(t[2]))}let c=n+A+s-(x?s:0===u.members.length&&0===u.methods.length?-s/2:0);if(o.attr("class").includes("methods-group")){const t=Math.max($,l/2);c=B?Math.max(O,_+E+t+A+2*l+s)+2*l:_+E+t+A+4*l+s}0===u.members.length&&0===u.methods.length&&r.class?.hideEmptyMembersBox&&(c=u.annotations.length>0?n-l:n),d||(c-=4);let p=w;(o.attr("class").includes("label-group")||o.attr("class").includes("annotation-group"))&&(p=-o.node()?.getBBox().width/2||0,g.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),o.attr("transform",`translate(${p}, ${c})`)}),u.members.length>0||u.methods.length>0||x){const t=_+E+A+s,r=b.line(M.x,t,M.x+M.width,t+.001,k);g.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",C)}if(x||u.members.length>0||u.methods.length>0){const t=_+E+$+A+2*l+s,r=b.line(M.x,B?Math.max(O,t):t,M.x+M.width,(B?Math.max(O,t):t)+.001,k);g.insert(()=>r).attr("class","divider"+("neo"!==e.look||a?"":" neo-line")).attr("style",C)}if("handDrawn"!==u.look&&g.selectAll("path").attr("style",C),F.select(":nth-child(2)").attr("style",C),g.selectAll(".divider").select("path").attr("style",C),e.labelStyle?g.selectAll("span").attr("style",e.labelStyle):g.selectAll("span").attr("style",C),!d){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(C);if(e){const t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}else if(y){const e=t.exec(y);if(e){const t=e[0].replace("color","fill");g.selectAll("tspan").attr("style",t)}}}return p(e,F),e.intersect=function(t){return z.rect(e,t)},g}async function me(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const a=e,s=e,l="verifyMethod"in e,d=g(e),{themeVariables:u}=(0,n.D7)(),{borderColorArray:f,requirementEdgeLabelBackground:y}=u,m=t.insert("g").attr("class",d).attr("id",e.domId??e.id);let C;C=l?await Ce(m,`<<${a.type}>>`,0,e.labelStyle):await Ce(m,"<<Element>>",0,e.labelStyle);let x=C;const b=await Ce(m,a.name,x,e.labelStyle+"; font-weight: bold;");if(x+=b+20,l){x+=await Ce(m,""+(a.requirementId?`ID: ${a.requirementId}`:""),x,e.labelStyle);x+=await Ce(m,""+(a.text?`Text: ${a.text}`:""),x,e.labelStyle);x+=await Ce(m,""+(a.risk?`Risk: ${a.risk}`:""),x,e.labelStyle),await Ce(m,""+(a.verifyMethod?`Verification: ${a.verifyMethod}`:""),x,e.labelStyle)}else{x+=await Ce(m,""+(s.type?`Type: ${s.type}`:""),x,e.labelStyle),await Ce(m,""+(s.docRef?`Doc Ref: ${s.docRef}`:""),x,e.labelStyle)}const k=(m.node()?.getBBox().width??200)+20,T=(m.node()?.getBBox().height??200)+20,S=-k/2,B=-T/2,w=c.A.svg(m),A=(0,o.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const L=w.rectangle(S,B,k,T,A),v=m.insert(()=>L,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",i),f?.length){const t=e.colorIndex??0;m.attr("data-color-id","color-"+t%f.length)}if(m.selectAll(".label").each((t,e,r)=>{const i=(0,h.Ltv)(r[e]),o=i.attr("transform");let a=0,s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(a=parseFloat(t[1]),s=parseFloat(t[2]))}const n=s-T/2;let l=S+10;0!==e&&1!==e||(l=a),i.attr("transform",`translate(${l}, ${n+20})`)}),x>C+b+20){const t=B+C+b+20;let r;if("neo"===e.look){const e=.001,i=[[S,t],[S+k,t],[S+k,t+e],[S,t+e]];r=w.polygon(i,A)}else r=w.line(S,t,S+k,t,A);m.insert(()=>r).attr("class","divider")}return p(e,v),e.intersect=function(t){return z.rect(e,t)},i&&"handDrawn"!==e.look&&(y||f?.length)&&m.selectAll("path").attr("style",i),m}async function Ce(t,e,r,i=""){if(""===e)return 0;const o=t.insert("g").attr("class","label").attr("style",i),l=(0,n.D7)(),c=l.htmlLabels??!0,d=await(0,a.GZ)(o,(0,n.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,l)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},l);let u;if(c){const t=d.children[0],e=(0,h.Ltv)(d);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}else{const t=d.children[0];for(const e of t.children)i&&e.setAttribute("style",i);u=d.getBBox(),u.height+=6}return o.attr("transform",`translate(${-u.width/2},${-u.height/2+r})`),u.height}(0,l.K2)(de,"erBox"),(0,l.K2)(ue,"addText"),(0,l.K2)(pe,"lineToPolygon"),(0,l.K2)(ge,"textHelper"),(0,l.K2)(fe,"addText"),(0,l.K2)(ye,"classBox"),(0,l.K2)(me,"requirementBox"),(0,l.K2)(Ce,"addText");var xe=(0,l.K2)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function be(t,e,{config:r}){const{labelStyles:i,nodeStyles:a}=(0,o.GX)(e);e.labelStyle=i||"";const s=e.width;e.width=(e.width??200)-10;const{shapeSvg:n,bbox:l,label:h}=await d(t,e,g(e)),f=e.padding||10;let y,m="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(m=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),y=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",m).attr("target","_blank"));const C={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,b;({label:x,bbox:b}=y?await u(y,"ticket"in e&&e.ticket||"",C):await u(n,"ticket"in e&&e.ticket||"",C));const{label:T,bbox:S}=await u(n,"assigned"in e&&e.assigned||"",C);e.width=s;const B=e?.width||0,w=Math.max(b.height,S.height)/2,A=Math.max(l.height+20,e?.height||0)+w,L=-B/2,v=-A/2;let F;h.attr("transform","translate("+(f-B/2)+", "+(-w-l.height/2)+")"),x.attr("transform","translate("+(f-B/2)+", "+(-w+l.height/2)+")"),T.attr("transform","translate("+(f+B/2-S.width-20)+", "+(-w+l.height/2)+")");const{rx:M,ry:_}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=c.A.svg(n),r=(0,o.Fr)(e,{}),i=M||_?t.path(k(L,v,B,A,M||0),r):t.rectangle(L,v,B,A,r);F=n.insert(()=>i,":first-child"),F.attr("class","basic label-container").attr("style",E||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",a).attr("rx",M??5).attr("ry",_??5).attr("x",L).attr("y",v).attr("width",B).attr("height",A);const t="priority"in e&&e.priority;if(t){const e=n.append("line"),r=L+2,i=v+Math.floor((M??0)/2),o=v+A-Math.floor((M??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",o).attr("stroke-width","4").attr("stroke",xe(t))}}return p(e,F),e.height=A,e.intersect=function(t){return z.rect(e,t)},n}async function ke(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:h,label:u}=await d(t,e,g(e)),f=n.width+10*h,y=n.height+8*h,m=.15*f,{cssStyles:C}=e,x=n.width+20,b=n.height+20,k=Math.max(f,x),T=Math.max(y,b);let S;u.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`);const B=`M0 0 \n a${m},${m} 1 0,0 ${.25*k},${-1*T*.1}\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},0\n a${m},${m} 1 0,0 ${.25*k},${.1*T}\n\n a${m},${m} 1 0,0 ${.15*k},${.33*T}\n a${.8*m},${.8*m} 1 0,0 0,${.34*T}\n a${m},${m} 1 0,0 ${-1*k*.15},${.33*T}\n\n a${m},${m} 1 0,0 ${-1*k*.25},${.15*T}\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},0\n a${m},${m} 1 0,0 ${-1*k*.25},${-1*T*.15}\n\n a${m},${m} 1 0,0 ${-1*k*.1},${-1*T*.33}\n a${.8*m},${.8*m} 1 0,0 0,${-1*T*.34}\n a${m},${m} 1 0,0 ${.1*k},${-1*T*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,o.Fr)(e,{}),i=t.path(B,r);S=a.insert(()=>i,":first-child"),S.attr("class","basic label-container").attr("style",(0,s.KL)(C))}else S=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",B);return S.attr("transform",`translate(${-k/2}, ${-T/2})`),p(e,S),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Bang intersect",e,t),z.rect(e,t)},a}async function Te(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:n,halfPadding:h,label:u}=await d(t,e,g(e)),f=n.width+2*h,y=n.height+2*h,m=.15*f,C=.25*f,x=.35*f,b=.2*f,{cssStyles:k}=e;let T;const S=`M0 0 \n a${m},${m} 0 0,1 ${.25*f},${-1*f*.1}\n a${x},${x} 1 0,1 ${.4*f},${-1*f*.1}\n a${C},${C} 1 0,1 ${.35*f},${.2*f}\n\n a${m},${m} 1 0,1 ${.15*f},${.35*y}\n a${b},${b} 1 0,1 ${-1*f*.15},${.65*y}\n\n a${C},${m} 1 0,1 ${-1*f*.25},${.15*f}\n a${x},${x} 1 0,1 ${-1*f*.5},0\n a${m},${m} 1 0,1 ${-1*f*.25},${-1*f*.15}\n\n a${m},${m} 1 0,1 ${-1*f*.1},${-1*y*.35}\n a${b},${b} 1 0,1 ${.1*f},${-1*y*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=c.A.svg(a),r=(0,o.Fr)(e,{}),i=t.path(S,r);T=a.insert(()=>i,":first-child"),T.attr("class","basic label-container").attr("style",(0,s.KL)(k))}else T=a.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return u.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),T.attr("transform",`translate(${-f/2}, ${-y/2})`),p(e,T),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return l.Rm.info("Cloud intersect",e,t),z.rect(e,t)},a}async function Se(t,e){const{labelStyles:r,nodeStyles:i}=(0,o.GX)(e);e.labelStyle=r;const{shapeSvg:a,bbox:s,halfPadding:n,label:l}=await d(t,e,g(e)),h=s.width+8*n,c=s.height+2*n,u="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);const f=a.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",u);return a.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),a.append(()=>l.node()),p(e,f),e.calcIntersect=function(t,e){return z.rect(t,e)},e.intersect=function(t){return z.rect(e,t)},a}async function Be(t,e){return Y(t,e,{padding:e.padding??0})}(0,l.K2)(be,"kanbanItem"),(0,l.K2)(ke,"bang"),(0,l.K2)(Te,"cloud"),(0,l.K2)(Se,"defaultMindmapNode"),(0,l.K2)(Be,"mindmapCircle");var we=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Nt},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:zt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:jt},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Yt},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:nt},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Y},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ke},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Te},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ft},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:At},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:wt},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:re},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Tt},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:ht},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Zt},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:G},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Pt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Ut},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Gt},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ut},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:yt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Q},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rt},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Lt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:ae},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:pt},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:ee},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:_t},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:it},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:lt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:oe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:le},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ct},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:ie},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:dt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Wt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Ot},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$t},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:j},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:V},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Vt},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Xt},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:se},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Et}],Ae=(0,l.K2)(()=>{const t={state:Ht,choice:U,note:It,rectWithTitle:Rt,labelRect:Bt,iconSquare:bt,iconCircle:Ct,icon:mt,iconRounded:xt,imageSquare:kt,anchor:P,kanbanItem:be,mindmapCircle:Be,defaultMindmapNode:Se,classBox:ye,erBox:de,requirementBox:me},e=[...Object.entries(t),...we.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Le(t){return t in Ae}(0,l.K2)(Le,"isValidShape");var ve=new Map;async function Fe(t,e,r){let i,o;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const a=e.shape?Ae[e.shape]:void 0;if(!a)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let s;"sandbox"===r.config.securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s??null),o=await a(i,e,r)}else o=await a(t,e,r),i=o;return i.attr("data-look",(0,s.KL)(e.look)),e.tooltip&&o.attr("title",e.tooltip),ve.set(e.id,i),e.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}(0,l.K2)(Fe,"insertNode");var Me=(0,l.K2)((t,e)=>{ve.set(e.id,t)},"setNodeElem"),_e=(0,l.K2)(()=>{ve.clear()},"clear"),Ee=(0,l.K2)(t=>{const e=ve.get(t.id);l.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},2101:(t,e,r)=>{"use strict";r.d(e,{$C:()=>v,$t:()=>j,C4:()=>G,I5:()=>N,Ib:()=>y,KL:()=>X,Sm:()=>U,Un:()=>D,_K:()=>H,bH:()=>$,dq:()=>P,pe:()=>h,rY:()=>Y,ru:()=>I,sM:()=>A,vU:()=>g,yT:()=>M});var i=r(5691),o=r(8894),a=r(9627),s=r(1485),n=r(9881),l=r(3765),h="\u200b",c={curveBasis:s.qrM,curveBasisClosed:s.Yu4,curveBasisOpen:s.IA3,curveBumpX:s.Wi0,curveBumpY:s.PGM,curveBundle:s.OEq,curveCardinalClosed:s.olC,curveCardinalOpen:s.IrU,curveCardinal:s.y8u,curveCatmullRomClosed:s.Q7f,curveCatmullRomOpen:s.cVp,curveCatmullRom:s.oDi,curveLinear:s.lUB,curveLinearClosed:s.Lx9,curveMonotoneX:s.nVG,curveMonotoneY:s.uxU,curveNatural:s.Xf2,curveStep:s.GZz,curveStepAfter:s.UPb,curveStepBefore:s.dyv},d=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,u=(0,o.K2)(function(t,e){const r=p(t,/(?:init\b)|(?:initialize\b)/);let o={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.$i)(t),o=(0,i.hH)(o,[...t])}else o=r.args;if(!o)return;let a=(0,i.Ch)(t,e);const s="config";return void 0!==o[s]&&("flowchart-v2"===a&&(a="flowchart"),o[a]=o[s],delete o[s]),o},"detectInit"),p=(0,o.K2)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${d.source})(?=[}][%]{2}).*\n`,"ig");let a;t=t.trim().replace(r,"").replace(/'/gm,'"'),o.Rm.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const s=[];for(;null!==(a=i.DB.exec(t));)if(a.index===i.DB.lastIndex&&i.DB.lastIndex++,a&&!e||e&&a[1]?.match(e)||e&&a[2]?.match(e)){const t=a[1]?a[1]:a[2],e=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;s.push({type:t,args:e})}return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return o.Rm.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),g=(0,o.K2)(function(t){return t.replace(i.DB,"")},"removeDirectives"),f=(0,o.K2)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function y(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return c[r]??e}function m(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.J)(r):r}(0,o.K2)(y,"interpolateToCurve"),(0,o.K2)(m,"formatUrl");var C=(0,o.K2)((t,...e)=>{const r=t.split("."),i=r.length-1,a=r[i];let s=window;for(let n=0;n{r+=x(t,e),e=t});return S(t,r/2)}function k(t){return 1===t.length?t[0]:b(t)}(0,o.K2)(x,"distance"),(0,o.K2)(b,"traverseEdge"),(0,o.K2)(k,"calcLabelPosition");var T=(0,o.K2)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),S=(0,o.K2)((t,e)=>{let r,i=e;for(const o of t){if(r){const t=x(o,r);if(0===t)return r;if(t=1)return{x:o.x,y:o.y};if(e>0&&e<1)return{x:T((1-e)*r.x+e*o.x,5),y:T((1-e)*r.y+e*o.y,5)}}}r=o}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),B=(0,o.K2)((t,e,r)=>{o.Rm.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=S(e,25),a=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),n={x:0,y:0};return n.x=Math.sin(s)*a+(e[0].x+i.x)/2,n.y=-Math.cos(s)*a+(e[0].y+i.y)/2,n},"calcCardinalityPosition");function w(t,e,r){const i=structuredClone(r);o.Rm.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const a=S(i,25+t),s=10+.5*t,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(n+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*s+(i[0].y+a.y)/2):"end_right"===e?(l.x=Math.sin(n-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*s+(i[0].y+a.y)/2-5):"end_left"===e?(l.x=Math.sin(n)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*s+(i[0].x+a.x)/2,l.y=-Math.cos(n)*s+(i[0].y+a.y)/2),l}function A(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,o.K2)(w,"calcTerminalLabelPosition"),(0,o.K2)(A,"getStylesFromArray");var L=0,v=(0,o.K2)(()=>(L++,"id-"+Math.random().toString(36).substr(2,12)+"-"+L),"generateId");function F(t){let e="";const r="0123456789abcdef";for(let i=0;iF(t.length),"random"),_=(0,o.K2)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),E=(0,o.K2)(function(t,e){const r=e.text.replace(i.Y2.lineBreakRegex," "),[,o]=N(e.fontSize),a=t.append("text");a.attr("x",e.x),a.attr("y",e.y),a.style("text-anchor",e.anchor),a.style("font-family",e.fontFamily),a.style("font-size",o),a.style("font-weight",e.fontWeight),a.attr("fill",e.fill),void 0!==e.class&&a.attr("class",e.class);const s=a.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.attr("fill",e.fill),s.text(r),a},"drawSimpleText"),$=(0,n.A)((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
    "},r),i.Y2.lineBreakRegex.test(t))return t;const o=t.split(" ").filter(Boolean),a=[];let s="";return o.forEach((t,i)=>{const n=D(`${t} `,r),l=D(s,r);if(n>e){const{hyphenatedStrings:i,remainingWord:o}=O(t,e,"-",r);a.push(s,...i),s=o}else l+n>=e?(a.push(s),s=t):s=[s,t].filter(Boolean).join(" ");i+1===o.length&&a.push(s)}),a.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),O=(0,n.A)((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const o=[...t],a=[];let s="";return o.forEach((t,n)=>{const l=`${s}${t}`;if(D(l,i)>=e){const t=n+1,e=o.length===t,i=`${l}${r}`;a.push(e?l:i),s=""}else s=l}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function I(t,e){return K(t,e).height}function D(t,e){return K(t,e).width}(0,o.K2)(I,"calculateTextHeight"),(0,o.K2)(D,"calculateTextWidth");var q,K=(0,n.A)((t,e)=>{const{fontSize:r=12,fontFamily:o="Arial",fontWeight:a=400}=e;if(!t)return{width:0,height:0};const[,n]=N(r),l=["sans-serif",o],c=t.split(i.Y2.lineBreakRegex),d=[],u=(0,s.Ltv)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const p=u.append("svg");for(const i of l){let t=0;const e={width:0,height:0,lineHeight:0};for(const r of c){const o=_();o.text=r||h;const s=E(p,o).style("font-size",n).style("font-weight",a).style("font-family",i),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");e.width=Math.round(Math.max(e.width,l.width)),t=Math.round(l.height),e.height+=t,e.lineHeight=Math.round(Math.max(e.lineHeight,t))}d.push(e)}p.remove();return d[isNaN(d[1].height)||isNaN(d[1].width)||isNaN(d[1].lineHeight)||d[0].height>d[1].height&&d[0].width>d[1].width&&d[0].lineHeight>d[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),R=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,o.K2)(this,"InitIDGenerator")}},z=(0,o.K2)(function(t){return q=q||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),q.innerHTML=t,unescape(q.textContent)},"entityDecode");function P(t){return"str"in t}(0,o.K2)(P,"isDetailedError");var W=(0,o.K2)((t,e,r,i)=>{if(!i)return;const o=t.node()?.getBBox();o&&t.append("text").text(i).attr("text-anchor","middle").attr("x",o.x+o.width/2).attr("y",-r).attr("class",e)},"insertTitle"),N=(0,o.K2)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function j(t,e){return(0,l.A)({},t,e)}(0,o.K2)(j,"cleanAndMerge");var H={assignWithDepth:i.hH,wrapLabel:$,calculateTextHeight:I,calculateTextWidth:D,calculateTextDimensions:K,cleanAndMerge:j,detectInit:u,detectDirective:p,isSubstringInArray:f,interpolateToCurve:y,calcLabelPosition:k,calcCardinalityPosition:B,calcTerminalLabelPosition:w,formatUrl:m,getStylesFromArray:A,generateId:v,random:M,runFunc:C,entityDecode:z,insertTitle:W,isLabelCoordinateInPath:V,parseFontSize:N,InitIDGenerator:R},G=(0,o.K2)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"\ufb02\xb0\xb0"+e+"\xb6\xdf":"\ufb02\xb0"+e+"\xb6\xdf"}),e},"encodeEntities"),U=(0,o.K2)(function(t){return t.replace(/\ufb02\xb0\xb0/g,"&#").replace(/\ufb02\xb0/g,"&").replace(/\xb6\xdf/g,";")},"decodeEntities"),Y=(0,o.K2)((t,e,{counter:r=0,prefix:i,suffix:o},a)=>a||`${i?`${i}_`:""}${t}_${e}_${r}${o?`_${o}`:""}`,"getEdgeId");function X(t){return t??null}function V(t,e){const r=Math.round(t.x),i=Math.round(t.y),o=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return o.includes(r.toString())||o.includes(i.toString())}(0,o.K2)(X,"handleUndefinedAttr"),(0,o.K2)(V,"isLabelCoordinateInPath")},8894:(t,e,r)=>{"use strict";r.d(e,{He:()=>h,K2:()=>a,Rm:()=>l,VA:()=>s});var i=r(3930),o=Object.defineProperty,a=(t,e)=>o(t,"name",{value:e,configurable:!0}),s=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},n={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},l={trace:a((...t)=>{},"trace"),debug:a((...t)=>{},"debug"),info:a((...t)=>{},"info"),warn:a((...t)=>{},"warn"),error:a((...t)=>{},"error"),fatal:a((...t)=>{},"fatal")},h=a(function(t="fatal"){let e=n.fatal;"string"==typeof t?t.toLowerCase()in n&&(e=n[t]):"number"==typeof t&&(e=t),l.trace=()=>{},l.debug=()=>{},l.info=()=>{},l.warn=()=>{},l.error=()=>{},l.fatal=()=>{},e<=n.fatal&&(l.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",c("FATAL"))),e<=n.error&&(l.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",c("ERROR"))),e<=n.warn&&(l.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",c("WARN"))),e<=n.info&&(l.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",c("INFO"))),e<=n.debug&&(l.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("DEBUG"))),e<=n.trace&&(l.trace=console.debug?console.debug.bind(console,c("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",c("TRACE")))},"setLogLevel"),c=a(t=>`%c${i().format("ss.SSS")} : ${t} : `,"format")},2125:(t,e,r)=>{"use strict";r.d(e,{Nq:()=>s,RI:()=>h,Wg:()=>o,hq:()=>a});var i=r(8894),o=(0,i.K2)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),a={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},s={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function n(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=l(t),e=l(e);const[r,i]=[t.x,t.y],[o,a]=[e.x,e.y],s=o-r,n=a-i;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}(0,i.K2)(n,"calculateDeltaAndAngle");var l=(0,i.K2)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),h=(0,i.K2)(t=>({x:(0,i.K2)(function(e,r,i){let o=0;const s=l(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaX:r}=n(i[i.length-1],i[i.length-2]);o=a[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const h=Math.abs(l(e).x-l(i[i.length-1]).x),c=Math.abs(l(e).y-l(i[i.length-1]).y),d=Math.abs(l(e).x-l(i[0]).x),u=Math.abs(l(e).y-l(i[0]).y),p=a[t.arrowTypeStart],g=a[t.arrowTypeEnd];if(h0&&c0&&u=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(a,t.arrowTypeEnd)){const{angle:e,deltaY:r}=n(i[i.length-1],i[i.length-2]);o=a[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const h=Math.abs(l(e).y-l(i[i.length-1]).y),c=Math.abs(l(e).x-l(i[i.length-1]).x),d=Math.abs(l(e).y-l(i[0]).y),u=Math.abs(l(e).x-l(i[0]).x),p=a[t.arrowTypeStart],g=a[t.arrowTypeEnd];if(h0&&c0&&u{"use strict";r.d(e,{IU:()=>b,Jo:()=>E,T_:()=>B,g0:()=>ot,jP:()=>T});var i=r(2125),o=r(5707),a=r(3276),s=r(4061),n=r(7127),l=r(2101),h=r(5691),c=r(8894),d=r(1485),u=r(1965),p=(0,c.K2)((t,e,r,i,o,a=!1,s)=>{e.arrowTypeStart&&y(t,"start",e.arrowTypeStart,r,i,o,a,s),e.arrowTypeEnd&&y(t,"end",e.arrowTypeEnd,r,i,o,a,s)},"addEdgeMarkers"),g={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},f=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],y=(0,c.K2)((t,e,r,i,o,a,s=!1,n)=>{const l=g[r],h=l&&f.includes(l.type);if(!l)return void c.Rm.warn(`Unknown arrow type: ${r}`);const d=`${o}_${a}-${l.type}${"start"===e?"Start":"End"}${s&&h?"-margin":""}`;if(n&&""!==n.trim()){const r=`${d}_${n.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(d);if(t){const e=t.cloneNode(!0);e.id=r;e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",n),l.fill&&t.setAttribute("fill",n)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${d})`)},"addEdgeMarker"),m=(0,c.K2)(t=>"string"==typeof t?t:(0,h.D7)()?.flowchart?.curve,"resolveEdgeCurveType"),C=new Map,x=new Map,b=(0,c.K2)(()=>{C.clear(),x.clear()},"clear"),k=(0,c.K2)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),T=(0,c.K2)(async(t,e)=>{const r=(0,h.D7)();let a=(0,h.E)(r);const{labelStyles:l}=(0,s.GX)(e);e.labelStyle=l;const u=t.insert("g").attr("class","edgeLabel"),p=u.insert("g").attr("class","label").attr("data-id",e.id),g="markdown"===e.labelType,f=await(0,n.GZ)(t,e.label,{style:k(e.labelStyle),useHtmlLabels:a,addSvgBackground:!0,isNode:!1,markdown:g,width:void 0},r);p.node().appendChild(f),c.Rm.info("abc82",e,e.labelType);let y,m=f.getBBox(),b=m;if(a){const t=f.children[0],e=(0,d.Ltv)(f);m=t.getBoundingClientRect(),b=m,e.attr("width",m.width),e.attr("height",m.height)}else{const t=(0,d.Ltv)(f).select("text").node();t&&"function"==typeof t.getBBox&&(b=t.getBBox())}if(p.attr("transform",(0,i.Wg)(b,a)),C.set(e.id,u),e.width=m.width,e.height=m.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await(0,o.DA)(s,e.startLabelLeft,k(e.labelStyle)||"",!1,!1);y=n;let l=n.getBBox();if(a){const t=n.children[0],e=(0,d.Ltv)(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,i.Wg)(l,a)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startLeft=r,S(y,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await(0,o.DA)(s,e.startLabelRight,k(e.labelStyle)||"",!1,!1);y=n,s.node().appendChild(n);let l=n.getBBox();if(a){const t=n.children[0],e=(0,d.Ltv)(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,i.Wg)(l,a)),x.get(e.id)||x.set(e.id,{}),x.get(e.id).startRight=r,S(y,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await(0,o.DA)(s,e.endLabelLeft,k(e.labelStyle)||"",!1,!1);y=n;let l=n.getBBox();if(a){const t=n.children[0],e=(0,d.Ltv)(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,i.Wg)(l,a)),r.node().appendChild(n),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endLeft=r,S(y,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await(0,o.DA)(s,e.endLabelRight,k(e.labelStyle)||"",!1,!1);y=n;let l=n.getBBox();if(a){const t=n.children[0],e=(0,d.Ltv)(n);l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height)}s.attr("transform",(0,i.Wg)(l,a)),r.node().appendChild(n),x.get(e.id)||x.set(e.id,{}),x.get(e.id).endRight=r,S(y,e.endLabelRight)}return f},"insertEdgeLabel");function S(t,e){(0,h.E)((0,h.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(S,"setTerminalWidth");var B=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,C.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const i=(0,h.D7)(),{subGraphTitleTotalMargin:o}=(0,a.O)(i);if(t.label){const i=C.get(t.id);let a=t.x,s=t.y;if(r){const i=l._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",a,",",s,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(a=i.x,s=i.y)}i.attr("transform",`translate(${a}, ${s+o/2})`)}if(t.startLabelLeft){const e=x.get(t.id).startLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=x.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=x.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=x.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=l._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}},"positionEdgeLabel"),w=(0,c.K2)((t,e)=>{const r=t.x,i=t.y,o=Math.abs(e.x-r),a=Math.abs(e.y-i),s=t.width/2,n=t.height/2;return o>=s||a>=n},"outsideNode"),A=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,o=t.y,a=Math.abs(i-r.x),s=t.width/2;let n=r.xMath.abs(i-e.x)*l){let t=r.y{c.Rm.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],o=!1;return t.forEach(t=>{if(c.Rm.info("abc88 checking point",t,e),w(e,t)||o)c.Rm.warn("abc88 outside",t,i),i=t,o||r.push(t);else{const a=A(e,i,t);c.Rm.debug("abc88 inside",t,i,a),c.Rm.debug("abc88 intersection",a,e);let s=!1;r.forEach(t=>{s=s||t.x===a.x&&t.y===a.y}),r.some(t=>t.x===a.x&&t.y===a.y)?c.Rm.warn("abc88 no intersect",a,r):r.push(a),o=!0}}),c.Rm.debug("returning points",r),r},"cutPathAtIntersect");function v(t){const e=[],r=[];for(let i=1;i5&&Math.abs(a.y-o.y)>5||o.y===a.y&&a.x===s.x&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5)&&(e.push(a),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.K2)(v,"extractCornerPoints");var F=(0,c.K2)(function(t,e,r){const i=e.x-t.x,o=e.y-t.y,a=r/Math.sqrt(i*i+o*o);return{x:e.x-a*i,y:e.y-a*o}},"findAdjacentPoint"),M=(0,c.K2)(function(t){const{cornerPointPositions:e}=v(t),r=[];for(let i=0;i10&&Math.abs(o.y-e.y)>=10){c.Rm.debug("Corner point fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));const t=5;u=a.x===s.x?{x:l<0?s.x-t+d:s.x+t-d,y:h<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:h<0?s.y-t+d:s.y+t-d}}else c.Rm.debug("Corner point skipping fixing",Math.abs(o.x-e.x),Math.abs(o.y-e.y));r.push(u,n)}else r.push(t[i]);return r},"fixCorners"),_=(0,c.K2)((t,e,r)=>{const i=t-e-r,o=Math.floor(i/4);return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),E=(0,c.K2)(function(t,e,r,o,a,n,g,f=!1){if(!g)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:y}=(0,h.D7)();let C=e.points,x=!1;const b=a;var k=n;const T=[];for(const i in e.cssCompiledStyles)(0,s.KX)(i)||T.push(e.cssCompiledStyles[i]);c.Rm.debug("UIO intersect check",e.points,k.x,b.x),k.intersect&&b.intersect&&!f&&(C=C.slice(1,e.points.length-1),C.unshift(b.intersect(C[0])),c.Rm.debug("Last point UIO",e.start,"--\x3e",e.end,C[C.length-1],k,k.intersect(C[C.length-1])),C.push(k.intersect(C[C.length-1])));const S=btoa(JSON.stringify(C));e.toCluster&&(c.Rm.info("to cluster abc88",r.get(e.toCluster)),C=L(e.points,r.get(e.toCluster).node),x=!0),e.fromCluster&&(c.Rm.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(C,null,2)),C=L(C.reverse(),r.get(e.fromCluster).node).reverse(),x=!0);let B=C.filter(t=>!Number.isNaN(t.y));const w=m(e.curve);"rounded"!==w&&(B=M(B));let A=d.lUB;switch(w){case"linear":case"rounded":A=d.lUB;break;case"basis":default:A=d.qrM;break;case"cardinal":A=d.y8u;break;case"bumpX":A=d.Wi0;break;case"bumpY":A=d.PGM;break;case"catmullRom":A=d.oDi;break;case"monotoneX":A=d.nVG;break;case"monotoneY":A=d.uxU;break;case"natural":A=d.Xf2;break;case"step":A=d.GZz;break;case"stepAfter":A=d.UPb;break;case"stepBefore":A=d.dyv}const{x:v,y:F}=(0,i.RI)(e),E=(0,d.n8j)().x(v).y(F).curve(A);let O,D;switch(e.thickness){case"normal":default:O="edge-thickness-normal";break;case"thick":O="edge-thickness-thick";break;case"invisible":O="edge-thickness-invisible"}switch(e.pattern){case"solid":default:O+=" edge-pattern-solid";break;case"dotted":O+=" edge-pattern-dotted";break;case"dashed":O+=" edge-pattern-dashed"}let q="rounded"===w?$(I(B,e),5):E(B);const K=Array.isArray(e.style)?e.style:[e.style];let R=K.find(t=>t?.startsWith("stroke:")),z="";e.animate&&(z="edge-animation-fast"),e.animation&&(z="edge-animation-"+e.animation);let P=!1;if("handDrawn"===e.look){const r=u.A.svg(t);Object.assign([],B);const i=r.path(q,{roughness:.3,seed:y});O+=" transition",D=(0,d.Ltv)(i).select("path").attr("id",`${g}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",K?K.reduce((t,e)=>t+";"+e,""):"");let o=D.attr("d");D.attr("d",o),t.node().appendChild(D.node())}else{const r=T.join(";"),o=K?K.reduce((t,e)=>t+e+";",""):"",a=(r?r+";"+o+";":o)+";"+(K?K.reduce((t,e)=>t+";"+e,""):"");D=t.append("path").attr("d",q).attr("id",`${g}-${e.id}`).attr("class"," "+O+(e.classes?" "+e.classes:"")+(z?" "+z:"")).attr("style",a),R=a.match(/stroke:([^;]+)/)?.[1],P=!0===e.animate||!!e.animation||r.includes("animation");const s=D.node(),n="function"==typeof s.getTotalLength?s.getTotalLength():0,l=i.Nq[e.arrowTypeStart]||0,h=i.Nq[e.arrowTypeEnd]||0;if("neo"===e.look&&!P){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?_(n,l,h):`0 ${l} ${n-l-h} ${h}`}; stroke-dashoffset: 0;`;D.attr("style",t+D.attr("style"))}}D.attr("data-edge",!0),D.attr("data-et","edge"),D.attr("data-id",e.id),D.attr("data-points",S),D.attr("data-look",(0,l.KL)(e.look)),e.showPoints&&B.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let W="";((0,h.D7)().flowchart.arrowMarkerAbsolute||(0,h.D7)().state.arrowMarkerAbsolute)&&(W=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,W=W.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),c.Rm.info("arrowTypeStart",e.arrowTypeStart),c.Rm.info("arrowTypeEnd",e.arrowTypeEnd);p(D,e,W,g,o,!P&&"neo"===e?.look,R);const N=C[Math.floor(C.length/2)];l._K.isLabelCoordinateInPath(N,D.attr("d"))||(x=!0);let j={};return x&&(j.updatedPath=C),j.originalPath=e.points,j},"insertEdge");function $(t,e){if(t.length<2)return"";let r="";const i=t.length,o=1e-5;for(let a=0;a({...t}));if(t.length>=2&&i.hq[e.arrowTypeStart]){const o=i.hq[e.arrowTypeStart],a=t[0],s=t[1],{angle:n}=O(a,s),l=o*Math.cos(n),h=o*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+h}const o=t.length;if(o>=2&&i.hq[e.arrowTypeEnd]){const a=i.hq[e.arrowTypeEnd],s=t[o-1],n=t[o-2],{angle:l}=O(n,s),h=a*Math.cos(l),c=a*Math.sin(l);r[o-1].x=s.x-h,r[o-1].y=s.y-c}return r}(0,c.K2)($,"generateRoundedPath"),(0,c.K2)(O,"calculateDeltaAndAngle"),(0,c.K2)(I,"applyMarkerOffsetsToPoints");var D=(0,c.K2)((t,e,r,i)=>{e.forEach(e=>{it[e](t,r,i)})},"insertMarkers"),q=(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),K=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),R=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),z=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),P=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),W=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),N=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),j=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),H=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),G=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{transitionColor:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),U=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Y=(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),o.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),X=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),V=(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const o=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");o.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),o.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Z=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Q=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",s??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),J=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),tt=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a,mainBkg:s}=o,n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",s??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),et=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),rt=(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),it={extension:q,composition:K,aggregation:R,dependency:z,lollipop:P,point:W,circle:N,cross:j,barb:H,barbNeo:G,only_one:U,zero_or_one:Y,one_or_more:X,zero_or_more:V,only_one_neo:Z,zero_or_one_neo:Q,one_or_more_neo:J,zero_or_more_neo:tt,requirement_arrow:et,requirement_contains:(0,c.K2)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:rt,requirement_contains_neo:(0,c.K2)((t,e,r)=>{const i=(0,h.zj)(),{themeVariables:o}=i,{strokeWidth:a}=o,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo")},ot=D},5691:(t,e,r)=>{"use strict";r.d(e,{C0:()=>C,xA:()=>mt,hH:()=>w,Dl:()=>Ut,IU:()=>ce,Wt:()=>ae,Y2:()=>Vt,a$:()=>Jt,sb:()=>ot,ME:()=>ke,UI:()=>et,Ch:()=>b,mW:()=>x,DB:()=>y,_3:()=>at,EJ:()=>f,m7:()=>ge,iN:()=>ue,zj:()=>ft,D7:()=>xe,Gs:()=>Le,J$:()=>S,ab:()=>ye,E:()=>Bt,Q2:()=>pt,P$:()=>O,ID:()=>qt,TM:()=>St,Wi:()=>Gt,H1:()=>wt,QO:()=>zt,Js:()=>Ae,Xd:()=>k,dj:()=>Xt,cL:()=>Ct,$i:()=>rt,jZ:()=>_t,oB:()=>Te,wZ:()=>dt,EI:()=>pe,SV:()=>de,Nk:()=>gt,XV:()=>be,ke:()=>fe,UU:()=>ct,ot:()=>te,mj:()=>Se,tM:()=>oe,H$:()=>V,B6:()=>ut});var i=r(8894),o=r(9404),a=r(3854);const s=(t,e)=>{const r=o.A.parse(t),i={};for(const o in e)e[o]&&(i[o]=r[o]+e[o]);return(0,a.A)(t,i)};var n=r(9543);const l=(t,e,r=50)=>{const{r:i,g:a,b:s,a:l}=o.A.parse(t),{r:h,g:c,b:d,a:u}=o.A.parse(e),p=r/100,g=2*p-1,f=l-u,y=((g*f===-1?g:(g+f)/(1+g*f))+1)/2,m=1-y,C=i*y+h*m,x=a*y+c*m,b=s*y+d*m,k=l*p+u*(1-p);return(0,n.A)(C,x,b,k)},h=(t,e=100)=>{const r=o.A.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,l(r,t,e)};var c,d=r(5485),u=r(279),p=r(4713),g=r(8685),f=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,y=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,m=/\s*%%.*\n/gm,C=class extends Error{static{(0,i.K2)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},x={},b=(0,i.K2)(function(t,e){t=t.replace(f,"").replace(y,"").replace(m,"\n");for(const[r,{detector:i}]of Object.entries(x)){if(i(t,e))return r}throw new C(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),k=(0,i.K2)((...t)=>{for(const{id:e,detector:r,loader:i}of t)T(e,r,i)},"registerLazyLoadedDiagrams"),T=(0,i.K2)((t,e,r)=>{x[t]&&i.Rm.warn(`Detector with key ${t} already exists. Overwriting.`),x[t]={detector:e,loader:r},i.Rm.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),S=(0,i.K2)(t=>x[t].loader,"getDiagramLoader"),B=(0,i.K2)((t,e,{depth:r=2,clobber:i=!1}={})=>{const o={depth:r,clobber:i};return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(e=>B(t,e,o)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||r<=0?null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e:(void 0!==e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||void 0!==t[o]&&"object"!=typeof t[o]?(i||"object"!=typeof t[o]&&"object"!=typeof e[o])&&(t[o]=e[o]):(void 0===t[o]&&(t[o]=Array.isArray(e[o])?[]:{}),t[o]=B(t[o],e[o],{depth:r-1,clobber:i}))}),t)},"assignWithDepth"),w=B,A="#ffffff",L="#f2f2f2",v=(0,i.K2)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),F=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,d.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,u.A)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},M=(0,i.K2)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),_=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,n.A)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=(0,d.A)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,d.A)(this.sectionBkgColor,10),this.taskBorderColor=(0,n.A)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,n.A)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,d.A)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,u.A)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=(0,u.A)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,u.A)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=h(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},E=(0,i.K2)(t=>{const e=new _;return e.calculate(t),e},"getThemeVariables"),$=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,n.A)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},O=(0,i.K2)(t=>{const e=new $;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,u.A)("#cde498",10),this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.primaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,d.A)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,d.A)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,d.A)(this.tertiaryColor,40);for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,i.K2)(t=>{const e=new I;return e.calculate(t),e},"getThemeVariables"),q=class{static{(0,i.K2)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,u.A)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,u.A)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,u.A)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,u.A)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},K=(0,i.K2)(t=>{const e=new q;return e.calculate(t),e},"getThemeVariables"),R=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||s(t,{h:30}),this.cScale4=this.cScale4||s(t,{h:60}),this.cScale5=this.cScale5||s(t,{h:90}),this.cScale6=this.cScale6||s(t,{h:120}),this.cScale7=this.cScale7||s(t,{h:150}),this.cScale8=this.cScale8||s(t,{h:210,l:150}),this.cScale9=this.cScale9||s(t,{h:270}),this.cScale10=this.cScale10||s(t,{h:300}),this.cScale11=this.cScale11||s(t,{h:330}),this.darkMode)for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},z=(0,i.K2)(t=>{const e=new R;return e.calculate(t),e},"getThemeVariables"),P=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,n.A)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},W=(0,i.K2)(t=>{const e=new P;return e.calculate(t),e},"getThemeVariables"),N=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=v("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},j=(0,i.K2)(t=>{const e=new N;return e.calculate(t),e},"getThemeVariables"),H=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,n.A)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},G=(0,i.K2)(t=>{const e=new H;return e.calculate(t),e},"getThemeVariables"),U=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=v(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor);const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let o=0;o{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},Y=(0,i.K2)(t=>{const e=new U;return e.calculate(t),e},"getThemeVariables"),X=class{static{(0,i.K2)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,u.A)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=v(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,u.A)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,n.A)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||v(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||v(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||v(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||v(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,d.A)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,d.A)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,u.A)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},V={base:{getThemeVariables:M},dark:{getThemeVariables:E},default:{getThemeVariables:O},forest:{getThemeVariables:D},neutral:{getThemeVariables:K},neo:{getThemeVariables:z},"neo-dark":{getThemeVariables:W},redux:{getThemeVariables:j},"redux-dark":{getThemeVariables:G},"redux-color":{getThemeVariables:Y},"redux-dark-color":{getThemeVariables:(0,i.K2)(t=>{const e=new X;return e.calculate(t),e},"getThemeVariables")}},Z={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Q={...Z,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:V.default.getThemeVariables(),sequence:{...Z.sequence,messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,i.K2)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,i.K2)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...Z.gantt,tickInterval:void 0,useWidth:void 0},c4:{...Z.c4,useWidth:void 0,personFont:(0,i.K2)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...Z.flowchart,inheritDir:!1},external_personFont:(0,i.K2)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,i.K2)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,i.K2)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,i.K2)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,i.K2)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,i.K2)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,i.K2)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,i.K2)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,i.K2)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,i.K2)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,i.K2)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,i.K2)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,i.K2)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,i.K2)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,i.K2)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,i.K2)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,i.K2)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...Z.pie,useWidth:984},xyChart:{...Z.xyChart,useWidth:void 0},requirement:{...Z.requirement,useWidth:void 0},packet:{...Z.packet},treeView:{...Z.treeView,useWidth:void 0},radar:{...Z.radar},ishikawa:{...Z.ishikawa},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...Z.venn}},J=(0,i.K2)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...J(t[i],"")]:[...r,e+i],[]),"keyify"),tt=new Set(J(Q,"")),et=Q,rt=(0,i.K2)(t=>{if(i.Rm.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>rt(t));else{for(const e of Object.keys(t)){if(i.Rm.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!tt.has(e)||null==t[e]){i.Rm.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){i.Rm.debug("sanitizing object",e),rt(t[e]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const o of r)e.includes(o)&&(i.Rm.debug("sanitizing css option",e),t[e]=it(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.Rm.debug("After sanitization",t)}},"sanitizeDirective"),it=(0,i.K2)(t=>{let e=0,r=0;for(const i of t){if(e!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),st=w({},ot),nt=[],lt=w({},ot),ht=(0,i.K2)((t,e)=>{let r=w({},t),i={};for(const o of e)yt(o),i=w(i,o);if(r=w(r,i),i.theme&&i.theme in V){const t=w({},c),e=w(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in V&&(r.themeVariables=V[r.theme].getThemeVariables(e))}return Tt(lt=r),lt},"updateCurrentConfig"),ct=(0,i.K2)(t=>(st=w({},ot),st=w(st,t),t.theme&&V[t.theme]&&(st.themeVariables=V[t.theme].getThemeVariables(t.themeVariables)),ht(st,nt),st),"setSiteConfig"),dt=(0,i.K2)(t=>{c=w({},t)},"saveConfigFromInitialize"),ut=(0,i.K2)(t=>(st=w(st,t),ht(st,nt),st),"updateSiteConfig"),pt=(0,i.K2)(()=>w({},st),"getSiteConfig"),gt=(0,i.K2)(t=>(Tt(t),w(lt,t),ft()),"setConfig"),ft=(0,i.K2)(()=>w({},lt),"getConfig"),yt=(0,i.K2)(t=>{t&&(["secure",...st.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.Rm.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&yt(t[e])}))},"sanitize"),mt=(0,i.K2)(t=>{rt(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),nt.push(t),ht(st,nt)},"addDirective"),Ct=(0,i.K2)((t=st)=>{ht(t,nt=[])},"reset"),xt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},bt={},kt=(0,i.K2)(t=>{bt[t]||(i.Rm.warn(xt[t]),bt[t]=!0)},"issueWarning"),Tt=(0,i.K2)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&kt("LAZY_LOAD_DEPRECATED")},"checkConfig"),St=(0,i.K2)(()=>{let t={};c&&(t=w(t,c));for(const e of nt)t=w(t,e);return t},"getUserDefinedConfig"),Bt=(0,i.K2)(t=>(null!=t.flowchart?.htmlLabels&&kt("FLOWCHART_HTML_LABELS_DEPRECATED"),at(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),wt=//gi,At=(0,i.K2)(t=>{if(!t)return[""];return Dt(t).replace(/\\n/g,"#br#").split("#br#")},"getRows"),Lt=(()=>{let t=!1;return()=>{t||(vt(),t=!0)}})();function vt(){const t="data-temp-href-target";g.A.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),g.A.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,i.K2)(vt,"setupDompurifyHooks");var Ft=(0,i.K2)(t=>{Lt();return g.A.sanitize(t)},"removeScript"),Mt=(0,i.K2)((t,e)=>{if(Bt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=Ft(t):"loose"!==r&&(t=(t=(t=Dt(t)).replace(//g,">")).replace(/=/g,"="),t=It(t))}return t},"sanitizeMore"),_t=(0,i.K2)((t,e)=>t?t=e.dompurifyConfig?g.A.sanitize(Mt(t,e),e.dompurifyConfig).toString():g.A.sanitize(Mt(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Et=(0,i.K2)((t,e)=>"string"==typeof t?_t(t,e):t.flat().map(t=>_t(t,e)),"sanitizeTextOrArray"),$t=(0,i.K2)(t=>wt.test(t),"hasBreaks"),Ot=(0,i.K2)(t=>t.split(wt),"splitBreaks"),It=(0,i.K2)(t=>t.replace(/#br#/g,"
    "),"placeholderToBreak"),Dt=(0,i.K2)(t=>t.replace(wt,"#br#"),"breakToPlaceholder"),qt=(0,i.K2)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Kt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Rt=(0,i.K2)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),zt=(0,i.K2)(function(t){const e=t.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,t.split(e).length-1),"countOccurrence"),Wt=(0,i.K2)((t,e)=>{const r=Pt(t,"~"),i=Pt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Nt=(0,i.K2)(t=>{const e=Pt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let o=i.indexOf("~"),a=i.lastIndexOf("~");for(;-1!==o&&-1!==a&&o!==a;)i[o]="<",i[a]=">",o=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),jt=(0,i.K2)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ht=/\$\$(.*)\$\$/g,Gt=(0,i.K2)(t=>(t.match(Ht)?.length??0)>0,"hasKatex"),Ut=(0,i.K2)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Xt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const o={width:r.clientWidth,height:r.clientHeight};return r.remove(),o},"calculateMathMLDimensions"),Yt=(0,i.K2)(async(t,e)=>{if(!Gt(t))return t;if(!(jt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ht,"MathML is unsupported in this environment.");{const{default:i}=await r.e(4326).then(r.bind(r,4326)),o=e.forceLegacyMathML||!jt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(wt).map(t=>Gt(t)?`
    ${t}
    `:`
    ${t}
    `).join("").replace(Ht,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:o}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),Xt=(0,i.K2)(async(t,e)=>_t(await Yt(t,e),e),"renderKatexSanitized"),Vt={getRows:At,sanitizeText:_t,sanitizeTextOrArray:Et,hasBreaks:$t,splitBreaks:Ot,lineBreakRegex:wt,removeScript:Ft,getUrl:qt,evaluate:at,getMax:Kt,getMin:Rt},Zt=(0,i.K2)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),Qt=(0,i.K2)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),Jt=(0,i.K2)(function(t,e,r,i){const o=Qt(e,r,i);Zt(t,o)},"configureSvgSize"),te=(0,i.K2)(function(t,e,r,o){const a=e.node().getBBox(),s=a.width,n=a.height;i.Rm.info(`SVG bounds: ${s}x${n}`,a);let l=0,h=0;i.Rm.info(`Graph bounds: ${l}x${h}`,t),l=s+2*r,h=n+2*r,i.Rm.info(`Calculated bounds: ${l}x${h}`),Jt(e,h,l,o);const c=`${a.x-r} ${a.y-r} ${a.width+2*r} ${a.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),ee={},re=(0,i.K2)((t,e,r,o)=>{let a="";return t in ee&&ee[t]?a=ee[t]({...r,svgId:o}):i.Rm.warn(`No theme found for ${t}`),` & {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${a}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+o+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${o}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),ie=(0,i.K2)((t,e)=>{void 0!==e&&(ee[t]=e)},"addStylesForDiagram"),oe=re,ae={};(0,i.VA)(ae,{clear:()=>ce,getAccDescription:()=>ge,getAccTitle:()=>ue,getDiagramTitle:()=>ye,setAccDescription:()=>pe,setAccTitle:()=>de,setDiagramTitle:()=>fe});var se="",ne="",le="",he=(0,i.K2)(t=>_t(t,ft()),"sanitizeText"),ce=(0,i.K2)(()=>{se="",le="",ne=""},"clear"),de=(0,i.K2)(t=>{se=he(t).replace(/^\s+/g,"")},"setAccTitle"),ue=(0,i.K2)(()=>se,"getAccTitle"),pe=(0,i.K2)(t=>{le=he(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ge=(0,i.K2)(()=>le,"getAccDescription"),fe=(0,i.K2)(t=>{ne=he(t)},"setDiagramTitle"),ye=(0,i.K2)(()=>ne,"getDiagramTitle"),me=i.Rm,Ce=i.He,xe=ft,be=gt,ke=ot,Te=(0,i.K2)(t=>_t(t,xe()),"sanitizeText"),Se=te,Be=(0,i.K2)(()=>ae,"getCommonDb"),we={},Ae=(0,i.K2)((t,e,r)=>{we[t]&&me.warn(`Diagram with id ${t} already registered. Overwriting.`),we[t]=e,r&&T(t,r),ie(t,e.styles),e.injectUtils?.(me,Ce,xe,Te,Se,Be(),()=>{})},"registerDiagram"),Le=(0,i.K2)(t=>{if(t in we)return we[t];throw new ve(t)},"getDiagram"),ve=class extends Error{static{(0,i.K2)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},7127:(t,e,r)=>{"use strict";r.d(e,{W6:()=>ae,GZ:()=>ce,WY:()=>jt,pC:()=>Pt,Gc:()=>Kt});var i=r(2101),o=r(5691),a=r(8894);const s=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),n=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...n,...l}),c=Object.freeze({...h,body:"",hidden:!1});function d(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function u(t,e,r){const i=t.icons,o=t.aliases||Object.create(null);let a={};function s(t){a=d(i[t]||o[t],a)}return s(e),r.forEach(s),d(t,a)}function p(t,e){if(t.icons[e])return u(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),o=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return o[e]=[];if(!(e in o)){o[e]=null;const r=i[e]&&i[e].parent,a=r&&t(r);a&&(o[e]=[r].concat(a))}return o[e]}),o}(t,[e])[e];return r?u(t,e,r):null}const g=Object.freeze({width:null,height:null}),f=Object.freeze({...g,...l}),y=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function C(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(y);if(null===i||!i.length)return t;const o=[];let a=i.shift(),s=m.test(a);for(;;){if(s){const t=parseFloat(a);isNaN(t)?o.push(a):o.push(Math.ceil(t*e*r)/r)}else o.push(a);if(a=i.shift(),void 0===a)return o.join("");s=!s}}const x=/\sid="(\S+)"/g,b=new Map;function k(t){const e=[];let r;for(;r=x.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=b.get(t)||0;return b.set(t,e+1),e?`${t}${e}`:t}(e),o=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}var T=r(1485);function S(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var B={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function w(t){B=t}var A={exec:()=>null};function L(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let o="string"==typeof e?e:e.source;return o=o.replace(F.caret,"$1"),r=r.replace(t,o),i},getRegex:()=>new RegExp(r,e)};return i}var v=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
    /i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},M=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,_=/(?:[*+-]|\d{1,9}[.)])/,E=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,$=L(E).replace(/bull/g,_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),O=L(E).replace(/bull/g,_).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),I=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,D=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,q=L(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",D).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),K=L(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,_).getRegex(),R="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z=/|$))/,P=L("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",z).replace("tag",R).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),W=L(I).replace("hr",M).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),N={blockquote:L(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",W).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:q,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:M,html:P,lheading:$,list:K,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:W,table:A,text:/^[^\n]+/},j=L("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",M).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex(),H={...N,lheading:O,table:j,paragraph:L(I).replace("hr",M).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",j).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",R).getRegex()},G={...N,html:L("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",z).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:A,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:L(I).replace("hr",M).replace("heading"," *#{1,6} *[^\n]").replace("lheading",$).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},U=/^( {2,}|\\)\n(?!\s*$)/,Y=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,V=/[^\s\p{P}\p{S}]/u,Z=L(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),Q=/(?!~)[\p{P}\p{S}]/u,J=L(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",v?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),tt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,et=L(tt,"u").replace(/punct/g,Y).getRegex(),rt=L(tt,"u").replace(/punct/g,Q).getRegex(),it="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",ot=L(it,"gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,Y).getRegex(),at=L(it,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,Q).getRegex(),st=L("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,V).replace(/punctSpace/g,X).replace(/punct/g,Y).getRegex(),nt=L(/\\(punct)/,"gu").replace(/punct/g,Y).getRegex(),lt=L(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),ht=L(z).replace("(?:--\x3e|$)","--\x3e").getRegex(),ct=L("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",ht).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),dt=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,ut=L(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",dt).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),pt=L(/^!?\[(label)\]\[(ref)\]/).replace("label",dt).replace("ref",D).getRegex(),gt=L(/^!?\[(ref)\](?:\[\])?/).replace("ref",D).getRegex(),ft=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,yt={_backpedal:A,anyPunctuation:nt,autolink:lt,blockSkip:J,br:U,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:A,emStrongLDelim:et,emStrongRDelimAst:ot,emStrongRDelimUnd:st,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:ut,nolink:gt,punctuation:Z,reflink:pt,reflinkSearch:L("reflink|nolink(?!\\()","g").replace("reflink",pt).replace("nolink",gt).getRegex(),tag:ct,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},St=t=>Tt[t];function Bt(t,e){if(e){if(F.escapeTest.test(t))return t.replace(F.escapeReplace,St)}else if(F.escapeTestNoEncode.test(t))return t.replace(F.escapeReplaceNoEncode,St);return t}function wt(t){try{t=encodeURI(t).replace(F.percentDecode,"%")}catch{return null}return t}function At(t,e){let r=t.replace(F.findPipe,(t,e,r)=>{let i=!1,o=e;for(;--o>=0&&"\\"===r[o];)i=!i;return i?"|":" |"}).split(F.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Lt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let o=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=o.length?t.slice(o.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=Lt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:Lt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=Lt(e[0],"\n").split("\n"),r="",i="",o=[];for(;t.length>0;){let e,a=!1,s=[];for(e=0;e1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;t;){let r=!1,i="",n="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),d=0;if(this.options.pedantic?(d=2,n=l.trimStart()):c?d=e[1].length+1:(d=e[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,n=l.slice(d),d+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(d),r=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),s=this.rules.other.htmlBeginRegex(d);for(;t;){let u,p=t.split("\n",1)[0];if(h=p,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),u=h):u=h.replace(this.rules.other.tabCharGlobal," "),o.test(h)||a.test(h)||s.test(h)||e.test(h)||r.test(h))break;if(u.search(this.rules.other.nonSpaceChar)>=d||!h.trim())n+="\n"+u.slice(d);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||o.test(l)||a.test(l)||r.test(l))break;n+="\n"+h}!c&&!h.trim()&&(c=!0),i+=p+"\n",t=t.substring(p.length+1),l=u.slice(d)}}o.loose||(s?o.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(s=!0));let u,p=null;this.options.gfm&&(p=this.rules.other.listIsTask.exec(n),p&&(u="[ ] "!==p[0],n=n.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:i,task:!!p,checked:u,loose:!1,text:n,tokens:[]}),o.raw+=i}let n=o.items.at(-1);if(!n)return;n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),o.raw=o.raw.trimEnd();for(let t=0;t"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));o.loose=r}if(o.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:a.align[e]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=Lt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),vt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return vt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,o,a=[...i[0]].length-1,s=a,n=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+a);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(o=[...r].length,i[3]||i[4]){s+=o;continue}if((i[5]||i[6])&&a%3&&!((a+o)%3)){n+=o;continue}if(s-=o,s>0)continue;o=Math.min(o,o+s+n);let e=[...i[0]][0].length,l=t.slice(0,a+i.index+e+o);if(Math.min(a,o)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},Mt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||B,this.options.tokenizer=this.options.tokenizer||new Ft,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:F,block:bt.normal,inline:kt.normal};this.options.pedantic?(e.block=bt.pedantic,e.inline=kt.pedantic):this.options.gfm&&(e.block=bt.gfm,this.options.breaks?e.inline=kt.breaks:e.inline=kt.gfm),this.tokenizer.rules=e}static get rules(){return{block:bt,inline:kt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(F.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let e=0;e!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let a=e.at(-1);r&&"paragraph"===a?.type?(a.raw+=(a.raw.endsWith("\n")?"":"\n")+i.raw,a.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):e.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,o=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(o=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(o=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(o=this.tokenizer.rules.inline.blockSkip.exec(i));)r=o[2]?o[2].length:0,i=i.slice(0,o.index+r)+"["+"a".repeat(o[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){let r;if(a||(s=""),a=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,s)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let o=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(o=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(o)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(s=r.raw.slice(-1)),a=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},_t=class{options;parser;constructor(t){this.options=t||B}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(F.notSpaceStart)?.[0],o=t.replace(F.endingNewline,"")+"\n";return i?'
    '+(r?o:Bt(o,!0))+"
    \n":"
    "+(r?o:Bt(o,!0))+"
    \n"}blockquote({tokens:t}){return`
    \n${this.parser.parse(t)}
    \n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)}\n`}hr(t){return"
    \n"}list(t){let e=t.ordered,r=t.start,i="";for(let a=0;a\n"+i+"\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+Bt(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`
  • ${e}
  • \n`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    \n`}table(t){let e="",r="";for(let o=0;o${i}`),"\n\n"+e+"\n"+i+"
    \n"}tablerow({text:t}){return`\n${t}\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`\n`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${Bt(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),o=wt(t);if(null===o)return i;let a='
    ",a}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=wt(t);if(null===o)return Bt(r);let a=`${r}{let o=t[i].flat(1/0);r=r.concat(this.walkTokens(o,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new _t(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,o=t.renderer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new Ft(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,o=t.tokenizer[i],a=e[i];e[i]=(...t)=>{let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new Ot;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,o=t.hooks[i],a=e[i];Ot.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&Ot.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await o.call(e,t);return a.call(e,r)})();let i=o.call(e,t);return a.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await o.apply(e,t);return!1===r&&(r=await a.apply(e,t)),r})();let r=o.apply(e,t);return!1===r&&(r=a.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return Mt.lex(t,e??this.defaults)}parser(t,e){return $t.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===i.async)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return a(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let r=o.hooks?await o.hooks.preprocess(e):e,i=await(o.hooks?await o.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(r,o),a=o.hooks?await o.hooks.processAllTokens(i):i;o.walkTokens&&await Promise.all(this.walkTokens(a,o.walkTokens));let s=await(o.hooks?await o.hooks.provideParser():t?$t.parse:$t.parseInline)(a,o);return o.hooks?await o.hooks.postprocess(s):s})().catch(a);try{o.hooks&&(e=o.hooks.preprocess(e));let r=(o.hooks?o.hooks.provideLexer():t?Mt.lex:Mt.lexInline)(e,o);o.hooks&&(r=o.hooks.processAllTokens(r)),o.walkTokens&&this.walkTokens(r,o.walkTokens);let i=(o.hooks?o.hooks.provideParser():t?$t.parse:$t.parseInline)(r,o);return o.hooks&&(i=o.hooks.postprocess(i)),i}catch(s){return a(s)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="

    An error occurred:

    "+Bt(r.message+"",!0)+"
    ";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function Dt(t,e){return It.parse(t,e)}Dt.options=Dt.setOptions=function(t){return It.setOptions(t),Dt.defaults=It.defaults,w(Dt.defaults),Dt},Dt.getDefaults=S,Dt.defaults=B,Dt.use=function(...t){return It.use(...t),Dt.defaults=It.defaults,w(Dt.defaults),Dt},Dt.walkTokens=function(t,e){return It.walkTokens(t,e)},Dt.parseInline=It.parseInline,Dt.Parser=$t,Dt.parser=$t.parse,Dt.Renderer=_t,Dt.TextRenderer=Et,Dt.Lexer=Mt,Dt.lexer=Mt.lex,Dt.Tokenizer=Ft,Dt.Hooks=Ot,Dt.parse=Dt;Dt.options,Dt.setOptions,Dt.use,Dt.walkTokens,Dt.parseInline,$t.parse,Mt.lex;var qt=r(9594),Kt={body:'?',height:80,width:80},Rt=new Map,zt=new Map,Pt=(0,a.K2)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(a.Rm.debug("Registering icon pack:",e.name),"loader"in e)zt.set(e.name,e.loader);else{if(!("icons"in e))throw a.Rm.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Rt.set(e.name,e.icons)}}},"registerIconPacks"),Wt=(0,a.K2)(async(t,e)=>{const r=((t,e,r,i="")=>{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;i=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),r=o.pop(),a={provider:o.length>0?o[0]:i,prefix:r,name:t};return e&&!s(a)?null:a}const a=o[0],n=a.split("-");if(n.length>1){const t={provider:i,prefix:n.shift(),name:n.join("-")};return e&&!s(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:a};return e&&!s(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=Rt.get(i);if(!o){const t=zt.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},Rt.set(i,o)}catch(l){throw a.Rm.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}const n=p(o,r.name);if(!n)throw new Error(`Icon not found: ${t}`);return n},"getRegisteredIconData"),Nt=(0,a.K2)(async t=>{try{return await Wt(t),!0}catch{return!1}},"isIconAvailable"),jt=(0,a.K2)(async(t,e,r)=>{let i;try{i=await Wt(t,e?.fallbackPrefix)}catch(l){a.Rm.error(l),i=Kt}const s=function(t,e){const r={...h,...t},i={...f,...e},o={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let s,n=t.rotate;switch(r?i?n+=2:(e.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),e.push("scale(-1 1)"),o.top=o.left=0):i&&(e.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),e.push("scale(1 -1)"),o.top=o.left=0),n<0&&(n-=4*Math.floor(n/4)),n%=4,n){case 1:s=o.height/2+o.top,e.unshift("rotate(90 "+s.toString()+" "+s.toString()+")");break;case 2:e.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:s=o.width/2+o.left,e.unshift("rotate(-90 "+s.toString()+" "+s.toString()+")")}n%2==1&&(o.left!==o.top&&(s=o.left,o.left=o.top,o.top=s),o.width!==o.height&&(s=o.width,o.width=o.height,o.height=s)),e.length&&(a=function(t,e,r){const i=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const o=t.indexOf(">",i),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(o+1,a).trim(),t=t.slice(0,i).trim()+t.slice(s+1)}return{defs:r,content:t}}(t);return o=i.defs,a=e+i.content+r,o?""+o+""+a:a;var o,a}(a,'',""))});const s=i.width,n=i.height,l=o.width,c=o.height;let d,u;null===s?(u=null===n?"1em":"auto"===n?c:n,d=C(u,l/c)):(d="auto"===s?l:s,u=null===n?C(d,c/l):"auto"===n?c:n);const p={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};g("width",d),g("height",u);const y=[o.left,o.top,l,c];return p.viewBox=y.join(" "),{attributes:p,viewBox:y,body:a}}(i,e),n=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in e)r+=" "+i+'="'+e[i]+'"';return'"+t+""}(k(s.body),{...s.attributes,...r});return(0,o.jZ)(n,(0,o.zj)())},"getIconSVG");function Ht(t,{markdownAutoWrap:e}){const r=t.replace(//g,"\n").replace(/\n{2,}/g,"\n");return(0,qt.T)(r)}function Gt(t){return t.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Ut(t,e={}){const r=Ht(t,e),i=Dt.lexer(r),o=[[]];let s=0;function n(t,e="normal"){if("text"===t.type){t.text.split("\n").forEach((t,r)=>{0!==r&&(s++,o.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&o[s].push({content:t,type:e})})})}else"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{n(e,t.type)}):"html"===t.type&&o[s].push({content:t.text,type:"normal"})}return(0,a.K2)(n,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{n(t)}):"html"===t.type?o[s].push({content:t.text,type:"normal"}):o[s].push({content:t.raw,type:"normal"})}),o}function Yt(t){return t?`

    ${t.replace(/\\n|\n/g,"
    ")}

    `:""}function Xt(t,{markdownAutoWrap:e}={}){const r=Dt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
    ").replace(/ /g," "):t.text.replace(/\n */g,"
    "):"strong"===t.type?`${t.tokens?.map(i).join("")}`:"em"===t.type?`${t.tokens?.map(i).join("")}`:"paragraph"===t.type?`

    ${t.tokens?.map(i).join("")}

    `:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.Rm.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,a.K2)(i,"output"),r.map(i).join("")}function Vt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function Zt(t,e){return Qt(t,[],Vt(e.content),e.type)}function Qt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[o,...a]=r,s=[...e,o];return t([{content:s.join(""),type:i}])?Qt(t,s,a,i):(0===e.length&&o&&(e.push(o),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Jt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return te(t,e)}function te(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let o="";" "===t[0].content&&(o=" ",t.shift());const a=t.shift()??{content:" ",type:"normal"},s=[...i];if(""!==o&&s.push({content:o,type:"normal"}),s.push(a),e(s))return te(t,e,r,s);if(i.length>0)r.push(i),t.unshift(a);else if(a.content){const[i,o]=Zt(e,a);r.push([i]),o.content&&t.unshift(o)}return te(t,e,r)}function ee(t,e){e&&t.attr("style",e)}(0,a.K2)(Ht,"preprocessMarkdown"),(0,a.K2)(Gt,"nonMarkdownToLines"),(0,a.K2)(Ut,"markdownToLines"),(0,a.K2)(Yt,"nonMarkdownToHTML"),(0,a.K2)(Xt,"markdownToHTML"),(0,a.K2)(Vt,"splitTextToChars"),(0,a.K2)(Zt,"splitWordToFitWidth"),(0,a.K2)(Qt,"splitWordToFitWidthRecursion"),(0,a.K2)(Jt,"splitLineToFitWidth"),(0,a.K2)(te,"splitLineToFitWidthRecursion"),(0,a.K2)(ee,"applyStyle");async function re(t,e,r,i,a=!1,s=(0,o.zj)()){const n=t.append("foreignObject");n.attr("width",`${Math.min(10*r,16384)}px`),n.attr("height",`${Math.min(10*r,16384)}px`);const l=n.append("xhtml:div"),h=(0,o.Wi)(e.label)?await(0,o.dj)(e.label.replace(o.Y2.lineBreakRegex,"\n"),s):(0,o.jZ)(e.label,s),c=e.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),ee(d,e.labelStyle),d.attr("class",`${c} ${i}`),ee(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),a&&l.attr("class","labelBkg");let u=l.node().getBoundingClientRect();return u.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),u=l.node().getBoundingClientRect()),n.node()}function ie(t,e,r,i=!1){const o=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&o.attr("text-anchor","middle"),o}function oe(t,e,r){const i=t.append("text"),o=ie(i,1,e);le(o,r);const a=o.node().getComputedTextLength();return i.remove(),a}function ae(t,e,r){const i=t.append("text"),o=ie(i,1,e);le(o,[{content:r,type:"normal"}]);const a=o.node()?.getBoundingClientRect();return a&&i.remove(),a}function se(t,e,r,i=!1,o=!1){const s=e.append("g"),n=s.insert("rect").attr("class","background").attr("style","stroke: none"),l=s.append("text").attr("y","-10.1");o&&l.attr("text-anchor","middle");let h=0;for(const c of r){const e=(0,a.K2)(e=>oe(s,1.1,e)<=t,"checkWidth"),r=e(c)?[c]:Jt(c,e);for(const t of r){le(ie(l,h,1.1,o),t),h++}}if(i){const t=l.node().getBBox(),e=2;return n.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),s.node()}return l.node()}function ne(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function le(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(ne(e.content)):i.text(" "+ne(e.content))})}async function he(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,i,a)=>(r.push((async()=>{const r=`${i}:${a}`;return await Nt(r)?await jt(r,void 0,{class:"label-icon"}):``})()),t));const i=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}(0,a.K2)(re,"addHtmlSpan"),(0,a.K2)(ie,"createTspan"),(0,a.K2)(oe,"computeWidthOfText"),(0,a.K2)(ae,"computeDimensionOfText"),(0,a.K2)(se,"createFormattedText"),(0,a.K2)(ne,"decodeHTMLEntities"),(0,a.K2)(le,"updateTextContentAndStyles"),(0,a.K2)(he,"replaceIconSubstring");var ce=(0,a.K2)(async(t,e="",{style:r="",isTitle:s=!1,classes:n="",useHtmlLabels:l=!0,markdown:h=!0,isNode:c=!0,width:d=200,addSvgBackground:u=!1}={},p)=>{if(a.Rm.debug("XYZ createText",e,r,s,n,l,c,"addSvgBackground: ",u),l){const a=h?Xt(e,p):Yt(e),s=await he((0,i.Sm)(a),p),l=e.replace(/\\\\/g,"\\"),g={isNode:c,label:(0,o.Wi)(e)?l:s,labelStyle:r.replace("fill:","color:")};return await re(t,g,d,n,u,p)}{const o=(0,i.Sm)(e.replace(//g,"
    ")),a=se(d,t,h?Ut(o.replace("
    ","
    "),p):Gt(o),!!e&&u,!c);if(c){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,T.Ltv)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,T.Ltv)(a).select("text").attr("style",e)}return s?(0,T.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,T.Ltv)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},4061:(t,e,r)=>{"use strict";r.d(e,{Fr:()=>c,GX:()=>h,KX:()=>l,WW:()=>s,ue:()=>a});var i=r(5691),o=r(8894),a=(0,o.K2)(t=>{const{handDrawnSeed:e}=(0,i.D7)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),s=(0,o.K2)(t=>{const e=n([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),n=(0,o.K2)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),l=(0,o.K2)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),h=(0,o.K2)(t=>{const{stylesArray:e}=s(t),r=[],i=[],o=[],a=[];return e.forEach(t=>{const e=t[0];l(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&o.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:o,backgroundStyles:a}},"styles2String"),c=(0,o.K2)((t,e)=>{const{themeVariables:r,handDrawnSeed:o}=(0,i.D7)(),{nodeBorder:a,mainBkg:n}=r,{stylesMap:l}=s(t);return Object.assign({roughness:.7,fill:l.get("fill")||n,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||a,seed:o,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),d=(0,o.K2)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},8712:(t,e,r)=>{"use strict";r.d(e,{H:()=>ir,r:()=>rr});var i=r(8894);function o(t){return null==t}function a(t){return"object"==typeof t&&null!==t}function s(t){return Array.isArray(t)?t:o(t)?[]:[t]}function n(t,e){var r,i,o,a;if(e)for(r=0,i=(a=Object.keys(e)).length;rn&&(e=i-n+(a=" ... ").length),r-i>n&&(r=i+n-(s=" ...").length),{str:a+t.slice(e,r).replace(/\t/g,"\u2192")+s,pos:i-e+a.length}}function f(t,e){return c.repeat(" ",e-t.length)+t}function y(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),"number"!=typeof e.indent&&(e.indent=1),"number"!=typeof e.linesBefore&&(e.linesBefore=3),"number"!=typeof e.linesAfter&&(e.linesAfter=2);for(var r,i=/\r?\n|\r|\0/g,o=[0],a=[],s=-1;r=i.exec(t.buffer);)a.push(r.index),o.push(r.index+r[0].length),t.position<=r.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var n,l,h="",d=Math.min(t.line+e.linesAfter,a.length).toString().length,u=e.maxLength-(e.indent+d+3);for(n=1;n<=e.linesBefore&&!(s-n<0);n++)l=g(t.buffer,o[s-n],a[s-n],t.position-(o[s]-o[s-n]),u),h=c.repeat(" ",e.indent)+f((t.line-n+1).toString(),d)+" | "+l.str+"\n"+h;for(l=g(t.buffer,o[s],a[s],t.position,u),h+=c.repeat(" ",e.indent)+f((t.line+1).toString(),d)+" | "+l.str+"\n",h+=c.repeat("-",e.indent+d+3+l.pos)+"^\n",n=1;n<=e.linesAfter&&!(s+n>=a.length);n++)l=g(t.buffer,o[s+n],a[s+n],t.position-(o[s]-o[s+n]),u),h+=c.repeat(" ",e.indent)+f((t.line+n+1).toString(),d)+" | "+l.str+"\n";return h.replace(/\n$/,"")}(0,i.K2)(g,"getLine"),(0,i.K2)(f,"padStart"),(0,i.K2)(y,"makeSnippet");var m=y,C=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],x=["scalar","sequence","mapping"];function b(t){var e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function k(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===C.indexOf(e))throw new p('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=b(e.styleAliases||null),-1===x.indexOf(this.kind))throw new p('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}(0,i.K2)(b,"compileStyleAliases"),(0,i.K2)(k,"Type$1");var T=k;function S(t,e){var r=[];return t[e].forEach(function(t){var e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function B(){var t,e,r={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(t){t.multi?(r.multi[t.kind].push(t),r.multi.fallback.push(t)):r[t.kind][t.tag]=r.fallback[t.tag]=t}for((0,i.K2)(o,"collectType"),t=0,e=arguments.length;t=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.K2)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.K2)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.K2)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),W=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function N(t){return null!==t&&!(!W.test(t)||"_"===t[t.length-1])}function j(t){var e,r;return r="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.K2)(N,"resolveYamlFloat"),(0,i.K2)(j,"constructYamlFloat");var H=/^[-+]?[0-9]+e/;function G(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(t))return"-0.0";return r=t.toString(10),H.test(r)?r.replace("e",".e"):r}function U(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||c.isNegativeZero(t))}(0,i.K2)(G,"representYamlFloat"),(0,i.K2)(U,"isFloat");var Y=new T("tag:yaml.org,2002:float",{kind:"scalar",resolve:N,construct:j,predicate:U,represent:G,defaultStyle:"lowercase"}),X=A.extend({implicit:[M,O,P,Y]}),V=X,Z=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Q=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function J(t){return null!==t&&(null!==Z.exec(t)||null!==Q.exec(t))}function tt(t){var e,r,i,o,a,s,n,l,h=0,c=null;if(null===(e=Z.exec(t))&&(e=Q.exec(t)),null===e)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,o=+e[3],!e[4])return new Date(Date.UTC(r,i,o));if(a=+e[4],s=+e[5],n=+e[6],e[7]){for(h=e[7].slice(0,3);h.length<3;)h+="0";h=+h}return e[9]&&(c=6e4*(60*+e[10]+ +(e[11]||0)),"-"===e[9]&&(c=-c)),l=new Date(Date.UTC(r,i,o,a,s,n,h)),c&&l.setTime(l.getTime()-c),l}function et(t){return t.toISOString()}(0,i.K2)(J,"resolveYamlTimestamp"),(0,i.K2)(tt,"constructYamlTimestamp"),(0,i.K2)(et,"representYamlTimestamp");var rt=new T("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:J,construct:tt,instanceOf:Date,represent:et});function it(t){return"<<"===t||null===t}(0,i.K2)(it,"resolveYamlMerge");var ot=new T("tag:yaml.org,2002:merge",{kind:"scalar",resolve:it}),at="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function st(t){if(null===t)return!1;var e,r,i=0,o=t.length,a=at;for(r=0;r64)){if(e<0)return!1;i+=6}return i%8==0}function nt(t){var e,r,i=t.replace(/[\r\n=]/g,""),o=i.length,a=at,s=0,n=[];for(e=0;e>16&255),n.push(s>>8&255),n.push(255&s)),s=s<<6|a.indexOf(i.charAt(e));return 0===(r=o%4*6)?(n.push(s>>16&255),n.push(s>>8&255),n.push(255&s)):18===r?(n.push(s>>10&255),n.push(s>>2&255)):12===r&&n.push(s>>4&255),new Uint8Array(n)}function lt(t){var e,r,i="",o=0,a=t.length,s=at;for(e=0;e>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]),o=(o<<8)+t[e];return 0===(r=a%3)?(i+=s[o>>18&63],i+=s[o>>12&63],i+=s[o>>6&63],i+=s[63&o]):2===r?(i+=s[o>>10&63],i+=s[o>>4&63],i+=s[o<<2&63],i+=s[64]):1===r&&(i+=s[o>>2&63],i+=s[o<<4&63],i+=s[64],i+=s[64]),i}function ht(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}(0,i.K2)(st,"resolveYamlBinary"),(0,i.K2)(nt,"constructYamlBinary"),(0,i.K2)(lt,"representYamlBinary"),(0,i.K2)(ht,"isBinary");var ct=new T("tag:yaml.org,2002:binary",{kind:"scalar",resolve:st,construct:nt,predicate:ht,represent:lt}),dt=Object.prototype.hasOwnProperty,ut=Object.prototype.toString;function pt(t){if(null===t)return!0;var e,r,i,o,a,s=[],n=t;for(e=0,r=n.length;e>10),56320+(t-65536&1023))}function Pt(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.K2)(_t,"_class"),(0,i.K2)(Et,"is_EOL"),(0,i.K2)($t,"is_WHITE_SPACE"),(0,i.K2)(Ot,"is_WS_OR_EOL"),(0,i.K2)(It,"is_FLOW_INDICATOR"),(0,i.K2)(Dt,"fromHexCode"),(0,i.K2)(qt,"escapedHexLen"),(0,i.K2)(Kt,"fromDecimalCode"),(0,i.K2)(Rt,"simpleEscapeSequence"),(0,i.K2)(zt,"charFromCodepoint"),(0,i.K2)(Pt,"setProperty");var Wt,Nt=new Array(256),jt=new Array(256);for(Wt=0;Wt<256;Wt++)Nt[Wt]=Rt(Wt)?1:0,jt[Wt]=Rt(Wt);function Ht(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||Bt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Gt(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=m(r),new p(e,r)}function Ut(t,e){throw Gt(t,e)}function Yt(t,e){t.onWarning&&t.onWarning.call(null,Gt(t,e))}(0,i.K2)(Ht,"State$1"),(0,i.K2)(Gt,"generateError"),(0,i.K2)(Ut,"throwError"),(0,i.K2)(Yt,"throwWarning");var Xt={YAML:(0,i.K2)(function(t,e,r){var i,o,a;null!==t.version&&Ut(t,"duplication of %YAML directive"),1!==r.length&&Ut(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&Ut(t,"ill-formed argument of the YAML directive"),o=parseInt(i[1],10),a=parseInt(i[2],10),1!==o&&Ut(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=a<2,1!==a&&2!==a&&Yt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.K2)(function(t,e,r){var i,o;2!==r.length&&Ut(t,"TAG directive accepts exactly two arguments"),i=r[0],o=r[1],Ft.test(i)||Ut(t,"ill-formed tag handle (first argument) of the TAG directive"),wt.call(t.tagMap,i)&&Ut(t,'there is a previously declared suffix for "'+i+'" tag handle'),Mt.test(o)||Ut(t,"ill-formed tag prefix (second argument) of the TAG directive");try{o=decodeURIComponent(o)}catch(a){Ut(t,"tag prefix is malformed: "+o)}t.tagMap[i]=o},"handleTagDirective")};function Vt(t,e,r,i){var o,a,s,n;if(e1&&(t.result+=c.repeat("\n",e-1))}function ie(t,e,r){var i,o,a,s,n,l,h,c,d=t.kind,u=t.result;if(Ot(c=t.input.charCodeAt(t.position))||It(c)||35===c||38===c||42===c||33===c||124===c||62===c||39===c||34===c||37===c||64===c||96===c)return!1;if((63===c||45===c)&&(Ot(i=t.input.charCodeAt(t.position+1))||r&&It(i)))return!1;for(t.kind="scalar",t.result="",o=a=t.position,s=!1;0!==c;){if(58===c){if(Ot(i=t.input.charCodeAt(t.position+1))||r&&It(i))break}else if(35===c){if(Ot(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&ee(t)||r&&It(c))break;if(Et(c)){if(n=t.line,l=t.lineStart,h=t.lineIndent,te(t,!1,-1),t.lineIndent>=e){s=!0,c=t.input.charCodeAt(t.position);continue}t.position=a,t.line=n,t.lineStart=l,t.lineIndent=h;break}}s&&(Vt(t,o,a,!1),re(t,t.line-n),o=a=t.position,s=!1),$t(c)||(a=t.position+1),c=t.input.charCodeAt(++t.position)}return Vt(t,o,a,!1),!!t.result||(t.kind=d,t.result=u,!1)}function oe(t,e){var r,i,o;if(39!==(r=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,i=o=t.position;0!==(r=t.input.charCodeAt(t.position));)if(39===r){if(Vt(t,i,t.position,!0),39!==(r=t.input.charCodeAt(++t.position)))return!0;i=t.position,t.position++,o=t.position}else Et(r)?(Vt(t,i,o,!0),re(t,te(t,!1,e)),i=o=t.position):t.position===t.lineStart&&ee(t)?Ut(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);Ut(t,"unexpected end of the stream within a single quoted scalar")}function ae(t,e){var r,i,o,a,s,n;if(34!==(n=t.input.charCodeAt(t.position)))return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));){if(34===n)return Vt(t,r,t.position,!0),t.position++,!0;if(92===n){if(Vt(t,r,t.position,!0),Et(n=t.input.charCodeAt(++t.position)))te(t,!1,e);else if(n<256&&Nt[n])t.result+=jt[n],t.position++;else if((s=qt(n))>0){for(o=s,a=0;o>0;o--)(s=Dt(n=t.input.charCodeAt(++t.position)))>=0?a=(a<<4)+s:Ut(t,"expected hexadecimal character");t.result+=zt(a),t.position++}else Ut(t,"unknown escape sequence");r=i=t.position}else Et(n)?(Vt(t,r,i,!0),re(t,te(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ee(t)?Ut(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Ut(t,"unexpected end of the stream within a double quoted scalar")}function se(t,e){var r,i,o,a,s,n,l,h,c,d,u,p,g=!0,f=t.tag,y=t.anchor,m=Object.create(null);if(91===(p=t.input.charCodeAt(t.position)))s=93,h=!1,a=[];else{if(123!==p)return!1;s=125,h=!0,a={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=a),p=t.input.charCodeAt(++t.position);0!==p;){if(te(t,!0,e),(p=t.input.charCodeAt(t.position))===s)return t.position++,t.tag=f,t.anchor=y,t.kind=h?"mapping":"sequence",t.result=a,!0;g?44===p&&Ut(t,"expected the node content, but found ','"):Ut(t,"missed comma between flow collection entries"),u=null,n=l=!1,63===p&&Ot(t.input.charCodeAt(t.position+1))&&(n=l=!0,t.position++,te(t,!0,e)),r=t.line,i=t.lineStart,o=t.position,pe(t,e,1,!1,!0),d=t.tag,c=t.result,te(t,!0,e),p=t.input.charCodeAt(t.position),!l&&t.line!==r||58!==p||(n=!0,p=t.input.charCodeAt(++t.position),te(t,!0,e),pe(t,e,1,!1,!0),u=t.result),h?Qt(t,a,m,d,c,u,r,i,o):n?a.push(Qt(t,null,m,d,c,u,r,i,o)):a.push(c),te(t,!0,e),44===(p=t.input.charCodeAt(t.position))?(g=!0,p=t.input.charCodeAt(++t.position)):g=!1}Ut(t,"unexpected end of the stream within a flow collection")}function ne(t,e){var r,i,o,a,s=1,n=!1,l=!1,h=e,d=0,u=!1;if(124===(a=t.input.charCodeAt(t.position)))i=!1;else{if(62!==a)return!1;i=!0}for(t.kind="scalar",t.result="";0!==a;)if(43===(a=t.input.charCodeAt(++t.position))||45===a)1===s?s=43===a?3:2:Ut(t,"repeat of a chomping mode identifier");else{if(!((o=Kt(a))>=0))break;0===o?Ut(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?Ut(t,"repeat of an indentation width identifier"):(h=e+o-1,l=!0)}if($t(a)){do{a=t.input.charCodeAt(++t.position)}while($t(a));if(35===a)do{a=t.input.charCodeAt(++t.position)}while(!Et(a)&&0!==a)}for(;0!==a;){for(Jt(t),t.lineIndent=0,a=t.input.charCodeAt(t.position);(!l||t.lineIndenth&&(h=t.lineIndent),Et(a))d++;else{if(t.lineIndente)&&0!==i)Ut(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(m&&(s=t.line,n=t.lineStart,l=t.position),pe(t,e,4,!0,o)&&(m?f=t.result:y=t.result),m||(Qt(t,u,p,g,f,y,s,n,l),g=f=y=null),te(t,!0,-1),h=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==h)Ut(t,"bad indentation of a mapping entry");else if(t.lineIndente?g=1:t.lineIndent===e?g=0:t.lineIndente?g=1:t.lineIndent===e?g=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,h=t.implicitTypes.length;l"),null!==t.result&&d.kind!==t.kind&&Ut(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result,t.tag)?(t.result=d.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):Ut(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||y}function ge(t){var e,r,i,o,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(o=t.input.charCodeAt(t.position))&&(te(t,!0,-1),o=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==o));){for(s=!0,o=t.input.charCodeAt(++t.position),e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);for(i=[],(r=t.input.slice(e,t.position)).length<1&&Ut(t,"directive name must not be less than one character in length");0!==o;){for(;$t(o);)o=t.input.charCodeAt(++t.position);if(35===o){do{o=t.input.charCodeAt(++t.position)}while(0!==o&&!Et(o));break}if(Et(o))break;for(e=t.position;0!==o&&!Ot(o);)o=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==o&&Jt(t),wt.call(Xt,r)?Xt[r](t,r,i):Yt(t,'unknown document directive "'+r+'"')}te(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,te(t,!0,-1)):s&&Ut(t,"directives end mark is expected"),pe(t,t.lineIndent-1,4,!1,!0),te(t,!0,-1),t.checkLineBreaks&&Lt.test(t.input.slice(a,t.position))&&Yt(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ee(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,te(t,!0,-1)):t.position=55296&&i<=56319&&e+1=56320&&r<=57343?1024*(i-55296)+r-56320+65536:i}function Ke(t){return/^\n* /.test(t)}(0,i.K2)(Le,"State"),(0,i.K2)(ve,"indentString"),(0,i.K2)(Fe,"generateNextLine"),(0,i.K2)(Me,"testImplicitResolving"),(0,i.K2)(_e,"isWhitespace"),(0,i.K2)(Ee,"isPrintable"),(0,i.K2)($e,"isNsCharOrWhitespace"),(0,i.K2)(Oe,"isPlainSafe"),(0,i.K2)(Ie,"isPlainSafeFirst"),(0,i.K2)(De,"isPlainSafeLast"),(0,i.K2)(qe,"codePointAt"),(0,i.K2)(Ke,"needIndentIndicator");function Re(t,e,r,i,o,a,s,n){var l,h=0,c=null,d=!1,u=!1,p=-1!==i,g=-1,f=Ie(qe(t,0))&&De(qe(t,t.length-1));if(e||s)for(l=0;l=65536?l+=2:l++){if(!Ee(h=qe(t,l)))return 5;f=f&&Oe(h,c,n),c=h}else{for(l=0;l=65536?l+=2:l++){if(10===(h=qe(t,l)))d=!0,p&&(u=u||l-g-1>i&&" "!==t[g+1],g=l);else if(!Ee(h))return 5;f=f&&Oe(h,c,n),c=h}u=u||p&&l-g-1>i&&" "!==t[g+1]}return d||u?r>9&&Ke(t)?5:s?2===a?5:2:u?4:3:!f||s||o(t)?2===a?5:2:1}function ze(t,e,r,o,a){t.dump=function(){if(0===e.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==Se.indexOf(e)||Be.test(e)))return 2===t.quotingType?'"'+e+'"':"'"+e+"'";var s=t.indent*Math.max(1,r),n=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),l=o||t.flowLevel>-1&&r>=t.flowLevel;function h(e){return Me(t,e)}switch((0,i.K2)(h,"testAmbiguity"),Re(e,l,t.indent,n,h,t.quotingType,t.forceQuotes&&!o,a)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+Pe(e,t.indent)+We(ve(e,s));case 4:return">"+Pe(e,t.indent)+We(ve(Ne(e,n),s));case 5:return'"'+He(e)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function Pe(t,e){var r=Ke(t)?String(e):"",i="\n"===t[t.length-1];return r+(i&&("\n"===t[t.length-2]||"\n"===t)?"+":i?"":"-")+"\n"}function We(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function Ne(t,e){for(var r,i,o,a=/(\n+)([^\n]*)/g,s=(r=-1!==(r=t.indexOf("\n"))?r:t.length,a.lastIndex=r,je(t.slice(0,r),e)),n="\n"===t[0]||" "===t[0];o=a.exec(t);){var l=o[1],h=o[2];i=" "===h[0],s+=l+(n||i||""===h?"":"\n")+je(h,e),n=i}return s}function je(t,e){if(""===t||" "===t[0])return t;for(var r,i,o=/ [^ ]/g,a=0,s=0,n=0,l="";r=o.exec(t);)(n=r.index)-a>e&&(i=s>a?s:n,l+="\n"+t.slice(a,i),a=i+1),s=n;return l+="\n",t.length-a>e&&s>a?l+=t.slice(a,s)+"\n"+t.slice(s+1):l+=t.slice(a),l.slice(1)}function He(t){for(var e,r="",i=0,o=0;o=65536?o+=2:o++)i=qe(t,o),!(e=Te[i])&&Ee(i)?(r+=t[o],i>=65536&&(r+=t[o+1])):r+=e||Ae(i);return r}function Ge(t,e,r){var i,o,a,s="",n=t.tag;for(i=0,o=r.length;i1024&&(n+="? "),n+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),Ze(t,e,s,!1,!1)&&(l+=n+=t.dump));t.tag=h,t.dump="{"+l+"}"}function Xe(t,e,r,i){var o,a,s,n,l,h,c="",d=t.tag,u=Object.keys(r);if(!0===t.sortKeys)u.sort();else if("function"==typeof t.sortKeys)u.sort(t.sortKeys);else if(t.sortKeys)throw new p("sortKeys must be a boolean or a function");for(o=0,a=u.length;o1024)&&(t.dump&&10===t.dump.charCodeAt(0)?h+="?":h+="? "),h+=t.dump,l&&(h+=Fe(t,e)),Ze(t,e+1,n,!0,l)&&(t.dump&&10===t.dump.charCodeAt(0)?h+=":":h+=": ",c+=h+=t.dump));t.tag=d,t.dump=c||"{}"}function Ve(t,e,r){var i,o,a,s,n,l;for(a=0,s=(o=r?t.explicitTypes:t.implicitTypes).length;a tag resolver accepts not "'+l+'" style');i=n.represent[l](e,l)}t.dump=i}return!0}return!1}function Ze(t,e,r,i,o,a,s){t.tag=null,t.dump=r,Ve(t,r,!1)||Ve(t,r,!0);var n,l=xe.call(t.dump),h=i;i&&(i=t.flowLevel<0||t.flowLevel>e);var c,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(c=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||d||2!==t.indent&&e>0)&&(o=!1),d&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(u&&d&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(Xe(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Ye(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l)i&&0!==t.dump.length?(t.noArrayIndent&&!s&&e>0?Ue(t,e-1,t.dump,o):Ue(t,e,t.dump,o),d&&(t.dump="&ref_"+c+t.dump)):(Ge(t,e,t.dump),d&&(t.dump="&ref_"+c+" "+t.dump));else{if("[object String]"!==l){if("[object Undefined]"===l)return!1;if(t.skipInvalid)return!1;throw new p("unacceptable kind of an object to dump "+l)}"?"!==t.tag&&ze(t,t.dump,e,a,h)}null!==t.tag&&"?"!==t.tag&&(n=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21"),n="!"===t.tag[0]?"!"+n:"tag:yaml.org,2002:"===n.slice(0,18)?"!!"+n.slice(18):"!<"+n+">",t.dump=n+" "+t.dump)}return!0}function Qe(t,e){var r,i,o=[],a=[];for(Je(t,o,a),r=0,i=a.length;r{"use strict";r.d(e,{O:()=>s,X:()=>n});var i=r(2101),o=r(5691),a=r(8894),s=(0,a.K2)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins");async function n(t,e){const r=t.getElementsByTagName("img");if(!r||0===r.length)return;const s=""===e.replace(/]*>/g,"").trim();await Promise.all([...r].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",s){const e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[a=o.UI.fontSize]=(0,i.I5)(e),s=a*r+"px";t.style.minWidth=s,t.style.maxWidth=s}else t.style.width="100%";e(t)}(0,a.K2)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}(0,a.K2)(n,"configureLabelImages")},5043:(t,e,r)=>{"use strict";r.r(e),r.d(e,{default:()=>er});var i=r(6417),o=r(8712),a=r(163),s=(r(1562),r(2125),r(5707),r(3276),r(4061),r(7127)),n=r(2101),l=r(5691),h=r(8894),c=r(9594),d=r(1485),u="comm",p="rule",g="decl",f=Math.abs,y=String.fromCharCode;Object.assign;function m(t){return t.trim()}function C(t,e,r){return t.replace(e,r)}function x(t,e,r){return t.indexOf(e,r)}function b(t,e){return 0|t.charCodeAt(e)}function k(t,e,r){return t.slice(e,r)}function T(t){return t.length}function S(t,e){return e.push(t),t}function B(t,e){for(var r="",i=0;i0?b(_,--F):0,L--,10===M&&(L=1,A--),M}function O(){return M=F2||K(M)>3?"":" "}function N(t,e){for(;--e&&O()&&!(M<48||M>102||M>57&&M<65||M>70&&M<97););return q(t,D()+(e<6&&32==I()&&32==O()))}function j(t){for(;O();)switch(M){case t:return F;case 34:case 39:34!==t&&39!==t&&j(M);break;case 40:41===t&&j(t);break;case 92:O()}return F}function H(t,e){for(;O()&&t+M!==57&&(t+M!==84||47!==I()););return"/*"+q(e,F-1)+"*"+y(47===t?t:O())}function G(t){for(;!K(I());)O();return q(t,F)}function U(t){return z(Y("",null,null,null,[""],t=R(t),0,[0],t))}function Y(t,e,r,i,o,a,s,n,l){for(var h=0,c=0,d=s,u=0,p=0,g=0,m=1,B=1,w=1,A=0,L="",v=o,F=a,M=i,_=L;B;)switch(g=A,A=O()){case 40:if(108!=g&&58==b(_,d-1)){-1!=x(_+=C(P(A),"&","&\f"),"&\f",f(h?n[h-1]:0))&&(w=-1);break}case 34:case 39:case 91:_+=P(A);break;case 9:case 10:case 13:case 32:_+=W(g);break;case 92:_+=N(D()-1,7);continue;case 47:switch(I()){case 42:case 47:S(V(H(O(),D()),e,r,l),l),5!=K(g||1)&&5!=K(I()||1)||!T(_)||" "===k(_,-1,void 0)||(_+=" ");break;default:_+="/"}break;case 123*m:n[h++]=T(_)*w;case 125*m:case 59:case 0:switch(A){case 0:case 125:B=0;case 59+c:-1==w&&(_=C(_,/\f/g,"")),p>0&&(T(_)-d||0===m&&47===g)&&S(p>32?Z(_+";",i,r,d-1,l):Z(C(_," ","")+";",i,r,d-2,l),l);break;case 59:_+=";";default:if(S(M=X(_,e,r,h,c,o,n,L,v=[],F=[],d,a),a),123===A)if(0===c)Y(_,e,M,M,v,a,d,n,F);else{switch(u){case 99:if(110===b(_,3))break;case 108:if(97===b(_,2))break;default:c=0;case 100:case 109:case 115:}c?Y(t,M,M,i&&S(X(t,M,M,0,0,o,n,L,o,v=[],d,F),F),o,F,d,n,i?v:F):Y(_,M,M,M,[""],F,0,n,F)}}h=c=p=0,m=w=1,L=_="",d=s;break;case 58:d=1+T(_),p=g;default:if(m<1)if(123==A)--m;else if(125==A&&0==m++&&125==$())continue;switch(_+=y(A),A*m){case 38:w=c>0?1:(_+="\f",-1);break;case 44:n[h++]=(T(_)-1)*w,w=1;break;case 64:45===I()&&(_+=P(O())),u=I(),c=d=T(L=_+=G(D())),A++;break;case 45:45===g&&2==T(_)&&(m=0)}}return a}function X(t,e,r,i,o,a,s,n,l,h,c,d){for(var u=o-1,g=0===o?a:[""],y=function(t){return t.length}(g),x=0,b=0,T=0;x0?g[S]+" "+B:C(B,/&\f/g,g[S])))&&(l[T++]=w);return E(t,e,r,0===o?p:n,l,h,c,d)}function V(t,e,r,i){return E(t,e,r,u,y(M),k(t,2,-2),0,i)}function Z(t,e,r,i,o){return E(t,e,r,g,k(t,0,i),k(t,i+1,-1),i,o)}var Q=r(8685),J=r(7684),tt={id:"c4",detector:(0,h.K2)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5319).then(r.bind(r,5319));return{id:"c4",diagram:t}},"loader")},et="flowchart",rt={id:et,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9911).then(r.bind(r,9911));return{id:et,diagram:t}},"loader")},it="flowchart-v2",ot={id:it,detector:(0,h.K2)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9911).then(r.bind(r,9911));return{id:it,diagram:t}},"loader")},at={id:"er",detector:(0,h.K2)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(125).then(r.bind(r,125));return{id:"er",diagram:t}},"loader")},st="gitGraph",nt={id:st,detector:(0,h.K2)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(9288)]).then(r.bind(r,9288));return{id:st,diagram:t}},"loader")},lt="gantt",ht={id:lt,detector:(0,h.K2)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(6325).then(r.bind(r,6325));return{id:lt,diagram:t}},"loader")},ct="info",dt={id:ct,detector:(0,h.K2)(t=>/^\s*info/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(6895)]).then(r.bind(r,6895));return{id:ct,diagram:t}},"loader")},ut={id:"pie",detector:(0,h.K2)(t=>/^\s*pie/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(5298)]).then(r.bind(r,5298));return{id:"pie",diagram:t}},"loader")},pt="quadrantChart",gt={id:pt,detector:(0,h.K2)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2913).then(r.bind(r,2913));return{id:pt,diagram:t}},"loader")},ft="xychart",yt={id:ft,detector:(0,h.K2)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9332).then(r.bind(r,9332));return{id:ft,diagram:t}},"loader")},mt="requirement",Ct={id:mt,detector:(0,h.K2)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5763).then(r.bind(r,5763));return{id:mt,diagram:t}},"loader")},xt="sequence",bt={id:xt,detector:(0,h.K2)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5725).then(r.bind(r,5725));return{id:xt,diagram:t}},"loader")},kt="class",Tt={id:kt,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(866),r.e(5537)]).then(r.bind(r,5537));return{id:kt,diagram:t}},"loader")},St="classDiagram",Bt={id:St,detector:(0,h.K2)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(866),r.e(9115)]).then(r.bind(r,1496));return{id:St,diagram:t}},"loader")},wt="state",At={id:wt,detector:(0,h.K2)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(1571),r.e(9808),r.e(5105),r.e(3674)]).then(r.bind(r,3674));return{id:wt,diagram:t}},"loader")},Lt="stateDiagram",vt={id:Lt,detector:(0,h.K2)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(5105),r.e(5769)]).then(r.bind(r,5769));return{id:Lt,diagram:t}},"loader")},Ft="journey",Mt={id:Ft,detector:(0,h.K2)(t=>/^\s*journey/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(401).then(r.bind(r,401));return{id:Ft,diagram:t}},"loader")},_t={draw:(0,h.K2)((t,e,r)=>{h.Rm.debug("rendering svg for syntax error\n");const o=(0,i.D)(e),a=o.append("g");o.attr("viewBox","0 0 2412 512"),(0,l.a$)(o,100,512,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Et=_t,$t={db:{},renderer:_t,parser:{parse:(0,h.K2)(()=>{},"parse")}},Ot="flowchart-elk",It={id:Ot,detector:(0,h.K2)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(9911).then(r.bind(r,9911));return{id:Ot,diagram:t}},"loader")},Dt="timeline",qt={id:Dt,detector:(0,h.K2)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5905).then(r.bind(r,5905));return{id:Dt,diagram:t}},"loader")},Kt="mindmap",Rt={id:Kt,detector:(0,h.K2)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(6621).then(r.bind(r,6621));return{id:Kt,diagram:t}},"loader")},zt="kanban",Pt={id:zt,detector:(0,h.K2)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2391).then(r.bind(r,4772));return{id:zt,diagram:t}},"loader")},Wt="sankey",Nt={id:Wt,detector:(0,h.K2)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(2858).then(r.bind(r,2858));return{id:Wt,diagram:t}},"loader")},jt="packet",Ht={id:jt,detector:(0,h.K2)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(2712)]).then(r.bind(r,2712));return{id:jt,diagram:t}},"loader")},Gt="radar",Ut={id:Gt,detector:(0,h.K2)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(4640)]).then(r.bind(r,4640));return{id:Gt,diagram:t}},"loader")},Yt="block",Xt={id:Yt,detector:(0,h.K2)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(1571),r.e(6076)]).then(r.bind(r,6076));return{id:Yt,diagram:t}},"loader")},Vt="treeView",Zt={id:Vt,detector:(0,h.K2)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(5428)]).then(r.bind(r,5428));return{id:Vt,diagram:t}},"loader")},Qt="architecture",Jt={id:Qt,detector:(0,h.K2)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(9314),r.e(6669)]).then(r.bind(r,6669));return{id:Qt,diagram:t}},"loader")},te="ishikawa",ee={id:te,detector:(0,h.K2)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(3640).then(r.bind(r,3640));return{id:te,diagram:t}},"loader")},re="venn",ie={id:re,detector:(0,h.K2)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await r.e(5613).then(r.bind(r,5613));return{id:re,diagram:t}},"loader")},oe="treemap",ae={id:oe,detector:(0,h.K2)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(2264)]).then(r.bind(r,2264));return{id:oe,diagram:t}},"loader")},se="wardley-beta",ne={id:se,detector:(0,h.K2)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,h.K2)(async()=>{const{diagram:t}=await Promise.all([r.e(156),r.e(4419),r.e(6545)]).then(r.bind(r,6545));return{id:se,diagram:t}},"loader")},le=!1,he=(0,h.K2)(()=>{le||(le=!0,(0,l.Js)("error",$t,t=>"error"===t.toLowerCase().trim()),(0,l.Js)("---",{db:{clear:(0,h.K2)(()=>{},"clear")},styles:{},renderer:{draw:(0,h.K2)(()=>{},"draw")},parser:{parse:(0,h.K2)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,h.K2)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,l.Xd)(It,Rt,Jt),(0,l.Xd)(tt,Pt,Bt,Tt,at,ht,dt,ut,Ct,bt,ot,rt,qt,nt,vt,At,Mt,gt,Nt,Ht,yt,Xt,Zt,Ut,ee,ae,ie,ne))},"addDiagrams"),ce=(0,h.K2)(async()=>{h.Rm.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(l.mW).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,l.Gs)(t)}catch{try{const{diagram:t,id:i}=await r();(0,l.Js)(i,t,e)}catch(i){throw h.Rm.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete l.mW[t],i}}}))).filter(t=>"rejected"===t.status);if(t.length>0){h.Rm.error(`Failed to load ${t.length} external diagrams`);for(const e of t)h.Rm.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function de(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function ue(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,h.K2)(de,"setA11yDiagramInfo"),(0,h.K2)(ue,"addSVGa11yTitleDescription");var pe=class t{constructor(t,e,r,i,o){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=o}static{(0,h.K2)(this,"Diagram")}static async fromText(e,r={}){const i=(0,l.zj)(),o=(0,l.Ch)(e,i);e=(0,n.C4)(e)+"\n";try{(0,l.Gs)(o)}catch{const t=(0,l.J$)(o);if(!t)throw new l.C0(`Diagram ${o} not found.`);const{id:e,diagram:r}=await t();(0,l.Js)(e,r)}const{db:a,parser:s,renderer:h,init:c}=(0,l.Gs)(o);return s.parser&&(s.parser.yy=a),a.clear?.(),c?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(e),new t(o,e,a,s,h)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},ge=[],fe=(0,h.K2)(()=>{ge.forEach(t=>{t()}),ge=[]},"attachFunctions"),ye=(0,h.K2)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function me(t){const e=t.match(l.EJ);if(!e)return{text:t,metadata:{}};let r=(0,o.H)(e[1],{schema:o.r})??{};r="object"!=typeof r||Array.isArray(r)?{}:r;const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:t.slice(e[0].length),metadata:i}}(0,h.K2)(me,"extractFrontMatter");var Ce=(0,h.K2)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),xe=(0,h.K2)(t=>{const{text:e,metadata:r}=me(t),{displayMode:i,title:o,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:o,config:a,text:e}},"processFrontmatter"),be=(0,h.K2)(t=>{const e=n._K.detectInit(t)??{},r=n._K.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,n.vU)(t),directive:e}},"processDirectives");function ke(t){const e=Ce(t),r=xe(e),i=be(r.text),o=(0,n.$t)(r.config,i.directive);return{code:t=ye(i.text),title:r.title,config:o}}function Te(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,h.K2)(ke,"preprocessDiagram"),(0,h.K2)(Te,"toBase64");var Se=["foreignobject"],Be=["dominant-baseline"];function we(t){const e=ke(t);return(0,l.cL)(),(0,l.xA)(e.config??{}),e}async function Ae(t,e){he();try{const{code:e,config:r}=we(t);return{diagramType:(await qe(e)).type,config:r}}catch(r){if(e?.suppressErrors)return!1;throw r}}(0,h.K2)(we,"processAndSetConfigs"),(0,h.K2)(Ae,"parse");var Le=(0,h.K2)((t,e,r=[])=>`\n.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),ve=(0,h.K2)((t,e=new Map)=>{let r="";if(void 0!==t.themeCSS&&(r+=`\n${t.themeCSS}`),void 0!==t.fontFamily&&(r+=`\n:root { --mermaid-font-family: ${t.fontFamily}}`),void 0!==t.altFontFamily&&(r+=`\n:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),e instanceof Map){const i=(0,l.E)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{(0,J.A)(t.styles)||i.forEach(e=>{r+=Le(t.id,e,t.styles)}),(0,J.A)(t.textStyles)||(r+=Le(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return r},"createCssStyles"),Fe=(0,h.K2)((t,e,r,i)=>{const o=ve(t,r);return B(U(`${i}{${(0,l.tM)(e,o,{...t.themeVariables,theme:t.theme,look:t.look},i)}}`),w)},"createUserStyles"),Me=(0,h.K2)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,n.Sm)(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),_e=(0,h.K2)((t="",e)=>``,"putIntoIFrame"),Ee=(0,h.K2)((t,e,r,i,o)=>{const a=t.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return o&&s.attr("xmlns:xlink",o),s.append("g"),t},"appendDivSvgG");function $e(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,h.K2)($e,"sandboxedIframe");var Oe=(0,h.K2)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),Ie=(0,h.K2)(async function(t,e,r){he();const i=we(e);e=i.code;const o=(0,l.zj)();h.Rm.debug(o),e.length>(o?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const a="#"+t,s="i"+t,n="#"+s,c="d"+t,u="#"+c,p=(0,h.K2)(()=>{const t=f?n:u,e=(0,d.Ltv)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,d.Ltv)("body");const f="sandbox"===o.securityLevel,y="loose"===o.securityLevel,m=o.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),f){const t=$e((0,d.Ltv)(r),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)(r);Ee(g,t,c,`font-family: ${m}`,"http://www.w3.org/1999/xlink")}else{if(Oe(document,t,c,s),f){const t=$e((0,d.Ltv)("body"),s);g=(0,d.Ltv)(t.nodes()[0].contentDocument.body),g.node().style.margin=0}else g=(0,d.Ltv)("body");Ee(g,t,c)}let C,x;try{C=await pe.fromText(e,{title:i.title})}catch(_){if(o.suppressErrorRendering)throw p(),_;C=await pe.fromText("error"),x=_}const b=g.select(u).node(),k=C.type,T=b.firstChild,S=T.firstChild,B=C.renderer.getClasses?.(e,C),w=Fe(o,k,B,a),A=document.createElement("style");A.innerHTML=w,T.insertBefore(A,S);try{await C.renderer.draw(e,t,"11.14.0",C)}catch(E){throw o.suppressErrorRendering?p():Et.draw(e,t,"11.14.0"),E}const L=g.select(`${u} svg`),v=C.db.getAccTitle?.(),F=C.db.getAccDescription?.();Ke(k,L,v,F),g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let M=g.select(u).node().innerHTML;if(h.Rm.debug("config.arrowMarkerAbsolute",o.arrowMarkerAbsolute),M=Me(M,f,(0,l._3)(o.arrowMarkerAbsolute)),f){const t=g.select(u+" svg").node();M=_e(M,t)}else y||(M=Q.A.sanitize(M,{ADD_TAGS:Se,ADD_ATTR:Be,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(fe(),x)throw x;return p(),{diagramType:k,svg:M,bindFunctions:C.db.bindFunctions}},"render");function De(t={}){const e=(0,l.hH)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,l.wZ)(e),e?.theme&&e.theme in l.H$?e.themeVariables=l.H$[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=l.H$.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,l.UU)(e):(0,l.Q2)();(0,h.He)(r.logLevel),he()}(0,h.K2)(De,"initialize");var qe=(0,h.K2)((t,e={})=>{const{code:r}=ke(t);return pe.fromText(r,e)},"getDiagramFromText");function Ke(t,e,r,i){de(e,t),ue(e,r,i,e.attr("id"))}(0,h.K2)(Ke,"addA11yInfo");var Re=Object.freeze({render:Ie,parse:Ae,getDiagramFromText:qe,initialize:De,getConfig:l.zj,setConfig:l.Nk,getSiteConfig:l.Q2,updateSiteConfig:l.B6,reset:(0,h.K2)(()=>{(0,l.cL)()},"reset"),globalReset:(0,h.K2)(()=>{(0,l.cL)(l.sb)},"globalReset"),defaultConfig:l.sb});(0,h.He)((0,l.zj)().logLevel),(0,l.cL)((0,l.zj)());var ze=(0,h.K2)((t,e,r)=>{h.Rm.warn(t),(0,n.dq)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),Pe=(0,h.K2)(async function(t={querySelector:".mermaid"}){try{await We(t)}catch(e){if((0,n.dq)(e)&&h.Rm.error(e.str),tr.parseError&&tr.parseError(e),!t.suppressErrors)throw h.Rm.error("Use the suppressErrors option to suppress these errors"),e}},"run"),We=(0,h.K2)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=Re.getConfig();let o;if(h.Rm.debug((t?"":"No ")+"Callback function found"),r)o=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");o=document.querySelectorAll(e)}h.Rm.debug(`Found ${o.length} diagrams`),void 0!==i?.startOnLoad&&(h.Rm.debug("Start On Load: "+i?.startOnLoad),Re.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new n._K.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const l=[];for(const u of Array.from(o)){if(h.Rm.info("Rendering diagram: "+u.id),u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");const e=`mermaid-${a.next()}`;s=u.innerHTML,s=(0,c.T)(n._K.entityDecode(s)).trim().replace(//gi,"
    ");const r=n._K.detectInit(s);r&&h.Rm.debug("Detected early reinit: ",r);try{const{svg:r,bindFunctions:i}=await Qe(e,s,u);u.innerHTML=r,t&&await t(e),i&&i(u)}catch(d){ze(d,l,tr.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),Ne=(0,h.K2)(function(t){Re.initialize(t)},"initialize"),je=(0,h.K2)(async function(t,e,r){h.Rm.warn("mermaid.init is deprecated. Please use run instead."),t&&Ne(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await Pe(i)},"init"),He=(0,h.K2)(async(t,{lazyLoad:e=!0}={})=>{he(),(0,l.Xd)(...t),!1===e&&await ce()},"registerExternalDiagrams"),Ge=(0,h.K2)(function(){if(tr.startOnLoad){const{startOnLoad:t}=Re.getConfig();t&&tr.run().catch(t=>h.Rm.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",Ge,!1);var Ue=(0,h.K2)(function(t){tr.parseError=t},"setParseErrorHandler"),Ye=[],Xe=!1,Ve=(0,h.K2)(async()=>{if(!Xe){for(Xe=!0;Ye.length>0;){const e=Ye.shift();if(e)try{await e()}catch(t){h.Rm.error("Error executing queue",t)}}Xe=!1}},"executeQueue"),Ze=(0,h.K2)(async(t,e)=>new Promise((r,i)=>{const o=(0,h.K2)(()=>new Promise((o,a)=>{Re.parse(t,e).then(t=>{o(t),r(t)},t=>{h.Rm.error("Error parsing",t),tr.parseError?.(t),a(t),i(t)})}),"performCall");Ye.push(o),Ve().catch(i)}),"parse"),Qe=(0,h.K2)((t,e,r)=>new Promise((i,o)=>{const a=(0,h.K2)(()=>new Promise((a,s)=>{Re.render(t,e,r).then(t=>{a(t),i(t)},t=>{h.Rm.error("Error parsing",t),tr.parseError?.(t),s(t),o(t)})}),"performCall");Ye.push(a),Ve().catch(o)}),"render"),Je=(0,h.K2)(()=>Object.keys(l.mW).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),tr={startOnLoad:!0,mermaidAPI:Re,parse:Ze,render:Qe,init:je,run:Pe,registerExternalDiagrams:He,registerLayoutLoaders:a.sO,initialize:Ne,parseError:void 0,contentLoaded:Ge,setParseErrorHandler:Ue,detectType:l.Ch,registerIconPacks:s.pC,getRegisteredDiagramsMetadata:Je},er=tr}}]); \ No newline at end of file diff --git a/assets/js/5043.2bc13b96.js.LICENSE.txt b/assets/js/5043.2bc13b96.js.LICENSE.txt new file mode 100644 index 0000000..7824b99 --- /dev/null +++ b/assets/js/5043.2bc13b96.js.LICENSE.txt @@ -0,0 +1 @@ +/*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE */ diff --git a/assets/js/5084391c.61a5cbb3.js b/assets/js/5084391c.61a5cbb3.js new file mode 100644 index 0000000..8ce620d --- /dev/null +++ b/assets/js/5084391c.61a5cbb3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4348],{693:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});const d=JSON.parse('{"id":"reference/lua/record-api","title":"Record API","description":"The Record API is only available in procedure scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller\'s PDS and indexed locally.","source":"@site/docs/reference/lua/record-api.md","sourceDirName":"reference/lua","slug":"/reference/lua/record-api","permalink":"/reference/lua/record-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Plugins","permalink":"/reference/admin/plugins"},"next":{"title":"Database API","permalink":"/reference/lua/database-api"}}');var s=n(199),t=n(2560);const i={},c="Record API",l={},a=[{value:"Constructor",id:"constructor",level:2},{value:"Static methods",id:"static-methods",level:2},{value:"Instance methods",id:"instance-methods",level:2},{value:"Instance fields",id:"instance-fields",level:2},{value:"Schema validation",id:"schema-validation",level:2},{value:"Save behavior",id:"save-behavior",level:2}];function o(e){const r={code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"record-api",children:"Record API"})}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"Record"})," API is only available in ",(0,s.jsx)(r.strong,{children:"procedure"})," scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller's PDS and indexed locally."]}),"\n",(0,s.jsx)(r.h2,{id:"constructor",children:"Constructor"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'local r = Record("xyz.statusphere.status", { status = "\\ud83d\\ude0a", createdAt = now() })\n'})}),"\n",(0,s.jsxs)(r.p,{children:["Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's ",(0,s.jsx)(r.code,{children:"_key_type"})," is automatically set from the lexicon's ",(0,s.jsx)(r.code,{children:"key"})," definition. Default values from the schema are populated for any missing fields."]}),"\n",(0,s.jsx)(r.h2,{id:"static-methods",children:"Static methods"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'-- Save multiple records in parallel\nRecord.save_all({ record1, record2, record3 })\n\n-- Load a record from the local database by AT URI\nlocal r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns nil if not found\n\n-- Load multiple records in parallel\nlocal records = Record.load_all({ uri1, uri2 })\n-- Returns nil entries for URIs not found\n'})}),"\n",(0,s.jsx)(r.h2,{id:"instance-methods",children:"Instance methods"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'-- Save (creates or updates depending on whether _uri is set)\nr:save()\n\n-- Delete from PDS and local database\nr:delete()\n\n-- Set the record key type (tid, any, nsid, or literal:*)\nr:set_key_type("tid")\n\n-- Set a specific record key\nr:set_rkey("my-key")\n\n-- Auto-generate a record key based on _key_type\nlocal key = r:generate_rkey()\n'})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["Key type behavior for ",(0,s.jsx)(r.code,{children:"generate_rkey()"}),":"]})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Key type"}),(0,s.jsx)(r.th,{children:"Generated rkey"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"tid"})}),(0,s.jsx)(r.td,{children:"Sortable timestamp-based ID"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"any"})}),(0,s.jsxs)(r.td,{children:["Same as ",(0,s.jsx)(r.code,{children:"tid"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"literal:value"})}),(0,s.jsx)(r.td,{children:"The literal value after the colon"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"nsid"})}),(0,s.jsxs)(r.td,{children:["Error \u2014 use ",(0,s.jsx)(r.code,{children:"set_rkey()"})," instead"]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"instance-fields",children:"Instance fields"}),"\n",(0,s.jsx)(r.p,{children:"These fields are set automatically and are read-only (writes raise an error):"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Field"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_uri"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["AT URI \u2014 set after ",(0,s.jsx)(r.code,{children:"save()"}),", cleared after ",(0,s.jsx)(r.code,{children:"delete()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_cid"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["Content hash \u2014 set after ",(0,s.jsx)(r.code,{children:"save()"}),", cleared after ",(0,s.jsx)(r.code,{children:"delete()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_key_type"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsx)(r.td,{children:"Record key type from the lexicon definition"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_rkey"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["Record key \u2014 set via ",(0,s.jsx)(r.code,{children:"set_rkey()"})," or ",(0,s.jsx)(r.code,{children:"generate_rkey()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_collection"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Collection NSID (always set)"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_schema"})}),(0,s.jsx)(r.td,{children:"table?"}),(0,s.jsx)(r.td,{children:"Schema definition from the lexicon (used for validation)"})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"schema-validation",children:"Schema validation"}),"\n",(0,s.jsx)(r.p,{children:"When a record has a schema (loaded from the lexicon):"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On save:"})," required fields are checked, and missing required fields raise an error"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On construction:"})," default values from schema properties are auto-populated"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On save:"})," only fields defined in the schema's ",(0,s.jsx)(r.code,{children:"properties"})," are sent to the PDS"]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"save-behavior",children:"Save behavior"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"r:save()"})," auto-detects create vs update:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["If ",(0,s.jsx)(r.code,{children:"_uri"})," is nil \u2192 calls ",(0,s.jsx)(r.code,{children:"createRecord"})," on the PDS"]}),"\n",(0,s.jsxs)(r.li,{children:["If ",(0,s.jsx)(r.code,{children:"_uri"})," is set \u2192 calls ",(0,s.jsx)(r.code,{children:"putRecord"})," on the PDS"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["After a successful save, ",(0,s.jsx)(r.code,{children:"_uri"})," and ",(0,s.jsx)(r.code,{children:"_cid"})," are updated on the record instance."]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>i,x:()=>c});var d=n(63);const s={},t=d.createContext(s);function i(e){const r=d.useContext(t);return d.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),d.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5105.56948e52.js b/assets/js/5105.56948e52.js new file mode 100644 index 0000000..f08997f --- /dev/null +++ b/assets/js/5105.56948e52.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5105],{7330:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(8894),n=s(1485),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},3830:(t,e,s)=>{s.d(e,{P:()=>r});var i=s(5691),n=s(8894),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:c,height:l,x:h,y:d}=o(t,e);(0,i.a$)(t,l,c,r);const u=a(h,d,c,l,e);t.attr("viewBox",u),n.Rm.debug(`viewBox configured: ${u} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),a=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},5105:(t,e,s)=>{s.d(e,{Zk:()=>h,q7:()=>K,tM:()=>ot,u4:()=>rt});var i=s(7330),n=s(3830),r=s(163),o=s(2101),a=s(5691),c=s(8894),l=function(){var t=(0,c.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,2],s=[1,3],i=[1,4],n=[2,4],r=[1,9],o=[1,11],a=[1,16],l=[1,17],h=[1,18],d=[1,19],u=[1,33],p=[1,20],y=[1,21],g=[1,22],m=[1,23],f=[1,24],S=[1,26],k=[1,27],b=[1,28],_=[1,29],T=[1,30],E=[1,31],D=[1,32],$=[1,35],x=[1,36],C=[1,37],v=[1,38],I=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],L=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],w=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],R={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:(0,c.K2)(function(t,e,s,i,n,r,o){var a=r.length-1;switch(n){case 3:return i.setRootDoc(r[a]),r[a];case 4:this.$=[];break;case 5:"nl"!=r[a]&&(r[a-1].push(r[a]),this.$=r[a-1]);break;case 6:case 7:case 12:this.$=r[a];break;case 8:this.$="nl";break;case 13:const t=r[a-1];t.description=i.trimColon(r[a]),this.$=t;break;case 14:this.$={stmt:"relation",state1:r[a-2],state2:r[a]};break;case 15:const e=i.trimColon(r[a]);this.$={stmt:"relation",state1:r[a-3],state2:r[a-1],description:e};break;case 19:this.$={stmt:"state",id:r[a-3],type:"default",description:"",doc:r[a-1]};break;case 20:var c=r[a],l=r[a-2].trim();if(r[a].match(":")){var h=r[a].split(":");c=h[0],l=[l,h[1]]}this.$={stmt:"state",id:c,type:"default",description:l};break;case 21:this.$={stmt:"state",id:r[a-3],type:"default",description:r[a-5],doc:r[a-1]};break;case 22:this.$={stmt:"state",id:r[a],type:"fork"};break;case 23:this.$={stmt:"state",id:r[a],type:"join"};break;case 24:this.$={stmt:"state",id:r[a],type:"choice"};break;case 25:this.$={stmt:"state",id:i.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[a-1].trim(),note:{position:r[a-2].trim(),text:r[a].trim()}};break;case 29:this.$=r[a].trim(),i.setAccTitle(this.$);break;case 30:case 31:this.$=r[a].trim(),i.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[a-3],url:r[a-2],tooltip:r[a-1]};break;case 33:this.$={stmt:"click",id:r[a-3],url:r[a-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[a-1].trim(),classes:r[a].trim()};break;case 36:this.$={stmt:"style",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 37:this.$={stmt:"applyClass",id:r[a-1].trim(),styleClass:r[a].trim()};break;case 38:i.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:i.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:i.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:i.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[a].trim(),type:"default",description:""};break;case 46:case 47:this.$={stmt:"state",id:r[a-2].trim(),classes:[r[a].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:e,5:s,6:i},{1:[3]},{3:5,4:e,5:s,6:i},{3:6,4:e,5:s,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:k,37:b,38:_,41:T,45:E,48:D,51:$,52:x,53:C,54:v,57:I},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:a,17:l,19:h,22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:k,37:b,38:_,41:T,45:E,48:D,51:$,52:x,53:C,54:v,57:I},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:u,57:I},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(L,[2,44],{58:[1,56]}),t(L,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:u,57:I},t(A,[2,17]),t(w,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,21:[1,72],22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:k,37:b,38:_,41:T,45:E,48:D,51:$,52:x,53:C,54:v,57:I},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(L,[2,46]),t(L,[2,47]),t(A,[2,15]),t(A,[2,19]),t(w,n,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:r,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:a,17:l,19:h,21:[1,81],22:d,24:u,25:p,26:y,27:g,28:m,29:f,32:25,33:S,35:k,37:b,38:_,41:T,45:E,48:D,51:$,52:x,53:C,54:v,57:I},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],o=this.table,a="",l=0,h=0,d=0,u=r.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;r.push(m);var f=p.options&&p.options.ranges;function S(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(S,"lex");for(var k,b,_,T,E,D,$,x,C,v={};;){if(_=s[s.length-1],this.defaultActions[_]?T=this.defaultActions[_]:(null==k&&(k=S()),T=o[_]&&o[_][k]),void 0===T||!T.length||!T[0]){var I="";for(D in C=[],o[_])this.terminals_[D]&&D>2&&C.push("'"+this.terminals_[D]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:m,expected:C})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+k);switch(T[0]){case 1:s.push(k),n.push(p.yytext),r.push(p.yylloc),s.push(T[1]),k=null,b?(k=b,b=null):(h=p.yyleng,a=p.yytext,l=p.yylineno,m=p.yylloc,d>0&&d--);break;case 2:if($=this.productions_[T[1]][1],v.$=n[n.length-$],v._$={first_line:r[r.length-($||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-($||1)].first_column,last_column:r[r.length-1].last_column},f&&(v._$.range=[r[r.length-($||1)].range[0],r[r.length-1].range[1]]),void 0!==(E=this.performAction.apply(v,[a,h,l,y.yy,T[1],n,r].concat(u))))return E;$&&(s=s.slice(0,-1*$*2),n=n.slice(0,-1*$),r=r.slice(0,-1*$)),s.push(this.productions_[T[1]][0]),n.push(v.$),r.push(v._$),x=o[s[s.length-2]][s[s.length-1]],s.push(x);break;case 3:return!0}}return!0},"parse")},N=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,s,i){switch(s){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:case 45:return 51;case 5:case 46:return 52;case 6:case 47:return 53;case 7:case 48:return 54;case 8:case 9:case 11:case 12:case 13:case 14:case 57:case 59:case 65:break;case 10:case 80:return 5;case 15:case 35:return this.pushState("SCALE"),17;case 16:case 36:return 18;case 17:case 23:case 37:case 52:case 55:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 38:this.pushState("STATE");break;case 39:case 42:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),25;case 40:case 43:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),26;case 41:case 44:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),27;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:case 67:return this.popState(),"ID";case 53:return"STATE_DESCR";case 54:return 19;case 56:return this.popState(),this.pushState("struct"),20;case 58:return this.popState(),21;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 66:return"NOTE_TEXT";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),e.yytext=e.yytext.substr(2).trim(),31;case 70:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),31;case 71:case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return e.yytext=e.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78,79],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}}}();function O(){this.yy={}}return R.lexer=N,(0,c.K2)(O,"Parser"),O.prototype=R,R.Parser=O,new O}();l.parser=l;var h=l,d="state",u="root",p="relation",y="default",g="divider",m="fill:none",f="fill: #333",S="markdown",k="normal",b="rect",_="rectWithTitle",T="divider",E="roundedWithTitle",D="statediagram",$=`${D}-state`,x="transition",C=`${x} note-edge`,v=`${D}-note`,I=`${D}-cluster`,A=`${D}-cluster-alt`,L="parent",w="note",R="----",N=`${R}${w}`,O=`${R}${L}`,B=(0,c.K2)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),K={getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,c.K2)(async function(t,e,s,l){c.Rm.info("REF0:"),c.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:d,layout:u}=(0,a.D7)();l.db.extract(l.db.getRootDocV2());const p=l.db.getData(),y=(0,i.A)(e,h);p.type=l.type,p.layoutAlgorithm=u,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50;"neo"===(0,a.D7)().look?p.markers=["barbNeo"]:p.markers=["barb"],p.diagramId=e,await(0,r.XX)(p,y);try{("function"==typeof l.db.getLinks?l.db.getLinks():new Map).forEach((t,e)=>{const s="string"==typeof e?e:"string"==typeof e?.id?e.id:"";if(!s)return void c.Rm.warn("\u26a0\ufe0f Invalid or missing stateId from key:",JSON.stringify(e));const i=y.node()?.querySelectorAll("g");let n;if(i?.forEach(t=>{const e=t.textContent?.trim();e===s&&(n=t)}),!n)return void c.Rm.warn("\u26a0\ufe0f Could not find node matching text:",s);const r=n.parentNode;if(!r)return void c.Rm.warn("\u26a0\ufe0f Node has no parent, cannot wrap:",s);const o=document.createElementNS("http://www.w3.org/2000/svg","a"),a=t.url.replace(/^"+|"+$/g,"");if(o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a),o.setAttribute("target","_blank"),t.tooltip){const e=t.tooltip.replace(/^"+|"+$/g,"");o.setAttribute("title",e)}r.replaceChild(o,n),o.appendChild(n),c.Rm.info("\ud83d\udd17 Wrapped node in
    tag for:",s,t.url)})}catch(g){c.Rm.error("\u274c Error injecting clickable links:",g)}o._K.insertTitle(y,"statediagramTitleText",d?.titleTopMargin??25,l.db.getDiagramTitle()),(0,n.P)(y,8,D,d?.useMaxWidth??!0)},"draw"),getDir:B},F=new Map,Y=0;function P(t="",e=0,s="",i=R){return`state-${t}${null!==s&&s.length>0?`${i}${s}`:""}-${e}`}(0,c.K2)(P,"stateDomId");var G=(0,c.K2)((t,e,s,i,n,r,o,l)=>{c.Rm.trace("items",e),e.forEach(e=>{switch(e.stmt){case d:case y:U(t,e,s,i,n,r,o,l);break;case p:{U(t,e.state1,s,i,n,r,o,l),U(t,e.state2,s,i,n,r,o,l);const c="neo"===o,h={id:"edge"+Y,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:c?"arrow_barb_neo":"arrow_barb",style:m,labelStyle:"",label:a.Y2.sanitizeText(e.description??"",(0,a.D7)()),arrowheadStyle:f,labelpos:"c",labelType:S,thickness:k,classes:x,look:o};n.push(h),Y++}}})},"setupDoc"),j=(0,c.K2)((t,e="TB")=>{let s=e;if(t.doc)for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir");function W(t,e,s){if(!e.id||""===e.id||""===e.id)return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{const i=s.get(t);i&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...i.styles])}));const i=t.find(t=>t.id===e.id);i?Object.assign(i,e):t.push(e)}function z(t){return t?.classes?.join(" ")??""}function M(t){return t?.styles??[]}(0,c.K2)(W,"insertOrUpdateNode"),(0,c.K2)(z,"getClassesFromDbInfo"),(0,c.K2)(M,"getStylesFromDbInfo");var U=(0,c.K2)((t,e,s,i,n,r,o,l)=>{const h=e.id,d=s.get(h),u=z(d),p=M(d),D=(0,a.D7)();if(c.Rm.info("dataFetcher parsedItem",e,d,p),"root"!==h){let s=b;!0===e.start?s="stateStart":!1===e.start&&(s="stateEnd"),e.type!==y&&(s=e.type),F.get(h)||F.set(h,{id:h,shape:s,description:a.Y2.sanitizeText(h,D),cssClasses:`${u} ${$}`,cssStyles:p});const d=F.get(h);e.description&&(Array.isArray(d.description)?(d.shape=_,d.description.push(e.description)):d.description?.length&&d.description.length>0?(d.shape=_,d.description===h?d.description=[e.description]:d.description=[d.description,e.description]):(d.shape=b,d.description=e.description),d.description=a.Y2.sanitizeTextOrArray(d.description,D)),1===d.description?.length&&d.shape===_&&("group"===d.type?d.shape=E:d.shape=b),!d.type&&e.doc&&(c.Rm.info("Setting cluster for XCX",h,j(e)),d.type="group",d.isGroup=!0,d.dir=j(e),d.shape=e.type===g?T:E,d.cssClasses=`${d.cssClasses} ${I} ${r?A:""}`);const x={labelStyle:"",shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:h,dir:d.dir,domId:P(h,Y),type:d.type,isGroup:"group"===d.type,padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(x.shape===T&&(x.label=""),t&&"root"!==t.id&&(c.Rm.trace("Setting node ",h," to be child of its parent ",t.id),x.parentId=t.id),x.centerLabel=!0,e.note){const t={labelStyle:"",shape:"note",label:e.note.text,labelType:"markdown",cssClasses:v,cssStyles:[],cssCompiledStyles:[],id:h+N+"-"+Y,domId:P(h,Y,w),type:d.type,isGroup:"group"===d.type,padding:D.flowchart?.padding,look:o,position:e.note.position},s=h+O,r={labelStyle:"",shape:"noteGroup",label:e.note.text,cssClasses:d.cssClasses,cssStyles:[],id:h+O,domId:P(h,Y,L),type:"group",isGroup:!0,padding:16,look:o,position:e.note.position};Y++,r.id=s,t.parentId=s,W(i,r,l),W(i,t,l),W(i,x,l);let a=h,c=t.id;"left of"===e.note.position&&(a=t.id,c=h),n.push({id:a+"-"+c,start:a,end:c,arrowhead:"none",arrowTypeEnd:"",style:m,labelStyle:"",classes:C,arrowheadStyle:f,labelpos:"c",labelType:S,thickness:k,look:o})}else W(i,x,l)}e.doc&&(c.Rm.trace("Adding nodes children "),G(e,e.doc,s,i,n,!r,o,l))},"dataFetcher"),V=(0,c.K2)(()=>{F.clear(),Y=0},"reset"),X="[*]",H="start",J="[*]",q="end",Z="color",Q="fill",tt="bgFill",et=",",st=(0,c.K2)(()=>new Map,"newClassesList"),it=(0,c.K2)(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),nt=(0,c.K2)(t=>JSON.parse(JSON.stringify(t)),"clone"),rt=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=st(),this.documents={root:it()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=a.iN,this.setAccTitle=a.SV,this.getAccDescription=a.m7,this.setAccDescription=a.EI,this.setDiagramTitle=a.ke,this.getDiagramTitle=a.ab,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{(0,c.K2)(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const i of Array.isArray(t)?t:t.doc)switch(i.stmt){case d:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case p:this.addRelation(i.state1,i.state2,i.description);break;case"classDef":this.addStyleClass(i.id.trim(),i.classes);break;case"style":this.handleStyleDef(i);break;case"applyClass":this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip)}const e=this.getStates(),s=(0,a.D7)();V(),U(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,s.look,this.classes);for(const i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),s=t.styleClass.split(",");for(const i of e){let t=this.getState(i);if(!t){const e=i.trim();this.addState(e),t=this.getState(e)}t&&(t.styles=s.map(t=>t.replace(/;/g,"")?.trim()))}}setRootDoc(t){c.Rm.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,s){if(e.stmt===p)return this.docTranslator(t,e.state1,!0),void this.docTranslator(t,e.state2,!1);if(e.stmt===d&&(e.id===X?(e.id=t.id+(s?"_start":"_end"),e.start=s):e.id=e.id.trim()),e.stmt!==u&&e.stmt!==d||!e.doc)return;const i=[];let n=[];for(const r of e.doc)if(r.type===g){const t=nt(r);t.doc=nt(n),i.push(t),n=[]}else n.push(r);if(i.length>0&&n.length>0){const t={stmt:d,id:(0,o.$C)(),type:"divider",doc:nt(n)};i.push(nt(t)),e.doc=i}e.doc.forEach(t=>this.docTranslator(e,t,!0))}getRootDocV2(){return this.docTranslator({id:u,stmt:u},{id:u,stmt:u,doc:this.rootDoc},!0),{id:u,doc:this.rootDoc}}addState(t,e=y,s=void 0,i=void 0,n=void 0,r=void 0,o=void 0,l=void 0){const h=t?.trim();if(this.currentDocument.states.has(h)){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.doc||(t.doc=s),t.type||(t.type=e)}else c.Rm.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:d,id:h,descriptions:[],type:e,doc:s,note:n,classes:[],styles:[],textStyles:[]});if(i){c.Rm.info("Setting state description",h,i);(Array.isArray(i)?i:[i]).forEach(t=>this.addDescription(h,t.trim()))}if(n){const t=this.currentDocument.states.get(h);if(!t)throw new Error(`State not found: ${h}`);t.note=n,t.note.text=a.Y2.sanitizeText(t.note.text,(0,a.D7)())}if(r){c.Rm.info("Setting state classes",h,r);(Array.isArray(r)?r:[r]).forEach(t=>this.setCssClass(h,t.trim()))}if(o){c.Rm.info("Setting state styles",h,o);(Array.isArray(o)?o:[o]).forEach(t=>this.setStyle(h,t.trim()))}if(l){c.Rm.info("Setting state styles",h,o);(Array.isArray(l)?l:[l]).forEach(t=>this.setTextStyle(h,t.trim()))}}clear(t){this.nodes=[],this.edges=[],this.documents={root:it()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=st(),t||(this.links=new Map,(0,a.IU)())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){c.Rm.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,s){this.links.set(t,{url:e,tooltip:s}),c.Rm.warn("Adding link",t,e,s)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===X?(this.startEndCount++,`${H}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=y){return t===X?H:e}endIdIfNeeded(t=""){return t===J?(this.startEndCount++,`${q}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=y){return t===J?q:e}addRelationObjs(t,e,s=""){const i=this.startIdIfNeeded(t.id.trim()),n=this.startTypeIfNeeded(t.id.trim(),t.type),r=this.startIdIfNeeded(e.id.trim()),o=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(r,o,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:a.Y2.sanitizeText(s,(0,a.D7)())})}addRelation(t,e,s){if("object"==typeof t&&"object"==typeof e)this.addRelationObjs(t,e,s);else if("string"==typeof t&&"string"==typeof e){const i=this.startIdIfNeeded(t.trim()),n=this.startTypeIfNeeded(t),r=this.endIdIfNeeded(e.trim()),o=this.endTypeIfNeeded(e);this.addState(i,n),this.addState(r,o),this.currentDocument.relations.push({id1:i,id2:r,relationTitle:s?a.Y2.sanitizeText(s,(0,a.D7)()):void 0})}}addDescription(t,e){const s=this.currentDocument.states.get(t),i=e.startsWith(":")?e.replace(":","").trim():e;s?.descriptions?.push(a.Y2.sanitizeText(i,(0,a.D7)()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const s=this.classes.get(t);e&&s&&e.split(et).forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(Z).exec(t)){const t=e.replace(Q,tt).replace(Z,Q);s.textStyles.push(t)}s.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(t=>{let s=this.getState(t);if(!s){const e=t.trim();this.addState(e),s=this.getState(e)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>"dir"===t.stmt)}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=(0,a.D7)();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:B(this.getRootDocV2())}}getConfig(){return(0,a.D7)().state}},ot=(0,c.K2)(t=>`\ndefs [id$="-barbEnd"] {\n fill: ${t.transitionColor};\n stroke: ${t.transitionColor};\n }\ng.stateGroup text {\n fill: ${t.nodeBorder};\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ${t.textColor};\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ${t.stateLabelColor};\n}\n\ng.stateGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.stateGroup line {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.transition {\n stroke: ${t.transitionColor};\n stroke-width: ${t.strokeWidth||1};\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ${t.background};\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n\n text {\n fill: ${t.noteTextColor};\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ${t.labelBackgroundColor};\n opacity: 0.5;\n}\n.edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n.edgeLabel .label text {\n fill: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n.label div .edgeLabel {\n color: ${t.transitionLabelColor||t.tertiaryTextColor};\n}\n\n.stateLabel text {\n fill: ${t.stateLabelColor};\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node .fork-join {\n fill: ${t.specialStateColor};\n stroke: ${t.specialStateColor};\n}\n\n.node circle.state-end {\n fill: ${t.innerEndBackground};\n stroke: ${t.background};\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ${t.compositeBackground||t.background};\n // stroke: ${t.background};\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ${t.stateBkg||t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n.node polygon {\n fill: ${t.mainBkg};\n stroke: ${t.stateBorder||t.nodeBorder};;\n stroke-width: ${t.strokeWidth||1}px;\n}\n[id$="-barbEnd"] {\n fill: ${t.lineColor};\n}\n\n.statediagram-cluster rect {\n fill: ${t.compositeTitleBackground};\n stroke: ${t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth||1}px;\n}\n\n.cluster-label, .nodeLabel {\n color: ${t.stateLabelColor};\n // line-height: 1;\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ${t.stateBorder||t.nodeBorder};\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ${t.compositeBackground||t.background};\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ${t.altBackground?t.altBackground:"#efefef"};\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ${t.noteBkgColor};\n stroke: ${t.noteBorderColor};\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ${t.noteTextColor};\n}\n\n.statediagram-note .nodeLabel {\n color: ${t.noteTextColor};\n}\n.statediagram .edgeLabel {\n color: red; // ${t.noteTextColor};\n}\n\n[id$="-dependencyStart"], [id$="-dependencyEnd"] {\n fill: ${t.lineColor};\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth||1};\n}\n\n.statediagramTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n[data-look="neo"].statediagram-cluster rect {\n fill: ${t.mainBkg};\n stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder};\n stroke-width: ${t.strokeWidth??1};\n}\n[data-look="neo"].statediagram-cluster rect.outer {\n rx: ${t.radius}px;\n ry: ${t.radius}px;\n filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"}\n}\n`,"getStyles")}}]); \ No newline at end of file diff --git a/assets/js/5149.dc032f86.js b/assets/js/5149.dc032f86.js deleted file mode 100644 index e452023..0000000 --- a/assets/js/5149.dc032f86.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5149],{5149(e,c,s){s.d(c,{createPacketServices:()=>a.$});var a=s(5626);s(808)}}]); \ No newline at end of file diff --git a/assets/js/5298.dfe74fea.js b/assets/js/5298.dfe74fea.js new file mode 100644 index 0000000..6b4016b --- /dev/null +++ b/assets/js/5298.dfe74fea.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5298],{2528:(e,t,a)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(8894).K2)(i,"populateCommonDb")},5298:(e,t,a)=>{a.d(t,{diagram:()=>C});var i=a(6417),l=a(2528),n=a(2101),r=a(5691),s=a(8894),o=a(4419),c=a(1485),p=r.UI.pie,d={sections:new Map,showData:!1,config:p},u=d.sections,h=d.showData,g=structuredClone(p),m=(0,s.K2)(()=>structuredClone(g),"getConfig"),f=(0,s.K2)(()=>{u=new Map,h=d.showData,(0,r.IU)()},"clear"),w=(0,s.K2)(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);u.has(e)||(u.set(e,t),s.Rm.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),x=(0,s.K2)(()=>u,"getSections"),S=(0,s.K2)(e=>{h=e},"setShowData"),$=(0,s.K2)(()=>h,"getShowData"),D={getConfig:m,clear:f,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:w,getSections:x,setShowData:S,getShowData:$},y=(0,s.K2)((e,t)=>{(0,l.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),T={parse:(0,s.K2)(async e=>{const t=await(0,o.qg)("pie",e);s.Rm.debug(t),y(t,D)},"parse")},b=(0,s.K2)(e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`,"getStyles"),v=(0,s.K2)(e=>{const t=[...e.values()].reduce((e,t)=>e+t,0),a=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return(0,c.rLf)().value(e=>e.value).sort(null)(a)},"createPieArcs"),C={parser:T,db:D,renderer:{draw:(0,s.K2)((e,t,a,l)=>{s.Rm.debug("rendering pie chart\n"+e);const o=l.db,p=(0,r.D7)(),d=(0,n.$t)(o.getConfig(),p.pie),u=18,h=450,g=h,m=(0,i.D)(t),f=m.append("g");f.attr("transform","translate(225,225)");const{themeVariables:w}=p;let[x]=(0,n.I5)(w.pieOuterStrokeWidth);x??=2;const S=d.textPosition,$=Math.min(g,h)/2-40,D=(0,c.JLW)().innerRadius(0).outerRadius($),y=(0,c.JLW)().innerRadius($*S).outerRadius($*S);f.append("circle").attr("cx",0).attr("cy",0).attr("r",$+x/2).attr("class","pieOuterCircle");const T=o.getSections(),b=v(T),C=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let k=0;T.forEach(e=>{k+=e});const A=b.filter(e=>"0"!==(e.data.value/k*100).toFixed(0)),K=(0,c.UMr)(C).domain([...T.keys()]);f.selectAll("mySlices").data(A).enter().append("path").attr("d",D).attr("fill",e=>K(e.data.label)).attr("class","pieCircle"),f.selectAll("mySlices").data(A).enter().append("text").text(e=>(e.data.value/k*100).toFixed(0)+"%").attr("transform",e=>"translate("+y.centroid(e)+")").style("text-anchor","middle").attr("class","slice");const R=f.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),M=[...T.entries()].map(([e,t])=>({label:e,value:t})),z=f.selectAll(".legend").data(M).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*M.length/2)+")");z.append("rect").attr("width",u).attr("height",u).style("fill",e=>K(e.label)).style("stroke",e=>K(e.label)),z.append("text").attr("x",22).attr("y",14).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const O=512+Math.max(...z.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0)),W=R.node()?.getBoundingClientRect().width??0,F=225-W/2,L=225+W/2,I=Math.min(0,F),_=Math.max(O,L)-I;m.attr("viewBox",`${I} 0 ${_} 450`),(0,r.a$)(m,h,_,d.useMaxWidth)},"draw")},styles:b}}}]); \ No newline at end of file diff --git a/assets/js/5319.33afc3dc.js b/assets/js/5319.33afc3dc.js new file mode 100644 index 0000000..146aeaa --- /dev/null +++ b/assets/js/5319.33afc3dc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5319],{5319:(t,e,a)=>{a.d(e,{diagram:()=>Nt});var n=a(8854),i=a(2101),s=a(5691),r=a(8894),l=a(1485),o=a(9627),h=function(){var t=(0,r.K2)(function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a},"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],s=[1,28],l=[1,63],o=[1,64],h=[1,65],d=[1,66],p=[1,67],u=[1,68],y=[1,69],g=[1,29],f=[1,30],b=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],S=[1,36],A=[1,37],C=[1,38],w=[1,39],k=[1,40],O=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],P=[1,47],B=[1,48],I=[1,50],M=[1,51],j=[1,52],K=[1,53],L=[1,54],Y=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],W=[1,60],Q=[14,42],$=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[1,82],q=[1,83],G=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],at=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],it={trace:(0,r.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,r.K2)(function(t,e,a,n,i,s,r){var l=s.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(s[l-3]);break;case 19:n.setTitle(s[l].substring(6)),this.$=s[l].substring(6);break;case 20:n.setAccDescription(s[l].substring(15)),this.$=s[l].substring(15);break;case 21:this.$=s[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=s[l].trim(),n.setAccDescription(this.$);break;case 28:s[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 29:s[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 30:n.addPersonOrSystemBoundary(...s[l]),this.$=s[l];break;case 31:s[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...s[l]),this.$=s[l];break;case 32:n.addDeploymentNode("node",...s[l]),this.$=s[l];break;case 33:n.addDeploymentNode("nodeL",...s[l]),this.$=s[l];break;case 34:n.addDeploymentNode("nodeR",...s[l]),this.$=s[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...s[l]),this.$=s[l];break;case 40:n.addPersonOrSystem("external_person",...s[l]),this.$=s[l];break;case 41:n.addPersonOrSystem("system",...s[l]),this.$=s[l];break;case 42:n.addPersonOrSystem("system_db",...s[l]),this.$=s[l];break;case 43:n.addPersonOrSystem("system_queue",...s[l]),this.$=s[l];break;case 44:n.addPersonOrSystem("external_system",...s[l]),this.$=s[l];break;case 45:n.addPersonOrSystem("external_system_db",...s[l]),this.$=s[l];break;case 46:n.addPersonOrSystem("external_system_queue",...s[l]),this.$=s[l];break;case 47:n.addContainer("container",...s[l]),this.$=s[l];break;case 48:n.addContainer("container_db",...s[l]),this.$=s[l];break;case 49:n.addContainer("container_queue",...s[l]),this.$=s[l];break;case 50:n.addContainer("external_container",...s[l]),this.$=s[l];break;case 51:n.addContainer("external_container_db",...s[l]),this.$=s[l];break;case 52:n.addContainer("external_container_queue",...s[l]),this.$=s[l];break;case 53:n.addComponent("component",...s[l]),this.$=s[l];break;case 54:n.addComponent("component_db",...s[l]),this.$=s[l];break;case 55:n.addComponent("component_queue",...s[l]),this.$=s[l];break;case 56:n.addComponent("external_component",...s[l]),this.$=s[l];break;case 57:n.addComponent("external_component_db",...s[l]),this.$=s[l];break;case 58:n.addComponent("external_component_queue",...s[l]),this.$=s[l];break;case 60:n.addRel("rel",...s[l]),this.$=s[l];break;case 61:n.addRel("birel",...s[l]),this.$=s[l];break;case 62:n.addRel("rel_u",...s[l]),this.$=s[l];break;case 63:n.addRel("rel_d",...s[l]),this.$=s[l];break;case 64:n.addRel("rel_l",...s[l]),this.$=s[l];break;case 65:n.addRel("rel_r",...s[l]),this.$=s[l];break;case 66:n.addRel("rel_b",...s[l]),this.$=s[l];break;case 67:s[l].splice(0,1),n.addRel("rel",...s[l]),this.$=s[l];break;case 68:n.updateElStyle("update_el_style",...s[l]),this.$=s[l];break;case 69:n.updateRelStyle("update_rel_style",...s[l]),this.$=s[l];break;case 70:n.updateLayoutConfig("update_layout_config",...s[l]),this.$=s[l];break;case 71:this.$=[s[l]];break;case 72:s[l].unshift(s[l-1]),this.$=s[l];break;case 73:case 75:this.$=s[l].trim();break;case 74:let t={};t[s[l-1].trim()]=s[l].trim(),this.$=t;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:s,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{14:[1,74]},t(Q,[2,13],{43:23,29:49,30:61,32:62,20:75,34:l,36:o,37:h,38:d,39:p,40:u,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(Q,[2,14]),t($,[2,16],{12:[1,76]}),t(Q,[2,36],{12:[1,77]}),t(H,[2,19]),t(H,[2,20]),{25:[1,78]},{27:[1,79]},t(H,[2,23]),{35:80,75:81,76:V,77:q,79:G,80:J},{35:86,75:81,76:V,77:q,79:G,80:J},{35:87,75:81,76:V,77:q,79:G,80:J},{35:88,75:81,76:V,77:q,79:G,80:J},{35:89,75:81,76:V,77:q,79:G,80:J},{35:90,75:81,76:V,77:q,79:G,80:J},{35:91,75:81,76:V,77:q,79:G,80:J},{35:92,75:81,76:V,77:q,79:G,80:J},{35:93,75:81,76:V,77:q,79:G,80:J},{35:94,75:81,76:V,77:q,79:G,80:J},{35:95,75:81,76:V,77:q,79:G,80:J},{35:96,75:81,76:V,77:q,79:G,80:J},{35:97,75:81,76:V,77:q,79:G,80:J},{35:98,75:81,76:V,77:q,79:G,80:J},{35:99,75:81,76:V,77:q,79:G,80:J},{35:100,75:81,76:V,77:q,79:G,80:J},{35:101,75:81,76:V,77:q,79:G,80:J},{35:102,75:81,76:V,77:q,79:G,80:J},{35:103,75:81,76:V,77:q,79:G,80:J},{35:104,75:81,76:V,77:q,79:G,80:J},t(Z,[2,59]),{35:105,75:81,76:V,77:q,79:G,80:J},{35:106,75:81,76:V,77:q,79:G,80:J},{35:107,75:81,76:V,77:q,79:G,80:J},{35:108,75:81,76:V,77:q,79:G,80:J},{35:109,75:81,76:V,77:q,79:G,80:J},{35:110,75:81,76:V,77:q,79:G,80:J},{35:111,75:81,76:V,77:q,79:G,80:J},{35:112,75:81,76:V,77:q,79:G,80:J},{35:113,75:81,76:V,77:q,79:G,80:J},{35:114,75:81,76:V,77:q,79:G,80:J},{35:115,75:81,76:V,77:q,79:G,80:J},{20:116,29:49,30:61,32:62,34:l,36:o,37:h,38:d,39:p,40:u,41:y,43:23,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W},{12:[1,118],33:[1,117]},{35:119,75:81,76:V,77:q,79:G,80:J},{35:120,75:81,76:V,77:q,79:G,80:J},{35:121,75:81,76:V,77:q,79:G,80:J},{35:122,75:81,76:V,77:q,79:G,80:J},{35:123,75:81,76:V,77:q,79:G,80:J},{35:124,75:81,76:V,77:q,79:G,80:J},{35:125,75:81,76:V,77:q,79:G,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Q,[2,15]),t($,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:s}),t(Q,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:s,34:l,36:o,37:h,38:d,39:p,40:u,41:y,44:g,45:f,46:b,47:x,48:_,49:m,50:E,51:S,52:A,53:C,54:w,55:k,56:O,57:T,58:v,59:R,60:D,61:N,62:P,63:B,64:I,65:M,66:j,67:K,68:L,69:Y,70:U,71:F,72:X,73:z,74:W}),t(H,[2,21]),t(H,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:V,77:q,79:G,80:J}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(at,[2,28]),t(at,[2,29]),t(at,[2,30]),t(at,[2,31]),t(at,[2,32]),t(at,[2,33]),t(at,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t($,[2,18]),t(Q,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,r.K2)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,r.K2)(function(t){var e=this,a=[0],n=[],i=[null],s=[],l=this.table,o="",c=0,h=0,d=0,p=s.slice.call(arguments,1),u=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);u.setInput(t,y.yy),y.yy.lexer=u,y.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;s.push(f);var b=u.options&&u.options.ranges;function x(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)(function(t){a.length=a.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,r.K2)(x,"lex");for(var _,m,E,S,A,C,w,k,O,T={};;){if(E=a[a.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=x()),S=l[E]&&l[E][_]),void 0===S||!S.length||!S[0]){var v="";for(C in O=[],l[E])this.terminals_[C]&&C>2&&O.push("'"+this.terminals_[C]+"'");v=u.showPosition?"Parse error on line "+(c+1)+":\n"+u.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:f,expected:O})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:a.push(_),i.push(u.yytext),s.push(u.yylloc),a.push(S[1]),_=null,m?(_=m,m=null):(h=u.yyleng,o=u.yytext,c=u.yylineno,f=u.yylloc,d>0&&d--);break;case 2:if(w=this.productions_[S[1]][1],T.$=i[i.length-w],T._$={first_line:s[s.length-(w||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(w||1)].first_column,last_column:s[s.length-1].last_column},b&&(T._$.range=[s[s.length-(w||1)].range[0],s[s.length-1].range[1]]),void 0!==(A=this.performAction.apply(T,[o,h,c,y.yy,S[1],i,s].concat(p))))return A;w&&(a=a.slice(0,-1*w*2),i=i.slice(0,-1*w),s=s.slice(0,-1*w)),a.push(this.productions_[S[1]][0]),i.push(T.$),s.push(T._$),k=l[a[a.length-2]][a[a.length-1]],a.push(k);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:(0,r.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K2)(function(){return this._more=!0,this},"more"),reject:(0,r.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K2)(function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},"test_match"),next:(0,r.K2)(function(){if(this.done)return this.EOF;var t,e,a,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;se[0].length)){if(e=a,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,r.K2)(function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}}();function rt(){this.yy={}}return it.lexer=st,(0,r.K2)(rt,"Parser"),rt.prototype=it,it.Parser=rt,new rt}();h.parser=h;var d,p=h,u=[],y=[""],g="global",f="",b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],x=[],_="",m=!1,E=4,S=2,A=(0,r.K2)(function(){return d},"getC4Type"),C=(0,r.K2)(function(t){let e=(0,s.jZ)(t,(0,s.D7)());d=e},"setC4Type"),w=(0,r.K2)(function(t,e,a,n,i,s,r,l,o){if(null==t||null==e||null==a||null==n)return;let c={};const h=x.find(t=>t.from===e&&t.to===a);if(h?c=h:x.push(c),c.type=t,c.from=e,c.to=a,c.label={text:n},null==i)c.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];c[t]={text:e}}else c.techn={text:i};if(null==s)c.descr={text:""};else if("object"==typeof s){let[t,e]=Object.entries(s)[0];c[t]={text:e}}else c.descr={text:s};if("object"==typeof r){let[t,e]=Object.entries(r)[0];c[t]=e}else c.sprite=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];c[t]=e}else c.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];c[t]=e}else c.link=o;c.wrap=H()},"addRel"),k=(0,r.K2)(function(t,e,a,n,i,s,r){if(null===e||null===a)return;let l={};const o=u.find(t=>t.alias===e);if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),l.label=null==a?{text:""}:{text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.tags=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.link=r;l.typeC4Shape={text:t},l.parentBoundary=g,l.wrap=H()},"addPersonOrSystem"),O=(0,r.K2)(function(t,e,a,n,i,s,r,l){if(null===e||null===a)return;let o={};const c=u.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=H(),o.typeC4Shape={text:t},o.parentBoundary=g},"addContainer"),T=(0,r.K2)(function(t,e,a,n,i,s,r,l){if(null===e||null===a)return;let o={};const c=u.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,u.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.sprite=s;if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=H(),o.typeC4Shape={text:t},o.parentBoundary=g},"addComponent"),v=(0,r.K2)(function(t,e,a,n,i){if(null===t||null===e)return;let s={};const r=b.find(e=>e.alias===t);if(r&&t===r.alias?s=r:(s.alias=t,b.push(s)),s.label=null==e?{text:""}:{text:e},null==a)s.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]={text:e}}else s.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]=e}else s.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=g,s.wrap=H(),f=g,g=t,y.push(f)},"addPersonOrSystemBoundary"),R=(0,r.K2)(function(t,e,a,n,i){if(null===t||null===e)return;let s={};const r=b.find(e=>e.alias===t);if(r&&t===r.alias?s=r:(s.alias=t,b.push(s)),s.label=null==e?{text:""}:{text:e},null==a)s.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];s[t]={text:e}}else s.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];s[t]=e}else s.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];s[t]=e}else s.link=i;s.parentBoundary=g,s.wrap=H(),f=g,g=t,y.push(f)},"addContainerBoundary"),D=(0,r.K2)(function(t,e,a,n,i,s,r,l){if(null===e||null===a)return;let o={};const c=b.find(t=>t.alias===e);if(c&&e===c.alias?o=c:(o.alias=e,b.push(o)),o.label=null==a?{text:""}:{text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.tags=r;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=g,o.wrap=H(),f=g,g=e,y.push(f)},"addDeploymentNode"),N=(0,r.K2)(function(){g=f,y.pop(),f=y.pop(),y.push(f)},"popBoundaryParseStack"),P=(0,r.K2)(function(t,e,a,n,i,s,r,l,o,c,h){let d=u.find(t=>t.alias===e);if(void 0!==d||(d=b.find(t=>t.alias===e),void 0!==d)){if(null!=a)if("object"==typeof a){let[t,e]=Object.entries(a)[0];d[t]=e}else d.bgColor=a;if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];d[t]=e}else d.fontColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];d[t]=e}else d.borderColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];d[t]=e}else d.shadowing=s;if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];d[t]=e}else d.shape=r;if(null!=l)if("object"==typeof l){let[t,e]=Object.entries(l)[0];d[t]=e}else d.sprite=l;if(null!=o)if("object"==typeof o){let[t,e]=Object.entries(o)[0];d[t]=e}else d.techn=o;if(null!=c)if("object"==typeof c){let[t,e]=Object.entries(c)[0];d[t]=e}else d.legendText=c;if(null!=h)if("object"==typeof h){let[t,e]=Object.entries(h)[0];d[t]=e}else d.legendSprite=h}},"updateElStyle"),B=(0,r.K2)(function(t,e,a,n,i,s,r){const l=x.find(t=>t.from===e&&t.to===a);if(void 0!==l){if(null!=n)if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n;if(null!=i)if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i;if(null!=s)if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(s);if(null!=r)if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(r)}},"updateRelStyle"),I=(0,r.K2)(function(t,e,a){let n=E,i=S;if("object"==typeof e){const t=Object.values(e)[0];n=parseInt(t)}else n=parseInt(e);if("object"==typeof a){const t=Object.values(a)[0];i=parseInt(t)}else i=parseInt(a);n>=1&&(E=n),i>=1&&(S=i)},"updateLayoutConfig"),M=(0,r.K2)(function(){return E},"getC4ShapeInRow"),j=(0,r.K2)(function(){return S},"getC4BoundaryInRow"),K=(0,r.K2)(function(){return g},"getCurrentBoundaryParse"),L=(0,r.K2)(function(){return f},"getParentBoundaryParse"),Y=(0,r.K2)(function(t){return null==t?u:u.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),U=(0,r.K2)(function(t){return u.find(e=>e.alias===t)},"getC4Shape"),F=(0,r.K2)(function(t){return Object.keys(Y(t))},"getC4ShapeKeys"),X=(0,r.K2)(function(t){return null==t?b:b.filter(e=>e.parentBoundary===t)},"getBoundaries"),z=X,W=(0,r.K2)(function(){return x},"getRels"),Q=(0,r.K2)(function(){return _},"getTitle"),$=(0,r.K2)(function(t){m=t},"setWrap"),H=(0,r.K2)(function(){return m},"autoWrap"),V=(0,r.K2)(function(){u=[],b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f="",g="global",y=[""],x=[],y=[""],_="",m=!1,E=4,S=2},"clear"),q=(0,r.K2)(function(t){let e=(0,s.jZ)(t,(0,s.D7)());_=e},"setTitle"),G={addPersonOrSystem:k,addPersonOrSystemBoundary:v,addContainer:O,addContainerBoundary:R,addComponent:T,addDeploymentNode:D,popBoundaryParseStack:N,addRel:w,updateElStyle:P,updateRelStyle:B,updateLayoutConfig:I,autoWrap:H,setWrap:$,getC4ShapeArray:Y,getC4Shape:U,getC4ShapeKeys:F,getBoundaries:X,getBoundarys:z,getCurrentBoundaryParse:K,getParentBoundaryParse:L,getRels:W,getTitle:Q,getC4Type:A,getC4ShapeInRow:M,getC4BoundaryInRow:j,setAccTitle:s.SV,getAccTitle:s.iN,getAccDescription:s.m7,setAccDescription:s.EI,getConfig:(0,r.K2)(()=>(0,s.D7)().c4,"getConfig"),clear:V,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:q,setC4Type:C},J=(0,r.K2)(function(t,e){return(0,n.tk)(t,e)},"drawRect"),Z=(0,r.K2)(function(t,e,a,n,i,s){const r=t.append("image");r.attr("width",e),r.attr("height",a),r.attr("x",n),r.attr("y",i);let l=s.startsWith("data:image/png;base64")?s:(0,o.J)(s);r.attr("xlink:href",l)},"drawImage"),tt=(0,r.K2)((t,e,a,n)=>{const i=t.append("g");let s=0;for(let r of e){let t=r.textColor?r.textColor:"#444444",e=r.lineColor?r.lineColor:"#444444",l=r.offsetX?parseInt(r.offsetX):0,o=r.offsetY?parseInt(r.offsetY):0,c="";if(0===s){let t=i.append("line");t.attr("x1",r.startPoint.x),t.attr("y1",r.startPoint.y),t.attr("x2",r.endPoint.x),t.attr("y2",r.endPoint.y),t.attr("stroke-width","1"),t.attr("stroke",e),t.style("fill","none"),"rel_b"!==r.type&&t.attr("marker-end","url("+c+"#"+n+"-arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+c+"#"+n+"-arrowend)"),s=-1}else{let t=i.append("path");t.attr("fill","none").attr("stroke-width","1").attr("stroke",e).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",r.startPoint.x).replaceAll("starty",r.startPoint.y).replaceAll("controlx",r.startPoint.x+(r.endPoint.x-r.startPoint.x)/2-(r.endPoint.x-r.startPoint.x)/4).replaceAll("controly",r.startPoint.y+(r.endPoint.y-r.startPoint.y)/2).replaceAll("stopx",r.endPoint.x).replaceAll("stopy",r.endPoint.y)),"rel_b"!==r.type&&t.attr("marker-end","url("+c+"#"+n+"-arrowhead)"),"birel"!==r.type&&"rel_b"!==r.type||t.attr("marker-start","url("+c+"#"+n+"-arrowend)")}let h=a.messageFont();dt(a)(r.label.text,i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+l,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+o,r.label.width,r.label.height,{fill:t},h),r.techn&&""!==r.techn.text&&(h=a.messageFont(),dt(a)("["+r.techn.text+"]",i,Math.min(r.startPoint.x,r.endPoint.x)+Math.abs(r.endPoint.x-r.startPoint.x)/2+l,Math.min(r.startPoint.y,r.endPoint.y)+Math.abs(r.endPoint.y-r.startPoint.y)/2+a.messageFontSize+5+o,Math.max(r.label.width,r.techn.width),r.techn.height,{fill:t,"font-style":"italic"},h))}},"drawRels"),et=(0,r.K2)(function(t,e,a){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",r=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1});let o={x:e.x,y:e.y,fill:i,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l};J(n,o);let c=a.boundaryFont();c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=r,dt(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},c),e.type&&""!==e.type.text&&(c=a.boundaryFont(),c.fontColor=r,dt(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},c)),e.descr&&""!==e.descr.text&&(c=a.boundaryFont(),c.fontSize=c.fontSize-2,c.fontColor=r,dt(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},c))},"drawBoundary"),at=(0,r.K2)(function(t,e,a){let i=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],s=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],r=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}const o=t.append("g");o.attr("class","person-man");const c=(0,n.PB)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":c.x=e.x,c.y=e.y,c.fill=i,c.width=e.width,c.height=e.height,c.stroke=s,c.rx=2.5,c.ry=2.5,c.attrs={"stroke-width":.5},J(o,c);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",s).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let h=ht(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",r).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Z(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let d=a[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=r,dt(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:r},d),d=a[e.typeC4Shape.text+"Font"](),d.fontColor=r,e.techn&&""!==e.techn?.text?dt(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:r,"font-style":"italic"},d):e.type&&""!==e.type.text&&dt(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:r,"font-style":"italic"},d),e.descr&&""!==e.descr.text&&(d=a.personFont(),d.fontColor=r,dt(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:r},d)),e.height},"drawC4Shape"),nt=(0,r.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),it=(0,r.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),st=(0,r.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),rt=(0,r.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),lt=(0,r.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),ot=(0,r.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ct=(0,r.K2)(function(t,e){const a=t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);a.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),a.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),ht=(0,r.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),dt=function(){function t(t,e,a,i,s,r,l){n(e.append("text").attr("x",a+s/2).attr("y",i+r/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,r,l,o,c){const{fontSize:h,fontFamily:d,fontWeight:p}=c,u=t.split(s.Y2.lineBreakRegex);for(let s=0;s=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>gt)&&(e=this.nextData.startx+t.margin+bt.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},_t(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},_t=(0,r.K2)(function(t){(0,s.hH)(bt,t),t.fontFamily&&(bt.personFontFamily=bt.systemFontFamily=bt.messageFontFamily=t.fontFamily),t.fontSize&&(bt.personFontSize=bt.systemFontSize=bt.messageFontSize=t.fontSize),t.fontWeight&&(bt.personFontWeight=bt.systemFontWeight=bt.messageFontWeight=t.fontWeight)},"setConf"),mt=(0,r.K2)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),Et=(0,r.K2)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),St=(0,r.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function At(t,e,a,n,r){if(!e[t].width)if(a)e[t].text=(0,i.bH)(e[t].text,r,n),e[t].textLines=e[t].text.split(s.Y2.lineBreakRegex).length,e[t].width=r,e[t].height=(0,i.ru)(e[t].text,n);else{let a=e[t].text.split(s.Y2.lineBreakRegex);e[t].textLines=a.length;let r=0;e[t].height=0,e[t].width=0;for(const s of a)e[t].width=Math.max((0,i.Un)(s,n),e[t].width),r=(0,i.ru)(s,n),e[t].height=e[t].height+r}}(0,r.K2)(At,"calcC4ShapeTextWH");var Ct=(0,r.K2)(function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=bt.c4ShapeMargin-35;let n=e.wrap&&bt.wrap,s=Et(bt);s.fontSize=s.fontSize+2,s.fontWeight="bold",At("label",e,n,s,(0,i.Un)(e.label.text,s)),pt.drawBoundary(t,e,bt)},"drawBoundary"),wt=(0,r.K2)(function(t,e,a,n){let s=0;for(const r of n){s=0;const n=a[r];let l=mt(bt,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,i.Un)("\xab"+n.typeC4Shape.text+"\xbb",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=bt.c4ShapePadding,s=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=s,s=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=s,s=n.image.Y+n.image.height);let o=n.wrap&&bt.wrap,c=bt.width-2*bt.c4ShapePadding,h=mt(bt,n.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",At("label",n,o,h,c),n.label.Y=s+8,s=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]",At("type",n,o,mt(bt,n.typeC4Shape.text),c),n.type.Y=s+5,s=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]",At("techn",n,o,mt(bt,n.techn.text),c),n.techn.Y=s+5,s=n.techn.Y+n.techn.height}let d=s,p=n.label.width;if(n.descr&&""!==n.descr.text){At("descr",n,o,mt(bt,n.typeC4Shape.text),c),n.descr.Y=s+20,s=n.descr.Y+n.descr.height,p=Math.max(n.label.width,n.descr.width),d=s-5*n.descr.textLines}p+=bt.c4ShapePadding,n.width=Math.max(n.width||bt.width,p,bt.width),n.height=Math.max(n.height||bt.height,d,bt.height),n.margin=n.margin||bt.c4ShapeMargin,t.insert(n),pt.drawC4Shape(e,n,bt)}t.bumpLastMargin(bt.c4ShapeMargin)},"drawC4ShapeArray"),kt=class{static{(0,r.K2)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},Ot=(0,r.K2)(function(t,e){let a=t.x,n=t.y,i=e.x,s=e.y,r=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),c=Math.abs(n-s),h=c/o,d=t.height/t.width,p=null;return n==s&&ai?p=new kt(a,l):a==i&&ns&&(p=new kt(r,n)),a>i&&n=h?new kt(a,l+h*t.width/2):new kt(r-o/c*t.height/2,n+t.height):a=h?new kt(a+t.width,l+h*t.width/2):new kt(r+o/c*t.height/2,n+t.height):as?p=d>=h?new kt(a+t.width,l-h*t.width/2):new kt(r+t.height/2*o/c,n):a>i&&n>s&&(p=d>=h?new kt(a,l-t.width/2*h):new kt(r-t.height/2*o/c,n)),p},"getIntersectPoint"),Tt=(0,r.K2)(function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=Ot(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:Ot(e,a)}},"getIntersectPoints"),vt=(0,r.K2)(function(t,e,a,n,s){let r=0;for(let l of e){r+=1;let t=l.wrap&&bt.wrap,e=St(bt);"C4Dynamic"===n.db.getC4Type()&&(l.label.text=r+": "+l.label.text);let s=(0,i.Un)(l.label.text,e);At("label",l,t,e,s),l.techn&&""!==l.techn.text&&(s=(0,i.Un)(l.techn.text,e),At("techn",l,t,e,s)),l.descr&&""!==l.descr.text&&(s=(0,i.Un)(l.descr.text,e),At("descr",l,t,e,s));let o=a(l.from),c=a(l.to),h=Tt(o,c);l.startPoint=h.startPoint,l.endPoint=h.endPoint}pt.drawRels(t,e,bt,s)},"drawRels");function Rt(t,e,a,n,i){let s=new xt(i);s.data.widthLimit=a.data.widthLimit/Math.min(ft,n.length);for(let[r,l]of n.entries()){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&bt.wrap,c=Et(bt);if(c.fontSize=c.fontSize+2,c.fontWeight="bold",At("label",l,o,c,s.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text){l.type.text="["+l.type.text+"]",At("type",l,o,Et(bt),s.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height}if(l.descr&&""!==l.descr.text){let t=Et(bt);t.fontSize=t.fontSize-2,At("descr",l,o,t,s.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==r||r%ft===0){let t=a.data.startx+bt.diagramMarginX,e=a.data.stopy+bt.diagramMarginY+n;s.setData(t,t,e,e)}else{let t=s.data.stopx!==s.data.startx?s.data.stopx+bt.diagramMarginX:s.data.startx,e=s.data.starty;s.setData(t,t,e,e)}s.name=l.alias;let h=i.db.getC4ShapeArray(l.alias),d=i.db.getC4ShapeKeys(l.alias);d.length>0&&wt(s,t,h,d),e=l.alias;let p=i.db.getBoundaries(e);p.length>0&&Rt(t,e,s,p,i),"global"!==l.alias&&Ct(t,l,s),a.data.stopy=Math.max(s.data.stopy+bt.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(s.data.stopx+bt.c4ShapeMargin,a.data.stopx),ut=Math.max(ut,a.data.stopx),yt=Math.max(yt,a.data.stopy)}}(0,r.K2)(Rt,"drawInsideBoundary");var Dt={drawPersonOrSystemArray:wt,drawBoundary:Ct,setConf:_t,draw:(0,r.K2)(function(t,e,a,n){bt=(0,s.D7)().c4;const i=(0,s.D7)().securityLevel;let o;"sandbox"===i&&(o=(0,l.Ltv)("#i"+e));const c="sandbox"===i?(0,l.Ltv)(o.nodes()[0].contentDocument.body):(0,l.Ltv)("body");let h=n.db;n.db.setWrap(bt.wrap),gt=h.getC4ShapeInRow(),ft=h.getC4BoundaryInRow(),r.Rm.debug(`C:${JSON.stringify(bt,null,2)}`);const d="sandbox"===i?c.select(`[id="${e}"]`):(0,l.Ltv)(`[id="${e}"]`);pt.insertComputerIcon(d,e),pt.insertDatabaseIcon(d,e),pt.insertClockIcon(d,e);let p=new xt(n);p.setData(bt.diagramMarginX,bt.diagramMarginX,bt.diagramMarginY,bt.diagramMarginY),p.data.widthLimit=screen.availWidth,ut=bt.diagramMarginX,yt=bt.diagramMarginY;const u=n.db.getTitle();Rt(d,"",p,n.db.getBoundaries(""),n),pt.insertArrowHead(d,e),pt.insertArrowEnd(d,e),pt.insertArrowCrossHead(d,e),pt.insertArrowFilledHead(d,e),vt(d,n.db.getRels(),n.db.getC4Shape,n,e),p.data.stopx=ut,p.data.stopy=yt;const y=p.data;let g=y.stopy-y.starty+2*bt.diagramMarginY;const f=y.stopx-y.startx+2*bt.diagramMarginX;u&&d.append("text").text(u).attr("x",(y.stopx-y.startx)/2-4*bt.diagramMarginX).attr("y",y.starty+bt.diagramMarginY),(0,s.a$)(d,g,f,bt.useMaxWidth);const b=u?60:0;d.attr("viewBox",y.startx-bt.diagramMarginX+" -"+(bt.diagramMarginY+b)+" "+f+" "+(g+b)),r.Rm.debug("models:",y)},"draw")},Nt={parser:p,db:G,renderer:Dt,styles:(0,r.K2)(t=>`.person {\n stroke: ${t.personBorder};\n fill: ${t.personBkg};\n }\n`,"getStyles"),init:(0,r.K2)(({c4:t,wrap:e})=>{Dt.setConf(t),G.setWrap(e)},"init")}},8854:(t,e,a)=>{a.d(e,{CP:()=>d,Ck:()=>y,HT:()=>u,PB:()=>p,aC:()=>h,lC:()=>o,m:()=>c,tk:()=>l});var n=a(5691),i=a(8894),s=a(9627),r=a(1485),l=(0,i.K2)((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const n in e.attrs)a.attr(n,e.attrs[n]);return e.class&&a.attr("class",e.class),a},"drawRect"),o=(0,i.K2)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};l(t,a).lower()},"drawBackgroundRect"),c=(0,i.K2)((t,e)=>{const a=e.text.replace(n.H1," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);const s=i.append("tspan");return s.attr("x",e.x+2*e.textMargin),s.text(a),i},"drawText"),h=(0,i.K2)((t,e,a,n)=>{const i=t.append("image");i.attr("x",e),i.attr("y",a);const r=(0,s.J)(n);i.attr("xlink:href",r)},"drawImage"),d=(0,i.K2)((t,e,a,n)=>{const i=t.append("use");i.attr("x",e),i.attr("y",a);const r=(0,s.J)(n);i.attr("xlink:href",`#${r}`)},"drawEmbeddedImage"),p=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),u=(0,i.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),y=(0,i.K2)(()=>{let t=(0,r.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,r.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")}}]); \ No newline at end of file diff --git a/assets/js/539fb2af.ab94867b.js b/assets/js/539fb2af.ab94867b.js deleted file mode 100644 index a47c4d9..0000000 --- a/assets/js/539fb2af.ab94867b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5563],{8289(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend.","source":"@site/docs/getting-started/dashboard.md","sourceDirName":"getting-started","slug":"/getting-started/dashboard","permalink":"/getting-started/dashboard","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/getting-started/configuration"},"next":{"title":"Statusphere","permalink":"/tutorials/statusphere"}}');var s=i(4848),t=i(8453);const o={},d="Dashboard",a={},c=[{value:"Logging in for the first time",id:"logging-in-for-the-first-time",level:2},{value:"Adding a lexicon",id:"adding-a-lexicon",level:2},{value:"JSON editor",id:"json-editor",level:3},{value:"Lua editor",id:"lua-editor",level:3}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dashboard",children:"Dashboard"})}),"\n",(0,s.jsxs)(n.p,{children:["HappyView ships with a web dashboard that provides a visual interface for everything the ",(0,s.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend."]}),"\n",(0,s.jsx)(n.h2,{id:"logging-in-for-the-first-time",children:"Logging in for the first time"}),"\n",(0,s.jsx)(n.p,{children:"The dashboard uses AT Protocol OAuth via AIP. If no admins exist in the database yet, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."}),"\n",(0,s.jsx)(n.h2,{id:"adding-a-lexicon",children:"Adding a lexicon"}),"\n",(0,s.jsxs)(n.p,{children:["Navigate to ",(0,s.jsx)(n.strong,{children:"Lexicons > Add Lexicon"})," and choose ",(0,s.jsx)(n.strong,{children:"Local"})," or ",(0,s.jsx)(n.strong,{children:"Network"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Local"})," lexicons are defined by you. The editor shows two side-by-side panels (stacked on mobile):"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lexicon JSON"})," (left): define your lexicon schema"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lua Script"})," (right): write the handler for query/procedure types"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The Lua panel only appears when the lexicon's ",(0,s.jsx)(n.code,{children:"defs.main.type"})," is ",(0,s.jsx)(n.code,{children:"query"})," or ",(0,s.jsx)(n.code,{children:"procedure"}),". For record-type lexicons, only the JSON panel is shown."]}),"\n",(0,s.jsx)(n.p,{children:"A default Lua script is auto-generated when you first set the type to query or procedure. The template updates automatically when the type changes, but once you manually edit the script your changes are preserved."}),"\n",(0,s.jsxs)(n.p,{children:["Toggle ",(0,s.jsx)(n.strong,{children:"Enable backfill"})," to index historical records when uploading a record-type lexicon."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Network"})," lexicons are fetched from the AT Protocol network. Enter an NSID (e.g. ",(0,s.jsx)(n.code,{children:"xyz.statusphere.status"}),") and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click ",(0,s.jsx)(n.strong,{children:"Add"})," to track it. Network lexicons are kept up to date via Tap. See ",(0,s.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for how resolution works."]}),"\n",(0,s.jsx)(n.h3,{id:"json-editor",children:"JSON editor"}),"\n",(0,s.jsx)(n.p,{children:"The JSON editor provides real-time validation against the AT Protocol Lexicon v1 schema:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Validation for Lexicon format"}),"\n",(0,s.jsxs)(n.li,{children:["Auto-complete for definition types (",(0,s.jsx)(n.code,{children:"record"}),", ",(0,s.jsx)(n.code,{children:"query"}),", ",(0,s.jsx)(n.code,{children:"procedure"}),", ",(0,s.jsx)(n.code,{children:"subscription"}),"), property types (",(0,s.jsx)(n.code,{children:"string"}),", ",(0,s.jsx)(n.code,{children:"integer"}),", ",(0,s.jsx)(n.code,{children:"boolean"}),", ",(0,s.jsx)(n.code,{children:"ref"}),", ",(0,s.jsx)(n.code,{children:"union"}),", ",(0,s.jsx)(n.code,{children:"blob"}),", ",(0,s.jsx)(n.code,{children:"cid-link"}),", etc.), and schema structure (",(0,s.jsx)(n.code,{children:"defs"}),", ",(0,s.jsx)(n.code,{children:"main"}),", ",(0,s.jsx)(n.code,{children:"properties"}),", ",(0,s.jsx)(n.code,{children:"required"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Enforces the required top-level shape: ",(0,s.jsx)(n.code,{children:"lexicon"}),", ",(0,s.jsx)(n.code,{children:"id"}),", and ",(0,s.jsx)(n.code,{children:"defs.main"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"lua-editor",children:"Lua editor"}),"\n",(0,s.jsxs)(n.p,{children:["The Lua editor provides context-aware code completions, including suggestions for the ",(0,s.jsx)(n.code,{children:"Record"}),", ",(0,s.jsx)(n.code,{children:"db"}),", ",(0,s.jsx)(n.code,{children:"input"}),", and ",(0,s.jsx)(n.code,{children:"params"})," APIs as well as Lua keywords, builtins, and standard library functions. It also offers snippet templates for common constructs like ",(0,s.jsx)(n.code,{children:"if"}),", ",(0,s.jsx)(n.code,{children:"for"}),", and ",(0,s.jsx)(n.code,{children:"function"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"})," for the full runtime reference and examples."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>d});var r=i(6540);const s={},t=r.createContext(s);function o(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/539fb2af.bdd86b5a.js b/assets/js/539fb2af.bdd86b5a.js new file mode 100644 index 0000000..12af147 --- /dev/null +++ b/assets/js/539fb2af.bdd86b5a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5563],{7629:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers. It runs as a separate Next.js application alongside the Rust backend and authenticates via atproto OAuth.","source":"@site/docs/getting-started/dashboard.md","sourceDirName":"getting-started","slug":"/getting-started/dashboard","permalink":"/getting-started/dashboard","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Authentication","permalink":"/getting-started/authentication"},"next":{"title":"Statusphere","permalink":"/tutorials/statusphere"}}');var r=n(199),t=n(2560);const a={},o="Dashboard",d={},l=[{value:"Lexicons",id:"lexicons",level:2},{value:"Adding a lexicon",id:"adding-a-lexicon",level:3},{value:"JSON editor",id:"json-editor",level:3},{value:"Lua editor",id:"lua-editor",level:3},{value:"Records",id:"records",level:2},{value:"Backfill",id:"backfill",level:2},{value:"Users",id:"users",level:2},{value:"Events",id:"events",level:2},{value:"Settings",id:"settings",level:2},{value:"General",id:"general",level:3},{value:"API Clients",id:"api-clients",level:3},{value:"API Keys",id:"api-keys",level:3},{value:"Users",id:"users-1",level:3},{value:"Plugins",id:"plugins",level:3},{value:"Labelers",id:"labelers",level:3},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Accounts",id:"accounts",level:3},{value:"Next steps",id:"next-steps",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"dashboard",children:"Dashboard"})}),"\n",(0,r.jsxs)(s.p,{children:["HappyView ships with a web dashboard that provides a visual interface for everything the ",(0,r.jsx)(s.a,{href:"/reference/admin-api",children:"admin API"})," offers. It runs as a separate Next.js application alongside the Rust backend and authenticates via atproto OAuth."]}),"\n",(0,r.jsx)(s.p,{children:"On a fresh deployment with no users in the database, the first person to log in to the dashboard is automatically bootstrapped as the super user with all permissions \u2014 so log in with the handle you want to own the instance first."}),"\n",(0,r.jsx)(s.h2,{id:"lexicons",children:"Lexicons"}),"\n",(0,r.jsxs)(s.p,{children:["Navigate to ",(0,r.jsx)(s.strong,{children:"Lexicons"})," to see all uploaded lexicons. Each entry shows the NSID, type (record, query, procedure), and whether a Lua script is attached."]}),"\n",(0,r.jsx)(s.h3,{id:"adding-a-lexicon",children:"Adding a lexicon"}),"\n",(0,r.jsxs)(s.p,{children:["Click ",(0,r.jsx)(s.strong,{children:"Add Lexicon"})," and choose ",(0,r.jsx)(s.strong,{children:"Local"})," or ",(0,r.jsx)(s.strong,{children:"Network"}),"."]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Local"})," lexicons are defined by you. The editor shows two side-by-side panels (stacked on mobile):"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Lexicon JSON"})," (left): define your lexicon schema"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Lua Script"})," (right): write the handler for query/procedure types"]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["The Lua panel only appears when the lexicon's ",(0,r.jsx)(s.code,{children:"defs.main.type"})," is ",(0,r.jsx)(s.code,{children:"query"})," or ",(0,r.jsx)(s.code,{children:"procedure"}),". For record-type lexicons, only the JSON panel is shown."]}),"\n",(0,r.jsx)(s.p,{children:"HappyView generates a default Lua script when you first set the type to query or procedure. The template updates when the type changes, but once you edit the script your changes are preserved."}),"\n",(0,r.jsxs)(s.p,{children:["Toggle ",(0,r.jsx)(s.strong,{children:"Enable backfill"})," to index historical records when uploading a record-type lexicon."]}),"\n",(0,r.jsxs)(s.p,{children:[(0,r.jsx)(s.strong,{children:"Network"})," lexicons are fetched from the atproto network. Enter an NSID (e.g. ",(0,r.jsx)(s.code,{children:"xyz.statusphere.status"}),") and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click ",(0,r.jsx)(s.strong,{children:"Add"})," to track it. Network lexicons are kept up to date via the Jetstream subscription. See ",(0,r.jsx)(s.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for how resolution works."]}),"\n",(0,r.jsx)(s.h3,{id:"json-editor",children:"JSON editor"}),"\n",(0,r.jsx)(s.p,{children:"The JSON editor provides real-time validation against the atproto Lexicon v1 schema:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsx)(s.li,{children:"Validation for Lexicon format"}),"\n",(0,r.jsxs)(s.li,{children:["Auto-complete for definition types (",(0,r.jsx)(s.code,{children:"record"}),", ",(0,r.jsx)(s.code,{children:"query"}),", ",(0,r.jsx)(s.code,{children:"procedure"}),", ",(0,r.jsx)(s.code,{children:"subscription"}),"), property types (",(0,r.jsx)(s.code,{children:"string"}),", ",(0,r.jsx)(s.code,{children:"integer"}),", ",(0,r.jsx)(s.code,{children:"boolean"}),", ",(0,r.jsx)(s.code,{children:"ref"}),", ",(0,r.jsx)(s.code,{children:"union"}),", ",(0,r.jsx)(s.code,{children:"blob"}),", ",(0,r.jsx)(s.code,{children:"cid-link"}),", etc.), and schema structure (",(0,r.jsx)(s.code,{children:"defs"}),", ",(0,r.jsx)(s.code,{children:"main"}),", ",(0,r.jsx)(s.code,{children:"properties"}),", ",(0,r.jsx)(s.code,{children:"required"}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["Enforces the required top-level shape: ",(0,r.jsx)(s.code,{children:"lexicon"}),", ",(0,r.jsx)(s.code,{children:"id"}),", and ",(0,r.jsx)(s.code,{children:"defs.main"})]}),"\n"]}),"\n",(0,r.jsx)(s.h3,{id:"lua-editor",children:"Lua editor"}),"\n",(0,r.jsxs)(s.p,{children:["The Lua editor provides context-aware code completions, including suggestions for the ",(0,r.jsx)(s.code,{children:"Record"}),", ",(0,r.jsx)(s.code,{children:"db"}),", ",(0,r.jsx)(s.code,{children:"input"}),", and ",(0,r.jsx)(s.code,{children:"params"})," APIs as well as Lua keywords, builtins, and standard library functions. It also has snippets for ",(0,r.jsx)(s.code,{children:"if"}),", ",(0,r.jsx)(s.code,{children:"for"}),", ",(0,r.jsx)(s.code,{children:"function"}),", etc."]}),"\n",(0,r.jsxs)(s.p,{children:["See ",(0,r.jsx)(s.a,{href:"/guides/scripting",children:"Lua Scripting"})," for the full runtime reference and examples."]}),"\n",(0,r.jsx)(s.h2,{id:"records",children:"Records"}),"\n",(0,r.jsxs)(s.p,{children:["Navigate to ",(0,r.jsx)(s.strong,{children:"Records"})," to browse all indexed atproto records. Records are grouped by collection and searchable. Each record shows its AT URI, author DID, and the raw record JSON."]}),"\n",(0,r.jsx)(s.h2,{id:"backfill",children:"Backfill"}),"\n",(0,r.jsxs)(s.p,{children:["Navigate to ",(0,r.jsx)(s.strong,{children:"Backfill"})," to view and manage backfill jobs. You can start a new backfill for any record-type lexicon to import historical records from the network. The page shows job status, progress (repos processed / total), and record counts. See ",(0,r.jsx)(s.a,{href:"/guides/backfill",children:"Backfill"})," for how the process works."]}),"\n",(0,r.jsx)(s.h2,{id:"users",children:"Users"}),"\n",(0,r.jsxs)(s.p,{children:["Navigate to ",(0,r.jsx)(s.strong,{children:"Users"})," to manage who can access the admin API and dashboard. You can add users by DID, assign permissions individually or via a template (",(0,r.jsx)(s.code,{children:"viewer"}),", ",(0,r.jsx)(s.code,{children:"operator"}),", ",(0,r.jsx)(s.code,{children:"manager"}),", ",(0,r.jsx)(s.code,{children:"full_access"}),"), and remove users. The super user is highlighted and has all permissions by default. See ",(0,r.jsx)(s.a,{href:"/guides/permissions",children:"Permissions"})," for what each permission grants."]}),"\n",(0,r.jsx)(s.h2,{id:"events",children:"Events"}),"\n",(0,r.jsxs)(s.p,{children:["Navigate to ",(0,r.jsx)(s.strong,{children:"Events"})," to view the audit log of admin actions. Events include user creation, lexicon uploads, permission changes, backfill starts, and more. Each entry shows the event type, severity, actor, subject, and timestamp. Events are retained for the number of days configured by ",(0,r.jsx)(s.code,{children:"EVENT_LOG_RETENTION_DAYS"})," (default 30)."]}),"\n",(0,r.jsx)(s.h2,{id:"settings",children:"Settings"}),"\n",(0,r.jsxs)(s.p,{children:["The ",(0,r.jsx)(s.strong,{children:"Settings"})," section contains several sub-pages:"]}),"\n",(0,r.jsx)(s.h3,{id:"general",children:"General"}),"\n",(0,r.jsx)(s.p,{children:"Configure instance-level settings: application name, logo, terms of service URL, and privacy policy URL. These values appear on OAuth authorization screens and can also be set via environment variables \u2014 dashboard values take precedence."}),"\n",(0,r.jsx)(s.h3,{id:"api-clients",children:"API Clients"}),"\n",(0,r.jsxs)(s.p,{children:["Register and manage third-party API clients. Each client gets an ",(0,r.jsx)(s.code,{children:"hvc_\u2026"})," client key and ",(0,r.jsx)(s.code,{children:"hvs_\u2026"})," client secret. You can configure the client type (confidential or public), allowed origins, scopes, and per-client rate limits. See ",(0,r.jsx)(s.a,{href:"/getting-started/authentication#xrpc-api-client-identification",children:"Authentication \u2014 API client identification"})," for how clients are used."]}),"\n",(0,r.jsx)(s.h3,{id:"api-keys",children:"API Keys"}),"\n",(0,r.jsxs)(s.p,{children:["Create and revoke admin API keys for automation. Each key is scoped to specific permissions and tied to the creating user. See ",(0,r.jsx)(s.a,{href:"/guides/api-keys",children:"API Keys"})," for details."]}),"\n",(0,r.jsx)(s.h3,{id:"users-1",children:"Users"}),"\n",(0,r.jsx)(s.p,{children:"An alternative path to the top-level Users page for managing user accounts and permissions."}),"\n",(0,r.jsx)(s.h3,{id:"plugins",children:"Plugins"}),"\n",(0,r.jsxs)(s.p,{children:["Manage installed plugins and configure plugin secrets. Plugins extend HappyView with additional functionality. Plugin secrets are encrypted at rest when ",(0,r.jsx)(s.code,{children:"TOKEN_ENCRYPTION_KEY"})," is configured. See ",(0,r.jsx)(s.a,{href:"/guides/plugins",children:"Plugins"})," for details."]}),"\n",(0,r.jsx)(s.h3,{id:"labelers",children:"Labelers"}),"\n",(0,r.jsxs)(s.p,{children:["Configure labeler subscriptions for content labeling. See ",(0,r.jsx)(s.a,{href:"/guides/labelers",children:"Labelers"})," for details."]}),"\n",(0,r.jsx)(s.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,r.jsx)(s.p,{children:"View the current values of all environment variables that affect HappyView's behavior. This is a read-only view \u2014 values are set via your deployment environment, not the dashboard."}),"\n",(0,r.jsx)(s.h3,{id:"accounts",children:"Accounts"}),"\n",(0,r.jsx)(s.p,{children:"Manage connected atproto accounts used by the instance."}),"\n",(0,r.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/guides/lexicons",children:"Lexicons"})," \u2014 how lexicons drive HappyView's indexing and routing"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/guides/scripting",children:"Lua Scripting"})," \u2014 write custom query and procedure logic"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 manage user access to admin features"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/getting-started/configuration",children:"Configuration"})," \u2014 full list of environment variables"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},2560:(e,s,n)=>{n.d(s,{R:()=>a,x:()=>o});var i=n(63);const r={},t=i.createContext(r);function a(e){const s=i.useContext(t);return i.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),i.createElement(t.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5428.ed2bd8da.js b/assets/js/5428.ed2bd8da.js new file mode 100644 index 0000000..268d0c6 --- /dev/null +++ b/assets/js/5428.ed2bd8da.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5428],{2528:(e,t,i)=>{function n(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}i.d(t,{S:()=>n}),(0,i(8894).K2)(n,"populateCommonDb")},4937:(e,t,i)=>{i.d(t,{m:()=>a});var n=i(8894),a=class{constructor(e){this.init=e,this.records=this.init()}static{(0,n.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},5428:(e,t,i)=>{i.d(t,{diagram:()=>f});var n=i(6417),a=i(2528),r=i(4937),s=i(2101),o=i(5691),c=i(8894),d=i(4419),l=new r.m(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),h=(0,c.K2)(()=>{l.reset(),(0,o.IU)()},"clear"),g=(0,c.K2)(()=>l.records.stack[0],"getRoot"),p=(0,c.K2)(()=>l.records.cnt,"getCount"),w=o.UI.treeView,k=(0,c.K2)(()=>(0,s.$t)(w,(0,o.zj)().treeView),"getConfig"),m={clear:h,addNode:(0,c.K2)((e,t)=>{for(;e<=l.records.stack[l.records.stack.length-1].level;)l.records.stack.pop();const i={id:l.records.cnt++,level:e,name:t,children:[]};l.records.stack[l.records.stack.length-1].children.push(i),l.records.stack.push(i)},"addNode"),getRoot:g,getCount:p,getConfig:k,getAccTitle:o.iN,getAccDescription:o.m7,getDiagramTitle:o.ab,setAccDescription:o.EI,setAccTitle:o.SV,setDiagramTitle:o.ke},b=(0,c.K2)(e=>{(0,a.S)(e,m),e.nodes.map(e=>m.addNode(e.indent?parseInt(e.indent):0,e.name))},"populate"),u={parse:(0,c.K2)(async e=>{const t=await(0,d.qg)("treeView",e);c.Rm.debug(t),b(t)},"parse")},x=(0,c.K2)((e,t,i,n,a)=>{const r=n.append("text").text(i.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:s,width:o}=r.node().getBBox(),c=s+2*a.paddingY,d=o+2*a.paddingX;r.attr("x",e+a.paddingX),r.attr("y",t+c/2),i.BBox={x:e,y:t,width:d,height:c}},"positionLabel"),K=(0,c.K2)((e,t,i,n,a,r)=>e.append("line").attr("x1",t).attr("y1",i).attr("x2",n).attr("y2",a).attr("stroke-width",r).attr("class","treeView-node-line"),"positionLine"),T=(0,c.K2)((e,t,i)=>{let n=0,a=0;const r=(0,c.K2)((e,t,i,r)=>{const s=r*(i.rowIndent+i.paddingX);x(s,n,t,e,i);const{height:o,width:c}=t.BBox;K(e,s-i.rowIndent,n+o/2,s,n+o/2,i.lineThickness),a=Math.max(a,s+c),n+=o},"drawNode"),s=(0,c.K2)((t,n=0)=>{r(e,t,i,n),t.children.forEach(e=>{s(e,n+1)});const{x:a,y:o,height:c}=t.BBox;if(t.children.length){const{y:n,height:r}=t.children[t.children.length-1].BBox;K(e,a+i.paddingX,o+c,a+i.paddingX,n+r/2+i.lineThickness/2,i.lineThickness)}},"processNode");return s(t),{totalHeight:n,totalWidth:a}},"drawTree"),C={labelFontSize:"16px",labelColor:"black",lineColor:"black"},f={db:m,renderer:{draw:(0,c.K2)((e,t,i,a)=>{c.Rm.debug("Rendering treeView diagram\n"+e);const r=a.db,s=r.getRoot(),d=r.getConfig(),l=(0,n.D)(t),h=l.append("g");h.attr("class","tree-view");const{totalHeight:g,totalWidth:p}=T(h,s,d);l.attr("viewBox",`-${d.lineThickness/2} 0 ${p} ${g}`),(0,o.a$)(l,g,p,d.useMaxWidth)},"draw")},parser:u,styles:(0,c.K2)(({treeView:e})=>{const{labelFontSize:t,labelColor:i,lineColor:n}=(0,s.$t)(C,e);return`\n .treeView-node-label {\n font-size: ${t};\n fill: ${i};\n }\n .treeView-node-line {\n stroke: ${n};\n }\n `},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/5471.8c36f303.js b/assets/js/5471.8c36f303.js new file mode 100644 index 0000000..933dae9 --- /dev/null +++ b/assets/js/5471.8c36f303.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5471],{1592:(e,n,t)=>{t.d(n,{A:()=>i});var r=t(5368);const i=function(e){return(0,r.A)(e,4)}},5471:(e,n,t)=>{t.r(n),t.d(n,{render:()=>k});var r=t(1562),i=(t(2125),t(5707)),a=t(3276),o=(t(4061),t(7127),t(2101),t(5691)),d=t(8894),s=t(9808),c=t(777),g=t(1592),l=t(5623);t(1236);function f(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:h(e),edges:p(e)};return c.A(e.graph())||(n.value=g.A(e.graph())),n}function h(e){return l.A(e.nodes(),function(n){var t=e.node(n),r=e.parent(n),i={v:n};return c.A(t)||(i.value=t),c.A(r)||(i.parent=r),i})}function p(e){return l.A(e.edges(),function(n){var t=e.edge(n),r={v:n.v,w:n.w};return c.A(n.name)||(r.name=n.name),c.A(t)||(r.value=t),r})}var u=t(7446),m=new Map,w=new Map,R=new Map,v=(0,d.K2)(()=>{w.clear(),R.clear(),m.clear()},"clear"),y=(0,d.K2)((e,n)=>{const t=w.get(n)||[];return d.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),X=(0,d.K2)((e,n)=>{const t=w.get(n)||[];return d.Rm.info("Descendants of ",n," is ",t),d.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||y(e.v,n)||y(e.w,n)||t.includes(e.w):(d.Rm.debug("Tilt, ",n,",not in descendants"),!1))},"edgeInCluster"),b=(0,d.K2)((e,n,t,r)=>{d.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),d.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(i=>{if(n.children(i).length>0)b(i,n,t,r);else{const a=n.node(i);d.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,a),r!==n.parent(i)&&(d.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(d.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(d.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),d.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const o=n.edges(i);d.Rm.debug("Copying Edges",o),o.forEach(i=>{d.Rm.info("Edge",i);const a=n.edge(i.v,i.w,i.name);d.Rm.info("Edge data",a,r);try{X(i,r)?(d.Rm.info("Copying as ",i.v,i.w,a,i.name),t.setEdge(i.v,i.w,a,i.name),d.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):d.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(o){d.Rm.error(o)}})}d.Rm.debug("Removing node",i),n.removeNode(i)})},"copy"),E=(0,d.K2)((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)R.set(i,e),r=[...r,...E(i,n)];return r},"extractDescendants"),N=(0,d.K2)((e,n,t)=>{const r=e.edges().filter(e=>e.v===n||e.w===n),i=e.edges().filter(e=>e.v===t||e.w===t),a=r.map(e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(n=>e.v===n.v&&e.w===n.w))},"findCommonEdges"),C=(0,d.K2)((e,n,t)=>{const r=n.children(e);if(d.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const a of r){const e=C(a,n,t),r=N(n,t,e);if(e){if(!(r.length>0))return e;i=e}}return i},"findNonClusterChild"),S=(0,d.K2)(e=>m.has(e)&&m.get(e).externalConnections&&m.has(e)?m.get(e).id:e,"getAnchorId"),x=(0,d.K2)((e,n)=>{if(!e||n>10)d.Rm.debug("Opting out, no graph ");else{d.Rm.debug("Opting in, graph "),e.nodes().forEach(function(n){e.children(n).length>0&&(d.Rm.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),w.set(n,E(n,e)),m.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const t=e.children(n),r=e.edges();t.length>0?(d.Rm.debug("Cluster identified",n,w),r.forEach(e=>{y(e.v,n)^y(e.w,n)&&(d.Rm.warn("Edge: ",e," leaves cluster ",n),d.Rm.warn("Descendants of XXX ",n,": ",w.get(n)),m.get(n).externalConnections=!0)})):d.Rm.debug("Not a cluster ",n,w)});for(let n of m.keys()){const t=m.get(n).id,r=e.parent(t);r!==n&&m.has(r)&&!m.get(r).externalConnections&&(m.get(n).id=r)}e.edges().forEach(function(n){const t=e.edge(n);d.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),d.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(d.Rm.warn("Fix XXX",m,"ids:",n.v,n.w,"Translating: ",m.get(n.v)," --- ",m.get(n.w)),m.get(n.v)||m.get(n.w)){if(d.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=S(n.v),i=S(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);m.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);m.get(r).externalConnections=!0,t.toCluster=n.w}d.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}}),d.Rm.warn("Adjusted Graph",f(e)),I(e,0),d.Rm.trace(m)}},"adjustClustersAndEdges"),I=(0,d.K2)((e,n)=>{if(d.Rm.warn("extractor - ",n,f(e),e.children("D")),n>10)return void d.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const i of t){const n=e.children(i);r=r||n.length>0}if(r){d.Rm.debug("Nodes = ",t,n);for(const r of t)if(d.Rm.debug("Extracting node",r,m,m.has(r)&&!m.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),m.has(r))if(!m.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){d.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";m.get(r)?.clusterData?.dir&&(t=m.get(r).clusterData.dir,d.Rm.warn("Fixing dir",m.get(r).clusterData.dir,t));const i=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});d.Rm.warn("Old graph before copy",f(e)),b(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:m.get(r).clusterData,label:m.get(r).label,graph:i}),d.Rm.warn("New graph after copy node: (",r,")",f(i)),d.Rm.debug("Old graph after copy",f(e))}else d.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!m.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),d.Rm.debug(m);else d.Rm.debug("Not a cluster",r,n);t=e.nodes(),d.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);d.Rm.warn(" Now next level",r,t),t?.clusterNode&&I(t.graph,n+1)}}else d.Rm.debug("Done, no node has children",e.nodes())},"extractor"),D=(0,d.K2)((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach(n=>{const r=e.children(n),i=D(e,r);t=[...t,...i]}),t},"sorter"),A=(0,d.K2)(e=>D(e,e.children()),"sortNodesByHierarchy"),O=(0,d.K2)(async(e,n,t,o,c,g)=>{d.Rm.warn("Graph in recursive render:XAX",f(n),c);const l=n.graph().rankdir;d.Rm.trace("Dir in recursive render - dir:",l);const h=e.insert("g").attr("class","root");n.nodes()?d.Rm.info("Recursive render XXX",n.nodes()):d.Rm.info("No nodes found for",n),n.edges().length>0&&d.Rm.info("Recursive edges",n.edge(n.edges()[0]));const p=h.insert("g").attr("class","clusters"),u=h.insert("g").attr("class","edgePaths"),w=h.insert("g").attr("class","edgeLabels"),R=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map(async function(e){const r=n.node(e);if(void 0!==c){const t=JSON.parse(JSON.stringify(c.clusterData));d.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",c.height),n.setNode(c.id,t),n.parent(e)||(d.Rm.trace("Setting parent",e,c.id),n.setParent(e,c.id,t))}if(d.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),r?.clusterNode){d.Rm.info("Cluster identified XBX",e,r.width,n.node(e));const{ranksep:a,nodesep:s}=n.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:s});const c=await O(R,r.graph,t,o,n.node(e),g),l=c.elem;(0,i.lC)(r,l),r.diff=c.diff||0,d.Rm.info("New compound node after recursive render XAX",e,"width",r.width,"height",r.height),(0,i.U7)(l,r)}else n.children(e).length>0?(d.Rm.trace("Cluster - the non recursive path XBX",e,r.id,r,r.width,"Graph:",n),d.Rm.trace(C(r.id,n)),m.set(r.id,{id:C(r.id,n),node:r})):(d.Rm.trace("Node - the non recursive path XAX",e,R,n.node(e),l),await(0,i.on)(R,n.node(e),{config:g,dir:l}))}));const v=(0,d.K2)(async()=>{const e=n.edges().map(async function(e){const t=n.edge(e.v,e.w,e.name);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),d.Rm.info("Fix",m,"ids:",e.v,e.w,"Translating: ",m.get(e.v),m.get(e.w)),await(0,r.jP)(w,t)});await Promise.all(e)},"processEdges");await v(),d.Rm.info("Graph before layout:",JSON.stringify(f(n))),d.Rm.info("############################################# XXX"),d.Rm.info("### Layout ### XXX"),d.Rm.info("############################################# XXX"),(0,s.Zp)(n),d.Rm.info("Graph after layout:",JSON.stringify(f(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,a.O)(g);return await Promise.all(A(n).map(async function(e){const t=n.node(e);if(d.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,d.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),m.get(t.id).node=t,(0,i.U_)(t);else if(n.children(e).length>0){d.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const r=t?.padding/2||0,a=t?.labelBBox?.height||0,o=a-r||0;d.Rm.debug("OffsetY",o,"labelHeight",a,"halfPadding",r),await(0,i.U)(p,t),m.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,d.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,i.U_)(t)}})),n.edges().forEach(function(e){const i=n.edge(e);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach(e=>e.y+=X/2);const a=n.node(e.v);var s=n.node(e.w);const c=(0,r.Jo)(u,i,m,t,a,s,o);(0,r.T_)(i,c)}),n.nodes().forEach(function(e){const t=n.node(e);d.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)}),d.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}},"recursiveRender"),k=(0,d.K2)(async(e,n)=>{const t=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=n.select("g");(0,r.g0)(a,e.markers,e.type,e.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),v(),e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),d.Rm.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const n=e.start,r=n+"---"+n+"---1",i=n+"---"+n+"---2",a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(i,a.parentId);const o=structuredClone(e),d=structuredClone(e),s=structuredClone(e);o.label="",o.arrowTypeEnd="none",o.id=n+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",s.label="",a.isGroup&&(o.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",s.arrowTypeStart="none",t.setEdge(n,r,o,n+"-cyclic-special-0"),t.setEdge(r,i,d,n+"-cyclic-special-1"),t.setEdge(i,n,s,n+"-cyci});var i=(0,n(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},2875(t,e,n){n.d(e,{CP:()=>h,HT:()=>y,PB:()=>u,aC:()=>c,lC:()=>o,m:()=>l,tk:()=>a});var i=n(7633),s=n(797),r=n(6750),a=(0,s.K2)((t,e)=>{const n=t.append("rect");if(n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),e.name&&n.attr("name",e.name),e.rx&&n.attr("rx",e.rx),e.ry&&n.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)n.attr(i,e.attrs[i]);return e.class&&n.attr("class",e.class),n},"drawRect"),o=(0,s.K2)((t,e)=>{const n={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};a(t,n).lower()},"drawBackgroundRect"),l=(0,s.K2)((t,e)=>{const n=e.text.replace(i.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const r=s.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),s},"drawText"),c=(0,s.K2)((t,e,n,i)=>{const s=t.append("image");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",a)},"drawImage"),h=(0,s.K2)((t,e,n,i)=>{const s=t.append("use");s.attr("x",e),s.attr("y",n);const a=(0,r.J)(i);s.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),u=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),y=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")},5480(t,e,n){n.d(e,{diagram:()=>X});var i=n(2875),s=n(2501),r=n(7633),a=n(797),o=n(451),l=function(){var t=(0,a.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],s=[1,11],r=[1,12],o=[1,13],l=[1,14],c={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:(0,a.K2)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 13:i.addTask(r[o-1],r[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:i,14:s,16:r,17:o,18:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,l="",c=0,h=0,u=0,y=r.slice.call(arguments,1),p=Object.create(this.lexer),d={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(d.yy[f]=this.yy[f]);p.setInput(t,d.yy),d.yy.lexer=p,d.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;r.push(g);var x=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,a.K2)(m,"lex");for(var k,_,b,w,v,K,$,T,M,S={};;){if(b=n[n.length-1],this.defaultActions[b]?w=this.defaultActions[b]:(null==k&&(k=m()),w=o[b]&&o[b][k]),void 0===w||!w.length||!w[0]){var C="";for(K in M=[],o[b])this.terminals_[K]&&K>2&&M.push("'"+this.terminals_[K]+"'");C=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:g,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(w[0]){case 1:n.push(k),s.push(p.yytext),r.push(p.yylloc),n.push(w[1]),k=null,_?(k=_,_=null):(h=p.yyleng,l=p.yytext,c=p.yylineno,g=p.yylloc,u>0&&u--);break;case 2:if($=this.productions_[w[1]][1],S.$=s[s.length-$],S._$={first_line:r[r.length-($||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-($||1)].first_column,last_column:r[r.length-1].last_column},x&&(S._$.range=[r[r.length-($||1)].range[0],r[r.length-1].range[1]]),void 0!==(v=this.performAction.apply(S,[l,h,c,d.yy,w[1],s,r].concat(y))))return v;$&&(n=n.slice(0,-1*$*2),s=s.slice(0,-1*$),r=r.slice(0,-1*$)),n.push(this.productions_[w[1]][0]),s.push(S.$),r.push(S._$),T=o[n[n.length-2]][n[n.length-1]],n.push(T);break;case 3:return!0}}return!0},"parse")},h=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}}();function u(){this.yy={}}return c.lexer=h,(0,a.K2)(u,"Parser"),u.prototype=c,c.Parser=u,new u}();l.parser=l;var c=l,h="",u=[],y=[],p=[],d=(0,a.K2)(function(){u.length=0,y.length=0,h="",p.length=0,(0,r.IU)()},"clear"),f=(0,a.K2)(function(t){h=t,u.push(t)},"addSection"),g=(0,a.K2)(function(){return u},"getSections"),x=(0,a.K2)(function(){let t=b();let e=0;for(;!t&&e<100;)t=b(),e++;return y.push(...p),y},"getTasks"),m=(0,a.K2)(function(){const t=[];y.forEach(e=>{e.people&&t.push(...e.people)});return[...new Set(t)].sort()},"updateActors"),k=(0,a.K2)(function(t,e){const n=e.substr(1).split(":");let i=0,s=[];1===n.length?(i=Number(n[0]),s=[]):(i=Number(n[0]),s=n[1].split(","));const r=s.map(t=>t.trim()),a={section:h,type:h,people:r,task:t,score:i};p.push(a)},"addTask"),_=(0,a.K2)(function(t){const e={section:h,type:h,description:t,task:t,classes:[]};y.push(e)},"addTaskOrg"),b=(0,a.K2)(function(){const t=(0,a.K2)(function(t){return p[t].processed},"compileTask");let e=!0;for(const[n,i]of p.entries())t(n),e=e&&i.processed;return e},"compileTasks"),w=(0,a.K2)(function(){return m()},"getActors"),v={getConfig:(0,a.K2)(()=>(0,r.D7)().journey,"getConfig"),clear:d,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:f,getSections:g,getTasks:x,addTask:k,addTaskOrg:_,getActors:w},K=(0,a.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.textColor};\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ${t.textColor}\n }\n\n .legend {\n fill: ${t.textColor};\n font-family: ${t.fontFamily};\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ${t.textColor}\n }\n\n .face {\n ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ${t.fillType0?`fill: ${t.fillType0}`:""};\n }\n .task-type-1, .section-type-1 {\n ${t.fillType0?`fill: ${t.fillType1}`:""};\n }\n .task-type-2, .section-type-2 {\n ${t.fillType0?`fill: ${t.fillType2}`:""};\n }\n .task-type-3, .section-type-3 {\n ${t.fillType0?`fill: ${t.fillType3}`:""};\n }\n .task-type-4, .section-type-4 {\n ${t.fillType0?`fill: ${t.fillType4}`:""};\n }\n .task-type-5, .section-type-5 {\n ${t.fillType0?`fill: ${t.fillType5}`:""};\n }\n .task-type-6, .section-type-6 {\n ${t.fillType0?`fill: ${t.fillType6}`:""};\n }\n .task-type-7, .section-type-7 {\n ${t.fillType0?`fill: ${t.fillType7}`:""};\n }\n\n .actor-0 {\n ${t.actor0?`fill: ${t.actor0}`:""};\n }\n .actor-1 {\n ${t.actor1?`fill: ${t.actor1}`:""};\n }\n .actor-2 {\n ${t.actor2?`fill: ${t.actor2}`:""};\n }\n .actor-3 {\n ${t.actor3?`fill: ${t.actor3}`:""};\n }\n .actor-4 {\n ${t.actor4?`fill: ${t.actor4}`:""};\n }\n .actor-5 {\n ${t.actor5?`fill: ${t.actor5}`:""};\n }\n ${(0,s.o)()}\n`,"getStyles"),$=(0,a.K2)(function(t,e){return(0,i.tk)(t,e)},"drawRect"),T=(0,a.K2)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),s=t.append("g");function r(t){const i=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function l(t){const i=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function c(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,a.K2)(r,"smile"),(0,a.K2)(l,"sad"),(0,a.K2)(c,"ambivalent"),e.score>3?r(s):e.score<3?l(s):c(s),i},"drawFace"),M=(0,a.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),S=(0,a.K2)(function(t,e){return(0,i.m)(t,e)},"drawText"),C=(0,a.K2)(function(t,e){function n(t,e,n,i,s){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-s)+" "+(t+n-1.2*s)+","+(e+i)+" "+t+","+(e+i)}(0,a.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,S(t,e)},"drawLabel"),E=(0,a.K2)(function(t,e,n){const s=t.append("g"),r=(0,i.PB)();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,$(s,r),j(n)(e.text,s,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),I=-1,P=(0,a.K2)(function(t,e,n){const s=e.x+n.width/2,r=t.append("g");I++;r.append("line").attr("id","task"+I).attr("x1",s).attr("y1",e.y).attr("x2",s).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),T(r,{cx:s,cy:300+30*(5-e.score),score:e.score});const a=(0,i.PB)();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=n.width,a.height=n.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,$(r,a);let o=e.x+14;e.people.forEach(t=>{const n=e.actors[t].color,i={cx:o,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};M(r,i),o+=10}),j(n)(e.task,r,a.x,a.y,a.width,a.height,{class:"task"},n,e.colour)},"drawTask"),A=(0,a.K2)(function(t,e){(0,i.lC)(t,e)},"drawBackgroundRect"),j=function(){function t(t,e,n,s,r,a,o,l){i(e.append("text").attr("x",n+r/2).attr("y",s+a/2+5).style("font-color",l).style("text-anchor","middle").text(t),o)}function e(t,e,n,s,r,a,o,l,c){const{taskFontSize:h,taskFontFamily:u}=l,y=t.split(//gi);for(let p=0;p{const r=L[s].color,a={cx:20,cy:i,r:7,fill:r,stroke:"#000",pos:L[s].position};B.drawCircle(t,a);let o=t.append("text").attr("visibility","hidden").text(s);const l=o.node().getBoundingClientRect().width;o.remove();let c=[];if(l<=n)c=[s];else{const e=s.split(" ");let i="";o=t.append("text").attr("visibility","hidden"),e.forEach(t=>{const e=i?`${i} ${t}`:t;o.text(e);if(o.node().getBoundingClientRect().width>n){if(i&&c.push(i),i=t,o.text(t),o.node().getBoundingClientRect().width>n){let e="";for(const i of t)e+=i,o.text(e+"-"),o.node().getBoundingClientRect().width>n&&(c.push(e.slice(0,-1)+"-"),e=i);i=e}}else i=e}),i&&c.push(i),o.remove()}c.forEach((n,s)=>{const r={x:40,y:i+7+20*s,fill:"#666",text:n,textMargin:e.boxTextMargin??5},a=B.drawText(t,r).node().getBoundingClientRect().width;a>D&&a>e.leftMargin-a&&(D=a)}),i+=Math.max(20,20*c.length)})}(0,a.K2)(V,"drawActorLegend");var R=(0,r.D7)().journey,O=0,N=(0,a.K2)(function(t,e,n,i){const s=(0,r.D7)(),a=s.journey.titleColor,l=s.journey.titleFontSize,c=s.journey.titleFontFamily,h=s.securityLevel;let u;"sandbox"===h&&(u=(0,o.Ltv)("#i"+e));const y="sandbox"===h?(0,o.Ltv)(u.nodes()[0].contentDocument.body):(0,o.Ltv)("body");z.init();const p=y.select("#"+e);B.initGraphics(p);const d=i.db.getTasks(),f=i.db.getDiagramTitle(),g=i.db.getActors();for(const r in L)delete L[r];let x=0;g.forEach(t=>{L[t]={color:R.actorColours[x%R.actorColours.length],position:x},x++}),V(p),O=R.leftMargin+D,z.insert(0,0,O,50*Object.keys(L).length),q(p,d,0);const m=z.getBounds();f&&p.append("text").text(f).attr("x",O).attr("font-size",l).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",c);const k=m.stopy-m.starty+2*R.diagramMarginY,_=O+m.stopx+2*R.diagramMarginX;(0,r.a$)(p,k,_,R.useMaxWidth),p.append("line").attr("x1",O).attr("y1",4*R.height).attr("x2",_-O-4).attr("y2",4*R.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const b=f?70:0;p.attr("viewBox",`${m.startx} -25 ${_} ${k+b}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",k+b+25)},"draw"),z={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:(0,a.K2)(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:(0,a.K2)(function(t,e,n,i){void 0===t[e]?t[e]=n:t[e]=i(n,t[e])},"updateVal"),updateBounds:(0,a.K2)(function(t,e,n,i){const s=(0,r.D7)().journey,o=this;let l=0;function c(r){return(0,a.K2)(function(a){l++;const c=o.sequenceItems.length-l+1;o.updateVal(a,"starty",e-c*s.boxMargin,Math.min),o.updateVal(a,"stopy",i+c*s.boxMargin,Math.max),o.updateVal(z.data,"startx",t-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopx",n+c*s.boxMargin,Math.max),"activation"!==r&&(o.updateVal(a,"startx",t-c*s.boxMargin,Math.min),o.updateVal(a,"stopx",n+c*s.boxMargin,Math.max),o.updateVal(z.data,"starty",e-c*s.boxMargin,Math.min),o.updateVal(z.data,"stopy",i+c*s.boxMargin,Math.max))},"updateItemBounds")}(0,a.K2)(c,"updateFn"),this.sequenceItems.forEach(c())},"updateBounds"),insert:(0,a.K2)(function(t,e,n,i){const s=Math.min(t,n),r=Math.max(t,n),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(z.data,"startx",s,Math.min),this.updateVal(z.data,"starty",a,Math.min),this.updateVal(z.data,"stopx",r,Math.max),this.updateVal(z.data,"stopy",o,Math.max),this.updateBounds(s,a,r,o)},"insert"),bumpVerticalPos:(0,a.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:(0,a.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,a.K2)(function(){return this.data},"getBounds")},W=R.sectionFills,Y=R.sectionColours,q=(0,a.K2)(function(t,e,n){const i=(0,r.D7)().journey;let s="";const a=n+(2*i.height+i.diagramMarginY);let o=0,l="#CCC",c="black",h=0;for(const[r,u]of e.entries()){if(s!==u.section){l=W[o%W.length],h=o%W.length,c=Y[o%Y.length];let n=0;const a=u.section;for(let t=r;t(L[e]&&(t[e]=L[e]),t),{});u.x=r*i.taskMargin+r*i.width+O,u.y=a,u.width=i.diagramMarginX,u.height=i.diagramMarginY,u.colour=c,u.fill=l,u.num=h,u.actors=n,B.drawTask(t,u,i),z.insert(u.x,u.y,u.x+u.width+i.taskMargin,450)}},"drawTasks"),J={setConf:F,draw:N},X={parser:c,db:v,renderer:J,styles:K,init:(0,a.K2)(t=>{J.setConf(t.journey),v.clear()},"init")}}}]); \ No newline at end of file diff --git a/assets/js/5537.d669d0d1.js b/assets/js/5537.d669d0d1.js new file mode 100644 index 0000000..29af6b2 --- /dev/null +++ b/assets/js/5537.d669d0d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5537],{5537:(e,r,s)=>{s.d(r,{diagram:()=>c});var a=s(866),t=(s(7214),s(8854),s(7330),s(3830),s(163),s(1562),s(2125),s(5707),s(3276),s(4061),s(7127),s(2101),s(5691),s(8894)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/5613.71ca5510.js b/assets/js/5613.71ca5510.js new file mode 100644 index 0000000..8cca596 --- /dev/null +++ b/assets/js/5613.71ca5510.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5613],{5613:(t,e,n)=>{n.d(e,{diagram:()=>St});var s=n(6417),i=n(2101),r=n(5691),o=n(8894),a=n(1485),l=n(4713),c=n(4485);const h=(t,e)=>(0,c.A)(t,"a",-e);var u=n(279),f=n(5485);const d=1e-10;function y(t,e){const n=function(t){const e=[];for(let n=0;nfunction(t,e){return e.every(e=>x(t,e)1){const e=b(s);for(let t=0;te.angle-t.angle);let n=s[s.length-1];for(let a=0;a2*i.radius&&(u=2*i.radius),(null==c||c.width>u)&&(c={circle:i,width:u,p1:e,p2:n,large:u>i.radius,sweep:!0})}null!=c&&(o.push(c),i+=g(c.circle.radius,c.width),n=e)}}else{let e=t[0];for(let s=1;sMath.abs(e.radius-t[s].radius)){n=!0;break}n?i=r=0:(i=e.radius*e.radius*Math.PI,o.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-d,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return r/=2,e&&(e.area=i+r,e.arcArea=i,e.polygonArea=r,e.arcs=o,e.innerPoints=s,e.intersectionPoints=n),i+r}function g(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function x(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function p(t,e,n){if(n>=t+e)return 0;if(n<=Math.abs(t-e))return Math.PI*Math.min(t,e)*Math.min(t,e);const s=e-(n*n-t*t+e*e)/(2*n);return g(t,t-(n*n-e*e+t*t)/(2*n))+g(e,s)}function m(t,e){const n=x(t,e),s=t.radius,i=e.radius;if(n>=s+i||n<=Math.abs(s-i))return[];const r=(s*s-i*i+n*n)/(2*n),o=Math.sqrt(s*s-r*r),a=t.x+r*(e.x-t.x)/n,l=t.y+r*(e.y-t.y)/n,c=-(e.y-t.y)*(o/n),h=-(e.x-t.x)*(o/n);return[{x:a+c,y:l-h},{x:a-c,y:l+h}]}function b(t){const e={x:0,y:0};for(const n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function v(t){const e=new Array(t);for(let n=0;nv(e))}function M(t,e){let n=0;for(let s=0;st.fx-e.fx,p=e.slice(),m=e.slice(),b=e.slice(),v=e.slice();for(let I=0;I{const e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:t})}f=0;for(let t=0;t=y[d-1].fx){let n=!1;if(m.fx>e.fx?(_(b,1+h,p,-h,e),b.fx=t(b),b.fx=1)break;for(let e=1;ea+r*i*l||c>=d)f=i;else{if(Math.abs(u)<=-o*l)return i;u*(f-h)>=0&&(f=h),h=i,d=c}return 0}i=i||1,r=r||1e-6,o=o||.1;for(let y=0;y<10;++y){if(_(s.x,1,n.x,i,e),c=s.fx=t(s.x,s.fxprime),u=M(s.fxprime,e),c>a+r*i*l||y&&c>=h)return d(f,i,h);if(Math.abs(u)<=-o*l)return i;if(u>=0)return d(i,f,c);h=c,f=i,i*=2}return i}function T(t,e,n){let s={x:e.slice(),fx:0,fxprime:e.slice()},i={x:e.slice(),fx:0,fxprime:e.slice()};const r=e.slice();let o,a,l,c=1;l=(n=n||{}).maxIterations||20*e.length,s.fx=t(s.x,s.fxprime),o=s.fxprime.slice(),w(o,s.fxprime,-1);for(let h=0;hObject.assign({},t));function i(t){return t.join(";")}if(n){const t=new Map;for(const e of s)for(let n=0;nt===e?0:t{const e={};for(let n=0;n0)throw"Initial bisect points must have opposite signs";if(0===o)return e;if(0===a)return n;for(let c=0;c=0&&(e=n),Math.abs(l)p(t,e,s)-n,0,t+e)}function K(t,e={}){let n=function(t,e){const n=e&&e.lossFunction?e.lossFunction:N,s={},i={};for(const u of t)if(1===u.sets.length){const t=u.sets[0];s[t]={x:1e10,y:1e10,rowid:s.length,size:u.size,radius:Math.sqrt(u.size/Math.PI)},i[t]=[]}t=t.filter(t=>2===t.sets.length);for(const u of t){let t=null!=u.weight?u.weight:1;const e=u.sets[0],n=u.sets[1];u.size+A>=Math.min(s[e].size,s[n].size)&&(t=0),i[e].push({set:n,size:u.size,weight:t}),i[n].push({set:e,size:u.size,weight:t})}const r=[];function o(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n=8){const i=function(t,e={}){const n=e.restarts||10,s=[],i={};for(const f of t)1===f.sets.length&&(i[f.sets[0]]=s.length,s.push(f));let{distances:r,constraints:o}=function(t,e,n){const s=I(e.length,e.length),i=I(e.length,e.length);return t.filter(t=>2===t.sets.length).forEach(t=>{const r=n[t.sets[0]],o=n[t.sets[1]],a=R(Math.sqrt(e[r].size/Math.PI),Math.sqrt(e[o].size/Math.PI),t.size);s[r][o]=s[o][r]=a;let l=0;t.size+1e-10>=Math.min(e[r].size,e[o].size)?l=1:t.size<=1e-10&&(l=-1),i[r][o]=i[o][r]=l}),{distances:s,constraints:i}}(t,s,i);const a=k(r.map(k))/r.length;r=r.map(t=>t.map(t=>t/a));const l=(t,e)=>function(t,e,n,s){for(let r=0;r0&&y<=u||f<0&&y>=u||(i+=2*g*g,e[2*r]+=4*g*(o-c),e[2*r+1]+=4*g*(a-h),e[2*l]+=4*g*(c-o),e[2*l+1]+=4*g*(h-a))}}return i}(t,e,r,o);let c=null;for(let f=0;ft[e]));n+=(null!=s.weight?s.weight:1)*(e-s.size)*(e-s.size)}return n}function D(t,e){let n=0;for(const s of e){if(1===s.sets.length)continue;let e;if(2===s.sets.length){const n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,x(n,i))}else e=y(s.sets.map(e=>t[e]));const i=null!=s.weight?s.weight:1,r=Math.log((e+1)/(s.size+1));n+=i*r*r}return n}function O(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){const e=t[0].x,n=t[0].y;for(const s of t)s.x-=e,s.y-=n}if(2===t.length){x(t[0],t[1])1){const n=Math.atan2(t[1].x,t[1].y)-e,s=Math.cos(n),i=Math.sin(n);for(const e of t){const t=e.x,n=e.y;e.x=s*t-i*n,e.y=i*t+s*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){const e=t[1].y/(1e-10+t[1].x);for(const n of t){var s=(n.x+e*n.y)/(1+e*e);n.x=2*s-n.x,n.y=2*s*e-n.y}}}}function C(t){const e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),Number.NEGATIVE_INFINITY),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),Number.POSITIVE_INFINITY)});return{xRange:e("x"),yRange:e("y")}}function F(t,e,n){null==e&&(e=Math.PI/2);let s=j(t).map(t=>Object.assign({},t));const i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}function n(t,n){const s=e(t),i=e(n);s.parent=i}t.forEach(t=>{t.parent=t});for(let i=0;i{delete t.parent}),Array.from(s.values())}(s);for(const c of i){O(c,e,n);const t=C(c);c.size=(t.xRange.max-t.xRange.min)*(t.yRange.max-t.yRange.min),c.bounds=t}i.sort((t,e)=>e.size-t.size),s=i[0];let r=s.bounds;const o=(r.xRange.max-r.xRange.min)/50;function a(t,e,n){if(!t)return;const i=t.bounds;let a,l;if(e)a=r.xRange.max-i.xRange.min+o;else{a=r.xRange.max-i.xRange.max;const t=(i.xRange.max-i.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;t<0&&(a+=t)}if(n)l=r.yRange.max-i.yRange.min+o;else{l=r.yRange.max-i.yRange.max;const t=(i.yRange.max-i.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;t<0&&(l+=t)}for(const r of t)r.x+=a,r.y+=l,s.push(r)}let l=1;for(;l({radius:h*t.radius,x:s+u+(t.x-o.min)*h,y:s+f+(t.y-a.min)*h,setid:t.setid})))}function L(t){const e={};for(const n of t)e[n.setid]=n;return e}function j(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function P(t={}){let e=!1,n=600,s=350,i=15,r=1e3,o=Math.PI/2,a=!0,l=null,c=!0,h=!0,u=null,f=null,d=!1,y=null,g=!(!t||!t.symmetricalTextCentre)&&t.symmetricalTextCentre,x={},p=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],m=0,b=function(t){if(t in x)return x[t];var e=x[t]=p[m];return m+=1,m>=p.length&&(m=0),e},v=z,I=N;function M(x){let p=x.datum();const m=new Set;p.forEach(t=>{0==t.size&&1==t.sets.length&&m.add(t.sets[0])}),p=p.filter(t=>!t.sets.some(t=>m.has(t)));let M={},k={};if(p.length>0){let t=v(p,{lossFunction:I,distinct:d});a&&(t=F(t,o,f)),M=$(t,n,s,i,l),k=V(M,p,g)}const w={};function _(t){return t.sets in w?w[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}p.forEach(t=>{t.label&&(w[t.sets]=t.label)}),x.selectAll("svg").data([M]).enter().append("svg");const S=x.select("svg");e?S.attr("viewBox",`0 0 ${n} ${s}`):S.attr("width",n).attr("height",s);const E={};let T=!1;function z(t){return e=>Y(t.sets.map(t=>{let i=E[t],r=M[t];return i||(i={x:n/2,y:s/2,radius:1}),r||(r={x:n/2,y:s/2,radius:1}),{x:i.x*(1-e)+r.x*e,y:i.y*(1-e)+r.y*e,radius:i.radius*(1-e)+r.radius*e}}),y)}S.selectAll(".venn-area path").each(function(t){const e=this.getAttribute("d");1==t.sets.length&&e&&!d&&(T=!0,E[t.sets[0]]=function(t){const e=t.split(" ");return{x:Number.parseFloat(e[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])}}(e))});const A=S.selectAll(".venn-area").data(p,t=>t.sets),R=A.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),K=R.append("path"),N=R.append("text").attr("class","label").text(t=>_(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",s/2);function D(t){return"function"==typeof t.transition?t.transition("venn").duration(r):t}h&&(K.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:b(t.sets)).style("fill-opacity",".25"),N.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?b(e.sets):"#444"));let O=x;T&&"function"==typeof O.transition?(O=D(x),O.selectAll("path").attrTween("d",z)):O.selectAll("path").attr("d",t=>Y(t.sets.map(t=>M[t])),y);const C=O.selectAll("text").filter(t=>t.sets in k).text(t=>_(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));c&&(T?"on"in C?C.on("end",U(M,_)):C.each("end",U(M,_)):C.each(U(M,_)));const L=D(A.exit()).remove();"function"==typeof A.transition&&L.selectAll("path").attrTween("d",z);const j=L.selectAll("text").attr("x",n/2).attr("y",s/2);return null!==u&&(N.style("font-size","0px"),C.style("font-size",u),j.style("font-size","0px")),{circles:M,textCentres:k,nodes:A,enter:R,update:O,exit:L}}return M.wrap=function(t){return arguments.length?(c=t,M):c},M.useViewBox=function(){return e=!0,M},M.width=function(t){return arguments.length?(n=t,M):n},M.height=function(t){return arguments.length?(s=t,M):s},M.padding=function(t){return arguments.length?(i=t,M):i},M.distinct=function(t){return arguments.length?(d=t,M):d},M.colours=function(t){return arguments.length?(b=t,M):b},M.colors=function(t){return arguments.length?(b=t,M):b},M.fontSize=function(t){return arguments.length?(u=t,M):u},M.round=function(t){return arguments.length?(y=t,M):y},M.duration=function(t){return arguments.length?(r=t,M):r},M.layoutFunction=function(t){return arguments.length?(v=t,M):v},M.normalize=function(t){return arguments.length?(a=t,M):a},M.scaleToFit=function(t){return arguments.length?(l=t,M):l},M.styled=function(t){return arguments.length?(h=t,M):h},M.orientation=function(t){return arguments.length?(o=t,M):o},M.orientationOrder=function(t){return arguments.length?(f=t,M):f},M.lossFunction=function(t){return arguments.length?(I="default"===t?N:"logRatio"===t?D:t,M):I},M}function U(t,e){return function(n){const s=this,i=t[n.sets[0]].radius||50,r=e(n)||"",o=r.split(/\s+/).reverse(),a=(r.length+o.length)/3;let l=o.pop(),c=[l],h=0;s.textContent=null;const u=[];function f(t){const e=s.ownerDocument.createElementNS(s.namespaceURI,"tspan");return e.textContent=t,u.push(e),s.append(e),e}let d=f(l);for(;l=o.pop(),l;){c.push(l);const t=c.join(" ");d.textContent=t,t.length>a&&d.getComputedTextLength()>i&&(c.pop(),d.textContent=c.join(" "),c=[l],d=f(l),h++)}const y=.35-1.1*h/2,g=s.getAttribute("x"),x=s.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",x),t.setAttribute("dy",`${y+1.1*e}em`)})}}function q(t,e,n){let s=e[0].radius-x(e[0],t);for(let i=1;i=r&&(i=s[h],r=n)}const o=S(n=>-1*q({x:n[0],y:n[1]},t,e),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,a={x:n?0:o[0],y:o[1]};let l=!0;for(const h of t)if(x(a,h)>h.radius){l=!1;break}for(const h of e)if(x(a,h)t.p1))}function G(t){const e={},n=Object.keys(t);for(const s of n)e[s]=[];for(let s=0;s0&&console.log("WARNING: area "+o+" not represented on screen")}return s}function W(t){if(0===t.length)return[];const e={};return y(t,e),e.arcs}function X(t,e){if(0===t.length)return"M 0 0";const n=Math.pow(10,e||0),s=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){const e=t[0].circle;return function(t,e,n){const s=[];return s.push("\nM",t,e),s.push("\nm",-n,0),s.push("\na",n,n,0,1,0,2*n,0),s.push("\na",n,n,0,1,0,2*-n,0),s.join(" ")}(s(e.x),s(e.y),s(e.radius))}const i=["\nM",s(t[0].p2.x),s(t[0].p2.y)];for(const r of t){const t=s(r.circle.radius);i.push("\nA",t,t,0,r.large?1:0,r.sweep?1:0,s(r.p1.x),s(r.p1.y))}return i.join(" ")}function Y(t,e){return X(W(t),e)}var Z=n(1965),H=function(){var t=(0,o.K2)(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],s=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],a=[1,31],l=[1,39],c=[7,8,11,12,17,19,22,24,27],h=[1,57],u=[1,56],f=[1,58],d=[1,59],y=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],x={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,o.K2)(function(t,e,n,s,i,r,o){var a=r.length-1;switch(i){case 1:return r[a-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:r[a-1].push(r[a]),this.$=r[a-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=r[a];break;case 8:s.setDiagramTitle(r[a].substr(6)),this.$=r[a].substr(6);break;case 9:s.addSubsetData([r[a]],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 10:s.addSubsetData([r[a-1]],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 11:s.addSubsetData([r[a-2]],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 12:s.addSubsetData([r[a-3]],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 13:if(r[a].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a]),s.addSubsetData(r[a],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 14:if(r[a-1].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-1]),s.addSubsetData(r[a-1],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 15:if(r[a-2].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-2]),s.addSubsetData(r[a-2],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 16:if(r[a-3].length<2)throw new Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-3]),s.addSubsetData(r[a-3],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 17:case 18:case 19:s.addTextData(r[a-1],r[a],void 0);break;case 20:case 21:s.addTextData(r[a-2],r[a-1],r[a]);break;case 23:s.addStyleData(r[a-1],r[a]);break;case 24:case 25:case 26:if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a],void 0);break;case 27:case 28:var l;if(!(l=s.getCurrentSets()))throw new Error("text requires set");s.addTextData(l,r[a-1],r[a]);break;case 29:case 41:case 34:this.$=[r[a]];break;case 30:case 42:this.$=[...r[a-2],r[a]];break;case 31:this.$=[r[a-2],r[a]];break;case 33:this.$=r[a].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:s,21:i},{13:20,18:19,20:s,21:i},{13:20,18:21,20:s,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:s,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:a}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:a},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:l,25:37,26:38,27:a},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:s,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(c,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(r,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:l,26:51},{16:h,20:u,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:y},t(n,[2,12]),t(n,[2,16]),t(c,[2,30]),t(c,[2,31]),t(c,[2,32]),t(c,[2,33],{30:61,16:h,20:u,31:f,32:d,33:y}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,n=[0],s=[],i=[null],r=[],a=this.table,l="",c=0,h=0,u=0,f=r.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var x=d.yylloc;r.push(x);var p=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,o.K2)(m,"lex");for(var b,v,I,M,k,w,_,S,E,T={};;){if(I=n[n.length-1],this.defaultActions[I]?M=this.defaultActions[I]:(null==b&&(b=m()),M=a[I]&&a[I][b]),void 0===M||!M.length||!M[0]){var z="";for(w in E=[],a[I])this.terminals_[w]&&w>2&&E.push("'"+this.terminals_[w]+"'");z=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(z,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:x,expected:E})}if(M[0]instanceof Array&&M.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch(M[0]){case 1:n.push(b),i.push(d.yytext),r.push(d.yylloc),n.push(M[1]),b=null,v?(b=v,v=null):(h=d.yyleng,l=d.yytext,c=d.yylineno,x=d.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[M[1]][1],T.$=i[i.length-_],T._$={first_line:r[r.length-(_||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(_||1)].first_column,last_column:r[r.length-1].last_column},p&&(T._$.range=[r[r.length-(_||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(T,[l,h,c,y.yy,M[1],i,r].concat(f))))return k;_&&(n=n.slice(0,-1*_*2),i=i.slice(0,-1*_),r=r.slice(0,-1*_)),n.push(this.productions_[M[1]][0]),i.push(T.$),r.push(T._$),S=a[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},p=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in i)this[r]=i[r];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),r=0;re[0].length)){if(e=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,n,s){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=p,(0,o.K2)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();H.parser=H;var J,Q=H,tt=[],et=[],nt=[],st=new Set,it=!1,rt=(0,o.K2)((t,e,n)=>{const s=ft(t).sort(),i=n??10/Math.pow(t.length,2);J=s,1===s.length&&st.add(s[0]),tt.push({sets:s,size:i,label:e?at(e):void 0})},"addSubsetData"),ot=(0,o.K2)(()=>tt,"getSubsetData"),at=(0,o.K2)(t=>{const e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),lt=(0,o.K2)(t=>t?at(t):t,"normalizeStyleValue"),ct=(0,o.K2)((t,e,n)=>{const s=at(e);et.push({sets:ft(t).sort(),id:s,label:n?at(n):void 0})},"addTextData"),ht=(0,o.K2)((t,e)=>{const n=ft(t).sort(),s={};for(const[i,r]of e)s[i]=lt(r)??r;nt.push({targets:n,styles:s})},"addStyleData"),ut=(0,o.K2)(()=>nt,"getStyleData"),ft=(0,o.K2)(t=>t.map(t=>at(t)),"normalizeIdentifierList"),dt=(0,o.K2)(t=>{const e=ft(t).filter(t=>!st.has(t));if(e.length>0)throw new Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),yt=(0,o.K2)(()=>et,"getTextData"),gt=(0,o.K2)(()=>J,"getCurrentSets"),xt=(0,o.K2)(()=>it,"getIndentMode"),pt=(0,o.K2)(t=>{it=t},"setIndentMode"),mt=r.UI.venn;function bt(){return(0,i.$t)(mt,(0,r.zj)().venn)}(0,o.K2)(bt,"getConfig");var vt={getConfig:bt,clear:(0,o.K2)(()=>{(0,r.IU)(),tt.length=0,et.length=0,nt.length=0,st.clear(),J=void 0,it=!1},"customClear"),setAccTitle:r.SV,getAccTitle:r.iN,setDiagramTitle:r.ke,getDiagramTitle:r.ab,getAccDescription:r.m7,setAccDescription:r.EI,addSubsetData:rt,getSubsetData:ot,addTextData:ct,addStyleData:ht,validateUnionIdentifiers:dt,getTextData:yt,getStyleData:ut,getCurrentSets:gt,getIndentMode:xt,setIndentMode:pt},It=(0,o.K2)(t=>`\n .venn-title {\n font-size: 32px;\n fill: ${t.vennTitleTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-circle text {\n font-size: 48px;\n font-family: ${t.fontFamily};\n }\n\n .venn-intersection text {\n font-size: 48px;\n fill: ${t.vennSetTextColor};\n font-family: ${t.fontFamily};\n }\n\n .venn-text-node {\n font-family: ${t.fontFamily};\n color: ${t.vennSetTextColor};\n }\n`,"getStyles");function Mt(t){const e=new Map;for(const n of t){const t=n.targets.join("|"),s=e.get(t);s?Object.assign(s,n.styles):e.set(t,{...n.styles})}return e}(0,o.K2)(Mt,"buildStyleByKey");var kt=(0,o.K2)((t,e,n,i)=>{const o=i.db,c=o.getConfig?.(),{themeVariables:d,look:y,handDrawnSeed:g}=(0,r.zj)(),x="handDrawn"===y,p=[d.venn1,d.venn2,d.venn3,d.venn4,d.venn5,d.venn6,d.venn7,d.venn8].filter(Boolean),m=o.getDiagramTitle?.(),b=o.getSubsetData(),v=o.getTextData(),I=Mt(o.getStyleData()),M=c?.width??800,k=c?.height??450,w=M/1600,_=m?48*w:0,S=d.primaryTextColor??d.textColor,E=(0,s.D)(e);E.attr("viewBox",`0 0 ${M} ${k}`),m&&E.append("text").text(m).attr("class","venn-title").attr("font-size",32*w+"px").attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*w).style("fill",d.vennTitleTextColor||d.titleColor);const T=(0,a.Ltv)(document.createElement("div")),A=P().width(M).height(k-_);T.datum(b).call(A);const R=x?Z.A.svg(T.select("svg").node()):void 0,K=function(t,e={}){const{lossFunction:n,layoutFunction:s=z,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:o,width:a=600,height:l=350,padding:c=15,scaleToFit:h=!1,symmetricalTextCentre:u=!1,distinct:f,round:d=2}=e;let y=s(t,{lossFunction:"default"!==n&&n?"logRatio"===n?D:n:N,distinct:f});i&&(y=F(y,r,o));const g=$(y,a,l,c,h),x=V(g,t,u),p=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),m=t.map(t=>{const e=t.sets.map(t=>p.get(t)),n=W(e);return{circles:e,arcs:n,path:X(n,d),area:t,has:new Set(t.sets)}});function b(t){let e="";for(const n of m)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}return m.map(({circles:t,arcs:e,path:n,area:s})=>({data:s,text:x[s.sets],circles:t,arcs:e,path:n,distinctPath:n+b(s.sets)}))}(b,{width:M,height:k-_,padding:c?.padding??15}),O=new Map;for(const s of K){const t=wt([...s.data.sets].sort());O.set(t,s)}v.length>0&&_t(c,O,T,v,w,I);const C=(0,l.A)(d.background||"#f4f4f4");T.selectAll(".venn-circle").each(function(t,e){const n=(0,a.Ltv)(this),s=wt([...t.sets].sort()),i=I.get(s),r=i?.fill||p[e%p.length]||d.primaryColor;n.classed("venn-set-"+e%8,!0);const o=i?.["fill-opacity"]??.1,l=i?.stroke||r,c=i?.["stroke-width"]||""+5*w;if(x&&R){const t=O.get(s);if(t&&t.circles.length>0){const s=t.circles[0],i=R.circle(s.x,s.y,2*s.radius,{roughness:.7,seed:g,fill:h(r,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:60*e-41,stroke:l,strokeWidth:parseFloat(String(c))});n.select("path").remove(),n.node()?.insertBefore(i,n.select("text").node())}}else n.select("path").style("fill",r).style("fill-opacity",o).style("stroke",l).style("stroke-width",c).style("stroke-opacity",.95);const y=i?.color||(C?(0,u.A)(r,30):(0,f.A)(r,30));n.select("text").style("font-size",48*w+"px").style("fill",y)}),x&&R?T.selectAll(".venn-intersection").each(function(t){const e=(0,a.Ltv)(this),n=wt([...t.sets].sort()),s=I.get(n),i=s?.fill;if(i){const t=e.select("path"),n=t.attr("d");if(n){const e=R.path(n,{roughness:.7,seed:g,fill:h(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),s=t.node();s?.parentNode?.insertBefore(e,s),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",48*w+"px").style("fill",s?.color??d.vennSetTextColor??S)}):(T.selectAll(".venn-intersection text").style("font-size",48*w+"px").style("fill",t=>{const e=wt([...t.sets].sort());return I.get(e)?.color??d.vennSetTextColor??S}),T.selectAll(".venn-intersection path").style("fill-opacity",t=>{const e=wt([...t.sets].sort());return I.get(e)?.fill?1:0}).style("fill",t=>{const e=wt([...t.sets].sort());return I.get(e)?.fill??"transparent"}));const L=E.append("g").attr("transform",`translate(0, ${_})`),j=T.select("svg").node();if(j&&"childNodes"in j)for(const s of[...j.childNodes])L.node()?.appendChild(s);(0,r.a$)(E,k,M,c?.useMaxWidth??!0)},"draw");function wt(t){return t.join("|")}function _t(t,e,n,s,i,r){const o=t?.useDebugLayout??!1,a=n.select("svg").append("g").attr("class","venn-text-nodes"),l=new Map;for(const c of s){const t=wt(c.sets),e=l.get(t);e?e.push(c):l.set(t,[c])}for(const[c,h]of l.entries()){const t=e.get(c);if(!t?.text)continue;const n=t.text.x,s=t.text.y,l=Math.min(...t.circles.map(t=>t.radius)),u=Math.min(...t.circles.map(t=>t.radius-Math.hypot(n-t.x,s-t.y)));let f=Number.isFinite(u)?Math.max(0,u):0;0===f&&Number.isFinite(l)&&(f=.6*l);const d=a.append("g").attr("class","venn-text-area").attr("font-size",40*i+"px");o&&d.append("circle").attr("class","venn-text-debug-circle").attr("cx",n).attr("cy",s).attr("r",f).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const y=Math.max(80*i,2*f*.95),g=Math.max(60*i,2*f*.95),x=(t.data.label&&t.data.label.length>0?Math.min(32*i,.25*f):0)+(h.length<=2?30*i:0),p=n-y/2,m=s-g/2+x,b=Math.max(1,Math.ceil(Math.sqrt(h.length))),v=y/b,I=g/Math.max(1,Math.ceil(h.length/b));for(const[e,a]of h.entries()){const t=e%b,n=Math.floor(e/b),s=p+v*(t+.5),l=m+I*(n+.5);o&&d.append("rect").attr("class","venn-text-debug-cell").attr("x",p+v*t).attr("y",m+I*n).attr("width",v).attr("height",I).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const c=.9*v,h=.9*I,u=d.append("foreignObject").attr("class","venn-text-node-fo").attr("width",c).attr("height",h).attr("x",s-c/2).attr("y",l-h/2).attr("overflow","visible"),f=r.get(a.id)?.color,y=u.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(a.label??a.id);f&&y.style("color",f)}}}(0,o.K2)(wt,"stableSetsKey"),(0,o.K2)(_t,"renderTextNodes");var St={parser:Q,db:vt,renderer:{draw:kt},styles:It}}}]); \ No newline at end of file diff --git a/assets/js/5725.9f82ae1a.js b/assets/js/5725.9f82ae1a.js new file mode 100644 index 0000000..d2d5ee7 --- /dev/null +++ b/assets/js/5725.9f82ae1a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5725],{4937:(t,e,a)=>{a.d(e,{m:()=>s});var r=a(8894),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},8854:(t,e,a)=>{a.d(e,{CP:()=>h,Ck:()=>E,HT:()=>T,PB:()=>p,aC:()=>l,lC:()=>c,m:()=>d,tk:()=>o});var r=a(5691),s=a(8894),i=a(9627),n=a(1485),o=(0,s.K2)((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return e.class&&a.attr("class",e.class),a},"drawRect"),c=(0,s.K2)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};o(t,a).lower()},"drawBackgroundRect"),d=(0,s.K2)((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s},"drawText"),l=(0,s.K2)((t,e,a,r)=>{const s=t.append("image");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",n)},"drawImage"),h=(0,s.K2)((t,e,a,r)=>{const s=t.append("use");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),p=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),T=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),E=(0,s.K2)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},5725:(t,e,a)=>{a.d(e,{diagram:()=>Vt});var r=a(8712),s=a(8854),i=a(4937),n=a(2101),o=a(5691),c=a(8894),d=a(1485),l=a(9627),h=function(){var t=(0,c.K2)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,12],d=[1,14],l=[1,15],h=[1,17],p=[1,18],T=[1,19],E=[1,25],g=[1,26],u=[1,27],y=[1,28],_=[1,29],O=[1,30],x=[1,31],m=[1,32],b=[1,33],I=[1,34],f=[1,35],R=[1,36],L=[1,37],w=[1,38],P=[1,39],N=[1,40],D=[1,42],S=[1,43],A=[1,44],k=[1,45],C=[1,46],M=[1,47],v=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],Y=[1,74],B=[1,80],K=[1,81],$=[1,82],V=[1,83],W=[1,84],F=[1,85],H=[1,86],q=[1,87],z=[1,88],j=[1,89],U=[1,90],G=[1,91],X=[1,92],J=[1,93],Z=[1,94],Q=[1,95],tt=[1,96],et=[1,97],at=[1,98],rt=[1,99],st=[1,100],it=[1,101],nt=[1,102],ot=[1,103],ct=[1,104],dt=[1,105],lt=[2,78],ht=[4,5,17,51,53,54],pt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Tt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],Et=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],gt=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],ut=[5,52],yt=[70,71,72,73],_t=[1,151],Ot={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",75:"CONFIG_START",76:"CONFIG_CONTENT",77:"CONFIG_END",78:"SOLID_OPEN_ARROW",79:"DOTTED_OPEN_ARROW",80:"SOLID_ARROW",81:"SOLID_ARROW_TOP",82:"SOLID_ARROW_BOTTOM",83:"STICK_ARROW_TOP",84:"STICK_ARROW_BOTTOM",85:"SOLID_ARROW_TOP_DOTTED",86:"SOLID_ARROW_BOTTOM_DOTTED",87:"STICK_ARROW_TOP_DOTTED",88:"STICK_ARROW_BOTTOM_DOTTED",89:"SOLID_ARROW_TOP_REVERSE",90:"SOLID_ARROW_BOTTOM_REVERSE",91:"STICK_ARROW_TOP_REVERSE",92:"STICK_ARROW_BOTTOM_REVERSE",93:"SOLID_ARROW_TOP_REVERSE_DOTTED",94:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",95:"STICK_ARROW_TOP_REVERSE_DOTTED",96:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",97:"BIDIRECTIONAL_SOLID_ARROW",98:"DOTTED_ARROW",99:"BIDIRECTIONAL_DOTTED_ARROW",100:"SOLID_CROSS",101:"DOTTED_CROSS",102:"SOLID_POINT",103:"DOTTED_POINT",104:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:(0,c.K2)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 10:case 8:case 9:case 14:this.$=[];break;case 5:case 11:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 12:case 13:case 67:this.$=i[o];break;case 16:i[o].type="createParticipant",this.$=i[o];break;case 17:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 24:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 30:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 31:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 32:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 35:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 42:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 44:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 46:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 48:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 49:case 54:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 50:case 55:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 51:case 56:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 52:case 57:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 53:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 58:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 59:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 60:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 61:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 63:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 66:this.$=[i[o-2],i[o]];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 71:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 72:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor}];break;case 73:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-4].actor}];break;case 74:this.$=[i[o-5],i[o-1],{type:"addMessage",from:i[o-5].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:i[o-1].actor},{type:"centralConnectionReverse",signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:i[o-5].actor}];break;case 75:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 76:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 77:this.$=i[o-1].trim();break;case 78:this.$={type:"addParticipant",actor:i[o]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,5]),{9:48,13:13,14:d,15:l,18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},t(v,[2,7]),t(v,[2,8]),t(v,[2,9]),t(v,[2,15]),{13:49,51:w,53:P,54:N},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:M},{23:56,73:M},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(v,[2,30]),t(v,[2,31]),{33:[1,62]},{35:[1,63]},t(v,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:Y},{23:75,55:76,73:Y},{23:77,73:M},{69:78,72:[1,79],78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:M},{23:111,73:M},{23:112,73:M},{23:113,73:M},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],lt),t(v,[2,6]),t(v,[2,16]),t(ht,[2,10],{11:114}),t(v,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(v,[2,22]),{5:[1,118]},{5:[1,119]},t(v,[2,25]),t(v,[2,26]),t(v,[2,27]),t(v,[2,28]),t(v,[2,29]),t(v,[2,32]),t(v,[2,33]),t(pt,s,{7:120}),t(pt,s,{7:121}),t(pt,s,{7:122}),t(Tt,s,{41:123,7:124}),t(Et,s,{43:125,7:126}),t(Et,s,{7:126,43:127}),t(gt,s,{46:128,7:129}),t(pt,s,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(ut,lt,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:M},{69:146,78:B,79:K,80:$,81:V,82:W,83:F,84:H,85:q,86:z,87:j,88:U,89:G,90:X,91:J,92:Z,93:Q,94:tt,95:et,96:at,97:rt,98:st,99:it,100:nt,101:ot,102:ct,103:dt},t(yt,[2,79]),t(yt,[2,80]),t(yt,[2,81]),t(yt,[2,82]),t(yt,[2,83]),t(yt,[2,84]),t(yt,[2,85]),t(yt,[2,86]),t(yt,[2,87]),t(yt,[2,88]),t(yt,[2,89]),t(yt,[2,90]),t(yt,[2,91]),t(yt,[2,92]),t(yt,[2,93]),t(yt,[2,94]),t(yt,[2,95]),t(yt,[2,96]),t(yt,[2,97]),t(yt,[2,98]),t(yt,[2,99]),t(yt,[2,100]),t(yt,[2,101]),t(yt,[2,102]),t(yt,[2,103]),t(yt,[2,104]),{23:147,73:M},{23:149,60:148,73:M},{73:[2,68]},{73:[2,69]},{58:150,104:_t},{58:152,104:_t},{58:153,104:_t},{58:154,104:_t},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:w,53:P,54:N},{5:[1,160]},t(v,[2,20]),t(v,[2,21]),t(v,[2,23]),t(v,[2,24]),{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,161],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,162],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,163],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,164]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,47],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,50:[1,165],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,166]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,45],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,49:[1,167],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{17:[1,168]},{17:[1,169]},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[2,43],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,48:[1,170],51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{4:i,5:n,8:8,9:10,10:o,13:13,14:d,15:l,17:[1,171],18:16,19:h,22:p,23:41,24:T,25:20,26:21,27:22,28:23,29:24,30:E,31:g,32:u,34:y,36:_,37:O,38:x,39:m,40:b,42:I,44:f,45:R,47:L,51:w,53:P,54:N,56:D,61:S,62:A,63:k,64:C,73:M},{16:[1,172]},t(v,[2,50]),{16:[1,173]},t(v,[2,55]),t(ut,[2,76]),{76:[1,174]},{16:[1,175]},t(v,[2,52]),{16:[1,176]},t(v,[2,57]),t(v,[2,53]),{23:177,73:M},{23:178,73:M},{23:179,73:M},{58:180,104:_t},{23:181,72:[1,182],73:M},{58:183,104:_t},{58:184,104:_t},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(v,[2,17]),t(ht,[2,11]),{13:186,51:w,53:P,54:N},t(ht,[2,13]),t(ht,[2,14]),t(v,[2,19]),t(v,[2,35]),t(v,[2,36]),t(v,[2,37]),t(v,[2,38]),{16:[1,187]},t(v,[2,39]),{16:[1,188]},t(v,[2,40]),t(v,[2,41]),{16:[1,189]},t(v,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:_t},{58:196,104:_t},{58:197,104:_t},{5:[2,75]},{58:198,104:_t},{23:199,73:M},{5:[2,58]},{5:[2,59]},{23:200,73:M},t(ht,[2,12]),t(Tt,s,{7:124,41:201}),t(Et,s,{7:126,43:202}),t(gt,s,{7:129,46:203}),t(v,[2,49]),t(v,[2,54]),t(ut,[2,77]),t(v,[2,51]),t(v,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:_t},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",d=0,l=0,h=0,p=i.slice.call(arguments,1),T=Object.create(this.lexer),E={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(E.yy[g]=this.yy[g]);T.setInput(t,E.yy),E.yy.lexer=T,E.yy.parser=this,void 0===T.yylloc&&(T.yylloc={});var u=T.yylloc;i.push(u);var y=T.options&&T.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||T.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof E.yy.parseError?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.K2)(_,"lex");for(var O,x,m,b,I,f,R,L,w,P={};;){if(m=a[a.length-1],this.defaultActions[m]?b=this.defaultActions[m]:(null==O&&(O=_()),b=n[m]&&n[m][O]),void 0===b||!b.length||!b[0]){var N="";for(f in w=[],n[m])this.terminals_[f]&&f>2&&w.push("'"+this.terminals_[f]+"'");N=T.showPosition?"Parse error on line "+(d+1)+":\n"+T.showPosition()+"\nExpecting "+w.join(", ")+", got '"+(this.terminals_[O]||O)+"'":"Parse error on line "+(d+1)+": Unexpected "+(1==O?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(N,{text:T.match,token:this.terminals_[O]||O,line:T.yylineno,loc:u,expected:w})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+O);switch(b[0]){case 1:a.push(O),s.push(T.yytext),i.push(T.yylloc),a.push(b[1]),O=null,x?(O=x,x=null):(l=T.yyleng,o=T.yytext,d=T.yylineno,u=T.yylloc,h>0&&h--);break;case 2:if(R=this.productions_[b[1]][1],P.$=s[s.length-R],P._$={first_line:i[i.length-(R||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(R||1)].first_column,last_column:i[i.length-1].last_column},y&&(P._$.range=[i[i.length-(R||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(P,[o,l,d,E.yy,b[1],s,i].concat(p))))return I;R&&(a=a.slice(0,-1*R*2),s=s.slice(0,-1*R),i=i.slice(0,-1*R)),a.push(this.productions_[b[1]][0]),s.push(P.$),i.push(P._$),L=n[a[a.length-2]][a[a.length-1]],a.push(L);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,a,r){switch(a){case 0:case 59:case 92:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:case 60:return e.yytext=e.yytext.trim(),73;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),73;case 13:return e.yytext=e.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return e.yytext=e.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 93:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}}();function mt(){this.yy={}}return Ot.lexer=xt,(0,c.K2)(mt,"Parser"),mt.prototype=Ot,Ot.Parser=mt,new mt}();h.parser=h;var p=h,T={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},E={FILLED:0,OPEN:1},g={LEFTOF:0,RIGHTOF:1,OVER:2},u="actor",y="control",_="database",O="entity",x=class{constructor(){this.state=new i.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=T,this.ARROWTYPE=E,this.PLACEMENT=g}static{(0,c.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,s,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,r.H)(t,{schema:r.r})}s=n?.type??s,!n?.alias||a&&a.text!==e||(a={text:n.alias,wrap:a?.wrap,type:s});const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(null==a?.text&&(a={text:e,type:s}),null!=s&&null!=a.text||(a={text:e,type:s}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s,centralConnection:i??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.jZ)(i,(0,o.D7)()):void 0,color:a,wrap:s}}addNote(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const r=JSON.parse(t);this.insertLinks(a,r)}catch(r){c.Rm.error("error while parsing actor link text",r)}}addALink(t,e){const a=this.getActor(t);try{const t={};let r=(0,o.jZ)(e.text,(0,o.D7)());const s=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const i=r.slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(r){c.Rm.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(r){c.Rm.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(s){c.Rm.error("error while parsing actor details text",s)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"centralConnection":case"centralConnectionReverse":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},m=(0,c.K2)(t=>{const e=t.dropShadow??"none",{look:a}=(0,o.D7)();return`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: ${t.strokeWidth??1};\n }\n\n rect.actor.outer-path[data-look="neo"] {\n filter: ${e};\n }\n\n rect.note[data-look="neo"] {\n stroke:${t.noteBorderColor};\n fill:${t.noteBkgColor};\n filter: ${e};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n\n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n [id$="-arrowhead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n [id$="-sequencenumber"] {\n fill: ${t.signalColor};\n }\n\n [id$="-crosshead"] path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n filter: ${"neo"===a?e:"none"};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n ${t.noteFontWeight?`font-weight: ${t.noteFontWeight};`:""}\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man circle, line {\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n g rect.rect {\n filter: ${e};\n stroke: ${t.nodeBorder};\n }\n`},"getStyles"),b="actor-top",I="actor-bottom",f="actor-box",R="actor-man",L=new Set(["redux-color","redux-dark-color"]),w=(0,c.K2)(function(t,e){const a=(0,s.tk)(t,e);return"neo"===(0,o.zj)().look&&a.attr("data-look","neo"),a},"drawRect"),P=(0,c.K2)(function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";s&&(c="block !important");const d=t.append("g");d.attr("id","actor"+n+"_popup"),d.attr("class","actorPopupMenu"),d.attr("display",c);var h="";void 0!==o.class&&(h=" "+o.class);let p=o.width>a?o.width:a;const T=d.append("rect");if(T.attr("class","actorPopupMenuPanel"+h),T.attr("x",o.x),T.attr("y",o.height),T.attr("fill",o.fill),T.attr("stroke",o.stroke),T.attr("width",p),T.attr("height",o.height),T.attr("rx",o.rx),T.attr("ry",o.ry),null!=i){var E=20;for(let t in i){var g=d.append("a"),u=(0,l.J)(i[t]);g.attr("xlink:href",u),g.attr("target","_blank"),nt(r)(t,g,o.x+10,o.height+E,p,20,{class:"actor"},r),E+=30}}return T.attr("height",E),{height:o.height+E,width:p}},"drawPopup"),N=(0,c.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),D=(0,c.K2)(async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,o.dj)(e.text,(0,o.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]},"drawKatex"),S=(0,c.K2)(function(t,e){let a=0,r=0;const s=e.text.split(o.Y2.lineBreakRegex),[i,d]=(0,n.I5)(e.fontSize);let l=[],h=0,p=(0,c.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,c.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,c.K2)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,c.K2)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,c]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(h=o*i);const s=t.append("text");s.attr("x",e.x),s.attr("y",p()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==d&&s.style("font-size",d),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==h&&s.attr("dy",h);const T=c||n.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(T)}else s.text(T);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),l.push(s)}return l},"drawText"),A=(0,c.K2)(function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,c.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,S(t,e),r},"drawLabel"),k=-1,C=(0,c.K2)((t,e,a,r)=>{t.select&&a.forEach(a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)})},"fixLifeLineHeights"),M=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.rx=3,y.ry=3,y.name=e.name,"neo"===l&&(y.rx=6,y.ry=6);const O=w(u,y),x=i.get(e.name)??0;if(L.has(h)&&(O.style("stroke",E[x%E.length]),O.style("fill",T[x%E.length])),"neo"===l&&O.attr("filter","url(#drop-shadow)"),e.rectData=y,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,s.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,s.aC)(u,y.x+y.width-20,y.y+10,t)}r||(u.attr("data-et","participant"),u.attr("data-type","participant"),u.attr("data-id",e.name)),it(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${f}`},a);let m=e.height;if(O.node){const t=O.node().getBBox();e.height=t.height,m=t.height}return m},"drawActorTypeParticipant"),v=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();var u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();var _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.class=_,y.name=e.name;const O={...y,x:y.x+-6,y:y.y+6,class:"actor"},x=w(u,y),m=w(u,O);e.rectData=y,"neo"===l&&u.attr("filter","url(#drop-shadow)");const R=i.get(e.name)??0;if(L.has(h)&&(x.style("stroke",E[R%E.length]),x.style("fill",T[R%E.length]),m.style("stroke",E[R%E.length]),m.style("fill",T[R%E.length])),e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,s.CP)(u,y.x+y.width-20,y.y+10,t.substr(1)):(0,s.aC)(u,y.x+y.width-20,y.y+10,t)}it(a,(0,o.Wi)(e.description))(e.description,u,y.x-6,y.y+6,y.width,y.height,{class:`actor ${f}`},a);let P=e.height;if(x.node){const t=x.node().getBBox();e.height=t.height,P=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","collections"),u.attr("data-id",e.name)),P},"drawActorTypeCollections"),Y=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower();let u=g;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&u.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),u=g.append("g"),e.actorCnt=k,null!=e.links&&u.attr("id","root-"+k),"neo"===l&&u.attr("data-look","neo"));const y=(0,s.PB)();let _="actor";e.properties?.class?_=e.properties.class:y.fill="#eaeaea",_+=r?` ${I}`:` ${b}`,u.attr("class",_),y.x=e.x,y.y=n,y.width=e.width,y.height=e.height,y.name=e.name;const O=y.height/2,x=O/(2.5+y.height/50),m=u.append("g"),R=u.append("g"),w=`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}\n h ${y.width-2*x}\n a ${x},${O} 0 0 0 0,-${y.height}\n Z\n `;m.append("path").attr("d",w),R.append("path").attr("d",`M ${y.x},${y.y+O}\n a ${x},${O} 0 0 0 0,${y.height}`),m.attr("transform",`translate(${x}, ${-y.height/2})`),R.attr("transform",`translate(${y.width-x}, ${-y.height/2})`),e.rectData=y,"neo"===l&&m.attr("filter","url(#drop-shadow)");const P=i.get(e.name)??0;if(L.has(h)&&(m.style("stroke",E[P%E.length]),m.style("fill",T[P%E.length]),R.style("stroke",E[P%E.length]),R.style("fill",T[P%E.length])),e.properties?.icon){const t=e.properties.icon.trim(),a=y.x+y.width-20,r=y.y+10;"@"===t.charAt(0)?(0,s.CP)(u,a,r,t.substr(1)):(0,s.aC)(u,a,r,t)}it(a,(0,o.Wi)(e.description))(e.description,u,y.x,y.y,y.width,y.height,{class:`actor ${f}`},a);let D=e.height;const S=m.select("path:last-child");if(S.node()){const t=S.node().getBBox();e.height=t.height,D=t.height}return r||(u.attr("data-et","participant"),u.attr("data-type","queue"),u.attr("data-id",e.name)),D},"drawActorTypeQueue"),B=(0,c.K2)(function(t,e,a,r,i,n){const c=r?e.stopy:e.starty,d=e.x+e.width/2,l=c+75,{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u,actorBkg:y}=T,_=t.append("g").lower();r||(k++,_.append("line").attr("id","actor"+k).attr("x1",d).attr("y1",l).attr("x2",d).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const O=t.append("g");let x=R;x+=r?` ${I}`:` ${b}`,O.attr("class",x),O.attr("name",e.name);const m=(0,s.PB)();m.x=e.x,m.y=c,m.fill="#eaeaea",m.width=e.width,m.height=e.height,m.class="actor";const f=e.x+e.width/2,w=c+32;O.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),O.append("circle").attr("cx",f).attr("cy",w).attr("r",22).attr("filter",""+("neo"===h?"url(#drop-shadow)":"")),O.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${f}, ${w-22})`);const P=n.get(e.name)??0;L.has(p)?(O.style("stroke",g[P%g.length]),O.style("fill",E[P%g.length])):(O.style("stroke",u),O.style("fill",y));const N=O.node().getBBox();return e.height=N.height+2*(a?.sequence?.labelBoxHeight??0),it(a,(0,o.Wi)(e.description))(e.description,O,m.x,m.y+22+(r?5:12),m.width,m.height,{class:`actor ${R}`},a),r||(O.attr("data-et","participant"),O.attr("data-type","control"),O.attr("data-id",e.name)),e.height},"drawActorTypeControl"),K=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+75,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E}=p,g=t.append("g").lower(),u=t.append("g");let y="actor";y+=r?` ${I}`:` ${b}`,u.attr("class",y),u.attr("name",e.name);const _=(0,s.PB)();_.x=e.x,_.y=n,_.fill="#eaeaea",_.width=e.width,_.height=e.height,_.class="actor";const O=e.x+e.width/2,x=n+(r?10:25),m=22;u.append("circle").attr("cx",O).attr("cy",x).attr("r",m).attr("width",e.width).attr("height",e.height),u.append("line").attr("x1",O-m).attr("x2",O+m).attr("y1",x+m).attr("y2",x+m).attr("stroke-width",2),"neo"===l&&u.attr("filter","url(#drop-shadow)");const f=i.get(e.name)??0;L.has(h)&&(u.style("stroke",E[f%E.length]),u.style("fill",T[f%E.length]));const w=u.node().getBBox();return e.height=w.height+(a?.sequence?.labelBoxHeight??0),r||(k++,g.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k),it(a,(0,o.Wi)(e.description))(e.description,u,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${R}`},a),r?u.attr("transform","translate(0, 22)"):(u.attr("transform","translate(0, 6)"),u.attr("data-et","participant"),u.attr("data-type","entity"),u.attr("data-id",e.name)),e.height},"drawActorTypeEntity"),$=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+e.height+2*a.boxTextMargin,{theme:l,themeVariables:h,look:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=h,u=t.append("g").lower();let y=u;r||(k++,Object.keys(e.links||{}).length&&!a.forceMenus&&y.attr("onclick",N(`actor${k}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),y=u.append("g"),e.actorCnt=k,null!=e.links&&y.attr("id","root-"+k),"neo"===p&&y.attr("data-look","neo"));const _=(0,s.PB)();let O="actor";e.properties?.class?O=e.properties.class:_.fill="#eaeaea",O+=r?` ${I}`:` ${b}`,_.x=e.x,_.y=n,_.width=e.width,_.height=e.height,_.class=O,_.name=e.name,_.x=e.x,_.y=n;const x=_.width/3,m=_.width/3,R=x/2,w=R/(2.5+x/50),P=y.append("g");P.attr("class",O);const D=`\n M ${_.x},${_.y+w}\n a ${R},${w} 0 0 0 ${x},0\n a ${R},${w} 0 0 0 -${x},0\n l 0,${m-2*w}\n a ${R},${w} 0 0 0 ${x},0\n l 0,-${m-2*w}\n`;P.append("path").attr("d",D),"neo"===p&&P.attr("filter","url(#drop-shadow)");const S=i.get(e.name)??0;L.has(l)?(P.style("stroke",E[S%E.length]),P.style("fill",T[S%E.length])):P.style("stroke",g),P.attr("transform",`translate(${x}, ${w})`),e.rectData=_,it(a,(0,o.Wi)(e.description))(e.description,y,_.x,_.y+35,_.width,_.height,{class:`actor ${f}`},a);const A=P.select("path:last-child");if(A.node()){const t=A.node().getBBox();e.height=t.height+(a.sequence.labelBoxHeight??0)}return r||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",e.name)),e.height},"drawActorTypeDatabase"),V=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,l=t.append("g").lower(),{look:h,theme:p,themeVariables:T}=a,{bkgColorArray:E,borderColorArray:g,actorBorder:u}=T;r||(k++,l.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const y=t.append("g");let _=R;_+=r?` ${I}`:` ${b}`,y.attr("class",_),y.attr("name",e.name);const O=(0,s.PB)();O.x=e.x,O.y=n,O.fill="#eaeaea",O.width=e.width,O.height=e.height,O.class="actor",y.append("line").attr("id","actor-man-torso"+k).attr("x1",e.x+e.width/2-55).attr("y1",n+12).attr("x2",e.x+e.width/2-15).attr("y2",n+12),y.append("line").attr("id","actor-man-arms"+k).attr("x1",e.x+e.width/2-55).attr("y1",n+2).attr("x2",e.x+e.width/2-55).attr("y2",n+22),y.append("circle").attr("cx",e.x+e.width/2).attr("cy",n+12).attr("r",22),"neo"===h&&y.attr("filter","url(#drop-shadow)");const x=i.get(e.name)??0;L.has(p)?(y.style("stroke",g[x%g.length]),y.style("fill",E[x%g.length])):y.style("stroke",u);const m=y.node().getBBox();return e.height=m.height+(a.sequence.labelBoxHeight??0),it(a,(0,o.Wi)(e.description))(e.description,y,O.x,O.y+15,O.width,O.height,{class:`actor ${R}`},a),y.attr("transform","translate(0,21)"),r||(y.attr("data-et","participant"),y.attr("data-type","boundary"),y.attr("data-id",e.name)),e.height},"drawActorTypeBoundary"),W=(0,c.K2)(function(t,e,a,r,i){const n=r?e.stopy:e.starty,c=e.x+e.width/2,d=n+80,{look:l,theme:h,themeVariables:p}=a,{bkgColorArray:T,borderColorArray:E,actorBorder:g}=p,u=t.append("g").lower();r||(k++,u.append("line").attr("id","actor"+k).attr("x1",c).attr("y1",d).attr("x2",c).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name).attr("data-et","life-line").attr("data-id",e.name),e.actorCnt=k);const y=t.append("g");let _=R;_+=r?` ${I}`:` ${b}`,y.attr("class",_),y.attr("name",e.name),r||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",e.name);const O="neo"===l?.5:1,x="neo"===l?n+30*(1-O):n;y.append("line").attr("id","actor-man-torso"+k).attr("x1",c).attr("y1",x+25*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("id","actor-man-arms"+k).attr("x1",c-18*O).attr("y1",x+33*O).attr("x2",c+18*O).attr("y2",x+33*O),y.append("line").attr("x1",c-18*O).attr("y1",x+60*O).attr("x2",c).attr("y2",x+45*O),y.append("line").attr("x1",c).attr("y1",x+45*O).attr("x2",c+16*O).attr("y2",x+60*O);const m=y.append("circle");m.attr("cx",e.x+e.width/2),m.attr("cy",x+10*O),m.attr("r",15*O),m.attr("width",e.width*O),m.attr("height",e.height*O);const f=y.node().getBBox();e.height=f.height;const w=(0,s.PB)();w.x=e.x,w.y=x,w.fill="#eaeaea",w.width=e.width,w.height=e.height/O,w.class="actor",w.rx=3,w.ry=3;const P=i.get(e.name)??0;return L.has(h)?(y.style("stroke",E[P%E.length]),y.style("fill",T[P%E.length])):y.style("stroke",g),it(a,(0,o.Wi)(e.description))(e.description,y,w.x,x+35*O-("neo"===l?10:0),w.width,w.height,{class:`actor ${R}`},a),e.height},"drawActorTypeActor"),F=(0,c.K2)(async function(t,e,a,r,s,i,n){const o=n??new Map([...i.db.getActors().values()].map((t,e)=>[t.name,e]));switch(e.type){case"actor":return await W(t,e,a,r,o);case"participant":return await M(t,e,a,r,o);case"boundary":return await V(t,e,a,r,o);case"control":return await B(t,e,a,r,s,o);case"entity":return await K(t,e,a,r,o);case"database":return await $(t,e,a,r,o);case"collections":return await v(t,e,a,r,o);case"queue":return await Y(t,e,a,r,o)}},"drawActor"),H=(0,c.K2)(function(t,e,a){const r=t.append("g");U(r,e),e.name&&it(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),q=(0,c.K2)(function(t){return t.append("g")},"anchorElement"),z=(0,c.K2)(function(t,e,a,r,i,n,o){const{theme:c,themeVariables:d}=r,{bkgColorArray:l,borderColorArray:h,mainBkg:p}=d,T=(0,s.PB)(),E=e.anchored,g=e.actor;T.x=e.startx,T.y=e.starty,T.class="activation"+i%3,T.width=e.stopx-e.startx,T.height=a-e.starty;const u=w(E,T),y=(o??new Map([...n.db.getActors().values()].map((t,e)=>[t.name,e]))).get(g)??0;L.has(c)&&(u.style("stroke",h[y%h.length]),u.style("fill",l[y%h.length]??p))},"drawActivation"),j=(0,c.K2)(async function(t,e,a,r,i){const{boxMargin:n,boxTextMargin:d,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:p,messageFontSize:T,messageFontWeight:E}=r,g=t.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),u=(0,c.K2)(function(t,e,a,r){return g.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");u(e.startx,e.starty,e.stopx,e.starty),u(e.stopx,e.starty,e.stopx,e.stopy),u(e.startx,e.stopy,e.stopx,e.stopy),u(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){u(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,s.HT)();y.text=a,y.x=e.startx,y.y=e.starty,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=Math.max(h??0,50),y.height=l+("neo"===r.look?15:0)||20,y.textMargin=d,y.class="labelText",A(g,y),y=rt(),y.text=e.title,y.x=e.startx+h/2+(e.stopx-e.startx)/2,y.y=e.starty+n+d,y.anchor="middle",y.valign="middle",y.textMargin=d,y.class="loopText",y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=!0;let _=(0,o.Wi)(y.text)?await D(g,y,e):S(g,y);if(void 0!==e.sectionTitles)for(const[s,c]of Object.entries(e.sectionTitles))if(c.message){y.text=c.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[s].y+n+d,y.class="loopText",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=p,y.fontSize=T,y.fontWeight=E,y.wrap=e.wrap,(0,o.Wi)(y.text)?(e.starty=e.sections[s].y,await D(g,y,e)):S(g,y);let t=Math.round(_.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[s].height+=t-(n+d)}return e.height=Math.round(e.stopy-e.starty),g},"drawLoop"),U=(0,c.K2)(function(t,e){(0,s.lC)(t,e)},"drawBackgroundRect"),G=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),X=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),J=(0,c.K2)(function(t,e){t.append("defs").append("symbol").attr("id",e+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Z=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Q=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),tt=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),et=(0,c.K2)(function(t,e){t.append("defs").append("marker").attr("id",e+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),at=(0,c.K2)(function(t,e){const{theme:a}=e;t.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",""+("redux"===a||"redux-color"===a?"#000000":"#FFFFFF"))},"insertDropShadow"),rt=(0,c.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),st=(0,c.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),it=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,c,d,l){const{actorFontSize:h,actorFontFamily:p,actorFontWeight:T}=l,[E,g]=(0,n.I5)(h),u=t.split(o.Y2.lineBreakRegex);for(let n=0;nt.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,c.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,c.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,c.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,c.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,c.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,c.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,c.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,c.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,c.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,c.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,c.K2)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,ft((0,o.D7)())},"init"),updateVal:(0,c.K2)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,c.K2)(function(t,e,a,r){const s=this;let i=0;function n(n){return(0,c.K2)(function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*pt.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*pt.boxMargin,Math.max),s.updateVal(Tt.data,"startx",t-c*pt.boxMargin,Math.min),s.updateVal(Tt.data,"stopx",a+c*pt.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*pt.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*pt.boxMargin,Math.max),s.updateVal(Tt.data,"starty",e-c*pt.boxMargin,Math.min),s.updateVal(Tt.data,"stopy",r+c*pt.boxMargin,Math.max))},"updateItemBounds")}(0,c.K2)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,c.K2)(function(t,e,a,r){const s=o.Y2.getMin(t,a),i=o.Y2.getMax(t,a),n=o.Y2.getMin(e,r),c=o.Y2.getMax(e,r);this.updateVal(Tt.data,"startx",s,Math.min),this.updateVal(Tt.data,"starty",n,Math.min),this.updateVal(Tt.data,"stopx",i,Math.max),this.updateVal(Tt.data,"stopy",c,Math.max),this.updateBounds(s,n,i,c)},"insert"),newActivation:(0,c.K2)(function(t,e,a){const r=a.get(t.from),s=Rt(t.from).length||0,i=r.x+r.width/2+(s-1)*pt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+pt.activationWidth,stopy:void 0,actor:t.from,anchored:ht.anchorElement(e)})},"newActivation"),endActivation:(0,c.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,c.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,c.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,c.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Tt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,c.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,c.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,c.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},Et=(0,c.K2)(async function(t,e,a){Tt.bumpVerticalPos(pt.boxMargin),e.height=pt.boxMargin,e.starty=Tt.getVerticalPos();const r=(0,s.PB)();r.x=e.startx,r.y=e.starty,r.width=e.width||pt.width,r.class="note";const i=t.append("g");i.attr("data-et","note"),i.attr("data-id","i"+a);const n=ht.drawRect(i,r),c=(0,s.HT)();c.x=e.startx,c.y=e.starty,c.width=r.width,c.dy="1em",c.text=e.message,c.class="noteText",c.fontFamily=pt.noteFontFamily,c.fontSize=pt.noteFontSize,c.fontWeight=pt.noteFontWeight,c.anchor=pt.noteAlign,c.textMargin=pt.noteMargin,c.valign="center";const d=(0,o.Wi)(c.text)?await D(i,c):S(i,c),l=Math.round(d.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",l+2*pt.noteMargin),e.height+=l+2*pt.noteMargin,Tt.bumpVerticalPos(l+2*pt.noteMargin),e.stopy=e.starty+l+2*pt.noteMargin,e.stopx=e.startx+r.width,Tt.insert(e.startx,e.starty,e.stopx,e.stopy),Tt.models.addNote(e)},"drawNote"),gt=(0,c.K2)(function(t,e,a,r,s,i,n){const o=r.db.getActors(),d=o.get(e.from),l=o.get(e.to),h=a.sequenceVisible;let p=d.x+d.width/2,T=l.x+l.width/2;const E=p<=T,g=vt(e,r),u=t.append("g"),y=(0,c.K2)((t,e)=>{const a=t?16.5:-16.5;return e?-a:a},"getCircleOffset"),_=(0,c.K2)(t=>{u.append("circle").attr("cx",t).attr("cy",n).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:O,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:m}=r.db.LINETYPE;if(h)switch(e.centralConnection){case O:g&&(T+=y(E,!0));break;case x:g||(p+=y(E,!1));break;case m:g?T+=y(E,!0):p+=y(E,!1)}switch(e.centralConnection){case O:_(T);break;case x:_(p);break;case m:_(p),_(T)}},"drawCentralConnection"),ut=(0,c.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),yt=(0,c.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),_t=(0,c.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function Ot(t,e){Tt.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,i=o.Y2.splitBreaks(s).length,c=(0,o.Wi)(s),d=c?await(0,o.Dl)(s,(0,o.D7)()):n._K.calculateTextDimensions(s,ut(pt));if(!c){const t=d.height/i;e.height+=t,Tt.bumpVerticalPos(t)}let l,h=d.height-10;const p=d.width;if(a===r){l=Tt.getVerticalPos()+h,pt.rightAngles||(h+=pt.boxMargin,l=Tt.getVerticalPos()+h),h+=30;const t=o.Y2.getMax(p/2,pt.width/2);Tt.insert(a-t,Tt.getVerticalPos()-10+h,r+t,Tt.getVerticalPos()+30+h)}else h+=pt.boxMargin,l=Tt.getVerticalPos()+h,Tt.insert(a,l-10,r,l);return Tt.bumpVerticalPos(h),e.height+=h,e.stopy=e.starty+e.height,Tt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}(0,c.K2)(Ot,"boundMessage");var xt=(0,c.K2)(async function(t,e,a,r,i,c){const{startx:d,stopx:l,starty:h,message:p,type:T,sequenceIndex:E,sequenceVisible:g}=e,u=n._K.calculateTextDimensions(p,ut(pt)),y=(0,s.HT)();y.x=d,y.y=h+10,y.width=l-d,y.class="messageText",y.dy="1em",y.text=p,y.fontFamily=pt.messageFontFamily,y.fontSize=pt.messageFontSize,y.fontWeight=pt.messageFontWeight,y.anchor=pt.messageAlign,y.valign="center",y.textMargin=pt.wrapPadding,y.tspan=!1,(0,o.Wi)(y.text)?await D(t,y,{startx:d,stopx:l,starty:a}):S(t,y);const _=u.width;let O;if(d===l){const s=g||pt.showSequenceNumbers,n=vt(i,r),c=Yt(i,r),h=d+(s&&(n||c)?10:0);O=pt.rightAngles?t.append("path").attr("d",`M ${h},${a} H ${d+o.Y2.getMax(pt.width/2,_/2)} V ${a+25} H ${d}`):t.append("path").attr("d","M "+h+","+a+" C "+(h+60)+","+(a-10)+" "+(d+60)+","+(a+30)+" "+d+","+(a+20)),Ct(i,r)&>(t,i,e,r,d,l,a)}else O=t.append("line"),O.attr("x1",d),O.attr("y1",a),O.attr("x2",l),O.attr("y2",a),Ct(i,r)&>(t,i,e,r,d,l,a);T===r.db.LINETYPE.DOTTED||T===r.db.LINETYPE.DOTTED_CROSS||T===r.db.LINETYPE.DOTTED_POINT||T===r.db.LINETYPE.DOTTED_OPEN||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||T===r.db.LINETYPE.SOLID_TOP_DOTTED||T===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||T===r.db.LINETYPE.STICK_TOP_DOTTED||T===r.db.LINETYPE.STICK_BOTTOM_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(O.style("stroke-dasharray","3, 3"),O.attr("class","messageLine1")):O.attr("class","messageLine0"),O.attr("data-et","message"),O.attr("data-id","i"+e.id),O.attr("data-from",e.from),O.attr("data-to",e.to);let x="";if(pt.arrowMarkerAbsolute&&(x=(0,o.ID)(!0)),O.attr("stroke-width",2),O.attr("stroke","none"),O.style("fill","none"),T!==r.db.LINETYPE.SOLID_TOP&&T!==r.db.LINETYPE.SOLID_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.SOLID_BOTTOM&&T!==r.db.LINETYPE.SOLID_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.STICK_TOP&&T!==r.db.LINETYPE.STICK_TOP_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.STICK_BOTTOM&&T!==r.db.LINETYPE.STICK_BOTTOM_DOTTED||O.attr("marker-end","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidBottomArrowHead)"),T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-solidTopArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickBottomArrowHead)"),T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE&&T!==r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED||O.attr("marker-start","url("+x+"#"+c+"-stickTopArrowHead)"),T!==r.db.LINETYPE.SOLID&&T!==r.db.LINETYPE.DOTTED||O.attr("marker-end","url("+x+"#"+c+"-arrowhead)"),T!==r.db.LINETYPE.BIDIRECTIONAL_SOLID&&T!==r.db.LINETYPE.BIDIRECTIONAL_DOTTED||(O.attr("marker-start","url("+x+"#"+c+"-arrowhead)"),O.attr("marker-end","url("+x+"#"+c+"-arrowhead)")),T!==r.db.LINETYPE.SOLID_POINT&&T!==r.db.LINETYPE.DOTTED_POINT||O.attr("marker-end","url("+x+"#"+c+"-filled-head)"),T!==r.db.LINETYPE.SOLID_CROSS&&T!==r.db.LINETYPE.DOTTED_CROSS||O.attr("marker-end","url("+x+"#"+c+"-crosshead)"),g||pt.showSequenceNumbers){const s=T===r.db.LINETYPE.BIDIRECTIONAL_SOLID||T===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,n=T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||T===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||T===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o=6,h=Ct(i,r);let p=d,g=l;s?(dd?g=l-2*o:(g=l-o,p+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),g+=h?15:0,O.attr("x2",g),O.attr("x1",p)):O.attr("x1",d+o);let u=0;const y=d<=l;u=d===l?e.fromBounds+1:n?y?e.toBounds-1:e.fromBounds+1:y?e.fromBounds+1:e.toBounds-1,t.append("line").attr("x1",u).attr("y1",a).attr("x2",u).attr("y2",a).attr("stroke-width",0).attr("marker-start","url("+x+"#"+c+"-sequencenumber)"),t.append("text").attr("x",u).attr("y",a+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(E)}},"drawMessage"),mt=(0,c.K2)(function(t,e,a,r,s,i,n){let c,d=0,l=0,h=0;for(const p of r){const t=e.get(p),r=t.box;c&&c!=r&&(n||Tt.models.addBox(c),l+=pt.boxMargin+c.margin),r&&r!=c&&(n||(r.x=d+l,r.y=s),l+=r.margin),t.width=o.Y2.getMax(t.width||pt.width,pt.width),t.height=o.Y2.getMax(t.height||pt.height,pt.height),t.margin=t.margin||pt.actorMargin,h=o.Y2.getMax(h,t.height),a.get(t.name)&&(l+=t.width/2),t.x=d+l,t.starty=Tt.getVerticalPos(),Tt.insert(t.x,s,t.x+t.width,t.height),d+=t.width+l,t.box&&(t.box.width=d+r.margin-t.box.x),l=t.margin,c=t.box,Tt.models.addActor(t)}c&&!n&&Tt.models.addBox(c),Tt.bumpVerticalPos(h)},"addActorRenderingData"),bt=(0,c.K2)(async function(t,e,a,r,s,i,n){if(r){let r=0;Tt.bumpVerticalPos(2*pt.boxMargin);for(const c of a){const a=e.get(c);a.stopy||(a.stopy=Tt.getVerticalPos());const d=await ht.drawActor(t,a,pt,!0,s,i,n);r=o.Y2.getMax(r,d)}Tt.bumpVerticalPos(r+pt.boxMargin)}else for(const o of a){const a=e.get(o);await ht.drawActor(t,a,pt,!1,s,i,n)}},"drawActors"),It=(0,c.K2)(function(t,e,a,r){let s=0,i=0;for(const n of a){const a=e.get(n),o=St(a),c=ht.drawPopup(t,a,o,pt,pt.forceMenus,r);c.height>s&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},"drawActorsPopup"),ft=(0,c.K2)(function(t){(0,o.hH)(pt,t),t.fontFamily&&(pt.actorFontFamily=pt.noteFontFamily=pt.messageFontFamily=t.fontFamily),t.fontSize&&(pt.actorFontSize=pt.noteFontSize=pt.messageFontSize=t.fontSize),t.fontWeight&&(pt.actorFontWeight=pt.noteFontWeight=pt.messageFontWeight=t.fontWeight)},"setConf"),Rt=(0,c.K2)(function(t){return Tt.activations.filter(function(e){return e.actor===t})},"actorActivations"),Lt=(0,c.K2)(function(t,e){const a=e.get(t),r=Rt(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function wt(t,e,a,r,s){Tt.bumpVerticalPos(a);let i=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=ut(pt);e.message=n._K.wrapLabel(`[${e.message}]`,a-2*pt.wrapPadding,s),e.width=a,e.wrap=!0;const d=n._K.calculateTextDimensions(e.message,s),l=o.Y2.getMax(d.height,pt.labelBoxHeight);i=r+l,c.Rm.debug(`${l} - ${e.message}`)}s(e),Tt.bumpVerticalPos(i)}function Pt(t,e,a,r,s,i,n){function o(a,r){a.x{t.add(e.from),t.add(e.to)}),_=_.filter(e=>t.has(e))}const f=new Map(_.map((t,e)=>[E.get(t)?.name??t,e]));mt(T,E,g,_,0,O,!1);const R=await Kt(O,E,I,r);function L(t,e){const a=Tt.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),ht.drawActivation(T,a,e,pt,Rt(t.from).length,r,f),Tt.insert(a.startx,e-10,a.stopx,e)}ht.insertArrowHead(T,e),ht.insertArrowCrossHead(T,e),ht.insertArrowFilledHead(T,e),ht.insertSequenceNumber(T,e),ht.insertSolidTopArrowHead(T,e),ht.insertSolidBottomArrowHead(T,e),ht.insertStickTopArrowHead(T,e),ht.insertStickBottomArrowHead(T,e),"neo"===n&&ht.insertDropShadow(T,pt),(0,c.K2)(L,"activeEnd");let w=1,P=1;const N=[],D=[];let S=0;for(const o of O){let t,e,a;switch(o.type){case r.db.LINETYPE.NOTE:Tt.resetVerticalPos(),e=o.noteModel,await Et(T,e,o.id);break;case r.db.LINETYPE.ACTIVE_START:case r.db.LINETYPE.CENTRAL_CONNECTION:case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Tt.newActivation(o,T,E);break;case r.db.LINETYPE.ACTIVE_END:L(o,Tt.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"loop",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:wt(R,o,pt.boxMargin,pt.boxMargin,t=>Tt.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=Tt.endLoop(),D.push(t),Tt.models.addLoop(t),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos());break;case r.db.LINETYPE.OPT_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"opt",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"alt",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t)),Tt.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"par",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:w=o.message.start||w,P=o.message.step||P,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:wt(R,o,pt.boxMargin+pt.boxTextMargin,pt.boxMargin,t=>Tt.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"critical",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:wt(R,o,pt.boxMargin,pt.boxMargin+pt.boxTextMargin,t=>Tt.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=Tt.endLoop(),await ht.drawLoop(T,t,"break",pt,o),Tt.bumpVerticalPos(t.stopy-Tt.getVerticalPos()),Tt.models.addLoop(t);break;default:try{a=o.msgModel,a.starty=Tt.getVerticalPos(),a.sequenceIndex=w,a.sequenceVisible=r.db.showSequenceNumbers(),a.id=o.id,a.from=o.from,a.to=o.to;const t=await Ot(0,a);Pt(o,a,t,S,E,g,u),N.push({messageModel:a,lineStartY:t,msg:o}),Tt.models.addMessage(a)}catch(V){c.Rm.error("error while drawing message",V)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(w+=P),S++}c.Rm.debug("createdActors",g),c.Rm.debug("destroyedActors",u),await bt(T,E,_,!1,e,r,f);for(const o of N)await xt(T,o.messageModel,o.lineStartY,r,o.msg,e);pt.mirrorActors&&await bt(T,E,_,!0,e,r,f),D.forEach(t=>ht.drawBackgroundRect(T,t)),C(T,E,_,pt);for(const o of Tt.models.boxes){o.height=Tt.getVerticalPos()-o.y,Tt.insert(o.x,o.y,o.x+o.width,o.height);const t=2*pt.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",ht.drawBox(T,o,pt)}m&&Tt.bumpVerticalPos(pt.boxMargin);const A=It(T,E,_,p),{bounds:k}=Tt.getBounds();void 0===k.startx&&(k.startx=0),void 0===k.starty&&(k.starty=0),void 0===k.stopx&&(k.stopx=0),void 0===k.stopy&&(k.stopy=0);let M=k.stopy-k.starty;M{const a=ut(pt);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*pt.boxMargin,r-=2*pt.boxTextMargin,e.wrap&&(e.name=n._K.wrapLabel(e.name,r-2*pt.wrapPadding,a));const i=n._K.calculateTextDimensions(e.name,a);s=o.Y2.getMax(i.height,s);const c=o.Y2.getMax(r,i.width+2*pt.wrapPadding);if(e.margin=pt.boxTextMargin,rt.textMaxHeight=s),o.Y2.getMax(r,pt.height)}(0,c.K2)(At,"calculateActorMargins");var kt=(0,c.K2)(async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),i=r.x,d=s.x,l=t.wrap&&t.message;let h=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,pt.width,yt(pt)):t.message,yt(pt));const p={width:l?pt.width:o.Y2.getMax(pt.width,h.width+2*pt.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=l?o.Y2.getMax(pt.width,h.width):o.Y2.getMax(r.width/2+s.width/2,h.width+2*pt.noteMargin),p.startx=i+(r.width+pt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=l?o.Y2.getMax(pt.width,h.width+2*pt.noteMargin):o.Y2.getMax(r.width/2+s.width/2,h.width+2*pt.noteMargin),p.startx=i-p.width+(r.width-pt.actorMargin)/2):t.to===t.from?(h=n._K.calculateTextDimensions(l?n._K.wrapLabel(t.message,o.Y2.getMax(pt.width,r.width),yt(pt)):t.message,yt(pt)),p.width=l?o.Y2.getMax(pt.width,r.width):o.Y2.getMax(r.width,pt.width,h.width+2*pt.noteMargin),p.startx=i+(r.width-p.width)/2):(p.width=Math.abs(i+r.width/2-(d+s.width/2))+pt.actorMargin,p.startx=i2,g=(0,c.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?T=p:(t.activate&&!E&&(T+=g(pt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN,a.db.LINETYPE.STICK_TOP,a.db.LINETYPE.STICK_BOTTOM,a.db.LINETYPE.STICK_TOP_DOTTED,a.db.LINETYPE.STICK_BOTTOM_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,a.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(T+=g(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,a.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,a.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(p-=g(3)));const u=[s,i,d,l],y=Math.abs(p-T);t.wrap&&t.message&&(t.message=n._K.wrapLabel(t.message,o.Y2.getMax(y+2*pt.wrapPadding,pt.width),ut(pt)));const _=n._K.calculateTextDimensions(t.message,ut(pt));return{width:o.Y2.getMax(t.wrap?0:_.width+2*pt.wrapPadding,y+2*pt.wrapPadding,pt.width),height:0,startx:p,stopx:T,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,u),toBounds:Math.max.apply(null,u)}},"buildMessageModel"),Kt=(0,c.K2)(async function(t,e,a,r){const s={},i=[];let n,d,l;for(const c of t){switch(c.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:c.id,msg:c.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:c.message&&(n=i.pop(),s[n.id]=n,s[c.id]=n,i.push(n));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:n=i.pop(),s[n.id]=n;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(c.from?c.from:c.to.actor),a=Rt(c.from?c.from:c.to.actor).length,r=t.x+t.width/2+(a-1)*pt.activationWidth/2,s={startx:r,stopx:r+pt.activationWidth,actor:c.from,enabled:!0};Tt.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const t=Tt.activations.map(t=>t.actor).lastIndexOf(c.from);Tt.activations.splice(t,1).splice(0,1)}}void 0!==c.placement?(d=await kt(c,e,r),c.noteModel=d,i.forEach(t=>{n=t,n.from=o.Y2.getMin(n.from,d.startx),n.to=o.Y2.getMax(n.to,d.startx+d.width),n.width=o.Y2.getMax(n.width,Math.abs(n.from-n.to))-pt.labelBoxWidth})):(l=Bt(c,e,r),c.msgModel=l,l.startx&&l.stopx&&i.length>0&&i.forEach(t=>{if(n=t,l.startx===l.stopx){const t=e.get(c.from),a=e.get(c.to);n.from=o.Y2.getMin(t.x-l.width/2,t.x-t.width/2,n.from),n.to=o.Y2.getMax(a.x+l.width/2,a.x+t.width/2,n.to),n.width=o.Y2.getMax(n.width,Math.abs(n.to-n.from))-pt.labelBoxWidth}else n.from=o.Y2.getMin(l.startx,n.from),n.to=o.Y2.getMax(l.stopx,n.to),n.width=o.Y2.getMax(n.width,l.width)-pt.labelBoxWidth}))}return Tt.activations=[],c.Rm.debug("Loop type widths:",s),s},"calculateLoopBounds"),$t={bounds:Tt,drawActors:bt,drawActorsPopup:It,setConf:ft,draw:Nt},Vt={parser:p,get db(){return new x},renderer:$t,styles:m,init:(0,c.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}}}]); \ No newline at end of file diff --git a/assets/js/5734.a0ed7a40.js b/assets/js/5734.a0ed7a40.js deleted file mode 100644 index aaf82ae..0000000 --- a/assets/js/5734.a0ed7a40.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5734],{5734(){}}]); \ No newline at end of file diff --git a/assets/js/5763.3c4dfa82.js b/assets/js/5763.3c4dfa82.js new file mode 100644 index 0000000..8b23ef7 --- /dev/null +++ b/assets/js/5763.3c4dfa82.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5763],{7330:(e,t,s)=>{s.d(t,{A:()=>r});var i=s(8894),n=s(1485),r=(0,i.K2)((e,t)=>{let s;"sandbox"===t&&(s=(0,n.Ltv)("#i"+e));return("sandbox"===t?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`)},"getDiagramElement")},3830:(e,t,s)=>{s.d(t,{P:()=>r});var i=s(5691),n=s(8894),r=(0,n.K2)((e,t,s,r)=>{e.attr("class",s);const{width:o,height:c,x:h,y:u}=a(e,t);(0,i.a$)(e,c,o,r);const y=l(h,u,o,c,t);e.attr("viewBox",y),n.Rm.debug(`viewBox configured: ${y} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,n.K2)((e,t)=>{const s=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*t,height:s.height+2*t,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,n.K2)((e,t,s,i,n)=>`${e-n} ${t-n} ${s} ${i}`,"createViewBox")},5763:(e,t,s)=>{s.d(t,{diagram:()=>p});var i=s(7330),n=s(3830),r=s(163),a=(s(1562),s(2125),s(5707),s(3276),s(4061),s(7127),s(2101)),l=s(5691),o=s(8894),c=function(){var e=(0,o.K2)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,3],s=[1,4],i=[1,5],n=[1,6],r=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],l=[2,7],c=[1,26],h=[1,27],u=[1,28],y=[1,29],d=[1,33],m=[1,34],E=[1,35],p=[1,36],R=[1,37],g=[1,38],f=[1,24],_=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],L=[1,70],v=[1,71],$=[1,72],w=[1,73],x=[1,74],O=[1,75],D=[1,76],M=[1,83],F=[1,80],K=[1,84],P=[1,85],V=[1,86],U=[1,87],B=[1,88],Y=[1,89],Q=[1,90],H=[1,91],W=[1,92],j=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],z=[63,64],G=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Z=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],oe=[1,115],ce={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,o.K2)(function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}},"anonymous"),table:[{3:1,4:2,6:t,9:s,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(r,[2,6]),{3:12,4:2,6:t,9:s,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},e(r,[2,4]),e(r,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:43,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:44,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:45,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:46,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:47,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:48,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:49,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{4:17,5:a,7:50,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:c,22:h,23:u,24:y,25:23,33:25,41:d,42:m,43:E,44:p,45:R,46:g,54:f,72:_,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:L,66:v,67:$,68:w,69:x,70:O,71:D},{62:77,65:L,66:v,67:$,68:w,69:x,70:O,71:D},{30:78,33:62,75:N,89:b,90:T},{73:79,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},e(j,[2,60]),e(j,[2,62]),{73:93,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(z,[2,50]),e(z,[2,51]),e(z,[2,52]),e(z,[2,53]),e(z,[2,54]),e(z,[2,55]),e(z,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:G}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:M,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W}),e(J,[2,67]),e(J,[2,69]),e(J,[2,70]),e(J,[2,71]),e(J,[2,72]),e(J,[2,73]),e(J,[2,74]),e(J,[2,75]),e(J,[2,76]),e(J,[2,77]),e(J,[2,78]),e(k,[2,57],{76:G}),e(k,[2,58],{76:F}),{5:Z,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:oe},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:M,78:121,79:82,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W},e(j,[2,61]),e(j,[2,63]),e(J,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:oe},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:M,80:K,81:P,82:V,83:U,84:B,85:Y,86:Q,87:H,88:W}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:Z,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:oe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:Z,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:oe},{5:re,40:ae,56:164,57:le,59:oe},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,o.K2)(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:(0,o.K2)(function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",c=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),m={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(m.yy[E]=this.yy[E]);d.setInput(e,m.yy),m.yy.lexer=d,m.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;r.push(p);var R=d.options&&d.options.ranges;function g(){var e;return"number"!=typeof(e=i.pop()||d.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),(0,o.K2)(g,"lex");for(var f,_,S,I,b,T,k,N,q,C={};;){if(S=s[s.length-1],this.defaultActions[S]?I=this.defaultActions[S]:(null==f&&(f=g()),I=a[S]&&a[S][f]),void 0===I||!I.length||!I[0]){var A="";for(T in q=[],a[S])this.terminals_[T]&&T>2&&q.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:p,expected:q})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+f);switch(I[0]){case 1:s.push(f),n.push(d.yytext),r.push(d.yylloc),s.push(I[1]),f=null,_?(f=_,_=null):(h=d.yyleng,l=d.yytext,c=d.yylineno,p=d.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[I[1]][1],C.$=n[n.length-k],C._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},R&&(C._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(C,[l,h,c,m.yy,I[1],n,r].concat(y))))return b;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),s.push(this.productions_[I[1]][0]),n.push(C.$),r.push(C._$),N=a[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},he=function(){return{EOF:1,parseError:(0,o.K2)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,o.K2)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,o.K2)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,o.K2)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,o.K2)(function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,o.K2)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return ce.lexer=he,(0,o.K2)(ue,"Parser"),ue.prototype=ce,ce.Parser=ue,new ue}();c.parser=c;var h=c,u=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setAccDescription=l.EI,this.getAccDescription=l.m7,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getConfig=(0,o.K2)(()=>(0,l.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,o.K2)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),o.Rm.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,l.IU)()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(e)for(const s of t){e.classes.push(s);const t=this.classes.get(s)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach(function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){const e=(0,l.D7)(),t=[],s=[];for(const i of this.requirements.values()){const s=i;s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),s.shape="requirementBox",s.look=e.look,s.colorIndex=t.length,t.push(s)}for(const i of this.elements.values()){const s=i;s.shape="requirementBox",s.look=e.look,s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),s.colorIndex=t.length,t.push(s)}for(const i of this.relations){let t=0;const n=i.type===this.Relationships.CONTAINS,r={id:`${i.src}-${i.dst}-${t}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",n?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:n?"normal":"dashed",arrowTypeStart:n?"requirement_contains":"",arrowTypeEnd:n?"":"requirement_arrow",look:e.look,labelType:"markdown"};s.push(r),t++}return{nodes:t,edges:s,other:{},config:e,direction:this.getDirection()}}},y=(0,o.K2)(e=>{const t=(0,l.zj)(),{themeVariables:s,look:i}=t,{bkgColorArray:n,borderColorArray:r}=s;if(!r?.length)return"";let a="";for(let l=0;l{const t=(0,l.zj)(),{look:s,themeVariables:i}=t,{requirementEdgeLabelBackground:n}=i;return`\n ${y(e)}\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: ${"neo"===s?e.strokeWidth:"1px"};\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${e.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${n??e.edgeLabelBackground};\n }\n\n`},"getStyles"),m={};(0,o.VA)(m,{draw:()=>E});var E=(0,o.K2)(async function(e,t,s,c){o.Rm.info("REF0:"),o.Rm.info("Drawing requirement diagram (unified)",t);const{securityLevel:h,state:u,layout:y,look:d}=(0,l.D7)(),m=c.db.getData(),E=(0,i.A)(t,h);m.type=c.type,m.layoutAlgorithm=(0,r.q7)(y),m.nodeSpacing=u?.nodeSpacing??50,m.rankSpacing=u?.rankSpacing??50,m.markers="neo"===d?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],m.diagramId=t,await(0,r.XX)(m,E);a._K.insertTitle(E,"requirementDiagramTitleText",u?.titleTopMargin??25,c.db.getDiagramTitle()),(0,n.P)(E,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),p={parser:h,get db(){return new u},renderer:m,styles:d}}}]); \ No newline at end of file diff --git a/assets/js/5769.004c2474.js b/assets/js/5769.004c2474.js new file mode 100644 index 0000000..10af605 --- /dev/null +++ b/assets/js/5769.004c2474.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5769],{5769:(e,r,t)=>{t.d(r,{diagram:()=>i});var a=t(5105),s=(t(7330),t(3830),t(163),t(1562),t(2125),t(5707),t(3276),t(4061),t(7127),t(2101),t(5691),t(8894)),i={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/5905.a482ad94.js b/assets/js/5905.a482ad94.js new file mode 100644 index 0000000..27ecc07 --- /dev/null +++ b/assets/js/5905.a482ad94.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5905],{5905:(t,e,n)=>{n.d(e,{diagram:()=>lt});var i=n(6417),r=n(2101),a=n(5691),s=n(8894),o=n(1485),c=n(4713),l=n(279),h=n(5485),d=function(){var t=(0,s.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],a=[1,15],o=[1,16],c=[1,19],l=[1,20],h={trace:(0,s.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:(0,s.K2)(function(t,e,n,i,r,a,s){var o=a.length-1;switch(r){case 1:return a[o-1];case 3:i.setDirection("LR");break;case 4:i.setDirection("TD");break;case 5:case 9:case 10:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:this.$=a[o];break;case 11:i.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 15:i.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 18:i.addTask(a[o],0,""),this.$=a[o];break;case 19:i.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(e,[2,5],{5:6}),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:a,20:o,21:17,22:18,23:c,24:l},t(e,[2,10],{1:[2,1]}),t(e,[2,6]),{12:21,14:n,15:i,17:r,19:a,20:o,21:17,22:18,23:c,24:l},t(e,[2,8]),t(e,[2,9]),t(e,[2,11]),{16:[1,22]},{18:[1,23]},t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,7]),t(e,[2,12]),t(e,[2,13])],defaultActions:{},parseError:(0,s.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,s.K2)(function(t){var e=this,n=[0],i=[],r=[null],a=[],o=this.table,c="",l=0,h=0,d=0,u=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var f=p.yylloc;a.push(f);var m=p.options&&p.options.ranges;function x(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,s.K2)(function(t){n.length=n.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,s.K2)(x,"lex");for(var b,k,w,_,v,$,K,S,E,R={};;){if(w=n[n.length-1],this.defaultActions[w]?_=this.defaultActions[w]:(null==b&&(b=x()),_=o[w]&&o[w][b]),void 0===_||!_.length||!_[0]){var T="";for($ in E=[],o[w])this.terminals_[$]&&$>2&&E.push("'"+this.terminals_[$]+"'");T=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(_[0]){case 1:n.push(b),r.push(p.yytext),a.push(p.yylloc),n.push(_[1]),b=null,k?(b=k,k=null):(h=p.yyleng,c=p.yytext,l=p.yylineno,f=p.yylloc,d>0&&d--);break;case 2:if(K=this.productions_[_[1]][1],R.$=r[r.length-K],R._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},m&&(R._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(R,[c,h,l,g.yy,_[1],r,a].concat(u))))return v;K&&(n=n.slice(0,-1*K*2),r=r.slice(0,-1*K),a=a.slice(0,-1*K)),n.push(this.productions_[_[1]][0]),r.push(R.$),a.push(R._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")},d=function(){return{EOF:1,parseError:(0,s.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,s.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,s.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,s.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,s.K2)(function(){return this._more=!0,this},"more"),reject:(0,s.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,s.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,s.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,s.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,s.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,s.K2)(function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},"test_match"),next:(0,s.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;ae[0].length)){if(e=n,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,s.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,s.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,s.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,s.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,s.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,s.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,s.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,s.K2)(function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 13;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}}();function u(){this.yy={}}return h.lexer=d,(0,s.K2)(u,"Parser"),u.prototype=h,h.Parser=u,new u}();d.parser=d;var u=d,p={};(0,s.VA)(p,{addEvent:()=>R,addSection:()=>$,addTask:()=>E,addTaskOrg:()=>T,clear:()=>w,default:()=>M,getCommonDb:()=>k,getDirection:()=>v,getSections:()=>K,getTasks:()=>S,setDirection:()=>_});var g="",y=0,f="LR",m=[],x=[],b=[],k=(0,s.K2)(()=>a.Wt,"getCommonDb"),w=(0,s.K2)(function(){m.length=0,x.length=0,g="",b.length=0,f="LR",(0,a.IU)()},"clear"),_=(0,s.K2)(function(t){f=t},"setDirection"),v=(0,s.K2)(function(){return f},"getDirection"),$=(0,s.K2)(function(t){g=t,m.push(t)},"addSection"),K=(0,s.K2)(function(){return m},"getSections"),S=(0,s.K2)(function(){let t=I();let e=0;for(;!t&&e<100;)t=I(),e++;return x.push(...b),x},"getTasks"),E=(0,s.K2)(function(t,e,n){const i={id:y++,section:g,type:g,task:t,score:e||0,events:n?[n]:[]};b.push(i)},"addTask"),R=(0,s.K2)(function(t){b.find(t=>t.id===y-1).events.push(t)},"addEvent"),T=(0,s.K2)(function(t){const e={section:g,type:g,description:t,task:t,classes:[]};x.push(e)},"addTaskOrg"),I=(0,s.K2)(function(){const t=(0,s.K2)(function(t){return b[t].processed},"compileTask");let e=!0;for(const[n,i]of b.entries())t(n),e=e&&i.processed;return e},"compileTasks"),M={clear:w,getCommonDb:k,getDirection:v,setDirection:_,addSection:$,getSections:K,getTasks:S,addTask:E,addTaskOrg:T,addEvent:R},L=0,H=(0,s.K2)(function(t,e){const n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},"drawRect"),C=(0,s.K2)(function(t,e){const n=15,i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",n).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");function a(t){const i=(0,o.JLW)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function c(t){const i=(0,o.JLW)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(n/2.2);t.append("path").attr("class","mouth").attr("d",i).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function l(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return r.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),(0,s.K2)(a,"smile"),(0,s.K2)(c,"sad"),(0,s.K2)(l,"ambivalent"),e.score>3?a(r):e.score<3?c(r):l(r),i},"drawFace"),N=(0,s.K2)(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},"drawCircle"),D=(0,s.K2)(function(t,e){const n=e.text.replace(//gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),void 0!==e.class&&i.attr("class",e.class);const r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(n),i},"drawText"),A=(0,s.K2)(function(t,e){function n(t,e,n,i,r){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+i-r)+" "+(t+n-1.2*r)+","+(e+i)+" "+t+","+(e+i)}(0,s.K2)(n,"genPoints");const i=t.append("polygon");i.attr("points",n(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,D(t,e)},"drawLabel"),O=(0,s.K2)(function(t,e,n){const i=t.append("g"),r=z();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=n.width,r.height=n.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,H(i,r),F(n)(e.text,i,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),B=-1,P=(0,s.K2)(function(t,e,n,i){const r=e.x+n.width/2,a=t.append("g");B++;a.append("line").attr("id",i+"-task"+B).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),C(a,{cx:r,cy:300+30*(5-e.score),score:e.score});const s=z();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=n.width,s.height=n.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,H(a,s),F(n)(e.task,a,s.x,s.y,s.width,s.height,{class:"task"},n,e.colour)},"drawTask"),W=(0,s.K2)(function(t,e){H(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),j=(0,s.K2)(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),z=(0,s.K2)(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),F=function(){function t(t,e,n,r,a,s,o,c){i(e.append("text").attr("x",n+a/2).attr("y",r+s/2+5).style("font-color",c).style("text-anchor","middle").text(t),o)}function e(t,e,n,r,a,s,o,c,l){const{taskFontSize:h,taskFontFamily:d}=c,u=t.split(//gi);for(let p=0;p)/).reverse(),r=[],a=n.attr("y"),s=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",s+"em");for(let o=0;oe||"
    "===t)&&(r.pop(),c.text(r.join(" ").trim()),r="
    "===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}(0,s.K2)(G,"wrap");var U=(0,s.K2)(function(t,e,n,i,r,a=!1){const{theme:s,look:c}=i,l=s?.includes("redux"),h=n%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=t.append("g");e.section=h,d.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+h);const u=d.append("g"),p=d.append("g"),g=p.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,e.width).node().getBBox(),y=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=g.height+1.1*y*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,p.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),l&&p.attr("transform",`translate(${e.width/2}, ${a?e.padding/2+3:e.padding})`),q(u,e,h,r,i),"neo"===c&&(d.attr("data-look","neo"),l)){const e=s.includes("dark"),n=t.node()?.ownerSVGElement??t.node(),i=(0,o.Ltv)(n),r=i.attr("id")??"",a=r?`${r}-drop-shadow`:"drop-shadow";if(i.select(`#${a}`).empty()){const t=i.select("defs");(t.empty()?i.append("defs"):t).append("filter").attr("id",a).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",e?"0.2":"0.06").attr("flood-color",e?"#FFFFFF":"#000000")}}return e},"drawNode"),Z=(0,s.K2)(function(t,e,n){const i=t.append("g"),r=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(G,e.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),r.height+1.1*a*.5+e.padding},"getVirtualNodeHeight"),q=(0,s.K2)(function(t,e,n,i,r){const{theme:a}=r,s=a?.includes("redux")?0:5,o=s>0?`M0 ${e.height-5} v${10-e.height} q0,-${s},${s},-${s} h${e.width-10} q${s},0,${s},${s} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;t.append("path").attr("id",i+"-node-"+L++).attr("class","node-bkg node-"+e.type).attr("d",o),a?.includes("redux")||t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),J={drawRect:H,drawCircle:N,drawSection:O,drawText:D,drawLabel:A,drawTask:P,drawBackgroundRect:W,getTextObj:j,getNoteRect:z,initGraphics:V,drawNode:U,getVirtualNodeHeight:Z},Y=(0,s.K2)(function(t,e,n,i){const r=(0,a.D7)(),{look:c,theme:l,themeVariables:h}=r,{useGradient:d,gradientStart:u,gradientStop:p}=h,g=r.timeline?.leftMargin??50;s.Rm.debug("timeline",i.db);const y=r.securityLevel;let f;"sandbox"===y&&(f=(0,o.Ltv)("#i"+e));const m=("sandbox"===y?(0,o.Ltv)(f.nodes()[0].contentDocument.body):(0,o.Ltv)("body")).select("#"+e);m.append("g");const x=i.db.getTasks(),b=i.db.getCommonDb().getDiagramTitle();s.Rm.debug("task",x),J.initGraphics(m,e);const k=i.db.getSections();s.Rm.debug("sections",k);let w=0,_=0,v=0,$=0,K=50+g,S=50;$=50;let E=0,R=!0;k.forEach(function(t){const e={number:E,descr:t,section:E,width:150,padding:20,maxHeight:w},n=J.getVirtualNodeHeight(m,e,r);s.Rm.debug("sectionHeight before draw",n),w=Math.max(w,n+20)});let T=0,I=0;s.Rm.debug("tasks.length",x.length);for(const[a,o]of x.entries()){const t={number:a,descr:o,section:o.section,width:150,padding:20,maxHeight:_},e=J.getVirtualNodeHeight(m,t,r);s.Rm.debug("taskHeight before draw",e),_=Math.max(_,e+20),T=Math.max(T,o.events.length);let n=0;for(const i of o.events){const t={descr:i,section:o.section,number:o.section,width:150,padding:20,maxHeight:50};n+=J.getVirtualNodeHeight(m,t,r)}o.events.length>0&&(n+=10*(o.events.length-1)),I=Math.max(I,n)}s.Rm.debug("maxSectionHeight before draw",w),s.Rm.debug("maxTaskHeight before draw",_),k&&k.length>0?k.forEach(t=>{const n=x.filter(e=>e.section===t),i={number:E,descr:t,section:E,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:w};s.Rm.debug("sectionNode",i);const a=m.append("g"),o=J.drawNode(a,i,E,r,e);s.Rm.debug("sectionNode output",o),a.attr("transform",`translate(${K}, 50)`),S+=w+50,n.length>0&&X(m,n,E,K,S,_,r,T,I,w,!1,e),K+=200*Math.max(n.length,1),S=50,E++}):(R=!1,X(m,x,E,K,S,_,r,T,I,w,!0,e));const M=m.node().getBBox();s.Rm.debug("bounds",M),b&&m.append("text").text(b).attr("x","neo"===c?2*M.x+g:M.width/2-g).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),v=R?w+_+150:_+100;if(m.append("g").attr("class","lineWrapper").append("line").attr("x1",g).attr("y1",v).attr("x2",M.width+3*g).attr("y2",v).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),"neo"===c&&d&&"neutral"!==l){const t=m.select("defs"),e=(t.empty()?m.append("defs"):t).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",p).attr("stop-opacity",1)}(0,a.ot)(void 0,m,r.timeline?.padding??50,r.timeline?.useMaxWidth??!1)},"draw"),X=(0,s.K2)(function(t,e,n,i,r,a,o,c,l,h,d,u){for(const p of e){const e={descr:p.task,section:n,number:n,width:150,padding:20,maxHeight:a};s.Rm.debug("taskNode",e);const c=t.append("g").attr("class","taskWrapper"),h=J.drawNode(c,e,n,o,u).height;if(s.Rm.debug("taskHeight after draw",h),c.attr("transform",`translate(${i}, ${r})`),a=Math.max(a,h),p.events){const e=t.append("g").attr("class","lineWrapper");let s=a;r+=100,s+=Q(t,p.events,n,i,r,o,u),r-=100,e.append("line").attr("x1",i+95).attr("y1",r+a).attr("x2",i+95).attr("y2",r+a+100+l+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${u}-arrowhead)`).attr("stroke-dasharray","5,5")}i+=200,d&&!o.timeline?.disableMulticolor&&n++}r-=10},"drawTasks"),Q=(0,s.K2)(function(t,e,n,i,r,a,o){let c=0;const l=r;r+=100;for(const h of e){const e={descr:h,section:n,number:n,width:150,padding:20,maxHeight:50};s.Rm.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),d=J.drawNode(l,e,n,a,o,!0).height;c+=d,l.attr("transform",`translate(${i}, ${r})`),r=r+10+d}return r=l,c},"drawEvents"),tt={setConf:(0,s.K2)(()=>{},"setConf"),draw:Y},et=200,nt=(0,s.K2)(function(t,e,n,o){const c=(0,a.D7)(),l=c.timeline?.leftMargin??50;s.Rm.debug("timeline",o.db);const h=(0,i.D)(e);h.append("g");const d=o.db.getTasks(),u=o.db.getCommonDb().getDiagramTitle();s.Rm.debug("task",d),J.initGraphics(h);const p=o.db.getSections();s.Rm.debug("sections",p);let g=0,y=0;const f=50+l;let m=50;const x=m,b=230,k=f+b;let w=0;const _=p&&p.length>0,v=_?k:f+b,$=Math.max(50,580);p.forEach(function(t){const e={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g},n=J.getVirtualNodeHeight(h,e,c);s.Rm.debug("sectionHeight before draw",n),g=Math.max(g,n)});let K=0;s.Rm.debug("tasks.length",d.length);for(const[i,r]of d.entries()){const t={number:i,descr:r,section:r.section,width:et,padding:5,maxHeight:y},e=J.getVirtualNodeHeight(h,t,c);s.Rm.debug("taskHeight before draw",e),y=Math.max(y,e);let n=0;for(const i of r.events){const t={descr:i,section:r.section,number:r.section,width:300,padding:5,maxHeight:50};n+=J.getVirtualNodeHeight(h,t,c)}r.events.length>0&&(n+=10*(r.events.length-1)),K=Math.max(K,n)+0}s.Rm.debug("maxSectionHeight before draw",g),s.Rm.debug("maxTaskHeight before draw",y);const S=Math.max(y,K)+30;_?p.forEach(t=>{const e=d.filter(e=>e.section===t),n={number:w,descr:t,section:w,width:$,padding:5,maxHeight:g};s.Rm.debug("sectionNode",n);const i=h.append("g"),r=J.drawNode(i,n,w,c);s.Rm.debug("sectionNode output",r);const a=v-b;i.attr("transform",`translate(${a}, ${m})`);const o=m+r.height+20;e.length>0&&it(h,e,w,v,o,y,c,S,!1);const l=e.length,u=r.height+20+S*Math.max(l,1)-(l>0?60:0);m+=u,w++}):it(h,d,w,v,m,y,c,S,!0);let E=h.node()?.getBBox();if(!E)throw new Error("bbox not found");if(s.Rm.debug("bounds",E),u){if(h.append("text").text(u).attr("x",E.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),E=h.node()?.getBBox(),!E)throw new Error("bbox not found");s.Rm.debug("bounds after title",E)}const[R]=(0,r.I5)(c.fontSize),T=2*(R??16),I=.5*(R??16)+20,M=h.append("g").attr("class","lineWrapper");M.append("line").attr("x1",v).attr("y1",x-T).attr("x2",v).attr("y2",E.y+E.height+I).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),M.lower(),(0,a.ot)(void 0,h,c.timeline?.padding??50,c.timeline?.useMaxWidth??!1)},"draw"),it=(0,s.K2)(function(t,e,n,i,r,a,o,c,l){for(const h of e){const e={descr:h.task,section:n,number:n,width:et,padding:5,maxHeight:a};s.Rm.debug("taskNode",e);const d=t.append("g").attr("class","taskWrapper"),u=J.drawNode(d,e,n,o),p=u.height;s.Rm.debug("taskHeight after draw",p);const g=i-20-u.width;if(d.attr("transform",`translate(${g}, ${r})`),a=Math.max(a,p),h.events&&h.events.length>0){const e=r,a=i+50;rt(t,h.events,n,i,a,e,o)}r+=c,l&&!o.timeline?.disableMulticolor&&n++}},"drawTasks"),rt=(0,s.K2)(function(t,e,n,i,r,a,o){let c=a;for(const l of e){const e={descr:l,section:n,number:n,width:300,padding:5,maxHeight:0};s.Rm.debug("eventNode",e);const a=t.append("g").attr("class","eventWrapper"),h=J.drawNode(a,e,n,o).height;a.attr("transform",`translate(${r}, ${c})`);const d=c+h/2;t.append("g").attr("class","lineWrapper").append("line").attr("x1",i).attr("y1",d).attr("x2",r).attr("y2",d).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),c=c+h+10}return c-a},"drawEvents"),at={setConf:(0,s.K2)(()=>{},"setConf"),draw:nt},st=(0,s.K2)(t=>{const{theme:e}=(0,a.zj)(),n=e?.includes("dark"),i=e?.includes("color"),r=t.svgId?.replace(/^#/,"")??"",s=r?`url(#${r}-drop-shadow)`:t.dropShadow??"none";let o="";for(let a=0;a{let e="";for(let n=0;n{const{theme:e}=(0,a.zj)(),n=e?.includes("redux"),i="neutral"===e,r=t.svgId?.replace(/^#/,"")??"";let s="";if(t.useGradient&&r&&t.THEME_COLOR_LIMIT&&!i)for(let a=0;a{},"setConf"),draw:(0,s.K2)((t,e,n,i)=>"TD"===(i?.db?.getDirection?.()??"LR")?at.draw(t,e,n,i):tt.draw(t,e,n,i),"draw")},parser:u,styles:ct}}}]); \ No newline at end of file diff --git a/assets/js/5955.5524a460.js b/assets/js/5955.5524a460.js deleted file mode 100644 index 8da3d14..0000000 --- a/assets/js/5955.5524a460.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5955],{5955(t,i,e){e.d(i,{diagram:()=>it});var s=e(3590),a=e(92),n=e(3226),h=e(7633),o=e(797),r=e(451),l=function(){var t=(0,o.K2)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],w=[1,43],S=[1,42],C=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,o.K2)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=n[o-1];break;case 20:this.$=[Number(n[o-2]),...n[o]];break;case 21:this.$=[Number(n[o])];break;case 22:s.setXAxisTitle(n[o]);break;case 23:s.setXAxisTitle(n[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(n[o]);break;case 26:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 28:this.$=[n[o-2],...n[o]];break;case 29:this.$=[n[o]];break;case 30:s.setYAxisTitle(n[o]);break;case 31:s.setYAxisTitle(n[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 37:case 38:this.$={text:n[o],type:"text"};break;case 39:this.$={text:n[o],type:"markdown"};break;case 40:this.$=n[o];break;case 41:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:a,35:n,36:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:a,35:n,36:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:n,36:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:a,35:n,36:h}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:a,35:n,36:h}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:w,27:S,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:C,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:w,27:S}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:C}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,o.K2)(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,r="",l=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,o.K2)(m,"lex");for(var b,A,w,S,C,k,_,T,R,D={};;){if(w=e[e.length-1],this.defaultActions[w]?S=this.defaultActions[w]:(null==b&&(b=m()),S=h[w]&&h[w][b]),void 0===S||!S.length||!S[0]){var L="";for(k in R=[],h[w])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(S[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(S[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[S[1]][1],D.$=a[a.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},y&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(C=this.performAction.apply(D,[r,c,l,d.yy,S[1],a,n].concat(u))))return C;_&&(e=e.slice(0,-1*_*2),a=a.slice(0,-1*_),n=n.slice(0,-1*_)),e.push(this.productions_[S[1]][0]),a.push(D.$),n.push(D._$),T=h[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0},"parse")},P=function(){return{EOF:1,parseError:(0,o.K2)(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:(0,o.K2)(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,o.K2)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;ni[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,o.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();l.parser=l;var c=l;function g(t){return"bar"===t.type}function u(t){return"band"===t.type}function x(t){return"linear"===t.type}(0,o.K2)(g,"isBarPlot"),(0,o.K2)(u,"isBandAxisData"),(0,o.K2)(x,"isLinearAxisData");var d=class{constructor(t){this.parentGroup=t}static{(0,o.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=(0,a.W6)(s,1,n),h=t?t.width:n.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},p=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,o.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const a=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},f=class extends p{static{(0,o.K2)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,r.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,r.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),o.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends p{static{(0,o.K2)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,r.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,r.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function m(t,i,e,s){const a=new d(s);return u(t)?new f(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,o.K2)(m,"getAxis");var b=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,o.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function A(t,i,e,s){const a=new d(s);return new b(a,t,i,e)}(0,o.K2)(A,"getChartTitleComponent");var w=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,o.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;return i="horizontal"===this.orientation?(0,r.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,r.n8j)().x(t=>t[0]).y(t=>t[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},S=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,o.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},C=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,o.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new w(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new S(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function k(t,i,e){return new C(t,i,e)}(0,o.K2)(k,"getPlotComponent");var _,T=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:A(t,i,e,s),plot:k(t,i,e),xAxis:m(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:m(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,o.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:n});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>g(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,a=e+o.height,t>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>g(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},R=class{static{(0,o.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new T(t,i,e,s).getDrawableElement()}},D=0,L=M(),P=$(),E=z(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1;function $(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function M(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function z(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function B(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function W(t){_=t}function O(t){L.chartOrientation="horizontal"===t?"horizontal":"vertical"}function F(t){E.xAxis.title=B(t.text)}function N(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},K=!0}function X(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>B(t.text))},K=!0}function V(t){E.yAxis.title=B(t.text)}function Y(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},I=!0}function H(t){const i=Math.min(...t),e=Math.max(...t),s=x(E.yAxis)?E.yAxis.min:1/0,a=x(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function U(t){let i=[];if(0===t.length)return i;if(!K){const i=x(E.xAxis)?E.xAxis.min:1/0,e=x(E.xAxis)?E.xAxis.max:-1/0;N(Math.min(i,1),Math.max(e,t.length))}if(I||H(t),u(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),x(E.xAxis)){const e=E.xAxis.min,s=E.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function j(t){return v[0===t?0:t%v.length]}function G(t,i){const e=U(i);E.plots.push({type:"line",strokeFill:j(D),strokeWidth:2,data:e}),D++}function Q(t,i){const e=U(i);E.plots.push({type:"bar",fill:j(D),data:e}),D++}function Z(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),R.build(L,E,P,_)}function q(){return P}function J(){return L}function tt(){return E}(0,o.K2)($,"getChartDefaultThemeConfig"),(0,o.K2)(M,"getChartDefaultConfig"),(0,o.K2)(z,"getChartDefaultData"),(0,o.K2)(B,"textSanitizer"),(0,o.K2)(W,"setTmpSVGG"),(0,o.K2)(O,"setOrientation"),(0,o.K2)(F,"setXAxisTitle"),(0,o.K2)(N,"setXAxisRangeData"),(0,o.K2)(X,"setXAxisBand"),(0,o.K2)(V,"setYAxisTitle"),(0,o.K2)(Y,"setYAxisRangeData"),(0,o.K2)(H,"setYAxisRangeFromPlotData"),(0,o.K2)(U,"transformDataWithoutCategory"),(0,o.K2)(j,"getPlotColorFromPalette"),(0,o.K2)(G,"setLineData"),(0,o.K2)(Q,"setBarData"),(0,o.K2)(Z,"getDrawableElem"),(0,o.K2)(q,"getChartThemeConfig"),(0,o.K2)(J,"getChartConfig"),(0,o.K2)(tt,"getXYChartData");var it={parser:c,db:{getDrawableElem:Z,clear:(0,o.K2)(function(){(0,h.IU)(),D=0,L=M(),E={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},P=$(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:O,setXAxisTitle:F,setXAxisRangeData:N,setXAxisBand:X,setYAxisTitle:V,setYAxisRangeData:Y,setLineData:G,setBarData:Q,setTmpSVGG:W,getChartThemeConfig:q,getChartConfig:J,getXYChartData:tt},renderer:{draw:(0,o.K2)((t,i,e,a)=>{const n=a.db,r=n.getChartThemeConfig(),l=n.getChartConfig(),c=n.getXYChartData().plots[0].data.map(t=>t[1]);function g(t){return"top"===t?"text-before-edge":"middle"}function u(t){return"left"===t?"start":"right"===t?"end":"middle"}function x(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,o.K2)(g,"getDominantBaseLine"),(0,o.K2)(u,"getTextAnchor"),(0,o.K2)(x,"getTextTransformation"),o.Rm.debug("Rendering xychart chart\n"+t);const d=(0,s.D)(i),p=d.append("g").attr("class","main"),f=p.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");(0,h.a$)(d,l.height,l.width,!0),d.attr("viewBox",`0 0 ${l.width} ${l.height}`),f.attr("fill",r.backgroundColor),n.setTmpSVGG(d.append("g").attr("class","mermaid-tmp-group"));const y=n.getDrawableElem(),m={};function b(t){let i=p,e="";for(const[s]of t.entries()){let a=p;s>0&&m[e]&&(a=m[e]),e+=t[s],i=m[e],i||(i=m[e]=a.append("g").attr("class",t[s]))}return i}(0,o.K2)(b,"getGroup");for(const s of y){if(0===s.data.length)continue;const t=b(s.groupTexts);switch(s.type){case"rect":if(t.selectAll("rect").data(s.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),l.showDataLabel)if("horizontal"===l.chartOrientation){let i=function(t,i){const{data:s,label:a}=t;return i*a.length*e<=s.width-10};(0,o.K2)(i,"fitsHorizontally");const e=.7,a=s.data.map((t,i)=>({data:t,label:c[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),n=a.map(t=>{const{data:e}=t;let s=.7*e.height;for(;!i(t,s)&&s>0;)s-=1;return s}),h=Math.floor(Math.min(...n));t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${h}px`).text(t=>t.label)}else{let i=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h+n/2,r=h-n/2>=s.x&&o<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};(0,o.K2)(i,"fitsInBar");const e=10,a=s.data.map((t,i)=>({data:t,label:c[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),n=a.map(t=>{const{data:s,label:a}=t;let n=s.width/(.7*a.length);for(;!i(t,n,e)&&n>0;)n-=1;return n}),h=Math.floor(Math.min(...n));t.selectAll("text").data(a).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",t=>t.data.y+e).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${h}px`).text(t=>t.label)}break;case"text":t.selectAll("text").data(s.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>g(t.verticalPos)).attr("text-anchor",t=>u(t.horizontalPos)).attr("transform",t=>x(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(s.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/5996.973aad9b.js b/assets/js/5996.973aad9b.js deleted file mode 100644 index 9010e83..0000000 --- a/assets/js/5996.973aad9b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5996],{7981(t,e,r){r.d(e,{T:()=>f});var a=r(9142),s=r(9610),i=r(7422),n=r(4092),o=r(6401),l=r(8058),c=r(9592),d=r(3588),h=r(4326),g=r(9902),u=r(3533);const p=(0,h.A)(function(t){return(0,g.A)((0,d.A)(t,1,u.A,!0))});var y=r(8207),b=r(9463),x="\0";class f{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=a.A(void 0),this._defaultEdgeLabelFn=a.A(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[x]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return s.A(t)||(t=a.A(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return i.A(this._nodes)}sources(){var t=this;return n.A(this.nodes(),function(e){return o.A(t._in[e])})}sinks(){var t=this;return n.A(this.nodes(),function(e){return o.A(t._out[e])})}setNodes(t,e){var r=arguments,a=this;return l.A(t,function(t){r.length>1?a.setNode(t,e):a.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=x,this._children[t]={},this._children[x][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],l.A(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),l.A(i.A(this._in[t]),e),delete this._in[t],delete this._preds[t],l.A(i.A(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.A(e))e=x;else{for(var r=e+="";!c.A(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==x)return e}}children(t){if(c.A(t)&&(t=x),this._isCompound){var e=this._children[t];if(e)return i.A(e)}else{if(t===x)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return i.A(e)}successors(t){var e=this._sucs[t];if(e)return i.A(e)}neighbors(t){var e=this.predecessors(t);if(e)return p(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;l.A(this._nodes,function(r,a){t(a)&&e.setNode(a,r)}),l.A(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var a={};function s(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(a[t]=i,i):i in a?a[i]:s(i)}return this._isCompound&&l.A(e.nodes(),function(t){e.setParent(t,s(t))}),e}setDefaultEdgeLabel(t){return s.A(t)||(t=a.A(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return y.A(this._edgeObjs)}setPath(t,e){var r=this,a=arguments;return b.A(t,function(t,s){return a.length>1?r.setEdge(t,s,e):r.setEdge(t,s),s}),this}setEdge(){var t,e,r,a,s=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(t=i.v,e=i.w,r=i.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=i,e=arguments[1],r=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,e=""+e,c.A(r)||(r=""+r);var n=_(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return s&&(this._edgeLabels[n]=a),this;if(!c.A(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[n]=s?a:this._defaultEdgeLabelFn(t,e,r);var o=function(t,e,r,a){var s=""+e,i=""+r;if(!t&&s>i){var n=s;s=i,i=n}var o={v:s,w:i};a&&(o.name=a);return o}(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[n]=o,m(this._preds[e],t),m(this._sucs[t],e),this._in[e][n]=o,this._out[t][n]=o,this._edgeCount++,this}edge(t,e,r){var a=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return this._edgeLabels[a]}hasEdge(t,e,r){var a=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,a)}removeEdge(t,e,r){var a=1===arguments.length?L(this._isDirected,arguments[0]):_(this._isDirected,t,e,r),s=this._edgeObjs[a];return s&&(t=s.v,e=s.w,delete this._edgeLabels[a],delete this._edgeObjs[a],w(this._preds[e],t),w(this._sucs[t],e),delete this._in[e][a],delete this._out[t][a],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var a=y.A(r);return e?n.A(a,function(t){return t.v===e}):a}}outEdges(t,e){var r=this._out[t];if(r){var a=y.A(r);return e?n.A(a,function(t){return t.w===e}):a}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function m(t,e){t[e]?t[e]++:t[e]=1}function w(t,e){--t[e]||delete t[e]}function _(t,e,r,a){var s=""+e,i=""+r;if(!t&&s>i){var n=s;s=i,i=n}return s+"\x01"+i+"\x01"+(c.A(a)?"\0":a)}function L(t,e){return _(t,e.v,e.w,e.name)}f.prototype._nodeCount=0,f.prototype._edgeCount=0},697(t,e,r){r.d(e,{T:()=>a.T});var a=r(7981)},5937(t,e,r){r.d(e,{A:()=>i});var a=r(2453),s=r(4886);const i=(t,e)=>a.A.lang.round(s.A.parse(t)[e])},53(t,e,r){r.d(e,{A:()=>s});var a=r(8675);const s=function(t){return(0,a.A)(t,4)}},5996(t,e,r){r.d(e,{diagram:()=>we});var a=r(2501),s=r(8698),i=r(3245),n=r(92),o=r(3226),l=r(7633),c=r(797),d=r(53),h=r(5582),g=r(5937),u=r(451),p=r(697),y=function(){var t=(0,c.K2)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],s=[1,14],i=[1,19],n=[1,16],o=[1,17],l=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],p=[8,10,15,16,21,28,29,30,31,39,43,46],y=[8,10,15,16,21,27,28,29,30,31,39,43,46],b=[1,49],x={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.K2)(function(t,e,r,a,s,i,n){var o=i.length-1;switch(s){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",i[o-1]),a.setHierarchy(i[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",i[o]),"number"==typeof i[o].length?this.$=i[o]:this.$=[i[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",i[o-1]),this.$=[i[o-1]].concat(i[o]);break;case 14:a.getLogger().debug("Rule: link: ",i[o],t),this.$={edgeTypeStr:i[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",i[o-3],i[o-1],i[o]),this.$={edgeTypeStr:i[o],label:i[o-1]};break;case 18:const e=parseInt(i[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",i[o-2],i[o-1],i[o]," typestr: ",i[o-1].edgeTypeStr);const s=a.edgeStrToEdgeData(i[o-1].edgeTypeStr);this.$=[{id:i[o-2].id,label:i[o-2].label,type:i[o-2].type,directions:i[o-2].directions},{id:i[o-2].id+"-"+i[o].id,start:i[o-2].id,end:i[o].id,label:i[o-1].label,type:"edge",directions:i[o].directions,arrowTypeEnd:s,arrowTypeStart:"arrow_open"},{id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",i[o-1],i[o]),this.$={id:i[o-1].id,label:i[o-1].label,type:a.typeStr2Type(i[o-1].typeStr),directions:i[o-1].directions,widthInColumns:parseInt(i[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",i[o]),this.$={id:i[o].id,label:i[o].label,type:a.typeStr2Type(i[o].typeStr),directions:i[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",i[o]),this.$={type:"column-setting",columns:"auto"===i[o]?-1:parseInt(i[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",i[o-2],i[o-1]);a.generateId();this.$={...i[o-2],type:"composite",children:i[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",i[o-2],i[o-1],i[o]);const n=a.generateId();this.$={id:n,type:"composite",label:"",children:i[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",i[o]),this.$={id:i[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",i[o-1],i[o]),this.$={id:i[o-1],label:i[o].label,typeStr:i[o].typeStr,directions:i[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",i[o]),this.$=[i[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",i[o-1],i[o]),this.$=[i[o-1]].concat(i[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",i[o-2],i[o-1],i[o]),this.$={typeStr:i[o-2]+i[o],label:i[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",i[o-3],i[o-2]," #3:",i[o-1],i[o]),this.$={typeStr:i[o-3]+i[o],label:i[o-2],directions:i[o-1]};break;case 35:case 36:this.$={type:"classDef",id:i[o-1].trim(),css:i[o].trim()};break;case 37:this.$={type:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:this.$={type:"applyStyles",id:i[o-1].trim(),stylesStr:i[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:s,31:i,39:n,43:o,46:l},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:s,31:i,39:n,43:o,46:l}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(p,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:i},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:s,31:i,39:n,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(y,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:i},{31:[2,14]},{17:[1,36]},t(p,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:s,31:i,39:n,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(y,[2,30]),{18:[1,43]},{18:[1,44]},t(p,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:b},{15:[1,50]},t(h,[2,27]),t(y,[2,33]),{38:[1,51]},{33:52,34:b,38:[2,31]},{31:[2,15]},t(y,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],a=[],s=[null],i=[],n=this.table,o="",l=0,d=0,h=0,g=i.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var b=u.yylloc;i.push(b);var x=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.K2)(f,"lex");for(var m,w,_,L,k,S,v,E,D,C={};;){if(_=r[r.length-1],this.defaultActions[_]?L=this.defaultActions[_]:(null==m&&(m=f()),L=n[_]&&n[_][m]),void 0===L||!L.length||!L[0]){var R="";for(S in D=[],n[_])this.terminals_[S]&&S>2&&D.push("'"+this.terminals_[S]+"'");R=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:b,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+m);switch(L[0]){case 1:r.push(m),s.push(u.yytext),i.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,o=u.yytext,l=u.yylineno,b=u.yylloc,h>0&&h--);break;case 2:if(v=this.productions_[L[1]][1],C.$=s[s.length-v],C._$={first_line:i[i.length-(v||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(v||1)].first_column,last_column:i[i.length-1].last_column},x&&(C._$.range=[i[i.length-(v||1)].range[0],i[i.length-1].range[1]]),void 0!==(k=this.performAction.apply(C,[o,d,l,p.yy,L[1],s,i].concat(g))))return k;v&&(r=r.slice(0,-1*v*2),s=s.slice(0,-1*v),i=i.slice(0,-1*v)),r.push(this.productions_[L[1]][0]),s.push(C.$),i.push(C._$),E=n[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,a,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=r,a=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function m(){this.yy={}}return x.lexer=f,(0,c.K2)(m,"Parser"),m.prototype=x,x.Parser=m,new m}();y.parser=y;var b=y,x=new Map,f=[],m=new Map,w="color",_="fill",L=(0,l.D7)(),k=new Map,S=(0,c.K2)(t=>l.Y2.sanitizeText(t,L),"sanitizeText"),v=(0,c.K2)(function(t,e=""){let r=k.get(t);r||(r={id:t,styles:[],textStyles:[]},k.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(w).exec(t)){const t=e.replace(_,"bgFill").replace(w,_);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),E=(0,c.K2)(function(t,e=""){const r=x.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),D=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=x.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},x.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),C=(0,c.K2)((t,e)=>{const r=t.flat(),a=[],s=r.find(t=>"column-setting"===t?.type),i=s?.columns??-1;for(const n of r)if("number"==typeof i&&i>0&&"column-setting"!==n.type&&"number"==typeof n.widthInColumns&&n.widthInColumns>i&&c.Rm.warn(`Block ${n.id} width ${n.widthInColumns} exceeds configured column width ${i}`),n.label&&(n.label=S(n.label)),"classDef"!==n.type)if("applyClass"!==n.type)if("applyStyles"!==n.type)if("column-setting"===n.type)e.columns=n.columns??-1;else if("edge"===n.type){const t=(m.get(n.id)??0)+1;m.set(n.id,t),n.id=t+"-"+n.id,f.push(n)}else{n.label||("composite"===n.type?n.label="":n.label=n.id);const t=x.get(n.id);if(void 0===t?x.set(n.id,n):("na"!==n.type&&(t.type=n.type),n.label!==n.id&&(t.label=n.label)),n.children&&C(n.children,n),"space"===n.type){const t=n.width??1;for(let e=0;e{c.Rm.debug("Clear called"),(0,l.IU)(),K={id:"root",type:"composite",children:[],columns:-1},x=new Map([["root",K]]),R=[],k=new Map,f=[],m=new Map},"clear");function N(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function T(t){return c.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function A(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,c.K2)(N,"typeStr2Type"),(0,c.K2)(T,"edgeTypeStr2Type"),(0,c.K2)(A,"edgeStrToEdgeData");var I=0,O=(0,c.K2)(()=>(I++,"id-"+Math.random().toString(36).substr(2,12)+"-"+I),"generateId"),B=(0,c.K2)(t=>{K.children=t,C(t,K),R=K.children},"setHierarchy"),z=(0,c.K2)(t=>{const e=x.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),M=(0,c.K2)(()=>[...x.values()],"getBlocksFlat"),P=(0,c.K2)(()=>R||[],"getBlocks"),Y=(0,c.K2)(()=>f,"getEdges"),F=(0,c.K2)(t=>x.get(t),"getBlock"),j=(0,c.K2)(t=>{x.set(t.id,t)},"setBlock"),W=(0,c.K2)(()=>c.Rm,"getLogger"),X=(0,c.K2)(function(){return k},"getClasses"),H={getConfig:(0,c.K2)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:N,edgeTypeStr2Type:T,edgeStrToEdgeData:A,getLogger:W,getBlocksFlat:M,getBlocks:P,getEdges:Y,setHierarchy:B,getBlock:F,setBlock:j,getColumns:z,getClasses:X,clear:$,generateId:O},U=(0,c.K2)((t,e)=>{const r=g.A,a=r(t,"r"),s=r(t,"g"),i=r(t,"b");return h.A(a,s,i,e)},"fade"),Z=(0,c.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${U(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .node .cluster {\n // fill: ${U(t.mainBkg,.5)};\n fill: ${U(t.clusterBkg,.5)};\n stroke: ${U(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,a.o)()}\n`,"getStyles"),q=(0,c.K2)((t,e,r,a)=>{e.forEach(e=>{G[e](t,r,a)})},"insertMarkers"),G={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},J=q,V=(0,l.D7)()?.block?.padding??8;function Q(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(Q,"calculateBlockPosition");var tt=(0,c.K2)(t=>{let e=0,r=0;for(const a of t.children){const{width:s,height:i,x:n,y:o}=a.size??{width:0,height:0,x:0,y:0};c.Rm.debug("getMaxChildSize abc95 child:",a.id,"width:",s,"height:",i,"x:",n,"y:",o,a.type),"space"!==a.type&&(s>e&&(e=s/(t.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}},"getMaxChildSize");function et(t,e,r=0,a=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let s=0,i=0;if(t.children?.length>0){for(const r of t.children)et(r,e);const n=tt(t);s=n.width,i=n.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",s,i);for(const e of t.children)e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${s} ${i} ${JSON.stringify(e.size)}`),e.size.width=s*(e.widthInColumns??1)+V*((e.widthInColumns??1)-1),e.size.height=i,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${s} maxHeight:${i}`));for(const r of t.children)et(r,e,s,i);const o=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let d=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(e>0){const r=(g-e*V-V)/e;c.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:g,height:u,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function rt(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const a=t?.children[0]?.size?.width??0,s=t.children.length*a+(t.children.length-1)*V;c.Rm.debug("widthOfChildren 88",s,"posX");let i=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-V,o=0;for(const l of t.children){const a=t;if(!l.size)continue;const{width:s,height:d}=l.size,{px:h,py:g}=Q(r,i);if(g!=o&&(o=g,n=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-V,c.Rm.debug("New row in layout for block",t.id," and child ",l.id,o)),c.Rm.debug(`abc89 layout blocks (child) id: ${l.id} Pos: ${i} (px, py) ${h},${g} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${s}${V}`),a.size){const t=s/2;l.size.x=n+V+t,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${l.id} startingPos=X${n} new startingPosX${l.size.x} ${t} padding=${V} width=${s} halfWidth=${t} => x:${l.size.x} y:${l.size.y} ${l.widthInColumns} (width * (child?.w || 1)) / 2 ${s*(l?.widthInColumns??1)/2}`),n=l.size.x+t,l.size.y=a.size.y-a.size.height/2+g*(d+V)+d/2+V,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${l.id}startingPosX${n}${V}${t}=>x:${l.size.x}y:${l.size.y}${l.widthInColumns}(width * (child?.w || 1)) / 2${s*(l?.widthInColumns??1)/2}`)}l.children&&rt(l,e);let u=l?.widthInColumns??1;r>0&&(u=Math.min(u,r-i%r)),i+=u,c.Rm.debug("abc88 columnsPos",l,i)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function at(t,{minX:e,minY:r,maxX:a,maxY:s}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:i,y:n,width:o,height:l}=t.size;i-o/2a&&(a=i+o/2),n+l/2>s&&(s=n+l/2)}if(t.children)for(const i of t.children)({minX:e,minY:r,maxX:a,maxY:s}=at(i,{minX:e,minY:r,maxX:a,maxY:s}));return{minX:e,minY:r,maxX:a,maxY:s}}function st(t){const e=t.getBlock("root");if(!e)return;et(e,t,0,0),rt(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:a,maxX:s,maxY:i}=at(e);return{x:r,y:a,width:s-r,height:i-a}}function it(t,e){e&&t.attr("style",e)}function nt(t,e){const r=(0,u.Ltv)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=r.append("xhtml:div"),s=t.label,i=t.isNode?"nodeLabel":"edgeLabel",n=a.append("span");return n.html((0,l.jZ)(s,e)),it(n,t.labelStyle),n.attr("class",i),it(a,t.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}(0,c.K2)(et,"setBlockSizes"),(0,c.K2)(rt,"layoutBlocks"),(0,c.K2)(at,"findBounds"),(0,c.K2)(st,"layout"),(0,c.K2)(it,"applyStyle"),(0,c.K2)(nt,"addHtmlLabel");var ot=(0,c.K2)(async(t,e,r,a)=>{let s=t||"";"object"==typeof s&&(s=s[0]);const i=(0,l.D7)();if((0,l._3)(i.flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"
    "),c.Rm.debug("vertexText"+s);return nt({isNode:a,label:await(0,n.hE)((0,o.Sm)(s)),labelStyle:e.replace("fill:","color:")},i)}{const t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));let a=[];a="string"==typeof s?s.split(/\\n|\n|/gi):Array.isArray(s)?s:[];for(const e of a){const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),r?a.setAttribute("class","title-row"):a.setAttribute("class","row"),a.textContent=e.trim(),t.appendChild(a)}return t}},"createLabel"),lt=(0,c.K2)((t,e,r,a,s)=>{e.arrowTypeStart&&dt(t,"start",e.arrowTypeStart,r,a,s),e.arrowTypeEnd&&dt(t,"end",e.arrowTypeEnd,r,a,s)},"addEdgeMarkers"),ct={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},dt=(0,c.K2)((t,e,r,a,s,i)=>{const n=ct[r];if(!n)return void c.Rm.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${s}_${i}-${n}${o})`)},"addEdgeMarker"),ht={},gt={},ut=(0,c.K2)(async(t,e)=>{const r=(0,l.D7)(),a=(0,l._3)(r.flowchart.htmlLabels),s="markdown"===e.labelType?(0,n.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:!0},r):await ot(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),o=i.insert("g").attr("class","label");o.node().appendChild(s);let c,d=s.getBBox();if(a){const t=s.children[0],e=(0,u.Ltv)(s);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}if(o.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),ht[e.id]=i,e.width=d.width,e.height=d.height,e.startLabelLeft){const r=await ot(e.startLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner");c=s.node().appendChild(r);const i=r.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),gt[e.id]||(gt[e.id]={}),gt[e.id].startLeft=a,pt(c,e.startLabelLeft)}if(e.startLabelRight){const r=await ot(e.startLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner");c=a.node().appendChild(r),s.node().appendChild(r);const i=r.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),gt[e.id]||(gt[e.id]={}),gt[e.id].startRight=a,pt(c,e.startLabelRight)}if(e.endLabelLeft){const r=await ot(e.endLabelLeft,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner");c=s.node().appendChild(r);const i=r.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),gt[e.id]||(gt[e.id]={}),gt[e.id].endLeft=a,pt(c,e.endLabelLeft)}if(e.endLabelRight){const r=await ot(e.endLabelRight,e.labelStyle),a=t.insert("g").attr("class","edgeTerminals"),s=a.insert("g").attr("class","inner");c=s.node().appendChild(r);const i=r.getBBox();s.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),a.node().appendChild(r),gt[e.id]||(gt[e.id]={}),gt[e.id].endRight=a,pt(c,e.endLabelRight)}return s},"insertEdgeLabel");function pt(t,e){(0,l.D7)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(pt,"setTerminalWidth");var yt=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,ht[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,l.D7)(),{subGraphTitleTotalMargin:s}=(0,i.O)(a);if(t.label){const a=ht[t.id];let i=t.x,n=t.y;if(r){const a=o._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",i,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(i=a.x,n=a.y)}a.attr("transform",`translate(${i}, ${n+s/2})`)}if(t.startLabelLeft){const e=gt[t.id].startLeft;let a=t.x,s=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,s=e.y}e.attr("transform",`translate(${a}, ${s})`)}if(t.startLabelRight){const e=gt[t.id].startRight;let a=t.x,s=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,s=e.y}e.attr("transform",`translate(${a}, ${s})`)}if(t.endLabelLeft){const e=gt[t.id].endLeft;let a=t.x,s=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,s=e.y}e.attr("transform",`translate(${a}, ${s})`)}if(t.endLabelRight){const e=gt[t.id].endRight;let a=t.x,s=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,s=e.y}e.attr("transform",`translate(${a}, ${s})`)}},"positionEdgeLabel"),bt=(0,c.K2)((t,e)=>{const r=t.x,a=t.y,s=Math.abs(e.x-r),i=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return s>=n||i>=o},"outsideNode"),xt=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,s=t.y,i=Math.abs(a-r.x),n=t.width/2;let o=r.xMath.abs(a-e.x)*l){let t=r.y{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],s=!1;return t.forEach(t=>{if(bt(e,t)||s)a=t,s||r.push(t);else{const i=xt(e,a,t);let n=!1;r.forEach(t=>{n=n||t.x===i.x&&t.y===i.y}),r.some(t=>t.x===i.x&&t.y===i.y)||r.push(i),s=!0}}),r},"cutPathAtIntersect"),mt=(0,c.K2)(function(t,e,r,a,i,n,o){let d=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var p=n.node(e.w);p?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(p.intersect(d[d.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",a[r.toCluster]),d=ft(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",a[r.fromCluster]),d=ft(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const y=d.filter(t=>!Number.isNaN(t.y));let b=u.qrM;!r.curve||"graph"!==i&&"flowchart"!==i||(b=r.curve);const{x:x,y:f}=(0,s.RI)(r),m=(0,u.n8j)().x(x).y(f).curve(b);let w;switch(r.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(r.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const _=t.append("path").attr("d",m(y)).attr("id",r.id).attr("class"," "+w+(r.classes?" "+r.classes:"")).attr("style",r.style);let L="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(L=(0,l.ID)(!0)),lt(_,r,L,o,i);let k={};return h&&(k.updatedPath=d),k.originalPath=r.points,k},"insertEdge"),wt=(0,c.K2)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),_t=(0,c.K2)((t,e,r)=>{const a=wt(t),s=e.height+2*r.padding,i=s/2,n=e.width+2*i+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:i,y:0},{x:n/2,y:2*o},{x:n-i,y:0},{x:n,y:0},{x:n,y:-s/3},{x:n+2*o,y:-s/2},{x:n,y:-2*s/3},{x:n,y:-s},{x:n-i,y:-s},{x:n/2,y:-s-2*o},{x:i,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*o,y:-s/2},{x:0,y:-s/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:i,y:0},{x:n-i,y:0},{x:n,y:-s/2},{x:n-i,y:-s},{x:i,y:-s},{x:0,y:-s/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:i,y:-s},{x:n-i,y:-s},{x:n,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:-i},{x:n,y:-s+i},{x:0,y:-s}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:n,y:0},{x:0,y:-i},{x:0,y:-s+i},{x:n,y:-s}]:a.has("right")&&a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-s/2},{x:n-i,y:-s},{x:n-i,y:-s+o},{x:i,y:-s+o},{x:i,y:-s},{x:0,y:-s/2}]:a.has("up")&&a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-s+o},{x:0,y:-s+o},{x:n/2,y:-s},{x:n,y:-s+o},{x:n-i,y:-s+o},{x:n-i,y:-o},{x:n,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:n,y:-i},{x:0,y:-s}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-s}]:a.has("left")&&a.has("up")?[{x:n,y:0},{x:0,y:-i},{x:n,y:-s}]:a.has("left")&&a.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-s}]:a.has("right")?[{x:i,y:-o},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:0},{x:n,y:-s/2},{x:n-i,y:-s},{x:n-i,y:-s+o},{x:i,y:-s+o},{x:i,y:-s+o}]:a.has("left")?[{x:i,y:0},{x:i,y:-o},{x:n-i,y:-o},{x:n-i,y:-s+o},{x:i,y:-s+o},{x:i,y:-s},{x:0,y:-s/2}]:a.has("up")?[{x:i,y:-o},{x:i,y:-s+o},{x:0,y:-s+o},{x:n/2,y:-s},{x:n,y:-s+o},{x:n-i,y:-s+o},{x:n-i,y:-o}]:a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:i,y:-o},{x:i,y:-s+o},{x:n-i,y:-s+o},{x:n-i,y:-o},{x:n,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function Lt(t,e){return t.intersect(e)}(0,c.K2)(Lt,"intersectNode");var kt=Lt;function St(t,e,r,a){var s=t.x,i=t.y,n=s-a.x,o=i-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x0}(0,c.K2)(Ct,"intersectLine"),(0,c.K2)(Rt,"sameSign");var Kt=Ct,$t=Nt;function Nt(t,e,r){var a=t.x,s=t.y,i=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=s-t.height/2-o,d=0;d1&&i.sort(function(t,e){var a=t.x-r.x,s=t.y-r.y,i=Math.sqrt(a*a+s*s),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return i{var r,a,s=t.x,i=t.y,n=e.x-s,o=e.y-i,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:s+r,y:i+a}},"intersectRect")},At=(0,c.K2)(async(t,e,r,a)=>{const s=(0,l.D7)();let i;const d=e.useHtmlLabels||(0,l._3)(s.flowchart.htmlLabels);i=r||"node default";const h=t.insert("g").attr("class",i).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let p;p=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];const y=g.node();let b;b="markdown"===e.labelType?(0,n.GZ)(g,(0,l.jZ)((0,o.Sm)(p),s),{useHtmlLabels:d,width:e.width||s.flowchart.wrappingWidth,classes:"markdown-node-label"},s):y.appendChild(await ot((0,l.jZ)((0,o.Sm)(p),s),e.labelStyle,!1,a));let x=b.getBBox();const f=e.padding/2;if((0,l._3)(s.flowchart.htmlLabels)){const t=b.children[0],e=(0,u.Ltv)(b),r=t.getElementsByTagName("img");if(r){const t=""===p.replace(/]*>/g,"").trim();await Promise.all([...r].map(e=>new Promise(r=>{function a(){if(e.style.display="flex",e.style.flexDirection="column",t){const t=s.fontSize?s.fontSize:window.getComputedStyle(document.body).fontSize,r=5,a=parseInt(t,10)*r+"px";e.style.minWidth=a,e.style.maxWidth=a}else e.style.width="100%";r(e)}(0,c.K2)(a,"setupImage"),setTimeout(()=>{e.complete&&a()}),e.addEventListener("error",a),e.addEventListener("load",a)})))}x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return d?g.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):g.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:x,halfPadding:f,label:g}},"labelHelper"),It=(0,c.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ot(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(Ot,"insertPolygonShape");var Bt=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,l.D7)().flowchart.htmlLabels||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:s}=await At(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);const i=r.insert("rect",":first-child");return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-s).attr("y",-a.height/2-s).attr("width",a.width+e.padding).attr("height",a.height+e.padding),It(e,i),e.intersect=function(t){return Tt.rect(e,t)},r},"note"),zt=(0,c.K2)(t=>t?" "+t:"","formatClass"),Mt=(0,c.K2)((t,e)=>`${e||"node default"}${zt(t.classes)} ${zt(t.class)}`,"getClassesFromNode"),Pt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding+(a.height+e.padding),i=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];c.Rm.info("Question main (Circle)");const n=Ot(r,s,s,i);return n.attr("style",e.style),It(e,n),e.intersect=function(t){return c.Rm.warn("Intersect called"),Tt.polygon(e,i,t)},r},"question"),Yt=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Tt.circle(e,14,t)},r},"choice"),Ft=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.height+e.padding,i=s/4,n=a.width+2*i+e.padding,o=[{x:i,y:0},{x:n-i,y:0},{x:n,y:-s/2},{x:n-i,y:-s},{x:i,y:-s},{x:0,y:-s/2}],l=Ot(r,n,s,o);return l.attr("style",e.style),It(e,l),e.intersect=function(t){return Tt.polygon(e,o,t)},r},"hexagon"),jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,void 0,!0),s=a.height+2*e.padding,i=s/2,n=a.width+2*i+e.padding,o=_t(e.directions,a,e),l=Ot(r,n,s,o);return l.attr("style",e.style),It(e,l),e.intersect=function(t){return Tt.polygon(e,o,t)},r},"block_arrow"),Wt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:-i/2,y:0},{x:s,y:0},{x:s,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}];return Ot(r,s,i,n).attr("style",e.style),e.width=s+i,e.height=i,e.intersect=function(t){return Tt.polygon(e,n,t)},r},"rect_left_inv_arrow"),Xt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:-2*i/6,y:0},{x:s-i/6,y:0},{x:s+2*i/6,y:-i},{x:i/6,y:-i}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"lean_right"),Ht=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:2*i/6,y:0},{x:s+i/6,y:0},{x:s-2*i/6,y:-i},{x:-i/6,y:-i}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"lean_left"),Ut=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:-2*i/6,y:0},{x:s+2*i/6,y:0},{x:s-i/6,y:-i},{x:i/6,y:-i}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"trapezoid"),Zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:i/6,y:0},{x:s-i/6,y:0},{x:s+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"inv_trapezoid"),qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:0,y:0},{x:s+i/2,y:0},{x:s,y:-i/2},{x:s+i/2,y:-i},{x:0,y:-i}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"rect_right_inv_arrow"),Gt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=s/2,n=i/(2.5+s/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+i+","+n+" 0,0,0 "+s+" 0 a "+i+","+n+" 0,0,0 "+-s+" 0 l 0,"+o+" a "+i+","+n+" 0,0,0 "+s+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-s/2+","+-(o/2+n)+")");return It(e,c),e.intersect=function(t){const r=Tt.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)e.height/2-n)){let s=n*n*(1-a*a/(i*i));0!=s&&(s=Math.sqrt(s)),s=n-s,t.y-e.y>0&&(s=-s),r.y+=s}return r},r},"cylinder"),Jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:s}=await At(t,e,"node "+e.classes+" "+e.class,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-s,d=e.positioned?-o/2:-a.height/2-s;if(i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(i,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return It(e,i),e.intersect=function(t){return Tt.rect(e,t)},r},"rect"),Vt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:s}=await At(t,e,"node "+e.classes,!0),i=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-s,d=e.positioned?-o/2:-a.height/2-s;if(i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(i,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return It(e,i),e.intersect=function(t){return Tt.rect(e,t)},r},"composite"),Qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r}=await At(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(te(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return It(e,a),e.intersect=function(t){return Tt.rect(e,t)},r},"labelRect");function te(t,e,r,a){const s=[],i=(0,c.K2)(t=>{s.push(t,0)},"addBorder"),n=(0,c.K2)(t=>{s.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),i(r)):n(r),e.includes("r")?(c.Rm.debug("add right border"),i(a)):n(a),e.includes("b")?(c.Rm.debug("add bottom border"),i(r)):n(r),e.includes("l")?(c.Rm.debug("add left border"),i(a)):n(a),t.attr("stroke-dasharray",s.join(" "))}(0,c.K2)(te,"applyNodePropertyBorders");var ee=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=a.insert("rect",":first-child"),i=a.insert("line"),n=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,c.Rm.info("Label text abc79",d,o,"object"==typeof o);const h=n.node().appendChild(await ot(d,e.labelStyle,!0,!0));let g={width:0,height:0};if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=h.children[0],e=(0,u.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.Rm.info("Text 2",o);const p=o.slice(1,o.length);let y=h.getBBox();const b=n.node().appendChild(await ot(p.join?p.join("
    "):p,e.labelStyle,!0,!0));if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=b.children[0],e=(0,u.Ltv)(b);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const x=e.padding/2;return(0,u.Ltv)(b).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,u.Ltv)(h).attr("transform","translate( "+(g.width{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.height+e.padding,i=a.width+s/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",s/2).attr("ry",s/2).attr("x",-i/2).attr("y",-s/2).attr("width",i).attr("height",s);return It(e,n),e.intersect=function(t){return Tt.rect(e,t)},r},"stadium"),ae=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:s}=await At(t,e,Mt(e,void 0),!0),i=r.insert("circle",":first-child");return i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+s).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("Circle main"),It(e,i),e.intersect=function(t){return c.Rm.info("Circle intersect",e,a.width/2+s,t),Tt.circle(e,a.width/2+s,t)},r},"circle"),se=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:s}=await At(t,e,Mt(e,void 0),!0),i=r.insert("g",":first-child"),n=i.insert("circle"),o=i.insert("circle");return i.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+s+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+s).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("DoubleCircle main"),It(e,n),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,a.width/2+s+5,t),Tt.circle(e,a.width/2+s+5,t)},r},"doublecircle"),ie=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await At(t,e,Mt(e,void 0),!0),s=a.width+e.padding,i=a.height+e.padding,n=[{x:0,y:0},{x:s,y:0},{x:s,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:s+8,y:0},{x:s+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Ot(r,s,i,n);return o.attr("style",e.style),It(e,o),e.intersect=function(t){return Tt.polygon(e,n,t)},r},"subroutine"),ne=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),It(e,a),e.intersect=function(t){return Tt.circle(e,7,t)},r},"start"),oe=(0,c.K2)((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s=70,i=10;"LR"===r&&(s=10,i=70);const n=a.append("rect").attr("x",-1*s/2).attr("y",-1*i/2).attr("width",s).attr("height",i).attr("class","fork-join");return It(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Tt.rect(e,t)},a},"forkJoin"),le={rhombus:Pt,composite:Vt,question:Pt,rect:Jt,labelRect:Qt,rectWithTitle:ee,choice:Yt,circle:ae,doublecircle:se,stadium:re,hexagon:Ft,block_arrow:jt,rect_left_inv_arrow:Wt,lean_right:Xt,lean_left:Ht,trapezoid:Ut,inv_trapezoid:Zt,rect_right_inv_arrow:qt,cylinder:Gt,start:ne,end:(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),s=r.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),It(e,s),e.intersect=function(t){return Tt.circle(e,7,t)},r},"end"),note:Bt,subroutine:ie,fork:oe,join:oe,class_box:(0,c.K2)(async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),i=s.insert("rect",":first-child"),n=s.insert("line"),o=s.insert("line");let c=0,d=4;const h=s.insert("g").attr("class","label");let g=0;const p=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",b=h.node().appendChild(await ot(y,e.labelStyle,!0,!0));let x=b.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=b.children[0],e=(0,u.Ltv)(b);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.D7)().flowchart.htmlLabels?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=h.node().appendChild(await ot(f,e.labelStyle,!0,!0));(0,u.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=m.children[0],e=(0,u.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const _=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.D7)().flowchart.htmlLabels&&(a=a.replace(//g,">"));const s=h.node().appendChild(await ot(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=s.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=s.children[0],e=(0,u.Ltv)(s);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,_.push(s)}),d+=8;const L=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.D7)().flowchart.htmlLabels&&(a=a.replace(//g,">"));const s=h.node().appendChild(await ot(a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0));let i=s.getBBox();if((0,l._3)((0,l.D7)().flowchart.htmlLabels)){const t=s.children[0],e=(0,u.Ltv)(s);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}i.width>c&&(c=i.width),d+=i.height+4,L.push(s)}),d+=8,p){let t=(c-x.width)/2;(0,u.Ltv)(b).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let k=(c-w.width)/2;return(0,u.Ltv)(m).attr("transform","translate( "+(-1*c/2+k)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,_.forEach(t=>{(0,u.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,L.forEach(t=>{(0,u.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),i.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),It(e,i),e.intersect=function(t){return Tt.rect(e,t)},s},"class_box")},ce={},de=(0,c.K2)(async(t,e,r)=>{let a,s;if(e.link){let i;"sandbox"===(0,l.D7)().securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i),s=await le[e.shape](a,e,r)}else s=await le[e.shape](t,e,r),a=s;return e.tooltip&&s.attr("title",e.tooltip),e.class&&s.attr("class","node default "+e.class),ce[e.id]=a,e.haveCallback&&ce[e.id].attr("class",ce[e.id].attr("class")+" clickable"),a},"insertNode"),he=(0,c.K2)(t=>{const e=ce[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function ge(t,e,r=!1){const a=t;let s="default";(a?.classes?.length||0)>0&&(s=(a?.classes??[]).join(" ")),s+=" flowchart-label";let i,n=0,c="";switch(a.type){case"round":n=5,c="rect";break;case"composite":n=0,c="composite",i=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0};return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:n,ry:n,class:s,style:d.style,id:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:i??(0,l.zj)()?.block?.padding??0}}async function ue(t,e,r){const a=ge(e,0,!1);if("group"===a.type)return;const s=(0,l.zj)(),i=await de(t,a,{config:s}),n=i.node().getBBox(),o=r.getBlock(a.id);o.size={width:n.width,height:n.height,x:0,y:0,node:i},r.setBlock(o),i.remove()}async function pe(t,e,r){const a=ge(e,0,!0);if("space"!==r.getBlock(a.id).type){const r=(0,l.zj)();await de(t,a,{config:r}),e.intersect=a?.intersect,he(a)}}async function ye(t,e,r,a){for(const s of e)await a(t,s,r),s.children&&await ye(t,s.children,r,a)}async function be(t,e,r){await ye(t,e,r,ue)}async function xe(t,e,r){await ye(t,e,r,pe)}async function fe(t,e,r,a,s){const i=new p.T({multigraph:!0,compound:!0});i.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const n of r)n.size&&i.setNode(n.id,{width:n.size.width,height:n.size.height,intersect:n.intersect});for(const n of e)if(n.start&&n.end){const e=a.getBlock(n.start),r=a.getBlock(n.end);if(e?.size&&r?.size){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}];mt(t,{v:n.start,w:n.end,name:n.id},{...n,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",i,s),n.label&&(await ut(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),yt({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,c.K2)(ge,"getNodeFromBlock"),(0,c.K2)(ue,"calculateBlockSize"),(0,c.K2)(pe,"insertBlockPositioned"),(0,c.K2)(ye,"performOperations"),(0,c.K2)(be,"calculateBlockSizes"),(0,c.K2)(xe,"insertBlocks"),(0,c.K2)(fe,"insertEdges");var me=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),we={parser:b,db:H,renderer:{draw:(0,c.K2)(async function(t,e,r,a){const{securityLevel:s,block:i}=(0,l.zj)(),n=a.db;let o;"sandbox"===s&&(o=(0,u.Ltv)("#i"+e));const d="sandbox"===s?(0,u.Ltv)(o.nodes()[0].contentDocument.body):(0,u.Ltv)("body"),h="sandbox"===s?d.select(`[id="${e}"]`):(0,u.Ltv)(`[id="${e}"]`);J(h,["point","circle","cross"],a.type,e);const g=n.getBlocks(),p=n.getBlocksFlat(),y=n.getEdges(),b=h.insert("g").attr("class","block");await be(b,g,n);const x=st(n);if(await xe(b,g,n),await fe(b,y,p,n,e),x){const t=x,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:s}=i;(0,l.a$)(h,r,a,!!s),c.Rm.debug("Here Bounds",x,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:me},styles:Z}},2501(t,e,r){r.d(e,{o:()=>a});var a=(0,r(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]); \ No newline at end of file diff --git a/assets/js/5b2964ea.142fbe85.js b/assets/js/5b2964ea.142fbe85.js new file mode 100644 index 0000000..d3f62d2 --- /dev/null +++ b/assets/js/5b2964ea.142fbe85.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2001],{1799:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"reference/admin/plugins","title":"Admin API: Plugins","description":"Plugins extend HappyView with WebAssembly modules sourced from the official plugin registry or any URL serving a manifest.json. Most endpoints take a plugin manifest URL and load (or reload) the plugin in place \u2014 no restart needed. Encrypted plugin secrets require TOKENENCRYPTIONKEY to be configured.","source":"@site/docs/reference/admin/plugins.md","sourceDirName":"reference/admin","slug":"/reference/admin/plugins","permalink":"/reference/admin/plugins","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"API Clients","permalink":"/reference/admin/api-clients"},"next":{"title":"Record API","permalink":"/reference/lua/record-api"}}');var r=s(199),l=s(2560);const t={},d="Admin API: Plugins",c={},a=[{value:"List installed plugins",id:"list-installed-plugins",level:2},{value:"Preview a plugin before installing",id:"preview-a-plugin-before-installing",level:2},{value:"Install a plugin",id:"install-a-plugin",level:2},{value:"List official plugins",id:"list-official-plugins",level:2},{value:"Remove a plugin",id:"remove-a-plugin",level:2},{value:"Reload a plugin",id:"reload-a-plugin",level:2},{value:"Check for plugin updates",id:"check-for-plugin-updates",level:2},{value:"Get plugin secrets",id:"get-plugin-secrets",level:2},{value:"Update plugin secrets",id:"update-plugin-secrets",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,l.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"admin-api-plugins",children:"Admin API: Plugins"})}),"\n",(0,r.jsxs)(n.p,{children:["Plugins extend HappyView with WebAssembly modules sourced from the ",(0,r.jsx)(n.a,{href:"/guides/plugins",children:"official plugin registry"})," or any URL serving a ",(0,r.jsx)(n.code,{children:"manifest.json"}),". Most endpoints take a plugin manifest URL and load (or reload) the plugin in place \u2014 no restart needed. Encrypted plugin secrets require ",(0,r.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"})," to be configured."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"list-installed-plugins",children:"List installed plugins"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/plugins\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:read"}),". Returns every loaded plugin with its source, required secrets, configuration status, and any pending updates from the official registry cache."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/plugins -H "$AUTH"\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "encryption_configured": true,\n "plugins": [\n {\n "id": "steam",\n "name": "Steam",\n "version": "1.2.0",\n "source": "url",\n "url": "https://example.com/plugins/steam/manifest.json",\n "sha256": null,\n "enabled": true,\n "auth_type": "openid",\n "required_secrets": [\n {\n "key": "PLUGIN_STEAM_API_KEY",\n "name": "Steam Web API Key",\n "description": "Get your API key at steamcommunity.com/dev/apikey"\n }\n ],\n "secrets_configured": true,\n "loaded_at": null,\n "update_available": false,\n "latest_version": "1.2.0",\n "pending_releases": []\n }\n ]\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"secrets_configured"})," is ",(0,r.jsx)(n.code,{children:"true"})," if the plugin has no required secrets, or if a row exists for it in ",(0,r.jsx)(n.code,{children:"plugin_configs"}),". ",(0,r.jsx)(n.code,{children:"update_available"})," and ",(0,r.jsx)(n.code,{children:"pending_releases"})," are populated from the cached official registry \u2014 call ",(0,r.jsx)(n.code,{children:"POST /admin/plugins/{id}/check-update"})," to refresh them."]}),"\n",(0,r.jsx)(n.h2,{id:"preview-a-plugin-before-installing",children:"Preview a plugin before installing"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/plugins/preview\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:create"}),". Fetches and parses a manifest without installing the plugin, so the dashboard can show what it would register."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/plugins/preview \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "url": "https://example.com/plugins/steam/manifest.json" }\'\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": "steam",\n "name": "Steam",\n "version": "1.2.0",\n "description": "Import your Steam game library and playtime data.",\n "icon_url": "https://example.com/steam-icon.png",\n "auth_type": "openid",\n "required_secrets": [\n { "key": "PLUGIN_STEAM_API_KEY", "name": "Steam Web API Key", "description": "..." }\n ],\n "manifest_url": "https://example.com/plugins/steam/manifest.json",\n "wasm_url": "https://example.com/plugins/steam/steam.wasm"\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Returns ",(0,r.jsx)(n.code,{children:"400 Bad Request"})," if the manifest can't be fetched or parsed."]}),"\n",(0,r.jsx)(n.h2,{id:"install-a-plugin",children:"Install a plugin"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/plugins\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:create"}),". Fetches the manifest, downloads the WASM, registers the plugin, and persists it."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/plugins \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "url": "https://example.com/plugins/steam/manifest.json",\n "sha256": "abc123..."\n }\'\n'})}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Required"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"url"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"yes"}),(0,r.jsxs)(n.td,{children:["URL to the plugin's ",(0,r.jsx)(n.code,{children:"manifest.json"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"sha256"})}),(0,r.jsx)(n.td,{children:"string"}),(0,r.jsx)(n.td,{children:"no"}),(0,r.jsx)(n.td,{children:"Optional sha256 of the WASM binary. If provided, install fails when the downloaded hash mismatches"})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})," returning the same ",(0,r.jsx)(n.code,{children:"PluginSummary"})," shape as the list endpoint. ",(0,r.jsx)(n.code,{children:"secrets_configured"})," will be ",(0,r.jsx)(n.code,{children:"false"})," if the plugin requires any secrets \u2014 call ",(0,r.jsx)(n.code,{children:"PUT /admin/plugins/{id}/secrets"})," to configure them before the plugin can run."]}),"\n",(0,r.jsx)(n.h2,{id:"list-official-plugins",children:"List official plugins"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/plugins/official\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:read"}),". Returns the cached catalog of plugins from the official registry. The cache is refreshed periodically by the server; use ",(0,r.jsx)(n.code,{children:"POST /admin/plugins/{id}/check-update"})," to force-refresh a single entry."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "last_refreshed_at": "2026-04-13T11:00:00Z",\n "plugins": [\n {\n "id": "steam",\n "name": "Steam",\n "description": "Import your Steam game library and playtime data.",\n "icon_url": "https://example.com/steam-icon.png",\n "latest_version": "1.2.0",\n "manifest_url": "https://example.com/plugins/steam/manifest.json"\n }\n ]\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"remove-a-plugin",children:"Remove a plugin"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"DELETE /admin/plugins/{id}\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:delete"}),". Unregisters the plugin from the runtime and deletes its row from the ",(0,r.jsx)(n.code,{children:"plugins"})," table. Secrets stay in ",(0,r.jsx)(n.code,{children:"plugin_configs"}),", so they're reused if you reinstall."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"204 No Content"}),". Returns ",(0,r.jsx)(n.code,{children:"404 Not Found"})," if no plugin with that id is loaded."]}),"\n",(0,r.jsx)(n.h2,{id:"reload-a-plugin",children:"Reload a plugin"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/plugins/{id}/reload\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:create"}),". Re-fetches the plugin from its current source URL and re-registers it. Useful after publishing a new version of a plugin you host yourself."]}),"\n",(0,r.jsx)(n.p,{children:"The body is optional. To point the plugin at a new URL, pass:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "url": "https://example.com/plugins/steam/manifest.json" }\n'})}),"\n",(0,r.jsxs)(n.p,{children:["When a new URL is provided, the stored ",(0,r.jsx)(n.code,{children:"sha256"})," is cleared (the new version has its own hash). File-based plugins cannot be reloaded via this endpoint and return ",(0,r.jsx)(n.code,{children:"400 Bad Request"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})," with the refreshed ",(0,r.jsx)(n.code,{children:"PluginSummary"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"check-for-plugin-updates",children:"Check for plugin updates"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"POST /admin/plugins/{id}/check-update\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:create"}),". Forces a cache refresh for one plugin from the official registry, then returns the updated ",(0,r.jsx)(n.code,{children:"PluginSummary"})," with ",(0,r.jsx)(n.code,{children:"update_available"}),", ",(0,r.jsx)(n.code,{children:"latest_version"}),", and ",(0,r.jsx)(n.code,{children:"pending_releases"})," reflecting the latest catalog state."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})," with a ",(0,r.jsx)(n.code,{children:"PluginSummary"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"get-plugin-secrets",children:"Get plugin secrets"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"GET /admin/plugins/{id}/secrets\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:read"}),". Returns the plugin's configured secrets with values masked (last 4 characters shown for values longer than 8 characters, otherwise fully masked). Requires ",(0,r.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"})," to be configured."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "plugin_id": "steam",\n "secrets": {\n "PLUGIN_STEAM_API_KEY": "********ABCD"\n }\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"update-plugin-secrets",children:"Update plugin secrets"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"PUT /admin/plugins/{id}/secrets\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Requires ",(0,r.jsx)(n.code,{children:"plugins:create"}),". Encrypts the provided secret values with ",(0,r.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"})," (AES-256-GCM) and upserts them into ",(0,r.jsx)(n.code,{children:"plugin_configs"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-sh",children:'curl -X PUT http://localhost:3000/admin/plugins/steam/secrets \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "secrets": {\n "PLUGIN_STEAM_API_KEY": "your-new-api-key"\n }\n }\'\n'})}),"\n",(0,r.jsx)(n.p,{children:"Special handling:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Values starting with ",(0,r.jsx)(n.code,{children:"********"})," are treated as masked placeholders and the existing encrypted value is preserved (so you can ",(0,r.jsx)(n.code,{children:"GET"})," then ",(0,r.jsx)(n.code,{children:"PUT"})," without re-typing every secret)."]}),"\n",(0,r.jsx)(n.li,{children:"Empty string values are not stored \u2014 use them to clear a secret."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Response"}),": ",(0,r.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>d});var i=s(63);const r={},l=i.createContext(r);function t(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d3a5990.05192a54.js b/assets/js/5d3a5990.05192a54.js new file mode 100644 index 0000000..170579e --- /dev/null +++ b/assets/js/5d3a5990.05192a54.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3197],{6425:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>a,default:()=>p,frontMatter:()=>l,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","source":"@site/docs/reference/scripts/expanded-query.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/expanded-query","permalink":"/reference/scripts/expanded-query","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"},"next":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"}}');var t=r(199),i=r(2560);const l={},a="Query: Expanded Query with Profiles",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"query-expanded-query-with-profiles",children:"Query: Expanded Query with Profiles"})}),"\n",(0,t.jsx)(s.p,{children:"List statuses and include the profile of each user who created one."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-lua",children:'function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = "xyz.statusphere.status",\n did = params.did,\n limit = limit,\n cursor = params.cursor,\n })\n\n -- Collect unique DIDs from the statuses\n local seen = {}\n local profile_uris = {}\n for _, status in ipairs(result.records) do\n local did = string.match(status.uri, "at://([^/]+)/")\n if did and not seen[did] then\n seen[did] = true\n profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"\n end\n end\n\n -- Load all profiles in parallel\n local profiles = {}\n if #profile_uris > 0 then\n local loaded = Record.load_all(profile_uris)\n for i, profile in ipairs(loaded) do\n if profile then\n profiles[#profiles + 1] = profile\n end\n end\n end\n\n return {\n statuses = result.records,\n profiles = profiles,\n cursor = result.cursor,\n }\nend\n'})}),"\n",(0,t.jsx)(s.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsx)(s.li,{children:"Query statuses from the target collection with pagination, same as a normal list query."}),"\n",(0,t.jsxs)(s.li,{children:["Extract the unique DIDs from the returned status URIs using ",(0,t.jsx)(s.code,{children:"string.match"}),"."]}),"\n",(0,t.jsxs)(s.li,{children:["Build an AT URI for each DID's ",(0,t.jsx)(s.code,{children:"app.bsky.actor.profile/self"})," record (this is where Bluesky profiles live)."]}),"\n",(0,t.jsxs)(s.li,{children:["Load all profiles in parallel with ",(0,t.jsx)(s.a,{href:"/reference/lua/record-api#static-methods",children:(0,t.jsx)(s.code,{children:"Record.load_all"})}),". Profiles that aren't indexed locally return ",(0,t.jsx)(s.code,{children:"nil"})," and are skipped."]}),"\n",(0,t.jsx)(s.li,{children:"Return statuses and profiles as separate keys, with the cursor from the status query."}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=&limit=20\n"})}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-json",children:'{\n "statuses": [\n { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "\ud83d\ude0a", "createdAt": "..." },\n { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "\ud83c\udf1f", "createdAt": "..." }\n ],\n "profiles": [\n { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },\n { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }\n ],\n "cursor": "MjAyNi0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."\n}\n'})}),"\n",(0,t.jsx)(s.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsx)(s.p,{children:"This avoids N+1 queries on the client side \u2014 the client gets statuses and profiles in one call. The deduplication step loads each profile only once even if multiple statuses share an author."}),"\n",(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"Record.load_all"})," reads from HappyView's local index. Profiles only appear if ",(0,t.jsx)(s.code,{children:"app.bsky.actor.profile"})," is also indexed. Missing profiles are skipped."]})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},2560:(e,s,r)=>{r.d(s,{R:()=>l,x:()=>a});var n=r(63);const t={},i=n.createContext(t);function l(e){const s=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d3a5990.a75f4a7b.js b/assets/js/5d3a5990.a75f4a7b.js deleted file mode 100644 index b7938cc..0000000 --- a/assets/js/5d3a5990.a75f4a7b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3197],{7825(e,s,r){r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","source":"@site/docs/reference/scripts/expanded-query.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/expanded-query","permalink":"/reference/scripts/expanded-query","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"},"next":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"}}');var n=r(4848),i=r(8453);const a={},l="Query: Expanded Query with Profiles",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"query-expanded-query-with-profiles",children:"Query: Expanded Query with Profiles"})}),"\n",(0,n.jsx)(s.p,{children:"List statuses and include the profile of each user who created one."}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-lua",children:'function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = "xyz.statusphere.status",\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n -- Collect unique DIDs from the statuses\n local seen = {}\n local profile_uris = {}\n for _, status in ipairs(result.records) do\n local did = string.match(status.uri, "at://([^/]+)/")\n if did and not seen[did] then\n seen[did] = true\n profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"\n end\n end\n\n -- Load all profiles in parallel\n local profiles = {}\n if #profile_uris > 0 then\n local loaded = Record.load_all(profile_uris)\n for i, profile in ipairs(loaded) do\n if profile then\n profiles[#profiles + 1] = profile\n end\n end\n end\n\n return {\n statuses = result.records,\n profiles = profiles,\n cursor = result.cursor,\n }\nend\n'})}),"\n",(0,n.jsx)(s.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"Query statuses from the target collection with pagination, same as a normal list query."}),"\n",(0,n.jsxs)(s.li,{children:["Extract the unique DIDs from the returned status URIs using ",(0,n.jsx)(s.code,{children:"string.match"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Build an AT URI for each DID's ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile/self"})," record (this is where Bluesky profiles live)."]}),"\n",(0,n.jsxs)(s.li,{children:["Load all profiles in parallel with ",(0,n.jsx)(s.a,{href:"/guides/scripting#static-methods",children:(0,n.jsx)(s.code,{children:"Record.load_all"})}),". Profiles that aren't indexed locally return ",(0,n.jsx)(s.code,{children:"nil"})," and are skipped."]}),"\n",(0,n.jsx)(s.li,{children:"Return statuses and profiles as separate keys, with the cursor from the status query."}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-json",children:'{\n "statuses": [\n { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "\ud83d\ude0a", "createdAt": "..." },\n { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "\ud83c\udf1f", "createdAt": "..." }\n ],\n "profiles": [\n { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },\n { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,n.jsx)(s.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsx)(s.p,{children:"This pattern avoids N+1 queries (fetching each author's profile individually) on the client side. Instead of fetching statuses and then making a separate request for each user's profile, the client gets everything in one call. The deduplication step ensures each profile is loaded only once even if multiple statuses are from the same user."}),"\n",(0,n.jsxs)(s.p,{children:["Note that ",(0,n.jsx)(s.code,{children:"Record.load_all"})," reads from HappyView's local index. Profiles only appear if ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile"})," is also being indexed. If a profile hasn't been indexed yet, it's silently omitted from the response."]})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453(e,s,r){r.d(s,{R:()=>a,x:()=>l});var t=r(6540);const n={},i=t.createContext(n);function a(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.ac259cea.js b/assets/js/5e95c892.ac259cea.js deleted file mode 100644 index e7075b3..0000000 --- a/assets/js/5e95c892.ac259cea.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9647],{7121(e,s,r){r.r(s),r.d(s,{default:()=>n});r(6540);var a=r(4164),c=r(7559),p=r(5500),u=r(2831),d=r(9139),h=r(4848);function n(e){return(0,h.jsx)(p.e3,{className:(0,a.A)(c.G.wrapper.docsPages),children:(0,h.jsx)(d.A,{children:(0,u.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5e95c892.d8f9e391.js b/assets/js/5e95c892.d8f9e391.js new file mode 100644 index 0000000..91f4c48 --- /dev/null +++ b/assets/js/5e95c892.d8f9e391.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9647],{201:(e,s,r)=>{r.r(s),r.d(s,{default:()=>n});r(63);var a=r(8573),c=r(4315),p=r(568),u=r(5034),d=r(4498),h=r(199);function n(e){return(0,h.jsx)(c.e3,{className:(0,a.A)(p.G.wrapper.docsPages),children:(0,h.jsx)(d.A,{children:(0,u.v)(e.route.routes)})})}}}]); \ No newline at end of file diff --git a/assets/js/5fd2dbdb.3f63380d.js b/assets/js/5fd2dbdb.3f63380d.js deleted file mode 100644 index 7890b0b..0000000 --- a/assets/js/5fd2dbdb.3f63380d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4440],{6395(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example AT Protocol application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","source":"@site/docs/tutorials/statusphere.md","sourceDirName":"tutorials","slug":"/tutorials/statusphere","permalink":"/tutorials/statusphere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Dashboard","permalink":"/getting-started/dashboard"},"next":{"title":"Lexicons","permalink":"/guides/lexicons"}}');var r=n(4848),i=n(8453);const a={},o="Tutorial: Statusphere with HappyView",c={},l=[{value:"The Statusphere lexicon",id:"the-statusphere-lexicon",level:2},{value:"Step 1: Upload the record lexicon",id:"step-1-upload-the-record-lexicon",level:2},{value:"Step 2: Verify records are being indexed",id:"step-2-verify-records-are-being-indexed",level:2},{value:"Step 3: Add a query lexicon for listing statuses",id:"step-3-add-a-query-lexicon-for-listing-statuses",level:2},{value:"Step 4: Enhance the query with a Lua script",id:"step-4-enhance-the-query-with-a-lua-script",level:2},{value:"Step 5: Add a procedure lexicon for setting status",id:"step-5-add-a-procedure-lexicon-for-setting-status",level:2},{value:"Step 6: Test the procedure endpoint",id:"step-6-test-the-procedure-endpoint",level:2},{value:"What you've built",id:"what-youve-built",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"tutorial-statusphere-with-happyview",children:"Tutorial: Statusphere with HappyView"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere"})," is an example AT Protocol application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting."]}),"\n",(0,r.jsx)(t.p,{children:"In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have automatically indexed records and automatically generated XPRC endpoints."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["This tutorial assumes you have a running HappyView instance. If you don't, start with the ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," or one of the local development guides (",(0,r.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Docker"}),", ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/other",children:"from source"}),")."]})}),"\n",(0,r.jsx)(t.h2,{id:"the-statusphere-lexicon",children:"The Statusphere lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["Statusphere uses a single record type, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"}),". Each record has two fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"status"}),": a single emoji"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"createdAt"}),": a timestamp"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:'Users can set their status as many times as they want. Each status is a new record in their repository, keyed by a TID (timestamp-based identifier). The most recent record is their "current" status.'}),"\n",(0,r.jsxs)(t.p,{children:["For more background on how the app works, see the ",(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"step-1-upload-the-record-lexicon",children:"Step 1: Upload the record lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["First, upload the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon to HappyView. This tells HappyView to start indexing Statusphere records from across the network as they're created, updated, or deleted."]}),"\n",(0,r.jsxs)(t.p,{children:["The examples below use ",(0,r.jsx)(t.code,{children:"$TOKEN"})," as a placeholder for an AIP-issued access token. See ",(0,r.jsx)(t.a,{href:"/getting-started/authentication",children:"Authentication"})," for how to get one."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.status",\n "defs": {\n "main": {\n "type": "record",\n "key": "tid",\n "record": {\n "type": "object",\n "required": ["status", "createdAt"],\n "properties": {\n "status": { "type": "string", "maxGraphemes": 1 },\n "createdAt": { "type": "string", "format": "datetime" }\n }\n }\n }\n }\n },\n "backfill": true\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["HappyView now subscribes to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," via Tap. The ",(0,r.jsx)(t.code,{children:"backfill"})," flag tells HappyView to also index existing status records from the network. You can monitor progress with ",(0,r.jsx)(t.code,{children:"GET /admin/backfill/status"})," or the ",(0,r.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["Since the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon is ",(0,r.jsx)(t.a,{href:"/guides/lexicons#network-lexicons",children:"published on the AT Protocol network"}),", you can also add it as a network lexicon instead of uploading the JSON manually:"]}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "nsid": "xyz.statusphere.status" }\'\n'})})]}),"\n",(0,r.jsx)(t.h2,{id:"step-2-verify-records-are-being-indexed",children:"Step 2: Verify records are being indexed"}),"\n",(0,r.jsx)(t.p,{children:"Once the backfill starts processing, you should see records appearing. Check the stats:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "total_records": 1234,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 1234 }]\n}\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-3-add-a-query-lexicon-for-listing-statuses",children:"Step 3: Add a query lexicon for listing statuses"}),"\n",(0,r.jsxs)(t.p,{children:["Now add a query endpoint to read the indexed data. Upload a query lexicon with ",(0,r.jsx)(t.code,{children:"target_collection"})," pointing at the record collection from Step 1:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "output": { "encoding": "application/json" }\n }\n }\n },\n "target_collection": "xyz.statusphere.status"\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["This creates a ",(0,r.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses"})," endpoint. Without a Lua script, it uses HappyView's built-in default behavior: listing records with ",(0,r.jsx)(t.code,{children:"limit"}),", ",(0,r.jsx)(t.code,{children:"cursor"}),", and ",(0,r.jsx)(t.code,{children:"did"})," parameters, or fetching a single record by ",(0,r.jsx)(t.code,{children:"uri"}),". Try it:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n },\n {\n "uri": "at://did:plc:def/xyz.statusphere.status/3def456",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T11:30:00Z"\n }\n ],\n "cursor": "5"\n}\n'})}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"})," for the full default query behavior."]}),"\n",(0,r.jsx)(t.h2,{id:"step-4-enhance-the-query-with-a-lua-script",children:"Step 4: Enhance the query with a Lua script"}),"\n",(0,r.jsxs)(t.p,{children:["The default query behavior works, but let's customize it with a ",(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),". Here's a script that handles single-record lookups by URI and paginated listing with an optional DID filter:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,r.jsx)(t.p,{children:"Re-upload the lexicon with parameters defined in the schema and the script attached:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "parameters": {\n "type": "params",\n "properties": {\n "uri": { "type": "string" },\n "did": { "type": "string" },\n "limit": { "type": "integer" },\n "cursor": { "type": "string" }\n }\n },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.p,{children:"The endpoint now uses your custom logic. Filter by a specific user:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1"\n'})}),"\n",(0,r.jsx)(t.p,{children:"Fetch a single record by URI:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-5-add-a-procedure-lexicon-for-setting-status",children:"Step 5: Add a procedure lexicon for setting status"}),"\n",(0,r.jsxs)(t.p,{children:["Add a write endpoint so users can set their status through your AppView. This creates a ",(0,r.jsx)(t.code,{children:"POST /xrpc/xyz.statusphere.setStatus"})," endpoint that proxies writes to the user's PDS."]}),"\n",(0,r.jsxs)(t.p,{children:["The Lua script auto-fills ",(0,r.jsx)(t.code,{children:"createdAt"})," and uses the authenticated user's DID:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"Upload the procedure lexicon with this script:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.setStatus",\n "defs": {\n "main": {\n "type": "procedure",\n "input": { "encoding": "application/json" },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-6-test-the-procedure-endpoint",children:"Step 6: Test the procedure endpoint"}),"\n",(0,r.jsx)(t.p,{children:"Set a status (requires authentication):"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude80" }\'\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",\n "cid": "bafyreiabc123..."\n}\n'})}),"\n",(0,r.jsx)(t.p,{children:"The record is created on your PDS and immediately indexed by HappyView."}),"\n",(0,r.jsx)(t.h2,{id:"what-youve-built",children:"What you've built"}),"\n",(0,r.jsx)(t.p,{children:"With three lexicon uploads and a few lines of Lua, you have a complete Statusphere AppView:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Real-time indexing"})," of ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," records from the entire AT Protocol network"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Historical backfill"})," of existing status records"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A query endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"}),") with filtering, pagination, and single-record lookups"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A write endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.setStatus"}),") that creates records on the user's PDS and indexes them locally"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Explore the full Record and database APIs to build more complex queries"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"}),": Learn about network lexicons, the backfill flag, and target collections"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere example app"}),": See the full Statusphere frontend"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),": Deep dive into how the app works at the protocol level"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>a,x:()=>o});var s=n(6540);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5fd2dbdb.9494322b.js b/assets/js/5fd2dbdb.9494322b.js new file mode 100644 index 0000000..3920d61 --- /dev/null +++ b/assets/js/5fd2dbdb.9494322b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[4440],{1597:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example atproto application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","source":"@site/docs/tutorials/statusphere.md","sourceDirName":"tutorials","slug":"/tutorials/statusphere","permalink":"/tutorials/statusphere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Dashboard","permalink":"/getting-started/dashboard"},"next":{"title":"Lexicons","permalink":"/guides/lexicons"}}');var r=s(199),i=s(2560);const a={},o="Tutorial: Statusphere with HappyView",l={},d=[{value:"The Statusphere lexicon",id:"the-statusphere-lexicon",level:2},{value:"Step 1: Add the record lexicon",id:"step-1-add-the-record-lexicon",level:2},{value:"Step 2: Verify records are being indexed",id:"step-2-verify-records-are-being-indexed",level:2},{value:"Step 3: Add a query lexicon for listing statuses",id:"step-3-add-a-query-lexicon-for-listing-statuses",level:2},{value:"Step 4: Enhance the query with a Lua script",id:"step-4-enhance-the-query-with-a-lua-script",level:2},{value:"Step 5: Add a procedure lexicon for setting status",id:"step-5-add-a-procedure-lexicon-for-setting-status",level:2},{value:"Step 6: Test the procedure endpoint",id:"step-6-test-the-procedure-endpoint",level:2},{value:"What you've built",id:"what-youve-built",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"tutorial-statusphere-with-happyview",children:"Tutorial: Statusphere with HappyView"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere"})," is an example atproto application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting."]}),"\n",(0,r.jsx)(t.p,{children:"In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have indexed records and working XRPC endpoints."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["This tutorial assumes you have a running HappyView instance. If you don't, start with the ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," or one of the local development guides (",(0,r.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Docker"}),", ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/other",children:"from source"}),")."]})}),"\n",(0,r.jsx)(t.h2,{id:"the-statusphere-lexicon",children:"The Statusphere lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["Statusphere uses a single record type, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"}),". Each record has two fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"status"}),": a single emoji"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"createdAt"}),": a timestamp"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:'Users can set their status as many times as they want. Each status is a new record in their repository, keyed by a TID (timestamp-based identifier). The most recent record is their "current" status.'}),"\n",(0,r.jsxs)(t.p,{children:["For more background on how the app works, see the ",(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"step-1-add-the-record-lexicon",children:"Step 1: Add the record lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["First, tell HappyView to start indexing Statusphere records. Since ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," is ",(0,r.jsx)(t.a,{href:"/guides/lexicons#network-lexicons",children:"published on the atproto network"}),", you can add it directly from the dashboard:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Go to ",(0,r.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Network"})]}),"\n",(0,r.jsxs)(t.li,{children:["Enter ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})]}),"\n",(0,r.jsx)(t.li,{children:"HappyView resolves the schema from its authority domain records and shows a preview"}),"\n",(0,r.jsxs)(t.li,{children:["Enable the ",(0,r.jsx)(t.strong,{children:"Backfill"})," toggle so HappyView fetches existing records from the network"]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["HappyView now subscribes to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," via Jetstream and kicks off a backfill job to index historical records."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["You can also add lexicons via the ",(0,r.jsx)(t.a,{href:"/reference/admin/lexicons",children:"admin API"}),". This is useful for automation or CI/CD workflows:"]}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.status",\n "defs": {\n "main": {\n "type": "record",\n "key": "tid",\n "record": {\n "type": "object",\n "required": ["status", "createdAt"],\n "properties": {\n "status": { "type": "string", "maxGraphemes": 1 },\n "createdAt": { "type": "string", "format": "datetime" }\n }\n }\n }\n }\n },\n "backfill": true\n }\'\n'})})]}),"\n",(0,r.jsx)(t.h2,{id:"step-2-verify-records-are-being-indexed",children:"Step 2: Verify records are being indexed"}),"\n",(0,r.jsx)(t.p,{children:"Once the backfill starts, you should see records appearing in the dashboard:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["The ",(0,r.jsx)(t.strong,{children:"home page"})," shows a live record count and per-collection breakdown"]}),"\n",(0,r.jsxs)(t.li,{children:["Go to ",(0,r.jsx)(t.strong,{children:"Records"})," to browse individual indexed statuses"]}),"\n",(0,r.jsxs)(t.li,{children:["Go to ",(0,r.jsx)(t.strong,{children:"Backfill"})," to watch the backfill job progress \u2014 you'll see the number of repos processed and records fetched"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"step-3-add-a-query-lexicon-for-listing-statuses",children:"Step 3: Add a query lexicon for listing statuses"}),"\n",(0,r.jsx)(t.p,{children:"Now add a query endpoint to read the indexed data:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Go to ",(0,r.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set the NSID to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set the type to ",(0,r.jsx)(t.strong,{children:"Query"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set ",(0,r.jsx)(t.code,{children:"target_collection"})," to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," \u2014 this tells the query which record collection it operates on (",(0,r.jsx)(t.code,{children:"target_collection"})," is a HappyView-specific field, not part of the lexicon spec)"]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["This creates a ",(0,r.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses"})," endpoint. Without a Lua script, it uses HappyView's built-in default behavior: listing records with ",(0,r.jsx)(t.code,{children:"limit"}),", ",(0,r.jsx)(t.code,{children:"cursor"}),", and ",(0,r.jsx)(t.code,{children:"did"})," parameters, or fetching a single record by ",(0,r.jsx)(t.code,{children:"uri"}),". Try it:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5" \\\n -H "X-Client-Key: $CLIENT_KEY"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n },\n {\n "uri": "at://did:plc:def/xyz.statusphere.status/3def456",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T11:30:00Z"\n }\n ],\n "cursor": "MjAyNS0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."\n}\n'})}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"})," for the full default query behavior."]}),"\n",(0,r.jsx)(t.h2,{id:"step-4-enhance-the-query-with-a-lua-script",children:"Step 4: Enhance the query with a Lua script"}),"\n",(0,r.jsxs)(t.p,{children:["The default query behavior works, but let's customize it with a ",(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),". The script will handle single-record lookups by URI and paginated listing with an optional DID filter."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Click on ",(0,r.jsx)(t.strong,{children:"xyz.statusphere.listStatuses"})," in the lexicon list to open its detail page"]}),"\n",(0,r.jsx)(t.li,{children:"The Lua script editor is at the bottom of the page"}),"\n",(0,r.jsx)(t.li,{children:"Paste in the following script:"}),"\n"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n cursor = params.cursor,\n })\nend\n'})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Save"})]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The endpoint now uses your custom logic. Filter by a specific user:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1" \\\n -H "X-Client-Key: $CLIENT_KEY"\n'})}),"\n",(0,r.jsx)(t.p,{children:"Fetch a single record by URI:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123" \\\n -H "X-Client-Key: $CLIENT_KEY"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-5-add-a-procedure-lexicon-for-setting-status",children:"Step 5: Add a procedure lexicon for setting status"}),"\n",(0,r.jsx)(t.p,{children:"Add a write endpoint so users can set their status through your AppView:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Go to ",(0,r.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set the NSID to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.setStatus"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set the type to ",(0,r.jsx)(t.strong,{children:"Procedure"})]}),"\n",(0,r.jsxs)(t.li,{children:["Set ",(0,r.jsx)(t.code,{children:"target_collection"})," to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})]}),"\n",(0,r.jsx)(t.li,{children:"A default Lua script is generated \u2014 replace it with:"}),"\n"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["This creates a ",(0,r.jsx)(t.code,{children:"POST /xrpc/xyz.statusphere.setStatus"})," endpoint that creates records on the user's PDS and indexes them locally."]}),"\n",(0,r.jsx)(t.h2,{id:"step-6-test-the-procedure-endpoint",children:"Step 6: Test the procedure endpoint"}),"\n",(0,r.jsxs)(t.p,{children:["Set a status. This requires DPoP authentication \u2014 the ",(0,r.jsx)(t.a,{href:"/sdk/overview",children:"JavaScript SDK"})," handles this for you, but you can test with curl if you have a token:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: DPoP $TOKEN" \\\n -H "DPoP: $DPOP_PROOF" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude80" }\'\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",\n "cid": "bafyreiabc123..."\n}\n'})}),"\n",(0,r.jsx)(t.p,{children:"The record is created on your PDS and immediately indexed by HappyView."}),"\n",(0,r.jsx)(t.h2,{id:"what-youve-built",children:"What you've built"}),"\n",(0,r.jsx)(t.p,{children:"With three lexicons and a few lines of Lua, you have a complete Statusphere AppView:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Real-time indexing"})," of ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," records from the entire atproto network"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Historical backfill"})," of existing status records"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A query endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"}),") with filtering, pagination, and single-record lookups"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A write endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.setStatus"}),") that creates records on the user's PDS and indexes them locally"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Everything was done through the dashboard \u2014 no server restarts, no config files, no deploys. For automation and CI/CD, the same operations are available via the ",(0,r.jsx)(t.a,{href:"/reference/admin-api",children:"admin API"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Explore the full Record and database APIs to build more complex queries"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"}),": Learn about network lexicons, the backfill flag, and target collections"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/admin-api",children:"Admin API"}),": Automate lexicon management via the API"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere example app"}),": See the full Statusphere frontend"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),": Deep dive into how the app works at the protocol level"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},2560:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>o});var n=s(63);const r={},i=n.createContext(r);function a(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6076.f916ec29.js b/assets/js/6076.f916ec29.js new file mode 100644 index 0000000..21296da --- /dev/null +++ b/assets/js/6076.f916ec29.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6076],{779:(t,e,r)=>{r.d(e,{A:()=>s});var a=r(6063),i=r(9404);const s=(t,e)=>a.A.lang.round(i.A.parse(t)[e])},1592:(t,e,r)=>{r.d(e,{A:()=>i});var a=r(5368);const i=function(t){return(0,a.A)(t,4)}},6076:(t,e,r)=>{r.d(e,{diagram:()=>ke});var a=r(7214),i=r(2125),s=r(3276),n=r(7127),o=r(2101),l=r(5691),c=r(8894),d=r(1592),h=r(779),g=r(9543),y=r(1485),u=r(7446),p=function(){var t=(0,c.K2)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],o=[1,17],l=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],y=[1,24],u=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],x=[1,49],b={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,c.K2)(function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:const e=parseInt(s[o]),r=a.generateId();this.$={id:r,type:"space",label:"",width:e,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);const i=a.edgeStrToEdgeData(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",directions:s[o].directions,arrowTypeEnd:i,arrowTypeStart:"arrow_open"},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]);a.generateId();this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]);const n=a.generateId();this.$={id:n,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:o,46:l}),t(h,[2,16],{14:22,15:g,16:y}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(u,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(u,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:y,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(u,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,o="",l=0,d=0,h=0,g=s.slice.call(arguments,1),y=Object.create(this.lexer),u={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(u.yy[p]=this.yy[p]);y.setInput(t,u.yy),u.yy.lexer=y,u.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var x=y.yylloc;s.push(x);var b=y.options&&y.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||y.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,c.K2)(f,"lex");for(var m,w,k,L,S,_,E,v,D,R={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==m&&(m=f()),L=n[k]&&n[k][m]),void 0===L||!L.length||!L[0]){var K="";for(_ in D=[],n[k])this.terminals_[_]&&_>2&&D.push("'"+this.terminals_[_]+"'");K=y.showPosition?"Parse error on line "+(l+1)+":\n"+y.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(K,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:x,expected:D})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(L[0]){case 1:r.push(m),i.push(y.yytext),s.push(y.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=y.yyleng,o=y.yytext,l=y.yylineno,x=y.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[L[1]][1],R.$=i[i.length-E],R._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(R._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(S=this.performAction.apply(R,[o,d,l,u.yy,L[1],i,s].concat(g))))return S;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[L[1]][0]),i.push(R.$),s.push(R._$),v=n[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0},"parse")},f=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var s in i)this[s]=i[s];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,r,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;se[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}}();function m(){this.yy={}}return b.lexer=f,(0,c.K2)(m,"Parser"),m.prototype=b,b.Parser=m,new m}();p.parser=p;var x=p,b=new Map,f=[],m=new Map,w="color",k="fill",L=(0,l.D7)(),S=new Map,_="",E=(0,c.K2)(t=>l.Y2.sanitizeText(t,L),"sanitizeText"),v=(0,c.K2)(function(t,e=""){let r=S.get(t);r||(r={id:t,styles:[],textStyles:[]},S.set(t,r)),null!=e&&e.split(",").forEach(t=>{const e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(w).exec(t)){const t=e.replace(k,"bgFill").replace(w,k);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),D=(0,c.K2)(function(t,e=""){const r=b.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),R=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=b.get(t);if(void 0===r){const e=t.trim();r={id:e,type:"na",children:[]},b.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),K=(0,c.K2)((t,e)=>{const r=t.flat(),a=[],i=r.find(t=>"column-setting"===t?.type),s=i?.columns??-1;for(const n of r)if("number"==typeof s&&s>0&&"column-setting"!==n.type&&"number"==typeof n.widthInColumns&&n.widthInColumns>s&&c.Rm.warn(`Block ${n.id} width ${n.widthInColumns} exceeds configured column width ${s}`),n.label&&(n.label=E(n.label)),"classDef"!==n.type)if("applyClass"!==n.type)if("applyStyles"!==n.type)if("column-setting"===n.type)e.columns=n.columns??-1;else if("edge"===n.type){const t=(m.get(n.id)??0)+1;m.set(n.id,t),n.id=t+"-"+n.id,f.push(n)}else{n.label||("composite"===n.type?n.label="":n.label=n.id);const t=b.get(n.id);if(void 0===t?b.set(n.id,n):("na"!==n.type&&(t.type=n.type),n.label!==n.id&&(t.label=n.label)),n.children&&K(n.children,n),"space"===n.type){const t=n.width??1;for(let e=0;e{c.Rm.debug("Clear called"),(0,l.IU)(),T={id:"root",type:"composite",children:[],columns:-1},b=new Map([["root",T]]),$=[],S=new Map,f=[],m=new Map,_=""},"clear");function N(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function C(t){return c.Rm.debug("typeStr2Type",t),"=="===t?"thick":"normal"}function B(t){switch(t.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}(0,c.K2)(N,"typeStr2Type"),(0,c.K2)(C,"edgeTypeStr2Type"),(0,c.K2)(B,"edgeStrToEdgeData");var z=0,O=(0,c.K2)(()=>(z++,"id-"+Math.random().toString(36).substr(2,12)+"-"+z),"generateId"),A=(0,c.K2)(t=>{T.children=t,K(t,T),$=T.children},"setHierarchy"),M=(0,c.K2)(t=>{const e=b.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),P=(0,c.K2)(()=>[...b.values()],"getBlocksFlat"),Y=(0,c.K2)(()=>$||[],"getBlocks"),W=(0,c.K2)(()=>f,"getEdges"),F=(0,c.K2)(t=>b.get(t),"getBlock"),X=(0,c.K2)(t=>{b.set(t.id,t)},"setBlock"),H=(0,c.K2)(t=>{_=t},"setDiagramId"),j=(0,c.K2)(()=>_,"getDiagramId"),U=(0,c.K2)(()=>c.Rm,"getLogger"),Z=(0,c.K2)(function(){return S},"getClasses"),q={getConfig:(0,c.K2)(()=>(0,l.zj)().block,"getConfig"),typeStr2Type:N,edgeTypeStr2Type:C,edgeStrToEdgeData:B,getLogger:U,getBlocksFlat:P,getBlocks:Y,getEdges:W,setHierarchy:A,getBlock:F,setBlock:X,getColumns:M,getClasses:Z,clear:I,generateId:O,setDiagramId:H,getDiagramId:j},G=(0,c.K2)((t,e)=>{const r=h.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return g.A(a,i,s,e)},"fade"),V=(0,c.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`

    \` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${G(t.mainBkg,.5)};\n fill: ${G(t.clusterBkg,.5)};\n stroke: ${G(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${(0,a.o)()}\n`,"getStyles"),J=(0,c.K2)((t,e,r,a)=>{e.forEach(e=>{Q[e](t,r,a)})},"insertMarkers"),Q={extension:(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),composition:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),aggregation:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),dependency:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),lollipop:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),point:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),circle:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},tt=J,et=(0,l.D7)()?.block?.padding??8;function rt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);if(t<0)return{px:e,py:0};if(1===t)return{px:0,py:e};return{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(rt,"calculateBlockPosition");var at=(0,c.K2)(t=>{let e=0,r=0;for(const a of t.children){const{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};c.Rm.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"!==a.type&&(t>e&&(e=t/(a.widthInColumns??1)),i>r&&(r=i))}return{width:e,height:r}},"getMaxChildSize");function it(t,e,r=0,a=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let i=0,s=0;if(t.children?.length>0){for(const r of t.children)it(r,e);const n=at(t);i=n.width,s=n.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,s);for(const e of t.children)e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${s} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+et*((e.widthInColumns??1)-1),e.size.height=s,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${s}`));for(const r of t.children)it(r,e,i,s);const o=t.columns??-1;let l=0;for(const e of t.children)l+=e.widthInColumns??1;let d=t.children.length;o>0&&o0?Math.min(t.children.length,o):t.children.length;if(e>0){const r=(g-e*et-et)/e;c.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r);for(const e of t.children)e.size&&(e.size.width=r)}}t.size={width:g,height:y,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function st(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);const r=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){const a=t?.children[0]?.size?.width??0,i=t.children.length*a+(t.children.length-1)*et;c.Rm.debug("widthOfChildren 88",i,"posX");const s=new Map;{let e=0;for(const a of t.children){if(!a.size)continue;const{py:t}=rt(r,e),i=s.get(t)??0;a.size.height>i&&s.set(t,a.size.height);let n=a?.widthInColumns??1;r>0&&(n=Math.min(n,r-e%r)),e+=n}}const n=new Map;{let t=0;const e=[...s.keys()].sort((t,e)=>t-e);for(const r of e)n.set(r,t),t+=(s.get(r)??0)+et}let o=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-et,d=0;for(const h of t.children){const a=t;if(!h.size)continue;const{width:i,height:g}=h.size,{px:y,py:u}=rt(r,o);if(u!=d&&(d=u,l=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-et,c.Rm.debug("New row in layout for block",t.id," and child ",h.id,d)),c.Rm.debug(`abc89 layout blocks (child) id: ${h.id} Pos: ${o} (px, py) ${y},${u} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${i}${et}`),a.size){const t=i/2;h.size.x=l+et+t,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${h.id} startingPos=X${l} new startingPosX${h.size.x} ${t} padding=${et} width=${i} halfWidth=${t} => x:${h.size.x} y:${h.size.y} ${h.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(h?.widthInColumns??1)/2}`),l=h.size.x+t;const e=n.get(u)??0,r=s.get(u)??g;h.size.y=a.size.y-a.size.height/2+e+r/2+et,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${h.id}startingPosX${l}${et}${t}=>x:${h.size.x}y:${h.size.y}${h.widthInColumns}(width * (child?.w || 1)) / 2${i*(h?.widthInColumns??1)/2}`)}h.children&&st(h,e);let p=h?.widthInColumns??1;r>0&&(p=Math.min(p,r-o%r)),o+=p,c.Rm.debug("abc88 columnsPos",h,o)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function nt(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){const{x:s,y:n,width:o,height:l}=t.size;s-o/2a&&(a=s+o/2),n+l/2>i&&(i=n+l/2)}if(t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=nt(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function ot(t){const e=t.getBlock("root");if(!e)return;it(e,t,0,0),st(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));const{minX:r,minY:a,maxX:i,maxY:s}=nt(e);return{x:r,y:a,width:i-r,height:s-a}}(0,c.K2)(it,"setBlockSizes"),(0,c.K2)(st,"layoutBlocks"),(0,c.K2)(nt,"findBounds"),(0,c.K2)(ot,"layout");var lt=(0,c.K2)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);const o=(0,l.D7)(),c=(0,l.E)(o);return await(0,n.GZ)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),ct=(0,c.K2)((t,e,r,a,i)=>{e.arrowTypeStart&&ht(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ht(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),dt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ht=(0,c.K2)((t,e,r,a,i,s)=>{const n=dt[r];if(!n)return void c.Rm.warn(`Unknown arrow type: ${r}`);const o="start"===e?"Start":"End";t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${o})`)},"addEdgeMarker"),gt={},yt={},ut=(0,c.K2)(async(t,e)=>{const r=(0,l.D7)(),a=(0,l.E)(r),s=t.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label"),c="markdown"===e.labelType,d=await(0,n.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:Number.POSITIVE_INFINITY},r);o.node().appendChild(d);let h,g=d.getBBox(),u=g;if(a){const t=d.children[0],e=(0,y.Ltv)(d);g=t.getBoundingClientRect(),u=g,e.attr("width",g.width),e.attr("height",g.height)}else{const t=(0,y.Ltv)(d).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(o.attr("transform",(0,i.Wg)(u,a)),gt[e.id]=s,e.width=g.width,e.height=g.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await lt(s,e.startLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,y.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),yt[e.id]||(yt[e.id]={}),yt[e.id].startLeft=r,pt(h,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await lt(r,e.startLabelRight,e.labelStyle);h=n,s.node().appendChild(n);let o=n.getBBox();if(a){const t=n.children[0],e=(0,y.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),yt[e.id]||(yt[e.id]={}),yt[e.id].startRight=r,pt(h,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await lt(s,e.endLabelLeft,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,y.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),r.node().appendChild(n),yt[e.id]||(yt[e.id]={}),yt[e.id].endLeft=r,pt(h,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),s=r.insert("g").attr("class","inner"),n=await lt(s,e.endLabelRight,e.labelStyle);h=n;let o=n.getBBox();if(a){const t=n.children[0],e=(0,y.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}s.attr("transform",(0,i.Wg)(o,a)),r.node().appendChild(n),yt[e.id]||(yt[e.id]={}),yt[e.id].endRight=r,pt(h,e.endLabelRight)}return d},"insertEdgeLabel");function pt(t,e){(0,l.E)((0,l.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(pt,"setTerminalWidth");var xt=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,gt[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath;const a=(0,l.D7)(),{subGraphTitleTotalMargin:i}=(0,s.O)(a);if(t.label){const a=gt[t.id];let s=t.x,n=t.y;if(r){const a=o._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){const e=yt[t.id].startLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){const e=yt[t.id].startRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){const e=yt[t.id].endLeft;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){const e=yt[t.id].endRight;let a=t.x,i=t.y;if(r){const e=o._K.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),bt=(0,c.K2)((t,e)=>{const r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,o=t.height/2;return i>=n||s>=o},"outsideNode"),ft=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.xMath.abs(a-e.x)*l){let t=r.y{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(bt(e,t)||i)a=t,i||r.push(t);else{const s=ft(e,a,t);let n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),wt=(0,c.K2)(function(t,e,r,a,s,n,o){let d=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let h=!1;const g=n.node(e.v);var u=n.node(e.w);u?.intersect&&g?.intersect&&(d=d.slice(1,r.points.length-1),d.unshift(g.intersect(d[0])),d.push(u.intersect(d[d.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",a[r.toCluster]),d=mt(r.points,a[r.toCluster].node),h=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",a[r.fromCluster]),d=mt(d.reverse(),a[r.fromCluster].node).reverse(),h=!0);const p=d.filter(t=>!Number.isNaN(t.y));let x=y.qrM;!r.curve||"graph"!==s&&"flowchart"!==s||(x=r.curve);const{x:b,y:f}=(0,i.RI)(r),m=(0,y.n8j)().x(b).y(f).curve(x);let w;switch(r.thickness){case"normal":w="edge-thickness-normal";break;case"thick":case"invisible":w="edge-thickness-thick";break;default:w=""}switch(r.pattern){case"solid":w+=" edge-pattern-solid";break;case"dotted":w+=" edge-pattern-dotted";break;case"dashed":w+=" edge-pattern-dashed"}const k=t.append("path").attr("d",m(p)).attr("id",r.id).attr("class"," "+w+(r.classes?" "+r.classes:"")).attr("style",r.style);let L="";((0,l.D7)().flowchart.arrowMarkerAbsolute||(0,l.D7)().state.arrowMarkerAbsolute)&&(L=(0,l.ID)(!0)),ct(k,r,L,o,s);let S={};return h&&(S.updatedPath=d),S.originalPath=r.points,S},"insertEdge"),kt=(0,c.K2)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),Lt=(0,c.K2)((t,e,r)=>{const a=kt(t),i=e.height+2*r.padding,s=i/2,n=e.width+2*s+r.padding,o=r.padding/2;return a.has("right")&&a.has("left")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:s,y:0},{x:n/2,y:2*o},{x:n-s,y:0},{x:n,y:0},{x:n,y:-i/3},{x:n+2*o,y:-i/2},{x:n,y:-2*i/3},{x:n,y:-i},{x:n-s,y:-i},{x:n/2,y:-i-2*o},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*o,y:-i/2},{x:0,y:-i/3}]:a.has("right")&&a.has("left")&&a.has("up")?[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:a.has("right")&&a.has("left")&&a.has("down")?[{x:0,y:0},{x:s,y:-i},{x:n-s,y:-i},{x:n,y:0}]:a.has("right")&&a.has("up")&&a.has("down")?[{x:0,y:0},{x:n,y:-s},{x:n,y:-i+s},{x:0,y:-i}]:a.has("left")&&a.has("up")&&a.has("down")?[{x:n,y:0},{x:0,y:-s},{x:0,y:-i+s},{x:n,y:-i}]:a.has("right")&&a.has("left")?[{x:s,y:0},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")&&a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-i+o},{x:0,y:-i+o},{x:n/2,y:-i},{x:n,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o},{x:n,y:-o}]:a.has("right")&&a.has("up")?[{x:0,y:0},{x:n,y:-s},{x:0,y:-i}]:a.has("right")&&a.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-i}]:a.has("left")&&a.has("up")?[{x:n,y:0},{x:0,y:-s},{x:n,y:-i}]:a.has("left")&&a.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-i}]:a.has("right")?[{x:s,y:-o},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i+o}]:a.has("left")?[{x:s,y:0},{x:s,y:-o},{x:n-s,y:-o},{x:n-s,y:-i+o},{x:s,y:-i+o},{x:s,y:-i},{x:0,y:-i/2}]:a.has("up")?[{x:s,y:-o},{x:s,y:-i+o},{x:0,y:-i+o},{x:n/2,y:-i},{x:n,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o}]:a.has("down")?[{x:n/2,y:0},{x:0,y:-o},{x:s,y:-o},{x:s,y:-i+o},{x:n-s,y:-i+o},{x:n-s,y:-o},{x:n,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function St(t,e){return t.intersect(e)}(0,c.K2)(St,"intersectNode");var _t=St;function Et(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,o=s-a.y,l=Math.sqrt(e*e*o*o+r*r*n*n),c=Math.abs(e*r*n/l);a.x0}(0,c.K2)(Kt,"intersectLine"),(0,c.K2)($t,"sameSign");var Tt=Kt,It=Nt;function Nt(t,e,r){var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y));for(var l=a-t.width/2-n,c=i-t.height/2-o,d=0;d1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,o=e.y-r.y,l=Math.sqrt(n*n+o*o);return s{var r,a,i=t.x,s=t.y,n=e.x-i,o=e.y-s,l=t.width/2,c=t.height/2;return Math.abs(o)*l>Math.abs(n)*c?(o<0&&(c=-c),r=0===o?0:c*n/o,a=c):(n<0&&(l=-l),r=l,a=0===n?0:l*o/n),{x:i+r,y:s+a}},"intersectRect")},Bt=(0,c.K2)(async(t,e,r,a)=>{const i=(0,l.D7)();let c;const d=e.useHtmlLabels||(0,l.E)(i);c=r||"node default";const h=t.insert("g").attr("class",c).attr("id",e.domId||e.id),g=h.insert("g").attr("class","label").attr("style",e.labelStyle);let u,p;u=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],p="markdown"===e.labelType?(0,n.GZ)(g,(0,l.jZ)((0,o.Sm)(u),i),{useHtmlLabels:d,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await lt(g,(0,l.jZ)((0,o.Sm)(u),i),e.labelStyle,!1,a);let x=p.getBBox();const b=e.padding/2;if((0,l.E)(i)){const t=p.children[0],e=(0,y.Ltv)(p);await(0,s.X)(t,u),x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return d?g.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):g.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:h,bbox:x,halfPadding:b,label:g}},"labelHelper"),zt=(0,c.K2)((t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function Ot(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(Ot,"insertPolygonShape");var At=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,l.E)((0,l.D7)())||(e.centerLabel=!0);const{shapeSvg:r,bbox:a,halfPadding:i}=await Bt(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),zt(e,s),e.intersect=function(t){return Ct.rect(e,t)},r},"note"),Mt=(0,c.K2)(t=>t?" "+t:"","formatClass"),Pt=(0,c.K2)((t,e)=>`${e||"node default"}${Mt(t.classes)} ${Mt(t.class)}`,"getClassesFromNode"),Yt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");const n=Ot(r,i,i,s);return n.attr("style",e.style),zt(e,n),e.intersect=function(t){return c.Rm.warn("Intersect called"),Ct.polygon(e,s,t)},r},"question"),Wt=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}];return r.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Ct.circle(e,14,t)},r},"choice"),Ft=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.height+e.padding,s=i/4,n=a.width+2*s+e.padding,o=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],l=Ot(r,n,i,o);return l.attr("style",e.style),zt(e,l),e.intersect=function(t){return Ct.polygon(e,o,t)},r},"hexagon"),Xt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,o=Lt(e.directions,a,e),l=Ot(r,n,i,o);return l.attr("style",e.style),zt(e,l),e.intersect=function(t){return Ct.polygon(e,o,t)},r},"block_arrow"),Ht=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return Ot(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return Ct.polygon(e,n,t)},r},"rect_left_inv_arrow"),jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"lean_right"),Ut=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"lean_left"),Zt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"trapezoid"),qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"inv_trapezoid"),Gt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"rect_right_inv_arrow"),Vt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),o=a.height+n+e.padding,l="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-o,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+n)+")");return zt(e,c),e.intersect=function(t){const r=Ct.rect(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),Jt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Bt(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ee(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return zt(e,s),e.intersect=function(t){return Ct.rect(e,t)},r},"rect"),Qt=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Bt(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,o=e.positioned?e.height:a.height+e.padding,l=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-o/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",l).attr("y",d).attr("width",n).attr("height",o),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ee(s,e.props.borders,n,o),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return zt(e,s),e.intersect=function(t){return Ct.rect(e,t)},r},"composite"),te=(0,c.K2)(async(t,e)=>{const{shapeSvg:r}=await Bt(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);const a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){const t=new Set(Object.keys(e.props));e.props.borders&&(ee(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return zt(e,a),e.intersect=function(t){return Ct.rect(e,t)},r},"labelRect");function ee(t,e,r,a){const i=[],s=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),n=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),s(r)):n(r),e.includes("r")?(c.Rm.debug("add right border"),s(a)):n(a),e.includes("b")?(c.Rm.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.Rm.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(ee,"applyNodePropertyBorders");var re=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";const a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let d="";d="object"==typeof o?o[0]:o,c.Rm.info("Label text abc79",d,o,"object"==typeof o);const h=await lt(n,d,e.labelStyle,!0,!0);let g={width:0,height:0};if((0,l.E)((0,l.D7)())){const t=h.children[0],e=(0,y.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.Rm.info("Text 2",o);const u=o.slice(1,o.length);let p=h.getBBox();const x=await lt(n,u.join?u.join("
    "):u,e.labelStyle,!0,!0);if((0,l.E)((0,l.D7)())){const t=x.children[0],e=(0,y.Ltv)(x);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}const b=e.padding/2;return(0,y.Ltv)(x).attr("transform","translate( "+(g.width>p.width?0:(p.width-g.width)/2)+", "+(p.height+b+5)+")"),(0,y.Ltv)(h).attr("transform","translate( "+(g.width{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return zt(e,n),e.intersect=function(t){return Ct.rect(e,t)},r},"stadium"),ie=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Bt(t,e,Pt(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("Circle main"),zt(e,s),e.intersect=function(t){return c.Rm.info("Circle intersect",e,a.width/2+i,t),Ct.circle(e,a.width/2+i,t)},r},"circle"),se=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await Bt(t,e,Pt(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),o=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("DoubleCircle main"),zt(e,n),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,a.width/2+i+5,t),Ct.circle(e,a.width/2+i+5,t)},r},"doublecircle"),ne=(0,c.K2)(async(t,e)=>{const{shapeSvg:r,bbox:a}=await Bt(t,e,Pt(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=Ot(r,i,s,n);return o.attr("style",e.style),zt(e,o),e.intersect=function(t){return Ct.polygon(e,n,t)},r},"subroutine"),oe=(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),zt(e,a),e.intersect=function(t){return Ct.circle(e,7,t)},r},"start"),le=(0,c.K2)((t,e,r)=>{const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,s=10;"LR"===r&&(i=10,s=70);const n=a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join");return zt(e,n),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ct.rect(e,t)},a},"forkJoin"),ce={rhombus:Yt,composite:Qt,question:Yt,rect:Jt,labelRect:te,rectWithTitle:re,choice:Wt,circle:ie,doublecircle:se,stadium:ae,hexagon:Ft,block_arrow:Xt,rect_left_inv_arrow:Ht,lean_right:jt,lean_left:Ut,trapezoid:Zt,inv_trapezoid:qt,rect_right_inv_arrow:Gt,cylinder:Vt,start:oe,end:(0,c.K2)((t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),zt(e,i),e.intersect=function(t){return Ct.circle(e,7,t)},r},"end"),note:At,subroutine:ne,fork:le,join:le,class_box:(0,c.K2)(async(t,e)=>{const r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";const i=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),o=i.insert("line");let c=0,d=4;const h=i.insert("g").attr("class","label");let g=0;const u=e.classData.annotations?.[0],p=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",x=await lt(h,p,e.labelStyle,!0,!0);let b=x.getBBox();if((0,l.E)((0,l.D7)())){const t=x.children[0],e=(0,y.Ltv)(x);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}e.classData.annotations[0]&&(d+=b.height+4,c+=b.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,l.E)((0,l.D7)())?f+="<"+e.classData.type+">":f+="<"+e.classData.type+">");const m=await lt(h,f,e.labelStyle,!0,!0);(0,y.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,l.E)((0,l.D7)())){const t=m.children[0],e=(0,y.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);const k=[];e.classData.members.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(//g,">"));const i=await lt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,y.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;const L=[];if(e.classData.methods.forEach(async t=>{const r=t.getDisplayDetails();let a=r.displayText;(0,l.E)((0,l.D7)())&&(a=a.replace(//g,">"));const i=await lt(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0);let s=i.getBBox();if((0,l.E)((0,l.D7)())){const t=i.children[0],e=(0,y.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,L.push(i)}),d+=8,u){let t=(c-b.width)/2;(0,y.Ltv)(x).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=b.height+4}let S=(c-w.width)/2;return(0,y.Ltv)(m).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,k.forEach(t=>{(0,y.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-d/2-r+8+g).attr("y2",-d/2-r+8+g),g+=8,L.forEach(t=>{(0,y.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");const e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-r).attr("y",-d/2-r).attr("width",c+e.padding).attr("height",d+e.padding),zt(e,s),e.intersect=function(t){return Ct.rect(e,t)},i},"class_box")},de={},he=(0,c.K2)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,l.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await ce[e.shape](a,e,r)}else i=await ce[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),de[e.id]=a,e.haveCallback&&de[e.id].attr("class",de[e.id].attr("class")+" clickable"),a},"insertNode"),ge=(0,c.K2)(t=>{const e=de[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function ye(t,e,r=!1){const a=t;let i="default";(a?.classes?.length||0)>0&&(i=(a?.classes??[]).join(" ")),i+=" flowchart-label";let s,n=0,c="";switch(a.type){case"round":n=5,c="rect";break;case"composite":n=0,c="composite",s=0;break;case"square":case"group":default:c="rect";break;case"diamond":c="question";break;case"hexagon":c="hexagon";break;case"block_arrow":c="block_arrow";break;case"odd":case"rect_left_inv_arrow":c="rect_left_inv_arrow";break;case"lean_right":c="lean_right";break;case"lean_left":c="lean_left";break;case"trapezoid":c="trapezoid";break;case"inv_trapezoid":c="inv_trapezoid";break;case"circle":c="circle";break;case"ellipse":c="ellipse";break;case"stadium":c="stadium";break;case"subroutine":c="subroutine";break;case"cylinder":c="cylinder";break;case"doublecircle":c="doublecircle"}const d=(0,o.sM)(a?.styles??[]),h=a.label,g=a.size??{width:0,height:0,x:0,y:0},y=e.getDiagramId();return{labelStyle:d.labelStyle,shape:c,labelText:h,rx:n,ry:n,class:i,style:d.style,id:a.id,domId:y?`${y}-${a.id}`:a.id,directions:a.directions,width:g.width,height:g.height,x:g.x,y:g.y,positioned:r,intersect:void 0,type:a.type,padding:s??(0,l.zj)()?.block?.padding??0}}async function ue(t,e,r){const a=ye(e,r,!1);if("group"===a.type)return;const i=(0,l.zj)(),s=await he(t,a,{config:i}),n=s.node().getBBox(),o=r.getBlock(a.id);o.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(o),s.remove()}async function pe(t,e,r){const a=ye(e,r,!0);if("space"!==r.getBlock(a.id).type){const r=(0,l.zj)();await he(t,a,{config:r}),e.intersect=a?.intersect,ge(a)}}async function xe(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await xe(t,i.children,r,a)}async function be(t,e,r){await xe(t,e,r,ue)}async function fe(t,e,r){await xe(t,e,r,pe)}async function me(t,e,r,a,i){const s=new u.T({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const n of r)n.size&&s.setNode(n.id,{width:n.size.width,height:n.size.height,intersect:n.intersect});for(const n of e)if(n.start&&n.end){const e=a.getBlock(n.start),r=a.getBlock(n.end);if(e?.size&&r?.size){const a=e.size,o=r.size,l=[{x:a.x,y:a.y},{x:a.x+(o.x-a.x)/2,y:a.y+(o.y-a.y)/2},{x:o.x,y:o.y}],c=i?`${i}-${n.id}`:n.id;wt(t,{v:n.start,w:n.end,name:c},{...n,id:c,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,i),n.label&&(await ut(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),xt({...n,x:l[1].x,y:l[1].y},{originalPath:l}))}}}(0,c.K2)(ye,"getNodeFromBlock"),(0,c.K2)(ue,"calculateBlockSize"),(0,c.K2)(pe,"insertBlockPositioned"),(0,c.K2)(xe,"performOperations"),(0,c.K2)(be,"calculateBlockSizes"),(0,c.K2)(fe,"insertBlocks"),(0,c.K2)(me,"insertEdges");var we=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),ke={parser:x,db:q,renderer:{draw:(0,c.K2)(async function(t,e,r,a){const{securityLevel:i,block:s}=(0,l.zj)(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=(0,y.Ltv)("#i"+e));const d="sandbox"===i?(0,y.Ltv)(o.nodes()[0].contentDocument.body):(0,y.Ltv)("body"),h="sandbox"===i?d.select(`[id="${e}"]`):(0,y.Ltv)(`[id="${e}"]`);tt(h,["point","circle","cross"],a.type,e);const g=n.getBlocks(),u=n.getBlocksFlat(),p=n.getEdges(),x=h.insert("g").attr("class","block");await be(x,g,n);const b=ot(n);if(await fe(x,g,n),await me(x,p,u,n,e),b){const t=b,e=Math.max(1,Math.round(t.width/t.height*.125)),r=t.height+e+10,a=t.width+10,{useMaxWidth:i}=s;(0,l.a$)(h,r,a,!!i),c.Rm.debug("Here Bounds",b,t),h.attr("viewBox",`${t.x-5} ${t.y-5} ${t.width+10} ${t.height+10}`)}},"draw"),getClasses:we},styles:V}},7214:(t,e,r)=>{r.d(e,{o:()=>a});var a=(0,r(8894).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")}}]); \ No newline at end of file diff --git a/assets/js/6101.1225bb35.js b/assets/js/6101.1225bb35.js new file mode 100644 index 0000000..616175b --- /dev/null +++ b/assets/js/6101.1225bb35.js @@ -0,0 +1 @@ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6101],{9536:function(t,e,i){var r;r=function(t){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=7)}([function(e,i){e.exports=t},function(t,e,i){"use strict";var r=i(0).FDLayoutConstants;function n(){}for(var o in r)n[o]=r[o];n.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,n.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,n.DEFAULT_COMPONENT_SEPERATION=60,n.TILE=!0,n.TILING_PADDING_VERTICAL=10,n.TILING_PADDING_HORIZONTAL=10,n.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutEdge;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraph;function n(t,e,i){r.call(this,t,e,i)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).LGraphManager;function n(t){r.call(this,t)}for(var o in n.prototype=Object.create(r.prototype),r)n[o]=r[o];t.exports=n},function(t,e,i){"use strict";var r=i(0).FDLayoutNode,n=i(0).IMath;function o(t,e,i,n){r.call(this,t,e,i,n)}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(g.WORLD_CENTER_X-s.x/2,g.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var n=y.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var A=g.indexOf(E);A>=0&&g.splice(A,1),p--,u--}c=null!=e?(g.indexOf(y[0])+1)%p:0;for(var N=Math.abs(r-i)/u,T=c;d!=u;T=++T%p){var _=g[T].getOtherEnd(t);if(_!=e){var L=(i+d*N)%360,m=(L+N)%360;v.branchRadialLayout(_,t,L,m,n+o,o),d++}}},v.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rh&&(h=g.rect.height)}i+=h+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var n=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,i){var r=this.getShortestRowIndex(t);if(r<0)return!0;var n=t.rowWidth[r];if(n+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[r]0&&(a=i+t.verticalPadding-t.rowHeight[r]),o=t.width-n>=e+t.horizontalPadding?(t.height+a)/(n+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var g=n;g<=o;g++)h[0]+=this.grid[g][s-1].length+this.grid[g][s].length-1;if(o0)for(g=s;g<=a;g++)h[3]+=this.grid[n-1][g].length+this.grid[n][g].length-1;for(var u,c,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,u,i))}},u.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(i(9536))},7265:function(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var g in l.prototype=Object.create(r.prototype),r)l[g]=r[g];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),g=i(12),u=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in c.prototype=Object.create(r.prototype),r)c[d]=r[d];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},c.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n-1&&g>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(g,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new g(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,g=n.MAX_VALUE,u=-n.MAX_VALUE,c=this.nodes,d=c.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),g>(r=f.getTop())&&(g=r),u<(o=f.getBottom())&&(u=o)}var y=new l(a,g,h-a,u-g);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,g=-n.MAX_VALUE,u=t.length,c=0;c(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(r=d.getTop())&&(h=r),g<(o=d.getBottom())&&(g=o)}return new l(s,h,a-s,g-h)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=A,!1;if(no)return i[0]=a,i[1]=n,i[2]=E,i[3]=s,!1;if(ro?(i[0]=g,i[1]=u,L=!0):(i[0]=l,i[1]=h,L=!0):O===D&&(r>o?(i[0]=a,i[1]=h,L=!0):(i[0]=c,i[1]=u,L=!0)),-I===D?o>r?(i[2]=v,i[3]=A,m=!0):(i[2]=E,i[3]=y,m=!0):I===D&&(o>r?(i[2]=f,i[3]=y,m=!0):(i[2]=N,i[3]=A,m=!0)),L&&m)return!1;if(r>o?n>s?(w=this.getCardinalDirection(O,D,4),R=this.getCardinalDirection(I,D,2)):(w=this.getCardinalDirection(-O,D,3),R=this.getCardinalDirection(-I,D,1)):n>s?(w=this.getCardinalDirection(-O,D,1),R=this.getCardinalDirection(-I,D,3)):(w=this.getCardinalDirection(O,D,2),R=this.getCardinalDirection(I,D,4)),!L)switch(w){case 1:M=h,C=r+-p/D,i[0]=C,i[1]=M;break;case 2:C=c,M=n+d*D,i[0]=C,i[1]=M;break;case 3:M=u,C=r+p/D,i[0]=C,i[1]=M;break;case 4:C=g,M=n+-d*D,i[0]=C,i[1]=M}if(!m)switch(R){case 1:x=y,G=o+-_/D,i[2]=G,i[3]=x;break;case 2:G=N,x=s+T*D,i[2]=G,i[3]=x;break;case 3:x=A,G=o+_/D,i[2]=G,i[3]=x;break;case 4:G=v,x=s+-T*D,i[2]=G,i[3]=x}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,g,u,c=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,v=n.x,A=n.y;return 0===(u=(o=f-d)*(h=y-v)-(s=A-E)*(a=c-p))?null:new r((a*(g=v*E-y*A)-h*(l=p*d-c*f))/u,(s*l-o*g)/u)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var g=a[0];a.splice(0,1),s.add(g);var u=g.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(u,1),g.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(7),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.springConstant=n.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=n.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h=this.getGraphManager().getAllEdges(),l=0;ln.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var g=0;gt}}]),t}();t.exports=o},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;i{"use strict";i.r(e),i.d(e,{render:()=>p});var r=i(8894),n=i(9314),o=i(6805),s=i(1485);function a(t,e){t.forEach(t=>{const i={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(i[e]=t[e])}),e.add({group:"nodes",data:i,position:{x:t.x??0,y:t.y??0}})})}function h(t,e){t.forEach(t=>{const i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function l(t){return new Promise(e=>{const i=(0,s.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),o=(0,n.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),a(t.nodes,o),h(t.edges,o),o.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});o.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),o.ready(t=>{r.Rm.info("Cytoscape ready",t),e(o)})})}function g(t){return t.nodes().map(t=>{const e=t.data(),i=t.position(),r={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function u(t){return t.edges().map(t=>{const e=t.data(),i=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function c(t,e){r.Rm.debug("Starting cose-bilkent layout algorithm");try{d(t);const e=await l(t),i=g(e),n=u(e);return r.Rm.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(i){throw r.Rm.error("Error in cose-bilkent layout algorithm:",i),i}}function d(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}n.A.use(o),(0,r.K2)(a,"addNodes"),(0,r.K2)(h,"addEdges"),(0,r.K2)(l,"createCytoscapeInstance"),(0,r.K2)(g,"extractPositionedNodes"),(0,r.K2)(u,"extractPositionedEdges"),(0,r.K2)(c,"executeCoseBilkentLayout"),(0,r.K2)(d,"validateLayoutData");var p=(0,r.K2)(async(t,e,{insertCluster:i,insertEdge:r,insertEdgeLabel:n,insertMarkers:o,insertNode:s,log:a,positionEdgeLabel:h},{algorithm:l})=>{const g={},u={},d=e.select("g");o(d,t.markers,t.type,t.diagramId);const p=d.insert("g").attr("class","subgraphs"),f=d.insert("g").attr("class","edgePaths"),y=d.insert("g").attr("class","edgeLabels"),E=d.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,g[e.id]=t,await i(p,e)}else{const i={...e};g[e.id]=i;const r=await s(E,e,{config:t.config,dir:t.direction||"TB"}),n=r.node().getBBox();i.width=n.width,i.height=n.height,i.domId=r,a.debug(`Node ${e.id} dimensions: ${n.width}x${n.height}`)}})),a.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=g[t.id];return{...t,width:e.width,height:e.height}})},A=await c(v,t.config);a.debug("Positioning nodes based on layout results"),A.nodes.forEach(t=>{const e=g[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,a.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),A.edges.forEach(e=>{const i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await n(y,e);const i=g[e.start??""],o=g[e.end??""];if(i&&o){const n=A.edges.find(t=>t.id===e.id);if(n){a.debug("APA01 positionedEdge",n);const s={...e},l=r(f,s,u,t.type,i,o,t.diagramId);h(s,l)}else{const n={...e,points:[{x:i.x||0,y:i.y||0},{x:o.x||0,y:o.y||0}]},s=r(f,n,u,t.type,i,o,t.diagramId);h(n,s)}}})),a.debug("Cose-bilkent rendering completed")},"render")}}]); \ No newline at end of file diff --git a/assets/js/6194.2e4ca43a.js b/assets/js/6194.2e4ca43a.js new file mode 100644 index 0000000..15cb3c5 --- /dev/null +++ b/assets/js/6194.2e4ca43a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6194],{6194:(e,s,c)=>{c.d(s,{createInfoServices:()=>p.v});var p=c(8746);c(3580)}}]); \ No newline at end of file diff --git a/assets/js/6241.ddb16fb6.js b/assets/js/6241.ddb16fb6.js deleted file mode 100644 index ebc773c..0000000 --- a/assets/js/6241.ddb16fb6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6241],{2501(t,e,n){n.d(e,{o:()=>i});var i=(0,n(797).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},6241(t,e,n){n.d(e,{diagram:()=>I});var i=n(3590),s=n(2501),r=n(3981),o=n(5894),a=(n(3245),n(2387),n(92),n(3226),n(7633)),c=n(797),l=n(3219),h=n(8041),u=n(5263),g=function(){var t=(0,c.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],l=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,c.K2)(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a-1].id),i.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 18:case 23:i.decorateNode({class:r[a]});break;case 19:i.getLogger().trace("SPACELIST");break;case 20:i.getLogger().trace("Node: ",r[a-1].id),i.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:i.decorateNode({icon:r[a]});break;case 27:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:n,9:22,12:11,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:n,12:21,13:i,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,a="",l=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,c.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),s.push(d.yytext),r.push(d.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,l=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,l,p.yy,S[1],s,r].concat(g))))return N;D&&(n=n.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),n.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[n[n.length-2]][n[n.length-1]],n.push(L);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,n,i){switch(n){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const n=/\n\s*/g;return e.yytext=e.yytext.replace(n,"
    "),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}}();function N(){this.yy={}}return E.lexer=S,(0,c.K2)(N,"Parser"),N.prototype=E,E.Parser=N,new N}();g.parser=g;var d=g,p=[],y=[],f=0,m={},b=(0,c.K2)(()=>{p=[],y=[],f=0,m={}},"clear"),_=(0,c.K2)(t=>{if(0===p.length)return null;const e=p[0].level;let n=null;for(let i=p.length-1;i>=0;i--)if(p[i].level!==e||n||(n=p[i]),p[i].levelt.parentId===i.id);for(const r of s){const e={id:r.id,parentId:i.id,label:(0,a.jZ)(r.label??"",n),isGroup:!1,ticket:r?.ticket,priority:r?.priority,assigned:r?.assigned,icon:r?.icon,shape:"kanbanItem",level:r.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),S=(0,c.K2)((t,e,n,i,s)=>{const o=(0,a.D7)();let c=o.mindmap?.padding??a.UI.mindmap.padding;switch(i){case N.ROUNDED_RECT:case N.RECT:case N.HEXAGON:c*=2}const l={id:(0,a.jZ)(e,o)||"kbn"+f++,level:t,label:(0,a.jZ)(n,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:c,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";const e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(l.shape=e?.shape),e?.label&&(l.label=e?.label),e?.icon&&(l.icon=e?.icon.toString()),e?.assigned&&(l.assigned=e?.assigned.toString()),e?.ticket&&(l.ticket=e?.ticket.toString()),e?.priority&&(l.priority=e?.priority)}const h=_(t);h?l.parentId=h.id||"kbn"+f++:y.push(l),p.push(l)},"addNode"),N={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},x={clear:b,addNode:S,getSections:k,getData:E,nodeType:N,getType:(0,c.K2)((t,e)=>{switch(c.Rm.debug("In get type",t,e),t){case"[":return N.RECT;case"(":return")"===e?N.ROUNDED_RECT:N.CLOUD;case"((":return N.CIRCLE;case")":return N.CLOUD;case"))":return N.BANG;case"{{":return N.HEXAGON;default:return N.DEFAULT}},"getType"),setElementForId:(0,c.K2)((t,e)=>{m[t]=e},"setElementForId"),decorateNode:(0,c.K2)(t=>{if(!t)return;const e=(0,a.D7)(),n=p[p.length-1];t.icon&&(n.icon=(0,a.jZ)(t.icon,e)),t.class&&(n.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),type2Str:(0,c.K2)(t=>{switch(t){case N.DEFAULT:return"no-border";case N.RECT:return"rect";case N.ROUNDED_RECT:return"rounded-rect";case N.CIRCLE:return"circle";case N.CLOUD:return"cloud";case N.BANG:return"bang";case N.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),getLogger:(0,c.K2)(()=>c.Rm,"getLogger"),getElementById:(0,c.K2)(t=>m[t],"getElementById")},D={draw:(0,c.K2)(async(t,e,n,s)=>{c.Rm.debug("Rendering kanban diagram\n"+t);const r=s.db.getData(),l=(0,a.D7)();l.htmlLabels=!1;const h=(0,i.D)(e),u=h.append("g");u.attr("class","sections");const g=h.append("g");g.attr("class","items");const d=r.nodes.filter(t=>t.isGroup);let p=0;const y=[];let f=25;for(const i of d){const t=l?.kanban?.sectionWidth||200;p+=1,i.x=t*p+10*(p-1)/2,i.width=t,i.y=0,i.height=3*t,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+p;const e=await(0,o.U)(u,i);f=Math.max(f,e?.labelBBox?.height),y.push(e)}let m=0;for(const i of d){const t=y[m];m+=1;const e=l?.kanban?.sectionWidth||200,n=3*-e/2+f;let s=n;const a=r.nodes.filter(t=>t.parentId===i.id);for(const r of a){if(r.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");r.x=i.x,r.width=e-15;const t=(await(0,o.on)(g,r,{config:l})).node().getBBox();r.y=s+t.height/2,await(0,o.U_)(r),s=r.y+t.height/2+5}const c=t.cluster.select("rect"),h=Math.max(s-n+30,50)+(f-25);c.attr("height",h)}(0,a.ot)(void 0,h,l.mindmap?.padding??a.UI.kanban.padding,l.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw")},L=(0,c.K2)(t=>{let e="";for(let i=0;it.darkMode?(0,u.A)(e,n):(0,h.A)(e,n),"adjuster");for(let i=0;i`\n .edge {\n stroke-width: 3;\n }\n ${L(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .cluster-label, .label {\n color: ${t.textColor};\n fill: ${t.textColor};\n }\n .kanban-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n ${(0,s.o)()}\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/6325.2cd44d9a.js b/assets/js/6325.2cd44d9a.js new file mode 100644 index 0000000..ce3745f --- /dev/null +++ b/assets/js/6325.2cd44d9a.js @@ -0,0 +1 @@ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6325],{1456:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return i.bind(this)(r)}}}()},3840:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=r.length,c=0;c-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,m=s.week,y=new Date,k=o||(r||a?1:y.getDate()),g=r||y.getFullYear(),p=0;r&&!a||(p=a>0?a-1:y.getMonth());var v,T=c||0,x=l||0,b=d||0,w=u||0;return h?new Date(Date.UTC(g,p,k,T,x,b,w+60*h.offset*1e3)):n?new Date(Date.UTC(g,p,k,T,x,b,w)):(v=new Date(g,p,k,T,x,b,w),m&&(v=i(v).week(m).toDate()),v)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,m=1;m<=h;m+=1){r[1]=o[m-1];var y=n.apply(this,r);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}m===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()},3913:function(t){t.exports=function(){"use strict";var t,e,n=1e3,i=6e4,s=36e5,r=864e5,a=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,o=31536e6,c=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,d={years:o,months:c,days:r,hours:s,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof p},h=function(t,e,n){return new p(t,n,e.$l)},f=function(t){return e.p(t)+"s"},m=function(t){return t<0},y=function(t){return m(t)?Math.ceil(t):Math.floor(t)},k=function(t){return Math.abs(t)},g=function(t,e){return t?m(t)?{negative:!0,format:""+k(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},p=function(){function m(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return h(t*d[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[f(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(l);if(s){var r=s.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var k=m.prototype;return k.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*d[n]},0)},k.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=y(t/o),t%=o,this.$d.months=y(t/c),t%=c,this.$d.days=y(t/r),t%=r,this.$d.hours=y(t/s),t%=s,this.$d.minutes=y(t/i),t%=i,this.$d.seconds=y(t/n),t%=n,this.$d.milliseconds=t},k.toISOString=function(){var t=g(this.$d.years,"Y"),e=g(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=g(n,"D"),s=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=g(a,"S"),c=t.negative||e.negative||i.negative||s.negative||r.negative||o.negative,l=s.format||r.format||o.format?"T":"",d=(c?"-":"")+"P"+t.format+e.format+i.format+l+s.format+r.format+o.format;return"P"===d||"-P"===d?"P0D":d},k.toJSON=function(){return this.toISOString()},k.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(a,function(t,e){return e||String(i[t])})},k.as=function(t){return this.$ms/d[f(t)]},k.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?y(e/d[n]):this.$d[n],e||0},k.add=function(t,e,n){var i;return i=e?t*d[f(e)]:u(t)?t.$ms:h(t,this).$ms,h(this.$ms+i*(n?-1:1),this)},k.subtract=function(t,e){return this.add(t,e,!0)},k.locale=function(t){var e=this.clone();return e.$l=t,e},k.clone=function(){return h(this.$ms,this)},k.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},m}(),v=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,s){t=s,e=s().$utils(),s.duration=function(t,e){var n=s.locale();return h(t,{$l:n},e)},s.isDuration=u;var r=i.prototype.add,a=i.prototype.subtract;i.prototype.add=function(t,e){return u(t)?v(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return u(t)?v(this,t,-1):a.bind(this)(t,e)}}}()},9856:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},6325:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>Pt});var i=n(2101),s=n(5691),r=n(8894),a=n(9627),o=n(3930),c=n(9856),l=n(3840),d=n(1456),u=n(3913),h=n(1485),f=function(){var t=(0,r.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],s=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],m=[1,11],y=[1,12],k=[1,13],g=[1,14],p=[1,15],v=[1,16],T=[1,19],x=[1,20],b=[1,21],w=[1,22],$=[1,23],_=[1,25],D=[1,35],S={trace:(0,r.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:(0,r.K2)(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:g,28:p,29:v,30:T,31:x,33:b,35:w,36:$,37:24,38:_,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:s,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:g,28:p,29:v,30:T,31:x,33:b,35:w,36:$,37:24,38:_,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:(0,r.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,r.K2)(function(t){var e=this,n=[0],i=[],s=[null],a=[],o=this.table,c="",l=0,d=0,u=0,h=a.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(m.yy[y]=this.yy[y]);f.setInput(t,m.yy),m.yy.lexer=f,m.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var k=f.yylloc;a.push(k);var g=f.options&&f.options.ranges;function p(){var t;return"number"!=typeof(t=i.pop()||f.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,a.length=a.length-t},"popStack"),(0,r.K2)(p,"lex");for(var v,T,x,b,w,$,_,D,S,C={};;){if(x=n[n.length-1],this.defaultActions[x]?b=this.defaultActions[x]:(null==v&&(v=p()),b=o[x]&&o[x][v]),void 0===b||!b.length||!b[0]){var M="";for($ in S=[],o[x])this.terminals_[$]&&$>2&&S.push("'"+this.terminals_[$]+"'");M=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(M,{text:f.match,token:this.terminals_[v]||v,line:f.yylineno,loc:k,expected:S})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+v);switch(b[0]){case 1:n.push(v),s.push(f.yytext),a.push(f.yylloc),n.push(b[1]),v=null,T?(v=T,T=null):(d=f.yyleng,c=f.yytext,l=f.yylineno,k=f.yylloc,u>0&&u--);break;case 2:if(_=this.productions_[b[1]][1],C.$=s[s.length-_],C._$={first_line:a[a.length-(_||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(_||1)].first_column,last_column:a[a.length-1].last_column},g&&(C._$.range=[a[a.length-(_||1)].range[0],a[a.length-1].range[1]]),void 0!==(w=this.performAction.apply(C,[c,d,l,m.yy,b[1],s,a].concat(h))))return w;_&&(n=n.slice(0,-1*_*2),s=s.slice(0,-1*_),a=a.slice(0,-1*_)),n.push(this.productions_[b[1]][0]),s.push(C.$),a.push(C._$),D=o[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},C=function(){return{EOF:1,parseError:(0,r.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,r.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K2)(function(){return this._more=!0,this},"more"),reject:(0,r.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,r.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K2)(function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function M(){this.yy={}}return S.lexer=C,(0,r.K2)(M,"Parser"),M.prototype=S,S.Parser=M,new M}();f.parser=f;var m=f;o.extend(c),o.extend(l),o.extend(d);var y,k,g={friday:5,saturday:6},p="",v="",T=void 0,x="",b=[],w=[],$=new Map,_=[],D=[],S="",C="",M=["active","done","crit","milestone","vert"],K=[],E="",Y=!1,L=!1,A="sunday",O="saturday",I=0,F=(0,r.K2)(function(){_=[],D=[],S="",K=[],kt=0,y=void 0,k=void 0,Tt=[],p="",v="",C="",T=void 0,x="",b=[],w=[],Y=!1,L=!1,I=0,$=new Map,E="",(0,s.IU)(),A="sunday",O="saturday"},"clear"),W=(0,r.K2)(function(t){E=t},"setDiagramId"),P=(0,r.K2)(function(t){v=t},"setAxisFormat"),H=(0,r.K2)(function(){return v},"getAxisFormat"),N=(0,r.K2)(function(t){T=t},"setTickInterval"),B=(0,r.K2)(function(){return T},"getTickInterval"),z=(0,r.K2)(function(t){x=t},"setTodayMarker"),R=(0,r.K2)(function(){return x},"getTodayMarker"),G=(0,r.K2)(function(t){p=t},"setDateFormat"),j=(0,r.K2)(function(){Y=!0},"enableInclusiveEndDates"),U=(0,r.K2)(function(){return Y},"endDatesAreInclusive"),V=(0,r.K2)(function(){L=!0},"enableTopAxis"),Z=(0,r.K2)(function(){return L},"topAxisEnabled"),X=(0,r.K2)(function(t){C=t},"setDisplayMode"),q=(0,r.K2)(function(){return C},"getDisplayMode"),Q=(0,r.K2)(function(){return p},"getDateFormat"),J=(0,r.K2)(function(t){b=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),tt=(0,r.K2)(function(){return b},"getIncludes"),et=(0,r.K2)(function(t){w=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),nt=(0,r.K2)(function(){return w},"getExcludes"),it=(0,r.K2)(function(){return $},"getLinks"),st=(0,r.K2)(function(t){S=t,_.push(t)},"addSection"),rt=(0,r.K2)(function(){return _},"getSections"),at=(0,r.K2)(function(){let t=_t();let e=0;for(;!t&&e<10;)t=_t(),e++;return D=Tt},"getTasks"),ot=(0,r.K2)(function(t,e,n,i){const s=t.format(e.trim()),r=t.format("YYYY-MM-DD");return!i.includes(s)&&!i.includes(r)&&(!(!n.includes("weekends")||t.isoWeekday()!==g[O]&&t.isoWeekday()!==g[O]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(s)||n.includes(r))))},"isInvalidDate"),ct=(0,r.K2)(function(t){A=t},"setWeekday"),lt=(0,r.K2)(function(){return A},"getWeekday"),dt=(0,r.K2)(function(t){O=t},"setWeekend"),ut=(0,r.K2)(function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?o(t.startTime):o(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?o(t.endTime):o(t.endTime,e,!0);const[a,c]=ht(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=c},"checkTaskDates"),ht=(0,r.K2)(function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=ot(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},"fixTaskDates"),ft=(0,r.K2)(function(t,e,n){n=n.trim();if((0,r.K2)(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=wt(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let s=o(n,e.trim(),!0);if(s.isValid())return s.toDate();{r.Rm.debug("Invalid date:"+n),r.Rm.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),mt=(0,r.K2)(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),yt=(0,r.K2)(function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=wt(n);void 0!==e&&(!t||e.startTime{window.open(n,"_self")}),$.set(t,n))}),St(t,"clickable")},"setLink"),St=(0,r.K2)(function(t,e){t.split(",").forEach(function(t){let n=wt(t);void 0!==n&&n.classes.push(e)})},"setClass"),Ct=(0,r.K2)(function(t,e,n){if("loose"!==(0,s.D7)().securityLevel)return;if(void 0===e)return;let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{i._K.runFunc(e,...r)})},"setClickFun"),Mt=(0,r.K2)(function(t,e){K.push(function(){const n=E?`${E}-${t}`:t,i=document.querySelector(`[id="${n}"]`);null!==i&&i.addEventListener("click",function(){e()})},function(){const n=E?`${E}-${t}`:t,i=document.querySelector(`[id="${n}-text"]`);null!==i&&i.addEventListener("click",function(){e()})})},"pushFun"),Kt=(0,r.K2)(function(t,e,n){t.split(",").forEach(function(t){Ct(t,e,n)}),St(t,"clickable")},"setClickEvent"),Et=(0,r.K2)(function(t){K.forEach(function(e){e(t)})},"bindFunctions"),Yt={getConfig:(0,r.K2)(()=>(0,s.D7)().gantt,"getConfig"),clear:F,setDateFormat:G,getDateFormat:Q,enableInclusiveEndDates:j,endDatesAreInclusive:U,enableTopAxis:V,topAxisEnabled:Z,setAxisFormat:P,getAxisFormat:H,setTickInterval:N,getTickInterval:B,setTodayMarker:z,getTodayMarker:R,setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,setDiagramId:W,setDisplayMode:X,getDisplayMode:q,setAccDescription:s.EI,getAccDescription:s.m7,addSection:st,getSections:rt,getTasks:at,addTask:bt,findTaskById:wt,addTaskOrg:$t,setIncludes:J,getIncludes:tt,setExcludes:et,getExcludes:nt,setClickEvent:Kt,setLink:Dt,getLinks:it,bindFunctions:Et,parseDuration:mt,isInvalidDate:ot,setWeekday:ct,getWeekday:lt,setWeekend:dt};function Lt(t,e,n){let i=!0;for(;i;)i=!1,n.forEach(function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)})}(0,r.K2)(Lt,"getTaskTags"),o.extend(u);var At,Ot=(0,r.K2)(function(){r.Rm.debug("Something is calling, setConf, remove the call")},"setConf"),It={monday:h.ABi,tuesday:h.PGu,wednesday:h.GuW,thursday:h.Mol,friday:h.TUC,saturday:h.rGn,sunday:h.YPH},Ft=(0,r.K2)((t,e)=>{let n=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),s=0;for(const r of i)for(let t=0;t=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s},"getMaxIntersections"),Wt=1e4,Pt={parser:m,db:Yt,renderer:{setConf:Ot,draw:(0,r.K2)(function(t,e,n,i){const a=(0,s.D7)().gantt;i.db.setDiagramId(e);const c=(0,s.D7)().securityLevel;let l;"sandbox"===c&&(l=(0,h.Ltv)("#i"+e));const d="sandbox"===c?(0,h.Ltv)(l.nodes()[0].contentDocument.body):(0,h.Ltv)("body"),u="sandbox"===c?l.nodes()[0].contentDocument:document,f=u.getElementById(e);void 0===(At=f.parentElement.offsetWidth)&&(At=1200),void 0!==a.useWidth&&(At=a.useWidth);const m=i.db.getTasks();let y=[];for(const s of m)y.push(s.type);y=C(y);const k={};let g=2*a.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===a.displayMode){const t={};for(const n of m)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=Ft(t[n],e)+1;e+=i,g+=i*(a.barHeight+a.barGap),k[n]=i}}else{g+=m.length*(a.barHeight+a.barGap);for(const t of y)k[t]=m.filter(e=>e.type===t).length}f.setAttribute("viewBox","0 0 "+At+" "+g);const p=d.select(`[id="${e}"]`),v=(0,h.w7C)().domain([(0,h.jkA)(m,function(t){return t.startTime}),(0,h.T9B)(m,function(t){return t.endTime})]).rangeRound([0,At-a.leftPadding-a.rightPadding]);function T(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:nt.vert===e.vert?0:t.vert?1:-1);const u=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));p.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+r-2}).attr("width",function(){return d-a.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%a.numberSectionStyles;return"section section0"}).enter();const f=p.append("g").selectAll("rect").data(t).enter(),k=i.db.getLinks();f.append("rect").attr("id",function(t){return e+"-"+t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?v(t.startTime)+o+.5*(v(t.endTime)-v(t.startTime))-.5*c:v(t.startTime)+o}).attr("y",function(t,e){return e=t.order,t.vert?a.gridLineStartPadding:e*n+r}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:v(t.renderEndTime||t.endTime)-v(t.startTime)}).attr("height",function(t){return t.vert?m.length*(a.barHeight+a.barGap)+2*a.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(v(t.startTime)+o+.5*(v(t.endTime)-v(t.startTime))).toString()+"px "+(e*n+r+.5*c).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,r]of y.entries())t.type===r&&(n=s%a.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),t.vert&&(i=" vert "+i),i+=n,i+=" "+e,"task"+i}),f.append("text").attr("id",function(t){return e+"-"+t.id+"-text"}).text(function(t){return t.task}).attr("font-size",a.fontSize).attr("x",function(t){let e=v(t.startTime),n=v(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(v(t.endTime)-v(t.startTime))-.5*c,n=e+c),t.vert)return v(t.startTime)+o;const i=this.getBBox().width;return i>n-e?n+i+1.5*a.leftPadding>d?e+o-5:n+o+5:(n-e)/2+e+o}).attr("y",function(t,e){return t.vert?a.gridLineStartPadding+m.length*(a.barHeight+a.barGap)+60:t.order*n+a.barHeight/2+(a.fontSize/2-2)+r}).attr("text-height",c).attr("class",function(t){const e=v(t.startTime);let n=v(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let r=0;for(const[c,l]of y.entries())t.type===l&&(r=c%a.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+r:"activeText"+r),t.done?o=t.crit?o+" doneCritText"+r:o+" doneText"+r:t.crit&&(o=o+" critText"+r),t.milestone&&(o+=" milestoneText"),t.vert&&(o+=" vertText"),i>n-e?n+i+1.5*a.leftPadding>d?s+" taskTextOutsideLeft taskTextOutside"+r+" "+o:s+" taskTextOutsideRight taskTextOutside"+r+" "+o+" width-"+i:s+" taskText taskText"+r+" "+o+" width-"+i});if("sandbox"===(0,s.D7)().securityLevel){let t;t=(0,h.Ltv)("#i"+e);const n=t.nodes()[0].contentDocument;f.filter(function(t){return k.has(t.id)}).each(function(t){var i=n.querySelector("#"+CSS.escape(e+"-"+t.id)),s=n.querySelector("#"+CSS.escape(e+"-"+t.id+"-text"));const r=i.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",k.get(t.id)),a.setAttribute("target","_top"),r.appendChild(a),a.appendChild(i),a.appendChild(s)})}}function w(t,n,s,c,l,d,u,h){if(0===u.length&&0===h.length)return;let f,m;for(const{startTime:e,endTime:i}of d)(void 0===f||em)&&(m=i);if(!f||!m)return;if(o(m).diff(o(f),"year")>5)return void r.Rm.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let g=null,T=o(f);for(;T.valueOf()<=m;)i.db.isInvalidDate(T,y,u,h)?g?g.end=T:g={start:T,end:T}:g&&(k.push(g),g=null),T=T.add(1,"d");p.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",t=>e+"-exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>v(t.start.startOf("day"))+s).attr("y",a.gridLineStartPadding).attr("width",t=>v(t.end.endOf("day"))-v(t.start.startOf("day"))).attr("height",l-n-a.gridLineStartPadding).attr("transform-origin",function(e,n){return(v(e.start)+s+.5*(v(e.end)-v(e.start))).toString()+"px "+(n*t+.5*l).toString()+"px"}).attr("class","exclude-range")}function $(t,e,n,i){if(n<=0||t>e)return 1/0;const s=e-t,r=o.duration({[i??"day"]:n}).asMilliseconds();return r<=0?1/0:Math.ceil(s/r)}function _(t,e,n,s){const o=i.db.getDateFormat(),c=i.db.getAxisFormat();let l;l=c||("D"===o?"%d":a.axisFormat??"%Y-%m-%d");let d=(0,h.l78)(v).tickSize(-s+e+a.gridLineStartPadding).tickFormat((0,h.DCK)(l));const u=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||a.tickInterval);if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],n=i.db.getWeekday()||a.weekday,s=v.domain(),o=$(s[0],s[1],t,e);if(o>Wt)r.Rm.warn(`The tick interval "${t}${e}" would generate ${o} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":d.ticks(h.t6C.every(t));break;case"second":d.ticks(h.ucG.every(t));break;case"minute":d.ticks(h.wXd.every(t));break;case"hour":d.ticks(h.Agd.every(t));break;case"day":d.ticks(h.UAC.every(t));break;case"week":d.ticks(It[n].every(t));break;case"month":d.ticks(h.Ui6.every(t))}}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(s-50)+")").call(d).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||a.topAxis){let n=(0,h.tlR)(v).tickSize(-s+e+a.gridLineStartPadding).tickFormat((0,h.DCK)(l));if(null!==u){const t=parseInt(u[1],10);if(isNaN(t)||t<=0)r.Rm.warn(`Invalid tick interval value: "${u[1]}". Skipping custom tick interval.`);else{const e=u[2],s=i.db.getWeekday()||a.weekday,r=v.domain();if($(r[0],r[1],t,e)<=Wt)switch(e){case"millisecond":n.ticks(h.t6C.every(t));break;case"second":n.ticks(h.ucG.every(t));break;case"minute":n.ticks(h.wXd.every(t));break;case"hour":n.ticks(h.Agd.every(t));break;case"day":n.ticks(h.UAC.every(t));break;case"week":n.ticks(It[s].every(t));break;case"month":n.ticks(h.Ui6.every(t))}}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function D(t,e){let n=0;const i=Object.keys(k).map(t=>[t,k[t]]);p.append("g").selectAll("text").data(i).enter().append(function(t){const e=t[0].split(s.Y2.lineBreakRegex),n=-(e.length-1)/2,i=u.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=u.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}return i}).attr("x",10).attr("y",function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/6370.8940c7dd.js b/assets/js/6370.8940c7dd.js new file mode 100644 index 0000000..6e2f0d4 --- /dev/null +++ b/assets/js/6370.8940c7dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6370],{6370:(e,p,s)=>{s.d(p,{createTreemapServices:()=>a.d});var a=s(7065);s(3580)}}]); \ No newline at end of file diff --git a/assets/js/646.e9971c6c.js b/assets/js/646.e9971c6c.js new file mode 100644 index 0000000..99ffe2c --- /dev/null +++ b/assets/js/646.e9971c6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[646],{646:(e,c,s)=>{s.d(c,{createPacketServices:()=>a.$});var a=s(7997);s(3580)}}]); \ No newline at end of file diff --git a/assets/js/6545.d609905c.js b/assets/js/6545.d609905c.js new file mode 100644 index 0000000..93f4d07 --- /dev/null +++ b/assets/js/6545.d609905c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6545],{2528:(t,e,a)=>{function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(8894).K2)(r,"populateCommonDb")},6545:(t,e,a)=>{a.d(e,{diagram:()=>I});var r=a(6417),n=a(2528),o=a(5691),i=a(8894),s=a(4419),d=(0,i.K2)((t,e)=>{const a=t<=1?100*t:t;if(a<0||a>100)throw new Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${t}`);return a},"toPercent"),l=(0,i.K2)((t,e,a)=>({x:d(e,`${a} evolution`),y:d(t,`${a} visibility`)}),"toCoordinates"),c=(0,i.K2)(t=>{if(t)return"+<>"===t?"bidirectional":"+<"===t?"backward":"+>"===t?"forward":void 0},"getFlowFromPort"),p=(0,i.K2)(t=>{if(!t?.startsWith("+"))return{};const e=/^\+'([^']*)'/.exec(t),a=e?.[1];return t.includes("<>")?{flow:"bidirectional",label:a}:t.includes("<")?{flow:"backward",label:a}:t.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),h=(0,i.K2)((t,e)=>{if((0,n.S)(t,e),t.size&&e.setSize(t.size.width,t.size.height),t.evolution){const a=t.evolution.stages.map(t=>t.secondName?`${t.name.trim()} / ${t.secondName.trim()}`:t.name.trim()),r=t.evolution.stages.filter(t=>void 0!==t.boundary).map(t=>t.boundary);e.updateAxes({stages:a,stageBoundaries:r})}if(t.anchors.forEach(t=>{const a=l(t.visibility,t.evolution,`Anchor "${t.name}"`);e.addNode(t.name,t.name,a.x,a.y,"anchor")}),t.components.forEach(t=>{const a=l(t.visibility,t.evolution,`Component "${t.name}"`),r=t.label?(t.label.negX?-1:1)*t.label.offsetX:void 0,n=t.label?(t.label.negY?-1:1)*t.label.offsetY:void 0,o=t.decorator?.strategy;e.addNode(t.name,t.name,a.x,a.y,"component",r,n,t.inertia,o)}),t.notes.forEach(t=>{const a=l(t.visibility,t.evolution,`Note "${t.text}"`);e.addNote(t.text,a.x,a.y)}),t.pipelines.forEach(t=>{const a=e.getNode(t.parent);if(!a||"number"!=typeof a.y)throw new Error(`Pipeline "${t.parent}" must reference an existing component with coordinates.`);const r=a.y;e.startPipeline(t.parent),t.components.forEach(a=>{const n=`${t.parent}_${a.name}`,o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,i=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,s=d(a.evolution,`Pipeline component "${a.name}" evolution`);e.addNode(n,a.name,s,r,"pipeline-component",o,i),e.addPipelineComponent(t.parent,n)})}),t.links.forEach(t=>{const a=!!t.arrow&&(t.arrow.includes("-.->")||t.arrow.includes(".-."));let r=c(t.fromPort)??c(t.toPort);const{flow:n,label:o}=p(t.arrow);!r&&n&&(r=n);const i=t.linkLabel,s=o??i;e.addLink(t.from,t.to,a,s,r)}),t.evolves.forEach(t=>{const a=e.getNode(t.component);if(void 0!==a?.y){const r=d(t.target,`Evolve target for "${t.component}"`);e.addTrend(t.component,r,a.y)}}),t.annotations.length>0){const a=t.annotations[0],r=l(a.x,a.y,"Annotations box");e.setAnnotationsBox(r.x,r.y)}t.annotation.forEach(t=>{const a=l(t.x,t.y,`Annotation ${t.number}`);e.addAnnotation(t.number,[{x:a.x,y:a.y}],t.text)}),t.accelerators.forEach(t=>{const a=l(t.x,t.y,`Accelerator "${t.name}"`);e.addAccelerator(t.name,a.x,a.y)}),t.deaccelerators.forEach(t=>{const a=l(t.x,t.y,`Deaccelerator "${t.name}"`);e.addDeaccelerator(t.name,a.x,a.y)})},"populateDb"),x={parser:{yy:void 0},parse:(0,i.K2)(async t=>{const e=await(0,s.qg)("wardley",t);i.Rm.debug(e);const a=x.parser?.yy;if(!a||"function"!=typeof a.addNode)throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");h(e,a)},"parse")},g=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{(0,i.K2)(this,"WardleyBuilder")}addNode(t){const e=this.nodes.get(t.id)??{id:t.id,label:t.label},a={...e,...t,className:t.className??e.className,labelOffsetX:t.labelOffsetX??e.labelOffsetX,labelOffsetY:t.labelOffsetY??e.labelOffsetY};this.nodes.set(t.id,a)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});const e=this.nodes.get(t);e&&(e.isPipelineParent=!0)}addPipelineComponent(t,e){const a=this.pipelines.get(t);a&&a.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,e){this.annotationsBox={x:t,y:e}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,e){this.size={width:t,height:e}}getNode(t){return this.nodes.get(t)}build(){const t=[];for(const e of this.nodes.values()){if("number"!=typeof e.x||"number"!=typeof e.y)throw new Error(`Node "${e.label}" is missing coordinates`);t.push(e)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function y(t){const e=(0,o.D7)();return(0,o.jZ)(t.trim(),e)}function f(){return(0,o.D7)()["wardley-beta"]}function u(t,e,a,r,n,o,i,s,d){g.addNode({id:t,label:y(e),x:a,y:r,className:n,labelOffsetX:o,labelOffsetY:i,inertia:s,sourceStrategy:d})}function m(t,e,a=!1,r,n){g.addLink({source:t,target:e,dashed:a,label:r,flow:n})}function w(t,e,a){g.addTrend({nodeId:t,targetX:e,targetY:a})}function k(t,e,a){g.addAnnotation({number:t,coordinates:e,text:a?y(a):void 0})}function b(t,e,a){g.addNote({text:y(t),x:e,y:a})}function $(t,e,a){g.addAccelerator({name:y(t),x:e,y:a})}function M(t,e,a){g.addDeaccelerator({name:y(t),x:e,y:a})}function v(t,e){g.setAnnotationsBox(t,e)}function S(t,e){g.setSize(t,e)}function P(t){g.startPipeline(t)}function C(t,e){g.addPipelineComponent(t,e)}function L(t){const e={};t.xLabel&&(e.xLabel=y(t.xLabel)),t.yLabel&&(e.yLabel=y(t.yLabel)),t.stages&&(e.stages=t.stages.map(t=>y(t))),t.stageBoundaries&&(e.stageBoundaries=t.stageBoundaries),g.setAxes(e)}function z(t){return g.getNode(t)}function N(){return g.build()}function A(){g.clear(),(0,o.IU)()}(0,i.K2)(y,"textSanitizer"),(0,i.K2)(f,"getConfig"),(0,i.K2)(u,"addNode"),(0,i.K2)(m,"addLink"),(0,i.K2)(w,"addTrend"),(0,i.K2)(k,"addAnnotation"),(0,i.K2)(b,"addNote"),(0,i.K2)($,"addAccelerator"),(0,i.K2)(M,"addDeaccelerator"),(0,i.K2)(v,"setAnnotationsBox"),(0,i.K2)(S,"setSize"),(0,i.K2)(P,"startPipeline"),(0,i.K2)(C,"addPipelineComponent"),(0,i.K2)(L,"updateAxes"),(0,i.K2)(z,"getNode"),(0,i.K2)(N,"getWardleyData"),(0,i.K2)(A,"clear");var T={getConfig:f,addNode:u,addLink:m,addTrend:w,addAnnotation:k,addNote:b,addAccelerator:$,addDeaccelerator:M,setAnnotationsBox:v,setSize:S,startPipeline:P,addPipelineComponent:C,updateAxes:L,getNode:z,getWardleyData:N,clear:A,setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI},E=["Genesis","Custom Built","Product","Commodity"],K=(0,i.K2)(()=>{const{themeVariables:t}=(0,o.D7)();return{backgroundColor:t.wardley?.backgroundColor??t.background??"#fff",axisColor:t.wardley?.axisColor??"#000",axisTextColor:t.wardley?.axisTextColor??t.primaryTextColor??"#222",gridColor:t.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:t.wardley?.componentFill??"#fff",componentStroke:t.wardley?.componentStroke??"#000",componentLabelColor:t.wardley?.componentLabelColor??t.primaryTextColor??"#222",linkStroke:t.wardley?.linkStroke??"#000",evolutionStroke:t.wardley?.evolutionStroke??"#dc3545",annotationStroke:t.wardley?.annotationStroke??"#000",annotationTextColor:t.wardley?.annotationTextColor??t.primaryTextColor??"#222",annotationFill:t.wardley?.annotationFill??t.background??"#fff"}},"getTheme"),B=(0,i.K2)(()=>{const t=(0,o.D7)()["wardley-beta"];return{width:t?.width??900,height:t?.height??600,padding:t?.padding??48,nodeRadius:t?.nodeRadius??6,nodeLabelOffset:t?.nodeLabelOffset??8,axisFontSize:t?.axisFontSize??12,labelFontSize:t?.labelFontSize??10,showGrid:t?.showGrid??!1,useMaxWidth:t?.useMaxWidth??!0}},"getConfigValues"),I={parser:x,db:T,renderer:{draw:(0,i.K2)((t,e,a,n)=>{i.Rm.debug("Rendering Wardley map\n"+t);const s=B(),d=K(),l=1.6*s.nodeRadius,c=n.db,p=c.getWardleyData(),h=c.getDiagramTitle(),x=p.size?.width??s.width,g=p.size?.height??s.height,y=(0,r.D)(e);y.selectAll("*").remove(),(0,o.a$)(y,g,x,s.useMaxWidth),y.attr("viewBox",`0 0 ${x} ${g}`);const f=y.append("g").attr("class","wardley-map"),u=y.append("defs");u.append("marker").attr("id",`arrow-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),u.append("marker").attr("id",`link-arrow-end-${e}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),u.append("marker").attr("id",`link-arrow-start-${e}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),f.append("rect").attr("class","wardley-background").attr("width",x).attr("height",g).attr("fill",d.backgroundColor);const m=x-2*s.padding,w=g-2*s.padding;h&&f.append("text").attr("class","wardley-title").attr("x",x/2).attr("y",s.padding/2).attr("fill",d.axisTextColor).attr("font-size",1.05*s.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const k=(0,i.K2)(t=>s.padding+t/100*m,"projectX"),b=(0,i.K2)(t=>g-s.padding-t/100*w,"projectY"),$=f.append("g").attr("class","wardley-axes");$.append("line").attr("x1",s.padding).attr("x2",x-s.padding).attr("y1",g-s.padding).attr("y2",g-s.padding).attr("stroke",d.axisColor).attr("stroke-width",1),$.append("line").attr("x1",s.padding).attr("x2",s.padding).attr("y1",s.padding).attr("y2",g-s.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const M=p.axes.xLabel??"Evolution",v=p.axes.yLabel??"Visibility";$.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",s.padding+m/2).attr("y",g-s.padding/4).attr("fill",d.axisTextColor).attr("font-size",s.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(M),$.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",s.padding/3).attr("y",s.padding+w/2).attr("fill",d.axisTextColor).attr("font-size",s.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${s.padding/3} ${s.padding+w/2})`).text(v);const S=p.axes.stages&&p.axes.stages.length>0?p.axes.stages:E;if(S.length>0){const t=f.append("g").attr("class","wardley-stages"),e=p.axes.stageBoundaries,a=[];if(e&&e.length===S.length){let t=0;e.forEach(e=>{a.push({start:t,end:e}),t=e})}else{const t=1/S.length;S.forEach((e,r)=>{a.push({start:r*t,end:(r+1)*t})})}S.forEach((e,r)=>{const n=a[r],o=s.padding+n.start*m,i=(o+(s.padding+n.end*m))/2;r>0&&t.append("line").attr("x1",o).attr("x2",o).attr("y1",s.padding).attr("y2",g-s.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",i).attr("y",g-s.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",s.axisFontSize-2).attr("text-anchor","middle").text(e)})}if(s.showGrid){const t=f.append("g").attr("class","wardley-grid");for(let e=1;e<4;e++){const a=e/4,r=s.padding+m*a;t.append("line").attr("x1",r).attr("x2",r).attr("y1",s.padding).attr("y2",g-s.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",s.padding).attr("x2",x-s.padding).attr("y1",g-s.padding-w*a).attr("y2",g-s.padding-w*a).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const P=new Map;if(p.nodes.forEach(t=>{P.set(t.id,{x:k(t.x),y:b(t.y),node:t})}),p.pipelines.length>0){const t=f.append("g").attr("class","wardley-pipelines"),e=f.append("g").attr("class","wardley-pipeline-links");p.pipelines.forEach(a=>{if(0===a.componentIds.length)return;const r=a.componentIds.map(t=>({id:t,pos:P.get(t),node:p.nodes.find(e=>e.id===t)})).filter(t=>t.pos&&t.node).sort((t,e)=>t.node.x-e.node.x);for(let t=0;t{const e=P.get(t);e&&(n=Math.min(n,e.x),o=Math.max(o,e.x),i=e.y)}),n!==1/0&&o!==-1/0){const e=15,r=4*s.nodeRadius,c=i-r/2,p=P.get(a.nodeId);if(p){const t=(n+o)/2;p.x=t,p.y=c-l/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",n-e).attr("y",c).attr("width",o-n+2*e).attr("height",r).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const C=f.append("g").attr("class","wardley-links"),L=new Map;p.pipelines.forEach(t=>{L.set(t.nodeId,new Set(t.componentIds))});const z=p.links.filter(t=>{if(!P.has(t.source)||!P.has(t.target))return!1;const e=L.get(t.target);return!e?.has(t.source)});C.selectAll("line").data(z).enter().append("line").attr("class",t=>"wardley-link"+(t.dashed?" wardley-link--dashed":"")).attr("x1",t=>{const e=P.get(t.source),a=P.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,n=a.x-e.x,o=a.y-e.y,i=Math.sqrt(n*n+o*o);return e.x+n/i*r}).attr("y1",t=>{const e=P.get(t.source),a=P.get(t.target),r=p.nodes.find(e=>e.id===t.source).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,n=a.x-e.x,o=a.y-e.y,i=Math.sqrt(n*n+o*o);return e.y+o/i*r}).attr("x2",t=>{const e=P.get(t.source),a=P.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,n=e.x-a.x,o=e.y-a.y,i=Math.sqrt(n*n+o*o);return a.x+n/i*r}).attr("y2",t=>{const e=P.get(t.source),a=P.get(t.target),r=p.nodes.find(e=>e.id===t.target).isPipelineParent?l/Math.sqrt(2):s.nodeRadius,n=e.x-a.x,o=e.y-a.y,i=Math.sqrt(n*n+o*o);return a.y+o/i*r}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>"forward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-end-${e})`:null).attr("marker-start",t=>"backward"===t.flow||"bidirectional"===t.flow?`url(#link-arrow-start-${e})`:null),C.selectAll("text").data(z.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=a.y-e.y,o=a.x-e.x;return r+8*(n/Math.sqrt(o*o+n*n))}).attr("y",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.y+a.y)/2,n=a.x-e.x,o=a.y-e.y;return r+8*(-n/Math.sqrt(n*n+o*o))}).attr("fill",d.axisTextColor).attr("font-size",s.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const e=P.get(t.source),a=P.get(t.target),r=(e.x+a.x)/2,n=(e.y+a.y)/2,o=a.x-e.x,i=a.y-e.y,s=Math.sqrt(o*o+i*i),d=r+8*(i/s),l=n+8*(-o/s);let c=180*Math.atan2(i,o)/Math.PI;return(c>90||c<-90)&&(c+=180),`rotate(${c} ${d} ${l})`}).text(t=>t.label);const N=f.append("g").attr("class","wardley-trends"),A=p.trends.map(t=>{const e=P.get(t.nodeId);if(!e)return null;const a=k(t.targetX),r=b(t.targetY),n=a-e.x,o=r-e.y,i=Math.sqrt(n*n+o*o),d=s.nodeRadius+2;return{origin:e,targetX:a,targetY:r,adjustedX2:i>d?a-n/i*d:a,adjustedY2:i>d?r-o/i*d:r}}).filter(t=>null!==t);N.selectAll("line").data(A).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${e})`);const T=f.append("g").attr("class","wardley-nodes").selectAll("g").data(p.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));T.filter(t=>"outsource"===t.sourceStrategy).append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*s.nodeRadius).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),T.filter(t=>"buy"===t.sourceStrategy).append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*s.nodeRadius).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),T.filter(t=>"build"===t.sourceStrategy).append("circle").attr("class","wardley-build-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*s.nodeRadius).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const I=T.filter(t=>"market"===t.sourceStrategy);I.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",2*s.nodeRadius).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),T.filter(t=>!t.isPipelineParent&&"market"!==t.sourceStrategy&&"anchor"!==t.className).append("circle").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y).attr("r",s.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const D=.7*s.nodeRadius,R=1.2*s.nodeRadius;if(I.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x).attr("y1",t=>P.get(t.id).y-R).attr("x2",t=>P.get(t.id).x-R*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x-R*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x+R*Math.cos(Math.PI/6)).attr("y2",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),I.append("line").attr("class","wardley-market-line").attr("x1",t=>P.get(t.id).x+R*Math.cos(Math.PI/6)).attr("y1",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("x2",t=>P.get(t.id).x).attr("y2",t=>P.get(t.id).y-R).attr("stroke",d.componentStroke).attr("stroke-width",1),I.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x).attr("cy",t=>P.get(t.id).y-R).attr("r",D).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x-R*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("r",D).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),I.append("circle").attr("class","wardley-market-dot").attr("cx",t=>P.get(t.id).x+R*Math.cos(Math.PI/6)).attr("cy",t=>P.get(t.id).y+R*Math.sin(Math.PI/6)).attr("r",D).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.filter(t=>!0===t.isPipelineParent).append("rect").attr("x",t=>P.get(t.id).x-l/2).attr("y",t=>P.get(t.id).y-l/2).attr("width",l).attr("height",l).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),T.filter(t=>!0===t.inertia).append("line").attr("class","wardley-inertia").attr("x1",t=>{const e=P.get(t.id);let a=t.isPipelineParent?l/2+15:s.nodeRadius+15;return t.sourceStrategy&&(a+=s.nodeRadius+10),e.x+a}).attr("y1",t=>{const e=P.get(t.id),a=t.isPipelineParent?l:2*s.nodeRadius;return e.y-a/2}).attr("x2",t=>{const e=P.get(t.id);let a=t.isPipelineParent?l/2+15:s.nodeRadius+15;return t.sourceStrategy&&(a+=s.nodeRadius+10),e.x+a}).attr("y2",t=>{const e=P.get(t.id),a=t.isPipelineParent?l:2*s.nodeRadius;return e.y+a/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),T.append("text").attr("x",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetX?e.x+t.labelOffsetX:e.x;let a=s.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetX&&(a+=10);const r=t.labelOffsetX??a;return e.x+r}).attr("y",t=>{const e=P.get(t.id);if("anchor"===t.className)return void 0!==t.labelOffsetY?e.y+t.labelOffsetY:e.y-3;let a=-s.nodeLabelOffset;t.sourceStrategy&&void 0===t.labelOffsetY&&(a-=10);const r=t.labelOffsetY??a;return e.y+r}).attr("class","wardley-node-label").attr("fill",t=>"evolved"===t.className?d.evolutionStroke:"anchor"===t.className?"#000":d.componentLabelColor).attr("font-size",s.labelFontSize).attr("font-weight",t=>"anchor"===t.className?"bold":"normal").attr("text-anchor",t=>"anchor"===t.className?"middle":"start").attr("dominant-baseline",t=>"anchor"===t.className?"middle":"auto").text(t=>t.label),p.annotations.length>0){const t=f.append("g").attr("class","wardley-annotations");if(p.annotations.forEach(e=>{const a=e.coordinates.map(t=>({x:k(t.x),y:b(t.y)}));if(a.length>1)for(let r=0;r{const r=t.append("g").attr("class","wardley-annotation");r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),r.append("text").attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.number)})}),p.annotationsBox){let e=k(p.annotationsBox.x),a=b(p.annotationsBox.y);const r=10,n=16,o=11,i=t.append("g").attr("class","wardley-annotations-box"),l=[...p.annotations].filter(t=>t.text).sort((t,e)=>t.number-e.number),c=[];if(l.forEach((t,s)=>{const l=i.append("text").attr("x",e+r).attr("y",a+r+(s+1)*n).attr("font-size",o).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${t.number}. ${t.text}`);c.push(l)}),c.length>0){let t=0,o=0;c.forEach(e=>{const a=e.node(),r=a.getComputedTextLength();t=Math.max(t,r);const n=a.getBBox();o=Math.max(o,n.height)});const p=t+2*r+105,h=l.length*n+2*r+o/2,y=s.padding,f=x-s.padding-p,u=s.padding,m=g-s.padding-h;e=Math.max(y,Math.min(e,f)),a=Math.max(u,Math.min(a,m)),c.forEach((t,o)=>{t.attr("x",e+r).attr("y",a+r+(o+1)*n)}),i.insert("rect","text").attr("x",e).attr("y",a).attr("width",p).attr("height",h).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(p.notes.length>0){const t=f.append("g").attr("class","wardley-notes");p.notes.forEach(e=>{const a=k(e.x),r=b(e.y);t.append("text").attr("x",a).attr("y",r).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.text)})}if(p.accelerators.length>0){const t=f.append("g").attr("class","wardley-accelerators");p.accelerators.forEach(e=>{const a=k(e.x),r=b(e.y),n=60,o=`\n M ${a} ${r-15}\n L ${a+n-20} ${r-15}\n L ${a+n-20} ${r-15-8}\n L ${a+n} ${r}\n L ${a+n-20} ${r+15+8}\n L ${a+n-20} ${r+15}\n L ${a} ${r+15}\n Z\n `;t.append("path").attr("d",o).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}if(p.deaccelerators.length>0){const t=f.append("g").attr("class","wardley-deaccelerators");p.deaccelerators.forEach(e=>{const a=k(e.x),r=b(e.y),n=`\n M ${a+60} ${r-15}\n L ${a+20} ${r-15}\n L ${a+20} ${r-15-8}\n L ${a} ${r}\n L ${a+20} ${r+15+8}\n L ${a+20} ${r+15}\n L ${a+60} ${r+15}\n Z\n `;t.append("path").attr("d",n).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",a+30).attr("y",r+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(e.name)})}},"draw")},styles:(0,i.K2)(()=>"","styles")}}}]); \ No newline at end of file diff --git a/assets/js/6567.ba0bae2c.js b/assets/js/6567.ba0bae2c.js deleted file mode 100644 index ea7fe29..0000000 --- a/assets/js/6567.ba0bae2c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6567],{5871(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(797).K2)(r,"populateCommonDb")},6567(t,e,a){a.d(e,{diagram:()=>m});var r=a(3590),i=a(5871),s=a(3226),o=a(7633),n=a(797),l=a(8731),c=o.UI.packet,d=class{constructor(){this.packet=[],this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getAccDescription=o.m7,this.setAccDescription=o.EI}static{(0,n.K2)(this,"PacketDB")}getConfig(){const t=(0,s.$t)({...c,...(0,o.zj)().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){(0,o.IU)(),this.packet=[]}},p=(0,n.K2)((t,e)=>{(0,i.S)(t,e);let a=-1,r=[],s=1;const{bitsPerRow:o}=e.getConfig();for(let{start:i,end:l,bits:c,label:d}of t.blocks){if(void 0!==i&&void 0!==l&&l{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*a)return[t,void 0];const r=e*a-1,i=e*a;return[{start:t.start,end:r,label:t.label,bits:r-t.start},{start:i,end:t.end,label:t.label,bits:t.end-i}]},"getNextFittingBlock"),b={parser:{yy:void 0},parse:(0,n.K2)(async t=>{const e=await(0,l.qg)("packet",t),a=b.parser?.yy;if(!(a instanceof d))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");n.Rm.debug(e),p(e,a)},"parse")},k=(0,n.K2)((t,e,a,i)=>{const s=i.db,n=s.getConfig(),{rowHeight:l,paddingY:c,bitWidth:d,bitsPerRow:p}=n,h=s.getPacket(),b=s.getDiagramTitle(),k=l+c,f=k*(h.length+1)-(b?0:l),u=d*p+2,w=(0,r.D)(e);w.attr("viewbox",`0 0 ${u} ${f}`),(0,o.a$)(w,f,u,n.useMaxWidth);for(const[r,o]of h.entries())g(w,o,r,n);w.append("text").text(b).attr("x",u/2).attr("y",f-k/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),g=(0,n.K2)((t,e,a,{rowHeight:r,paddingX:i,paddingY:s,bitWidth:o,bitsPerRow:n,showBits:l})=>{const c=t.append("g"),d=a*(r+s)+s;for(const p of e){const t=p.start%n*o+1,e=(p.end-p.start+1)*o-i;if(c.append("rect").attr("x",t).attr("y",d).attr("width",e).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",t+e/2).attr("y",d+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(p.label),!l)continue;const a=p.end===p.start,s=d-2;c.append("text").attr("x",t+(a?e/2:0)).attr("y",s).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",a?"middle":"start").text(p.start),a||c.append("text").attr("x",t+e).attr("y",s).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(p.end)}},"drawWord"),f={draw:k},u={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},w=(0,n.K2)(({packet:t}={})=>{const e=(0,s.$t)(u,t);return`\n\t.packetByte {\n\t\tfont-size: ${e.byteFontSize};\n\t}\n\t.packetByte.start {\n\t\tfill: ${e.startByteColor};\n\t}\n\t.packetByte.end {\n\t\tfill: ${e.endByteColor};\n\t}\n\t.packetLabel {\n\t\tfill: ${e.labelColor};\n\t\tfont-size: ${e.labelFontSize};\n\t}\n\t.packetTitle {\n\t\tfill: ${e.titleColor};\n\t\tfont-size: ${e.titleFontSize};\n\t}\n\t.packetBlock {\n\t\tstroke: ${e.blockStrokeColor};\n\t\tstroke-width: ${e.blockStrokeWidth};\n\t\tfill: ${e.blockFillColor};\n\t}\n\t`},"styles"),m={parser:b,get db(){return new d},renderer:f,styles:w}}}]); \ No newline at end of file diff --git a/assets/js/6621.df644f70.js b/assets/js/6621.df644f70.js new file mode 100644 index 0000000..b3cb7ed --- /dev/null +++ b/assets/js/6621.df644f70.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6621],{7330:(t,e,n)=>{n.d(e,{A:()=>s});var i=n(8894),o=n(1485),s=(0,i.K2)((t,e)=>{let n;"sandbox"===e&&(n=(0,o.Ltv)("#i"+t));return("sandbox"===e?(0,o.Ltv)(n.nodes()[0].contentDocument.body):(0,o.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},3830:(t,e,n)=>{n.d(e,{P:()=>s});var i=n(5691),o=n(8894),s=(0,o.K2)((t,e,n,s)=>{t.attr("class",n);const{width:c,height:l,x:h,y:d}=r(t,e);(0,i.a$)(t,l,c,s);const g=a(h,d,c,l,e);t.attr("viewBox",g),o.Rm.debug(`viewBox configured: ${g} with padding: ${e}`)},"setupViewPortForSVG"),r=(0,o.K2)((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),a=(0,o.K2)((t,e,n,i,o)=>`${t-o} ${e-o} ${n} ${i}`,"createViewBox")},6621:(t,e,n)=>{n.d(e,{diagram:()=>N});var i=n(7330),o=n(3830),s=n(163),r=(n(1562),n(2125),n(5707),n(3276),n(4061),n(7127),n(2101),n(5691)),a=n(8894);const c={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let l;const h=new Uint8Array(16);const d=[];for(let D=0;D<256;++D)d.push((D+256).toString(16).slice(1));function g(t,e=0){return(d[t[e+0]]+d[t[e+1]]+d[t[e+2]]+d[t[e+3]]+"-"+d[t[e+4]]+d[t[e+5]]+"-"+d[t[e+6]]+d[t[e+7]]+"-"+d[t[e+8]]+d[t[e+9]]+"-"+d[t[e+10]]+d[t[e+11]]+d[t[e+12]]+d[t[e+13]]+d[t[e+14]]+d[t[e+15]]).toLowerCase()}const u=function(t,e,n){if(c.randomUUID&&!e&&!t)return c.randomUUID();const i=(t=t||{}).random??t.rng?.()??function(){if(!l){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");l=crypto.getRandomValues.bind(crypto)}return l(h)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=i[t];return e}return g(i)};var p=n(4713),y=n(279),m=n(5485),f=function(){var t=(0,a.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],o=[1,15],s=[1,16],r=[1,20],c=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,a.K2)(function(t,e,n,i,o,s,r){var a=s.length-1;switch(o){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",s[a].id),i.addNode(s[a-1].length,s[a].id,s[a].descr,s[a].type);break;case 16:i.getLogger().trace("Icon: ",s[a]),i.decorateNode({icon:s[a]});break;case 17:case 21:i.decorateNode({class:s[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",s[a].id),i.addNode(0,s[a].id,s[a].descr,s[a].type);break;case 20:i.decorateNode({icon:s[a]});break;case 25:i.getLogger().trace("node found ..",s[a-2]),this.$={id:s[a-1],descr:s[a-1],type:i.getType(s[a-2],s[a])};break;case 26:this.$={id:s[a],descr:s[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",s[a-3]),this.$={id:s[a-3],descr:s[a-1],type:i.getType(s[a-2],s[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:o,16:s,17:17,18:18,19:r,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:o,16:s,17:17,18:18,19:r,22:c},{6:n,9:22,12:11,13:i,14:14,15:o,16:s,17:17,18:18,19:r,22:c},{6:h,7:d,10:23,11:g},t(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:c}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,23]),t(u,[2,24]),t(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:o,16:s,17:17,18:18,19:r,22:c},t(p,[2,14],{7:y,11:m}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(u,[2,15]),t(u,[2,16]),t(u,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:y,11:m}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(u,[2,25]),t(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],i=[],o=[null],s=[],r=this.table,c="",l=0,h=0,d=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;s.push(m);var f=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,o.length=o.length-t,s.length=s.length-t},"popStack"),(0,a.K2)(b,"lex");for(var _,k,E,S,x,L,N,D,$,I={};;){if(E=n[n.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=r[E]&&r[E][_]),void 0===S||!S.length||!S[0]){var v="";for(L in $=[],r[E])this.terminals_[L]&&L>2&&$.push("'"+this.terminals_[L]+"'");v=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(v,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:n.push(_),o.push(u.yytext),s.push(u.yylloc),n.push(S[1]),_=null,k?(_=k,k=null):(h=u.yyleng,c=u.yytext,l=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(N=this.productions_[S[1]][1],I.$=o[o.length-N],I._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},f&&(I._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),void 0!==(x=this.performAction.apply(I,[c,h,l,p.yy,S[1],o,s].concat(g))))return x;N&&(n=n.slice(0,-1*N*2),o=o.slice(0,-1*N),s=s.slice(0,-1*N)),n.push(this.productions_[S[1]][0]),o.push(I.$),s.push(I._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var o=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[o[0],o[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,i,o;if(this.options.backtrack_lexer&&(o={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(o.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in o)this[s]=o[s];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var o=this._currentRules(),s=0;se[0].length)){if(e=n,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,o[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,o[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function k(){this.yy={}}return b.lexer=_,(0,a.K2)(k,"Parser"),k.prototype=b,b.Parser=k,new k}();f.parser=f;var b=f,_={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},k=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=_,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,a.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,n,i){a.Rm.info("addNode",t,e,n,i);let o=!1;0===this.nodes.length?(this.baseLevel=t,t=0,o=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,o=!1);const s=(0,r.D7)();let c=s.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}const l={id:this.count++,nodeId:(0,r.jZ)(e,s),level:t,descr:(0,r.jZ)(n,s),type:i,children:[],width:s.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:o},h=this.getParent(t);if(h)h.children.push(l),this.nodes.push(l);else{if(!o)throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`);this.nodes.push(l)}}getType(t,e){switch(a.Rm.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,r.D7)(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=(0,r.jZ)(t.icon,e)),t.class&&(n.class=(0,r.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[n,i]of t.children.entries()){const o=0===t.level?n%11:e;this.assignSections(i,o)}}flattenNodes(t,e){const n=(0,r.D7)(),i=["mindmap-node"];!0===t.isRoot?i.push("section-root","section--1"):void 0!==t.section&&i.push(`section-${t.section}`),t.class&&i.push(t.class);const o=i.join(" "),s=(0,a.K2)(t=>{const e=(n.theme?.toLowerCase()??"").includes("redux");switch(t){case _.CIRCLE:return"mindmapCircle";case _.RECT:return"rect";case _.ROUNDED_RECT:return"rounded";case _.CLOUD:return"cloud";case _.BANG:return"bang";case _.HEXAGON:return"hexagon";case _.DEFAULT:return e?"rounded":"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),c={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:s(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:o,cssStyles:[],look:n.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(c),t.children)for(const r of t.children)this.flattenNodes(r,e)}generateEdges(t,e){if(!t.children)return;const n=(0,r.D7)();for(const i of t.children){let o="edge";void 0!==i.section&&(o+=` section-edge-${i.section}`);o+=` edge-depth-${t.level+1}`;const s={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:o,depth:t.level,section:i.section};e.push(s),this.generateEdges(i,e)}}getData(){const t=this.getMindmap(),e=(0,r.D7)(),n=e;if(void 0!==(0,r.TM)().layout||(n.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:n};a.Rm.debug("getData: mindmapRoot",t,e),this.assignSections(t);const i=[],o=[];this.flattenNodes(t,i),this.generateEdges(t,o),a.Rm.debug(`getData: processed ${i.length} nodes and ${o.length} edges`);const s=new Map;for(const r of i)s.set(r.id,{shape:r.shape,width:r.width,height:r.height,padding:r.padding});return{nodes:i,edges:o,config:n,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(s),type:"mindmap",diagramId:"mindmap-"+u()}}getLogger(){return a.Rm}},E={draw:(0,a.K2)(async(t,e,n,c)=>{a.Rm.debug("Rendering mindmap diagram\n"+t);const l=c.db,h=l.getData(),d=(0,i.A)(e,h.config.securityLevel);h.type=c.type,h.layoutAlgorithm=(0,s.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=e;if(!l.getMindmap())return;h.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape?(t.width=0,t.padding=10):"hexagon"===t.shape&&(t.width=0,t.height=0)}),await(0,s.XX)(h,d);const{themeVariables:g}=(0,r.zj)(),{useGradient:u,gradientStart:p,gradientStop:y}=g;if(u&&p&&y){const t=d.attr("id"),e=d.append("defs").append("linearGradient").attr("id",`${t}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("stop").attr("offset","0%").attr("stop-color",p).attr("stop-opacity",1),e.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,o.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw")},S=(0,a.K2)(t=>{const{theme:e,look:n}=t;let i="";for(let o=0;o{let i="";for(let o=0;o{const{theme:e}=t,n=t.svgId,i=t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`\n .edge {\n stroke-width: 3;\n }\n ${S(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${e?.includes("redux")?t.nodeBorder:t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n [data-look="neo"].mindmap-node {\n filter: ${i};\n }\n [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {\n fill: ${e?.includes("redux")?t.mainBkg:t.git0};\n }\n [data-look="neo"].mindmap-node.section-root .text-inner-tspan {\n fill: ${e?.includes("redux")?t.nodeBorder:t["cScaleLabel"+("neutral"===e?1:0)]};\n }\n ${t.useGradient&&n&&t.mainBkg?x(t.THEME_COLOR_LIMIT,n,t.mainBkg):""}\n`},"getStyles"),N={get db(){return new k},renderer:E,parser:b,styles:L}}}]); \ No newline at end of file diff --git a/assets/js/6669.e47e086b.js b/assets/js/6669.e47e086b.js new file mode 100644 index 0000000..46b35b0 --- /dev/null +++ b/assets/js/6669.e47e086b.js @@ -0,0 +1 @@ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6669],{1614:function(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var n={};n.layoutBase=i(551),n.CoSEConstants=i(806),n.CoSEEdge=i(767),n.CoSEGraph=i(880),n.CoSEGraphManager=i(578),n.CoSELayout=i(765),n.CoSENode=i(991),n.ConstraintHandler=i(902),t.exports=n},806:(t,e,i)=>{var n=i(551).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,t.exports=r},767:(t,e,i)=>{var n=i(551).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},880:(t,e,i)=>{var n=i(551).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},578:(t,e,i)=>{var n=i(551).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},765:(t,e,i)=>{var n=i(551).FDLayout,r=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),d=i(551).FDLayoutConstants,c=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,f=i(551).DimensionD,p=i(551).Layout,y=i(551).Integer,m=i(551).IGeometry,v=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){n.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(n.prototype),n)T[A]=n[A];T.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(n.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),i=t[n],t[n]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var i=s.has(e.left)?s.get(e.left):e.left,n=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:n,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:i,gap:e.gap})}else{var r=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(r).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:r,gap:e.gap})}});else{var c=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;c.has(e)?c.get(e).push(i):c.set(e,[i]),c.has(i)?c.get(i).push(e):c.set(i,[e])}else{var n=a.has(t.top)?a.get(t.top):t.top,r=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(n)?g.get(n).push(r):g.set(n,[r]),g.has(r)?g.get(r).push(n):g.set(r,[n])}});var u=function(t,e){var i=[],n=[],r=new N,o=new Set,s=0;return t.forEach(function(a,h){if(!o.has(h)){i[s]=[],n[s]=!1;var l=h;for(r.push(l),o.add(l),i[s].push(l);0!=r.length;)l=r.shift(),e.has(l)&&(n[s]=!0),t.get(l).forEach(function(t){o.has(t)||(r.push(t),o.add(t),i[s].push(t))});s++}}),{components:i,isFixed:n}},f=u(c,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var p=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=p.components,this.fixedComponentsOnVertical=p.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,n);var r=v.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var y=p[0];p.splice(0,1);var v=d.indexOf(y);v>=0&&d.splice(v,1),f--,c--}g=null!=e?(d.indexOf(p[0])+1)%f:0;for(var E=Math.abs(n-i)/c,N=g;u!=c;N=++N%f){var A=d[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,I=(w+E)%360;T.branchRadialLayout(A,t,w,I,r+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,i=0;ie&&(e=n)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;lr?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(o+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>o?(n.rect.y-=(n.labelHeight-o)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-o)/2):"bottom"==n.labelPosVertical&&n.setHeight(o+n.labelHeight))}})},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop,s=n.labelMarginLeft,a=n.labelMarginTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o,s,a)})},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nd&&(d=g.rect.height)}i+=d+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r=e[n];if(i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height,r.setCenter(i.tiledMemberPack[n].centerX,i.tiledMemberPack[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.rect.width,s=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(o+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>o?(r.rect.x-=(r.labelWidth-o)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-o)/2):"right"==r.labelPosHorizontal&&r.setWidth(o+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(s+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>s?(r.rect.y-=(r.labelHeight-s)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-s)/2):"bottom"==r.labelPosVertical&&r.setHeight(s+r.labelHeight))}})},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),n=this.tileNodesByFavoringDim(t,e,!1),r=this.getOrgRatio(i);return this.getOrgRatio(n)a&&(a=t.getWidth())});var l,d=o/r,c=s/r,g=Math.pow(i-n,2)+4*(d+n)*(c+i)*r,u=(n-i+Math.sqrt(g))/(2*(d+n));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var f=l*(d+n)-n;return a>f&&(f=a),f+=2*n},T.prototype.tileNodesByFavoringDim=function(t,e,i){var n=h.TILING_PADDING_VERTICAL,r=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort(function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)});for(var d=0,c=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth}var r=this.getShortestRowIndex(t);if(r<0)return!0;var o=t.rowWidth[r];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[r]0&&(h=i+t.verticalPadding-t.rowHeight[r]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)l[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)l[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,f=y.MAX_VALUE,p=0;p{var n=i(551).FDLayoutNode,r=i(551).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r{function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;n.forEach(function(t){"horizontal"==e?(c.set(t,h.has(t)?l[h.get(t)]:r.get(t)),o+=c.get(t)):(c.set(t,h.has(t)?d[h.get(t)]:r.get(t)),o+=c.get(t))}),o/=n.length,t.forEach(function(t){i.has(t)||c.set(t,o)})}else{var s=0;t.forEach(function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:r.get(t):h.has(t)?d[h.get(t)]:r.get(t)}),s/=t.length,t.forEach(function(t){c.set(t,s)})}});for(var f=function(){var n=u.shift();t.get(n).forEach(function(t){if(c.get(t.id)s&&(s=v),Ea&&(a=E)}}catch(_){u=!0,f=_}finally{try{!g&&y.return&&y.return()}finally{if(u)throw f}}var N=(n+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var I,C=t[Symbol.iterator]();!(T=(I=C.next()).done);T=!0){var L=I.value;c.set(L,c.get(L)+N)}}catch(_){A=!0,w=_}finally{try{!T&&C.return&&C.return()}finally{if(A)throw w}}})}return c},m=function(t){var e=0,i=0,n=0,r=0;if(t.forEach(function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:d[h.get(t.top)]-d[h.get(t.bottom)]>=0?n++:r++}),e>i&&n>r)for(var o=0;oi)for(var s=0;sr)for(var a=0;a1)e.fixedNodeConstraint.forEach(function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]}),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,r=function(e){var r=new Set;i[e].forEach(function(t){r.add(t)});var o=new Set([].concat(n(r)).filter(function(t){return C.has(t)})),s=void 0;s=o.size>0?l[h.get(o.values().next().value)]:p(r).x,i[e].forEach(function(e){T[t]=[s,d[h.get(e)]],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},o=0;o0?l[h.get(r.values().next().value)]:p(i).y,s[e].forEach(function(e){T[t]=[l[h.get(e)],o],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},c=0;cx&&(x=M[D].length,O=D);if(x<_.size/2)m(e.relativePlacementConstraint),w=!1,I=!1;else{var R=new Map,b=new Map,F=[];M[O].forEach(function(t){L.get(t).forEach(function(e){"horizontal"==e.direction?(R.has(t)?R.get(t).push(e):R.set(t,[e]),R.has(e.id)||R.set(e.id,[]),F.push({left:t,right:e.id})):(b.has(t)?b.get(t).push(e):b.set(t,[e]),b.has(e.id)||b.set(e.id,[]),F.push({top:t,bottom:e.id}))})}),m(F),I=!1;var G=y(R,"horizontal"),S=y(b,"vertical");M[O].forEach(function(t,e){A[e]=[l[h.get(t)],d[h.get(t)]],T[e]=[],G.has(t)?T[e][0]=G.get(t):T[e][0]=l[h.get(t)],S.has(t)?T[e][1]=S.get(t):T[e][1]=d[h.get(t)]}),w=!0}}if(w){for(var P,U=s.transpose(T),Y=s.transpose(A),k=0;k0){var j={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var i,n,r={x:l[h.get(t.nodeId)],y:d[h.get(t.nodeId)]},o=t.position,s=(n=r,{x:(i=o).x-n.x,y:i.y-n.y});j.x+=s.x,j.y+=s.y}),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach(function(t,e){l[e]+=j.x}),d.forEach(function(t,e){d[e]+=j.y}),e.fixedNodeConstraint.forEach(function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var $=e.alignmentConstraint.vertical,q=function(t){var e=new Set;$[t].forEach(function(t){e.add(t)});var i=new Set([].concat(n(e)).filter(function(t){return C.has(t)})),r=void 0;r=i.size>0?l[h.get(i.values().next().value)]:p(e).x,e.forEach(function(t){C.has(t)||(l[h.get(t)]=r)})},K=0;K<$.length;K++)q(K);if(e.alignmentConstraint.horizontal)for(var Z=e.alignmentConstraint.horizontal,Q=function(t){var e=new Set;Z[t].forEach(function(t){e.add(t)});var i=new Set([].concat(n(e)).filter(function(t){return C.has(t)})),r=void 0;r=i.size>0?d[h.get(i.values().next().value)]:p(e).y,e.forEach(function(t){C.has(t)||(d[h.get(t)]=r)})},J=0;J{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(45);return n})()},t.exports=n(i(3761))},5582:function(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(h){r=!0,o=h}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)});for(var d=0;d1){l=a[0],d=l.connectedEdges().length,a.forEach(function(t){t.connectedEdges().length0&&n.set("dummy"+(n.size+1),u),f},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,d=void 0;try{for(var c,g=e.nodeIndexes[Symbol.iterator]();!(h=(c=g.next()).done);h=!0){var u=c.value,f=n(u,2),p=f[0],y=f[1],m=i.cy.getElementById(p);if(m){var v=m.boundingBox(),E=e.xCoords[y]-v.w/2,N=e.xCoords[y]+v.w/2,T=e.yCoords[y]-v.h/2,A=e.yCoords[y]+v.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(_){l=!0,d=_}finally{try{!h&&g.return&&g.return()}finally{if(l)throw d}}var w=t.x-(o+r)/2,I=t.y-(a+s)/2;e.xCoords=e.xCoords.map(function(t){return t+w}),e.yCoords=e.yCoords.map(function(t){return t+I})}else{Object.keys(e).forEach(function(t){var i=e[t],n=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,d=i.getRect().y+i.getRect().height;no&&(o=h),la&&(a=d)});var C=t.x-(o+r)/2,L=t.y-(a+s)/2;Object.keys(e).forEach(function(t){var i=e[t];i.setCenter(i.getCenterX()+C,i.getCenterY()+L)})}}},calcBoundingBox:function(t,e,i,n){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,d=void 0,c=void 0,g=t.descendants().not(":parent"),u=g.length,f=0;f(h=e[n.get(p.id())]-p.width()/2)&&(r=h),o<(l=e[n.get(p.id())]+p.width()/2)&&(o=l),s>(d=i[n.get(p.id())]-p.height()/2)&&(s=d),a<(c=i[n.get(p.id())]+p.height()/2)&&(a=c)}var y={};return y.topLeftX=r,y.topLeftY=s,y.width=o-r,y.height=a-s,y},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||i.merge(t)}),i}};t.exports=o},816:(t,e,i)=>{var n=i(548),r=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,d=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,c=t.eles,g=c.nodes(),u=c.edges(),f=void 0,p=void 0,y=void 0,m={};t.randomize&&(f=e.nodeIndexes,p=e.xCoords,y=e.yCoords);var v=function(t){return"function"==typeof t},E=function(t,e){return v(t)?t(e):t},N=n.calcParentsWithoutChildren(i,c);null!=t.nestingFactor&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(d.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(d.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(d.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,d.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,d.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,d.TILE=t.tile,d.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),"enforced"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),"cose"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new r,A=T.newGraphManager();return function t(e,i,r,h){for(var l=i.length,d=0;d0&&t(r.getGraphManager().add(r.newGraph(),u),g,r,h)}}(A.addRoot(),n.getTopMostNodes(g),T,t),function(e,i,n){for(var r=0,o=0,s=0;s0?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=r/o:v(t.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,d.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),m}}},212:(t,e,i)=>{var n=function(){function t(t,e){for(var i=0;i0)if(c){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach(function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&h.forEach(function(e){t.eles=e,n.push(s(t))}),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var f=new Map,p=0,y={nodeIndexes:f,xCoords:[],yCoords:[]},m=[];if(h.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,i){u.merge(t.nodes()[i]),e.isParent()||(y.nodeIndexes.set(t.nodes()[i].id(),p++),y.xCoords.push(t.nodes()[0].position().x),y.yCoords.push(t.nodes()[0].position().y))}),m.push(e))}),u.length>1){var v=u.boundingBox();l.push({x:v.x1+v.w/2,y:v.y1+v.h/2}),h.push(u),n.push(y);for(var E=m.length-1;E>=0;E--)h.splice(m[E],1),n.splice(m[E],1),l.splice(m[E],1)}}h.forEach(function(e,i){t.eles=e,r.push(a(t,n[i])),o.relocateComponent(l[i],r[i],t)})}else h.forEach(function(e,i){o.relocateComponent(l[i],n[i],t)});var N=new Set;if(h.length>1){var T=[],A=i.filter(function(t){return"none"==t.css("display")});h.forEach(function(e,i){var s=void 0;if("draft"==t.quality&&(s=n[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,n[i].xCoords,n[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:n[i].xCoords[h]-e.boundingbox().w/2,y:n[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else r[i][e.id()]&&a.nodes.push({x:r[i][e.id()].getLeft(),y:r[i][e.id()].getTop(),width:r[i][e.id()].getWidth(),height:r[i][e.id()].getHeight()})}),e.edges().forEach(function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var d=s.get(h.id()),c=s.get(l.id()),g=[],u=[];if(h.isParent()){var f=o.calcBoundingBox(h,n[i].xCoords,n[i].yCoords,s);g.push(f.topLeftX+f.width/2),g.push(f.topLeftY+f.height/2)}else g.push(n[i].xCoords[d]),g.push(n[i].yCoords[d]);if(l.isParent()){var p=o.calcBoundingBox(l,n[i].xCoords,n[i].yCoords,s);u.push(p.topLeftX+p.width/2),u.push(p.topLeftY+p.height/2)}else u.push(n[i].xCoords[c]),u.push(n[i].yCoords[c]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else r[i][h.id()]&&r[i][l.id()]&&a.edges.push({startX:r[i][h.id()].getCenterX(),startY:r[i][h.id()].getCenterY(),endX:r[i][l.id()].getCenterX(),endY:r[i][l.id()].getCenterY()})}),a.nodes.length>0&&(T.push(a),N.add(i))}});var w=d.packComponents(T,t.randomize).shifts;if("draft"==t.quality)n.forEach(function(t,e){var i=t.xCoords.map(function(t){return t+w[e].dx}),n=t.yCoords.map(function(t){return t+w[e].dy});t.xCoords=i,t.yCoords=n});else{var I=0;N.forEach(function(t){Object.keys(r[t]).forEach(function(e){var i=r[t][e];i.setCenter(i.getCenterX()+w[I].dx,i.getCenterY()+w[I].dy)}),I++})}}}else{var C=t.eles.boundingBox();if(l.push({x:C.x1+C.w/2,y:C.y1+C.h/2}),t.randomize){var L=s(t);n.push(L)}"default"==t.quality||"proof"==t.quality?(r.push(a(t,n[0])),o.relocateComponent(l[0],r[0],t)):o.relocateComponent(l[0],n[0],t)}var _=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return r.forEach(function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])}),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return n.forEach(function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})}),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var M=o.calcParentsWithoutChildren(e,i),x=i.filter(function(t){return"none"==t.css("display")});t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,_),M.length>0&&M.forEach(function(t){t.position(_(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=l},657:(t,e,i)=>{var n=i(548),r=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,d=new Map,c=[],g=[],u=[],f=[],p=[],y=[],m=[],v=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,I=t.nodeSeparation,C=void 0,L=function(t,e,i){for(var n=[],r=0,o=0,s=0,a=void 0,h=[],d=0,g=1,u=0;u=r;){s=n[r++];for(var f=c[s],m=0;md&&(d=p[T],g=T)}return g};n.connectComponents(e,i,n.getTopMostNodes(s),h),a.forEach(function(t){n.connectComponents(e,i,n.getTopMostNodes(t.descendants().intersection(i)),h)});for(var _=0,M=0;M0&&(n.isParent()?c[e].push(d.get(n.id())):c[e].push(n.id()))})});var S=function(t){var i=l.get(t),n=void 0;h.get(t).forEach(function(r){n=e.getElementById(r).isParent()?d.get(r):r,c[i].push(n),c[l.get(n)].push(t)})},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(K){U=!0,Y=K}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){C=E=1)break;l=h}for(var f=0;f=1)break;l=h}for(var m=0;m{var n=i(212),r=function(t){t&&t("layout","fcose",n)};"undefined"!=typeof cytoscape&&r(cytoscape),t.exports=r},140:e=>{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(579);return n})()},t.exports=n(i(1614))},3761:function(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var d in l.prototype=Object.create(n.prototype),n)l[d]=n[d];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var n=i(0);function r(){}for(var o in n)r[o]=n[o];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=r},function(t,e,i){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),d=i(12),c=i(11);function g(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},g.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),n=i.length,r=0;r-1&&d>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(d,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new d(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,d=r.MAX_VALUE,c=-r.MAX_VALUE,g=this.nodes,u=g.length,f=0;f(e=p.getLeft())&&(a=e),h<(i=p.getRight())&&(h=i),d>(n=p.getTop())&&(d=n),c<(o=p.getBottom())&&(c=o)}var y=new l(a,d,h-a,c-d);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},g.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,d=-r.MAX_VALUE,c=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(n=u.getTop())&&(h=n),d<(o=u.getBottom())&&(d=o)}return new l(s,h,a-s,d-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=E,!1;if(ro)return i[0]=a,i[1]=r,i[2]=m,i[3]=s,!1;if(no?(i[0]=d,i[1]=c,w=!0):(i[0]=l,i[1]=h,w=!0):C===_&&(n>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=c,w=!0)),-L===_?o>n?(i[2]=v,i[3]=E,I=!0):(i[2]=m,i[3]=y,I=!0):L===_&&(o>n?(i[2]=p,i[3]=y,I=!0):(i[2]=N,i[3]=E,I=!0)),w&&I)return!1;if(n>o?r>s?(M=this.getCardinalDirection(C,_,4),x=this.getCardinalDirection(L,_,2)):(M=this.getCardinalDirection(-C,_,3),x=this.getCardinalDirection(-L,_,1)):r>s?(M=this.getCardinalDirection(-C,_,1),x=this.getCardinalDirection(-L,_,3)):(M=this.getCardinalDirection(C,_,2),x=this.getCardinalDirection(L,_,4)),!w)switch(M){case 1:D=h,O=n+-f/_,i[0]=O,i[1]=D;break;case 2:O=g,D=r+u*_,i[0]=O,i[1]=D;break;case 3:D=c,O=n+f/_,i[0]=O,i[1]=D;break;case 4:O=d,D=r+-u*_,i[0]=O,i[1]=D}if(!I)switch(x){case 1:b=y,R=o+-A/_,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*_,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/_,i[2]=R,i[3]=b;break;case 4:R=v,b=s+-T*_,i[2]=R,i[3]=b}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,d,c,g=t.x,u=t.y,f=e.x,p=e.y,y=i.x,m=i.y,v=r.x,E=r.y;return 0===(c=(o=p-u)*(h=y-v)-(s=E-m)*(a=g-f))?null:new n((a*(d=v*m-y*E)-h*(l=f*u-g*p))/c,(s*l-o*d)/c)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i=0){var d=(-h+Math.sqrt(h*h-4*a*l))/(2*a),c=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return d>=0&&d<=1?[d]:c>=0&&c<=1?[c]:null}return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,t.exports=r},function(t,e,i){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var d=a[0];a.splice(0,1),s.add(d);var c=d.getEdges();for(o=0;o-1&&l.splice(p,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(c,1),d.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,i){"use strict";var n=i(5);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(4),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h,l=this.getGraphManager().getAllEdges(),d=0;dr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var d=0;dt}}]),t}();t.exports=o},function(t,e,i){"use strict";function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],n=0;n0;)e.push(0);return e}(this.n),r=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),o=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),a=0;a=0;_--)if(0!==this.s[_]){for(var M=_+1;M=0;G--){if(function(t,e){return t&&e}(G0;){var V=void 0,B=void 0;for(V=I-2;V>=-1&&-1!==V;V--)if(Math.abs(i[V])<=z+X*(Math.abs(this.s[V])+Math.abs(this.s[V+1]))){i[V]=0;break}if(V===I-2)B=4;else{var W=void 0;for(W=I-1;W>=V&&W!==V;W--){var j=(W!==I?Math.abs(i[W]):0)+(W!==V+1?Math.abs(i[W-1]):0);if(Math.abs(this.s[W])<=z+X*j){this.s[W]=0;break}}W===V?B=3:W===I-1?B=1:(B=2,V=W)}switch(V++,B){case 1:var $=i[I-2];i[I-2]=0;for(var q=I-2;q>=V;q--){var K=n.hypot(this.s[q],$),Z=this.s[q]/K,Q=$/K;this.s[q]=K,q!==V&&($=-Q*i[q-1],i[q-1]=Z*i[q-1]);for(var J=0;J=this.s[V+1]);){var It=this.s[V];if(this.s[V]=this.s[V+1],this.s[V+1]=It,VMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;i{"use strict";i.d(e,{diagram:()=>Z});var n=i(6417),r=i(7127),o=i(2528),s=i(2101),a=i(5691),h=i(8894),l=i(4419),d=i(9314),c=i(5582),g=i(1485),u={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,h.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,h.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,h.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,h.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},p={L:(0,h.K2)((t,e)=>t-e+2,"L"),R:(0,h.K2)((t,e)=>t-2,"R"),T:(0,h.K2)((t,e)=>t-e+2,"T"),B:(0,h.K2)((t,e)=>t-2,"B")},y=(0,h.K2)(function(t){return v(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),m=(0,h.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),v=(0,h.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),E=(0,h.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),N=(0,h.K2)(function(t,e){const i=v(t)&&E(e),n=E(t)&&v(e);return i||n},"isArchitectureDirectionXY"),T=(0,h.K2)(function(t){const e=t[0],i=t[1],n=v(e)&&E(i),r=E(e)&&v(i);return n||r},"isArchitecturePairXY"),A=(0,h.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),w=(0,h.K2)(function(t,e){const i=`${t}${e}`;return A(i)?i:void 0},"getArchitectureDirectionPair"),I=(0,h.K2)(function([t,e],i){const n=i[0],r=i[1];return v(n)?E(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:v(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),C=(0,h.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),L=(0,h.K2)(function(t,e){return N(t,e)?"bend":v(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),_=(0,h.K2)(function(t){return"service"===t.type},"isArchitectureService"),M=(0,h.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),x=(0,h.K2)(t=>t.data(),"edgeData"),O=(0,h.K2)(t=>t.data(),"nodeData"),D=a.UI.architecture,R=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=a.SV,this.getAccTitle=a.iN,this.setDiagramTitle=a.ke,this.getDiagramTitle=a.ab,this.getAccDescription=a.m7,this.setAccDescription=a.EI,this.clear()}static{(0,h.K2)(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,a.IU)()}addService({id:t,icon:e,in:i,title:n,iconText:r}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:r,title:n,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(_)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==e){if(t===e)throw new Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(M)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:i,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:n,lhsInto:r,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!m(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(i)}`);if(!m(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=this.nodes[t].in,d=this.nodes[e].in;if(s&&l&&d&&l==d)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&l&&d&&l==d)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const c={lhsId:t,lhsDir:i,lhsInto:r,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:o,rhsGroup:a,title:h};this.edges.push(c),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const t={},e=Object.entries(this.nodes).reduce((e,[i,n])=>(e[i]=n.edges.reduce((e,n)=>{const r=this.getNode(n.lhsId)?.in,o=this.getNode(n.rhsId)?.in;if(r&&o&&r!==o){const e=L(n.lhsDir,n.rhsDir);"bend"!==e&&(t[r]??={},t[r][o]=e,t[o]??={},t[o][r]=e)}if(n.lhsId===i){const t=w(n.lhsDir,n.rhsDir);t&&(e[t]=n.rhsId)}else{const t=w(n.rhsDir,n.lhsDir);t&&(e[t]=n.lhsId)}return e},{}),e),{}),i=Object.keys(e)[0],n={[i]:1},r=Object.keys(e).reduce((t,e)=>e===i?t:{...t,[e]:1},{}),o=(0,h.K2)(t=>{const i={[t]:[0,0]},o=[t];for(;o.length>0;){const t=o.shift();if(t){n[t]=1,delete r[t];const s=e[t],[a,h]=i[t];Object.entries(s).forEach(([t,e])=>{n[e]||(i[e]=I([a,h],t),o.push(e))})}}return i},"BFS"),s=[o(i)];for(;Object.keys(r).length>0;)s.push(o(Object.keys(r)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,s.$t)({...D,...(0,a.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},b=(0,h.K2)((t,e)=>{(0,o.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),F={parser:{yy:void 0},parse:(0,h.K2)(async t=>{const e=await(0,l.qg)("architecture",t);h.Rm.debug(e);const i=F.parser?.yy;if(!(i instanceof R))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b(e,i)},"parse")},G=(0,h.K2)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),S=(0,h.K2)(t=>`${t}`,"wrapIcon"),P={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:S('')},server:{body:S('')},disk:{body:S('')},internet:{body:S('')},cloud:{body:S('')},unknown:r.Gc,blank:{body:S("")}}},U=(0,h.K2)(async function(t,e,i,n){const o=i.getConfigField("padding"),h=i.getConfigField("iconSize"),l=h/2,d=h/6,c=d/2;await Promise.all(e.edges().map(async e=>{const{source:h,sourceDir:g,sourceArrow:u,sourceGroup:y,target:m,targetDir:A,targetArrow:I,targetGroup:L,label:_}=x(e);let{x:M,y:O}=e[0].sourceEndpoint();const{x:D,y:R}=e[0].midpoint();let{x:b,y:F}=e[0].targetEndpoint();const G=o+4;if(y&&(v(g)?M+="L"===g?-G:G:O+="T"===g?-G:G+18),L&&(v(A)?b+="L"===A?-G:G:F+="T"===A?-G:G+18),y||"junction"!==i.getNode(h)?.type||(v(g)?M+="L"===g?l:-l:O+="T"===g?l:-l),L||"junction"!==i.getNode(m)?.type||(v(A)?b+="L"===A?l:-l:F+="T"===A?l:-l),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${M},${O} L ${D},${R} L${b},${F} `).attr("class","edge").attr("id",`${n}-${(0,s.rY)(h,m,{prefix:"L"})}`),u){const t=v(g)?p[g](M,d):M-c,i=E(g)?p[g](O,d):O-c;e.insert("polygon").attr("points",f[g](d)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(I){const t=v(A)?p[A](b,d):b-c,i=E(A)?p[A](F,d):F-c;e.insert("polygon").attr("points",f[A](d)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(_){const t=N(g,A)?"XY":v(g)?"X":"Y";let i=0;i="X"===t?Math.abs(M-b):"Y"===t?Math.abs(O-F)/1.5:Math.abs(M-b)/2;const n=e.append("g");if(await(0,r.GZ)(n,_,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,a.D7)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)n.attr("transform","translate("+D+", "+R+")");else if("Y"===t)n.attr("transform","translate("+D+", "+R+") rotate(-90)");else if("XY"===t){const t=w(g,A);if(t&&T(t)){const e=n.node().getBoundingClientRect(),[i,r]=C(t);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*r*45})`);const o=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${D}, ${R-e.height/2})\n translate(${i*o.width/2}, ${r*o.height/2})\n rotate(${-1*i*r*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),Y=(0,h.K2)(async function(t,e,i,n){const o=.75*i.getConfigField("padding"),s=i.getConfigField("fontSize"),h=i.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const l=O(e);if("group"===l.type){const{h:d,w:c,x1:g,y1:u}=e.boundingBox(),f=t.append("rect");f.attr("id",`${n}-group-${l.id}`).attr("x",g+h).attr("y",u+h).attr("width",c).attr("height",d).attr("class","node-bkg");const p=t.append("g");let y=g,m=u;if(l.icon){const t=p.append("g");t.html(`${await(0,r.WY)(l.icon,{height:o,width:o,fallbackPrefix:P.prefix})}`),t.attr("transform","translate("+(y+h+1)+", "+(m+h+1)+")"),y+=o,m+=s/2-1-2}if(l.label){const t=p.append("g");await(0,r.GZ)(t,l.label,{useHtmlLabels:!1,width:c,classes:"architecture-service-label"},(0,a.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(y+h+4)+", "+(m+h+2)+")")}i.setElementForId(l.id,f)}}))},"drawGroups"),k=(0,h.K2)(async function(t,e,i,n){const o=(0,a.D7)();for(const s of i){const i=e.append("g"),h=t.getConfigField("iconSize");if(s.title){const t=i.append("g");await(0,r.GZ)(t,s.title,{useHtmlLabels:!1,width:1.5*h,classes:"architecture-service-label"},o),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+h/2+", "+h+")")}const l=i.append("g");if(s.icon)l.html(`${await(0,r.WY)(s.icon,{height:h,width:h,fallbackPrefix:P.prefix})}`);else if(s.iconText){l.html(`${await(0,r.WY)("blank",{height:h,width:h,fallbackPrefix:P.prefix})}`);const t=l.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html((0,a.jZ)(s.iconText,o)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/e)};`)}else l.append("path").attr("class","node-bkg").attr("id",`${n}-node-${s.id}`).attr("d",`M0,${h} V5 Q0,0 5,0 H${h-5} Q${h},0 ${h},5 V${h} Z`);i.attr("id",`${n}-service-${s.id}`).attr("class","architecture-service");const{width:d,height:c}=i.node().getBBox();s.width=d,s.height=c,t.setElementForId(s.id,i)}return 0},"drawServices"),H=(0,h.K2)(function(t,e,i,n){i.forEach(i=>{const r=e.append("g"),o=t.getConfigField("iconSize");r.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",o).attr("height",o),r.attr("class","architecture-junction");const{width:s,height:a}=r._groups[0][0].getBBox();r.width=s,r.height=a,t.setElementForId(i.id,r)})},"drawJunctions");function X(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function z(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function V(t,e){e.nodes().map(e=>{const i=O(e);if("group"===i.type)return;i.x=e.position().x,i.y=e.position().y;t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function B(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function W(t,e){t.forEach(t=>{const{lhsId:i,rhsId:n,lhsInto:r,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:d}=t,c=N(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${n}`,label:d,source:i,sourceDir:a,sourceArrow:r,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:n,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:c})})}function j(t,e,i){const n=(0,h.K2)((t,e)=>Object.entries(t).reduce((t,[n,r])=>{let o=0;const s=Object.entries(r);if(1===s.length)return t[n]=s[0][1],t;for(let a=0;a{const i={},r={};return Object.entries(e).forEach(([e,[n,o]])=>{const s=t.getNode(e)?.in??"default";i[o]??={},i[o][s]??=[],i[o][s].push(e),r[n]??={},r[n][s]??=[],r[n][s].push(e)}),{horiz:Object.values(n(i,"horizontal")).filter(t=>t.length>1),vert:Object.values(n(r,"vertical")).filter(t=>t.length>1)}}),[o,s]=r.reduce(([t,e],{horiz:i,vert:n})=>[[...t,...i],[...e,...n]],[[],[]]);return{horizontal:o,vertical:s}}function $(t,e){const i=[],n=(0,h.K2)(t=>`${t[0]},${t[1]}`,"posToStr"),r=(0,h.K2)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const o=Object.fromEntries(Object.entries(t).map(([t,e])=>[n(e),t])),s=[n([0,0])],a={},h={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const t=s.shift();if(t){a[t]=1;const l=o[t];if(l){const d=r(t);Object.entries(h).forEach(([t,r])=>{const h=n([d[0]+r[0],d[1]+r[1]]),c=o[h];c&&!a[h]&&(s.push(h),i.push({[u[t]]:c,[u[y(t)]]:l,gap:1.5*e.getConfigField("iconSize")}))})}}}}),i}function q(t,e,i,n,r,{spatialMaps:o,groupAlignments:s}){return new Promise(a=>{const l=(0,g.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),c=(0,d.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${r.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${r.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),B(i,c),X(t,c,r),z(e,c,r),W(n,c);const u=j(r,o,s),f=$(o,r),p=c.layout({name:"fcose",quality:"proof",randomize:r.getConfigField("randomize"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:n}=O(e),{parent:o}=O(i);return n===o?1.5*r.getConfigField("iconSize"):.5*r.getConfigField("iconSize")},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:n}=O(e),{parent:r}=O(i);return n===r?.45:.001},alignmentConstraint:u,relativePlacementConstraint:f});p.one("layoutstop",()=>{function t(t,e,i,n){let r,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(n-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),r=Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2)-Math.pow(o,2));r/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let d=(h-s)*(n-a)-(l-a)*(i-s);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let c=(h-s)*(i-s)+(l-a)*(n-a);switch(!0){case c>=0:c=1;break;case c<0:c=-1}return o=Math.abs(o)*d,r*=c,{distances:o,weights:r}}(0,h.K2)(t,"getSegmentWeights"),c.startBatch();for(const e of Object.values(c.edges()))if(e.data?.()){const{x:i,y:n}=e.source().position(),{x:r,y:o}=e.target().position();if(i!==r&&n!==o){const i=e.sourceEndpoint(),n=e.targetEndpoint(),{sourceDir:r}=x(e),[o,s]=E(r)?[i.x,n.y]:[n.x,i.y],{weights:a,distances:h}=t(i,n,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}c.endBatch(),p.run()}),p.run(),c.ready(t=>{h.Rm.info("Ready",t),a(c)})})}(0,r.pC)([{name:P.prefix,icons:P}]),d.A.use(c),(0,h.K2)(X,"addServices"),(0,h.K2)(z,"addJunctions"),(0,h.K2)(V,"positionNodes"),(0,h.K2)(B,"addGroups"),(0,h.K2)(W,"addEdges"),(0,h.K2)(j,"getAlignments"),(0,h.K2)($,"getRelativeConstraints"),(0,h.K2)(q,"layoutArchitecture");var K={draw:(0,h.K2)(async(t,e,i,r)=>{const o=r.db;o.setDiagramId(e);const s=o.getServices(),h=o.getJunctions(),l=o.getGroups(),d=o.getEdges(),c=o.getDataStructures(),g=(0,n.D)(e),u=g.append("g");u.attr("class","architecture-edges");const f=g.append("g");f.attr("class","architecture-services");const p=g.append("g");p.attr("class","architecture-groups"),await k(o,f,s,e),H(o,f,h,e);const y=await q(s,h,l,d,o,c);await U(u,y,o,e),await Y(p,y,o,e),V(o,y),(0,a.ot)(void 0,g,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},Z={parser:F,get db(){return new R},renderer:K,styles:G}},2528:(t,e,i)=>{"use strict";function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>n}),(0,i(8894).K2)(n,"populateCommonDb")}}]); \ No newline at end of file diff --git a/assets/js/6895.8e72dbe9.js b/assets/js/6895.8e72dbe9.js new file mode 100644 index 0000000..425ed3c --- /dev/null +++ b/assets/js/6895.8e72dbe9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6895],{6895:(e,a,r)=>{r.d(a,{diagram:()=>p});var t=r(6417),s=r(5691),n=r(8894),d=r(4419),i={version:"11.14.0"},p={parser:{parse:(0,n.K2)(async e=>{const a=await(0,d.qg)("info",e);n.Rm.debug(a)},"parse")},db:{getVersion:(0,n.K2)(()=>i.version,"getVersion")},renderer:{draw:(0,n.K2)((e,a,r)=>{n.Rm.debug("rendering info diagram\n"+e);const d=(0,t.D)(a);(0,s.a$)(d,100,400,!0);d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/6992.6dfc4d99.js b/assets/js/6992.6dfc4d99.js deleted file mode 100644 index 217178c..0000000 --- a/assets/js/6992.6dfc4d99.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6992],{5871(t,e,a){function r(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>r}),(0,a(797).K2)(r,"populateCommonDb")},6992(t,e,a){a.d(e,{diagram:()=>z});var r=a(3590),n=a(5871),i=a(3226),s=a(7633),o=a(797),l=a(8731),c={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},d={axes:[],curves:[],options:c},g=structuredClone(d),p=s.UI.radar,h=(0,o.K2)(()=>(0,i.$t)({...p,...(0,s.zj)().radar}),"getConfig"),u=(0,o.K2)(()=>g.axes,"getAxes"),x=(0,o.K2)(()=>g.curves,"getCurves"),m=(0,o.K2)(()=>g.options,"getOptions"),$=(0,o.K2)(t=>{g.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),f=(0,o.K2)(t=>{g.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:y(t.entries)}))},"setCurves"),y=(0,o.K2)(t=>{if(null==t[0].axis)return t.map(t=>t.value);const e=u();if(0===e.length)throw new Error("Axes must be populated before curves for reference entries");return e.map(e=>{const a=t.find(t=>t.axis?.$refText===e.name);if(void 0===a)throw new Error("Missing entry for axis "+e.label);return a.value})},"computeCurveEntries"),v={getAxes:u,getCurves:x,getOptions:m,setAxes:$,setCurves:f,setOptions:(0,o.K2)(t=>{const e=t.reduce((t,e)=>(t[e.name]=e,t),{});g.options={showLegend:e.showLegend?.value??c.showLegend,ticks:e.ticks?.value??c.ticks,max:e.max?.value??c.max,min:e.min?.value??c.min,graticule:e.graticule?.value??c.graticule}},"setOptions"),getConfig:h,clear:(0,o.K2)(()=>{(0,s.IU)(),g=structuredClone(d)},"clear"),setAccTitle:s.SV,getAccTitle:s.iN,setDiagramTitle:s.ke,getDiagramTitle:s.ab,getAccDescription:s.m7,setAccDescription:s.EI},w=(0,o.K2)(t=>{(0,n.S)(t,v);const{axes:e,curves:a,options:r}=t;v.setAxes(e),v.setCurves(a),v.setOptions(r)},"populate"),b={parse:(0,o.K2)(async t=>{const e=await(0,l.qg)("radar",t);o.Rm.debug(e),w(e)},"parse")},C=(0,o.K2)((t,e,a,n)=>{const i=n.db,s=i.getAxes(),o=i.getCurves(),l=i.getOptions(),c=i.getConfig(),d=i.getDiagramTitle(),g=(0,r.D)(e),p=M(g,c),h=l.max??Math.max(...o.map(t=>Math.max(...t.entries))),u=l.min,x=Math.min(c.width,c.height)/2;K(p,s,x,l.ticks,l.graticule),L(p,s,x,c),T(p,s,o,u,h,l.graticule,c),O(p,o,l.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),M=(0,o.K2)((t,e)=>{const a=e.width+e.marginLeft+e.marginRight,r=e.height+e.marginTop+e.marginBottom,n=e.marginLeft+e.width/2,i=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${a} ${r}`).attr("width",a).attr("height",r),t.append("g").attr("transform",`translate(${n}, ${i})`)},"drawFrame"),K=(0,o.K2)((t,e,a,r,n)=>{if("circle"===n)for(let i=0;i{const a=2*e*Math.PI/n-Math.PI/2;return`${s*Math.cos(a)},${s*Math.sin(a)}`}).join(" ");t.append("polygon").attr("points",o).attr("class","radarGraticule")}}},"drawGraticule"),L=(0,o.K2)((t,e,a,r)=>{const n=e.length;for(let i=0;i{if(e.entries.length!==o)return;const c=e.entries.map((t,e)=>{const a=2*Math.PI*e/o-Math.PI/2,i=k(t,r,n,l);return{x:i*Math.cos(a),y:i*Math.sin(a)}});"circle"===i?t.append("path").attr("d",A(c,s.curveTension)).attr("class",`radarCurve-${a}`):"polygon"===i&&t.append("polygon").attr("points",c.map(t=>`${t.x},${t.y}`).join(" ")).attr("class",`radarCurve-${a}`)})}function k(t,e,a,r){return r*(Math.min(Math.max(t,e),a)-e)/(a-e)}function A(t,e){const a=t.length;let r=`M${t[0].x},${t[0].y}`;for(let n=0;n{const r=t.append("g").attr("transform",`translate(${n}, ${i+20*a})`);r.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${a}`),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(e.label)})}(0,o.K2)(T,"drawCurves"),(0,o.K2)(k,"relativeRadius"),(0,o.K2)(A,"closedRoundCurve"),(0,o.K2)(O,"drawLegend");var S={draw:C},I=(0,o.K2)((t,e)=>{let a="";for(let r=0;r{const e=(0,s.P$)(),a=(0,s.zj)(),r=(0,i.$t)(e,a.themeVariables);return{themeVariables:r,radarOptions:(0,i.$t)(r.radar,t)}},"buildRadarStyleOptions"),z={parser:b,db:v,renderer:S,styles:(0,o.K2)(({radar:t}={})=>{const{themeVariables:e,radarOptions:a}=D(t);return`\n\t.radarTitle {\n\t\tfont-size: ${e.fontSize};\n\t\tcolor: ${e.titleColor};\n\t\tdominant-baseline: hanging;\n\t\ttext-anchor: middle;\n\t}\n\t.radarAxisLine {\n\t\tstroke: ${a.axisColor};\n\t\tstroke-width: ${a.axisStrokeWidth};\n\t}\n\t.radarAxisLabel {\n\t\tdominant-baseline: middle;\n\t\ttext-anchor: middle;\n\t\tfont-size: ${a.axisLabelFontSize}px;\n\t\tcolor: ${a.axisColor};\n\t}\n\t.radarGraticule {\n\t\tfill: ${a.graticuleColor};\n\t\tfill-opacity: ${a.graticuleOpacity};\n\t\tstroke: ${a.graticuleColor};\n\t\tstroke-width: ${a.graticuleStrokeWidth};\n\t}\n\t.radarLegendText {\n\t\ttext-anchor: start;\n\t\tfont-size: ${a.legendFontSize}px;\n\t\tdominant-baseline: hanging;\n\t}\n\t${I(e,a)}\n\t`},"styles")}}}]); \ No newline at end of file diff --git a/assets/js/6acefe75.365eee6d.js b/assets/js/6acefe75.365eee6d.js new file mode 100644 index 0000000..5d393ae --- /dev/null +++ b/assets/js/6acefe75.365eee6d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6495],{6510:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","source":"@site/docs/reference/scripts/update-or-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/update-or-delete","permalink":"/reference/scripts/update-or-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"},"next":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"}}');var d=t(199),s=t(2560);const i={},c="Procedure: Update or Delete",o={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"procedure-update-or-delete",children:"Procedure: Update or Delete"})}),"\n",(0,d.jsx)(n.p,{children:"A single endpoint that handles create, update, and delete based on the input fields."}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-lua",children:'function handle()\n if input.delete and input.uri then\n local r = Record.load(input.uri)\n if r then r:delete() end\n return { success = true }\n end\n\n if input.uri then\n -- Update existing\n local r = Record.load(input.uri)\n if not r then error("not found") end\n r.status = input.status\n r:save()\n return { uri = r._uri, cid = r._cid }\n end\n\n -- Create new\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,d.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,d.jsxs)(n.ol,{children:["\n",(0,d.jsxs)(n.li,{children:["If ",(0,d.jsx)(n.code,{children:"input.delete"})," is truthy and ",(0,d.jsx)(n.code,{children:"input.uri"})," is provided, load the record with ",(0,d.jsx)(n.a,{href:"/reference/lua/record-api#static-methods",children:(0,d.jsx)(n.code,{children:"Record.load"})})," and delete it."]}),"\n",(0,d.jsxs)(n.li,{children:["If only ",(0,d.jsx)(n.code,{children:"input.uri"})," is provided, load the existing record with ",(0,d.jsx)(n.a,{href:"/reference/lua/record-api#static-methods",children:(0,d.jsx)(n.code,{children:"Record.load"})}),", update its fields, and save it back. Since ",(0,d.jsx)(n.code,{children:"_uri"})," is already set, ",(0,d.jsx)(n.code,{children:"r:save()"})," calls ",(0,d.jsx)(n.code,{children:"putRecord"})," instead of ",(0,d.jsx)(n.code,{children:"createRecord"}),"."]}),"\n",(0,d.jsx)(n.li,{children:"If neither condition matches, create a new record from the input."}),"\n"]}),"\n",(0,d.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'# Create\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n\n# Update\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }\'\n\n# Delete\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }\'\n'})}),"\n",(0,d.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,d.jsxs)(n.p,{children:["This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of ",(0,d.jsx)(n.code,{children:"uri"})," and ",(0,d.jsx)(n.code,{children:"delete"})," fields in the input determines the action."]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(l,{...e})}):l(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var r=t(63);const d={},s=r.createContext(d);function i(e){const n=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6acefe75.bf671ca4.js b/assets/js/6acefe75.bf671ca4.js deleted file mode 100644 index b095967..0000000 --- a/assets/js/6acefe75.bf671ca4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6495],{1438(e,n,t){t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","source":"@site/docs/reference/scripts/update-or-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/update-or-delete","permalink":"/reference/scripts/update-or-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"},"next":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"}}');var s=t(4848),d=t(8453);const i={},c="Procedure: Update or Delete",o={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-update-or-delete",children:"Procedure: Update or Delete"})}),"\n",(0,s.jsx)(n.p,{children:"A single endpoint that handles create, update, and delete based on the input fields."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if input.delete and input.uri then\n local r = Record.load(input.uri)\n if r then r:delete() end\n return { success = true }\n end\n\n if input.uri then\n -- Update existing\n local r = Record.load(input.uri)\n if not r then error("not found") end\n r.status = input.status\n r:save()\n return { uri = r._uri, cid = r._cid }\n end\n\n -- Create new\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If ",(0,s.jsx)(n.code,{children:"input.delete"})," is truthy and ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})})," and delete it."]}),"\n",(0,s.jsxs)(n.li,{children:["If only ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the existing record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),", update its fields, and save it back. Since ",(0,s.jsx)(n.code,{children:"_uri"})," is already set, ",(0,s.jsx)(n.code,{children:"r:save()"})," calls ",(0,s.jsx)(n.code,{children:"putRecord"})," instead of ",(0,s.jsx)(n.code,{children:"createRecord"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If neither condition matches, create a new record from the input."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'# Create\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n\n# Update\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }\'\n\n# Delete\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of ",(0,s.jsx)(n.code,{children:"uri"})," and ",(0,s.jsx)(n.code,{children:"delete"})," fields in the input determines the action."]})]})}function u(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,t){t.d(n,{R:()=>i,x:()=>c});var r=t(6540);const s={},d=r.createContext(s);function i(e){const n=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/713f9d9e.7a4c4e6b.js b/assets/js/713f9d9e.7a4c4e6b.js new file mode 100644 index 0000000..19fca9c --- /dev/null +++ b/assets/js/713f9d9e.7a4c4e6b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6277],{1266:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>i,contentTitle:()=>l,default:()=>c,frontMatter:()=>a,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"reference/lua/http-api","title":"HTTP API","description":"The http table provides async HTTP client functions. Available in queries, procedures, and index hooks.","source":"@site/docs/reference/lua/http-api.md","sourceDirName":"reference/lua","slug":"/reference/lua/http-api","permalink":"/reference/lua/http-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Database API","permalink":"/reference/lua/database-api"},"next":{"title":"atproto API","permalink":"/reference/lua/atproto-api"}}');var r=s(199),d=s(2560);const a={},l="HTTP API",i={},o=[{value:"Methods",id:"methods",level:2},{value:"Options",id:"options",level:2},{value:"Response",id:"response",level:2},{value:"Examples",id:"examples",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"http-api",children:"HTTP API"})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"http"})," table provides async HTTP client functions. Available in queries, procedures, and ",(0,r.jsx)(t.a,{href:"/guides/index-hooks",children:"index hooks"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"methods",children:"Methods"}),"\n",(0,r.jsxs)(t.p,{children:["All methods take a URL and an optional options table, and return a ",(0,r.jsx)(t.a,{href:"#response",children:"response table"}),"."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:"http.get(url, opts?)\nhttp.post(url, opts?)\nhttp.put(url, opts?)\nhttp.patch(url, opts?)\nhttp.delete(url, opts?)\nhttp.head(url, opts?)\n"})}),"\n",(0,r.jsx)(t.h2,{id:"options",children:"Options"}),"\n",(0,r.jsx)(t.p,{children:"The optional second argument is a table with:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"headers"})}),(0,r.jsx)(t.td,{children:"table"}),(0,r.jsx)(t.td,{children:"Request headers as key-value string pairs"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"body"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Request body (ignored for GET and HEAD)"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"response",children:"Response"}),"\n",(0,r.jsx)(t.p,{children:"Every method returns a table with:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Field"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"status"})}),(0,r.jsx)(t.td,{children:"integer"}),(0,r.jsx)(t.td,{children:"HTTP status code"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"body"})}),(0,r.jsx)(t.td,{children:"string"}),(0,r.jsx)(t.td,{children:"Response body text (empty string for HEAD)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"headers"})}),(0,r.jsx)(t.td,{children:"table"}),(0,r.jsx)(t.td,{children:"Response headers as key-value pairs (lowercase keys)"})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"examples",children:"Examples"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:'-- Simple GET\nlocal resp = http.get("https://api.example.com/data")\n-- resp.status = 200, resp.body = "...", resp.headers["content-type"] = "application/json"\n\n-- GET with custom headers\nlocal resp = http.get("https://api.example.com/data", {\n headers = { ["authorization"] = "Bearer token123" }\n})\n\n-- POST with JSON body\nlocal resp = http.post("https://api.example.com/hook", {\n body = \'{"key": "value"}\',\n headers = { ["content-type"] = "application/json" }\n})\n\n-- PUT, PATCH, DELETE, HEAD follow the same pattern\nlocal resp = http.put(url, { body = data, headers = { ... } })\nlocal resp = http.patch(url, { body = data, headers = { ... } })\nlocal resp = http.delete(url, { headers = { ... } })\nlocal resp = http.head(url)\n'})})]})}function c(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},2560:(e,t,s)=>{s.d(t,{R:()=>a,x:()=>l});var n=s(63);const r={},d=n.createContext(r);function a(e){const t=n.useContext(d);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7508.2bdb1473.js b/assets/js/7508.2bdb1473.js new file mode 100644 index 0000000..d5038af --- /dev/null +++ b/assets/js/7508.2bdb1473.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7508],{7508:(e,s,c)=>{c.d(s,{createTreeViewServices:()=>p.I});var p=c(3018);c(3580)}}]); \ No newline at end of file diff --git a/assets/js/7592.a68b31ac.js b/assets/js/7592.a68b31ac.js deleted file mode 100644 index 81f31e8..0000000 --- a/assets/js/7592.a68b31ac.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7592],{2938(t,e,a){a.d(e,{m:()=>s});var r=a(797),s=class{constructor(t){this.init=t,this.records=this.init()}static{(0,r.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},2875(t,e,a){a.d(e,{CP:()=>h,HT:()=>p,PB:()=>d,aC:()=>l,lC:()=>o,m:()=>c,tk:()=>n});var r=a(7633),s=a(797),i=a(6750),n=(0,s.K2)((t,e)=>{const a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(const r in e.attrs)a.attr(r,e.attrs[r]);return e.class&&a.attr("class",e.class),a},"drawRect"),o=(0,s.K2)((t,e)=>{const a={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};n(t,a).lower()},"drawBackgroundRect"),c=(0,s.K2)((t,e)=>{const a=e.text.replace(r.H1," "),s=t.append("text");s.attr("x",e.x),s.attr("y",e.y),s.attr("class","legend"),s.style("text-anchor",e.anchor),e.class&&s.attr("class",e.class);const i=s.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(a),s},"drawText"),l=(0,s.K2)((t,e,a,r)=>{const s=t.append("image");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",n)},"drawImage"),h=(0,s.K2)((t,e,a,r)=>{const s=t.append("use");s.attr("x",e),s.attr("y",a);const n=(0,i.J)(r);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),d=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,s.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")},7592(t,e,a){a.d(e,{diagram:()=>vt});var r=a(2875),s=a(3981),i=a(2938),n=a(3226),o=a(7633),c=a(797),l=a(451),h=a(6750),d=function(){var t=(0,c.K2)(function(t,e,a,r){for(a=a||{},r=t.length;r--;a[t[r]]=e);return a},"o"),e=[1,2],a=[1,3],r=[1,4],s=[2,4],i=[1,9],n=[1,11],o=[1,13],l=[1,14],h=[1,16],d=[1,17],p=[1,18],g=[1,24],u=[1,25],x=[1,26],y=[1,27],m=[1,28],b=[1,29],T=[1,30],f=[1,31],E=[1,32],w=[1,33],I=[1,34],L=[1,35],_=[1,36],P=[1,37],k=[1,38],N=[1,39],A=[1,41],v=[1,42],M=[1,43],O=[1,44],D=[1,45],S=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],$=[2,71],C=[4,5,16,50,52,53],Y=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],K=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],B=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],V=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],F=[69,70,71],W=[1,127],q={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:(0,c.K2)(function(t,e,a,r,s,i,n){var o=i.length-1;switch(s){case 3:return r.apply(i[o]),i[o];case 4:case 9:case 8:case 13:this.$=[];break;case 5:case 10:i[o-1].push(i[o]),this.$=i[o-1];break;case 6:case 7:case 11:case 12:case 63:this.$=i[o];break;case 15:i[o].type="createParticipant",this.$=i[o];break;case 16:i[o-1].unshift({type:"boxStart",boxData:r.parseBoxData(i[o-2])}),i[o-1].push({type:"boxEnd",boxText:i[o-2]}),this.$=i[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-2]),sequenceIndexStep:Number(i[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(i[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-1].actor};break;case 29:r.setDiagramTitle(i[o].substring(6)),this.$=i[o].substring(6);break;case 30:r.setDiagramTitle(i[o].substring(7)),this.$=i[o].substring(7);break;case 31:this.$=i[o].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=i[o].trim(),r.setAccDescription(this.$);break;case 34:i[o-1].unshift({type:"loopStart",loopText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.LOOP_START}),i[o-1].push({type:"loopEnd",loopText:i[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=i[o-1];break;case 35:i[o-1].unshift({type:"rectStart",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_START}),i[o-1].push({type:"rectEnd",color:r.parseMessage(i[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=i[o-1];break;case 36:i[o-1].unshift({type:"optStart",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_START}),i[o-1].push({type:"optEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=i[o-1];break;case 37:i[o-1].unshift({type:"altStart",altText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.ALT_START}),i[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=i[o-1];break;case 38:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 39:i[o-1].unshift({type:"parStart",parText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.PAR_OVER_START}),i[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=i[o-1];break;case 40:i[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.CRITICAL_START}),i[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=i[o-1];break;case 41:i[o-1].unshift({type:"breakStart",breakText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_START}),i[o-1].push({type:"breakEnd",optText:r.parseMessage(i[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=i[o-1];break;case 43:this.$=i[o-3].concat([{type:"option",optionText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},i[o]]);break;case 45:this.$=i[o-3].concat([{type:"and",parText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.PAR_AND},i[o]]);break;case 47:this.$=i[o-3].concat([{type:"else",altText:r.parseMessage(i[o-1]),signalType:r.LINETYPE.ALT_ELSE},i[o]]);break;case 48:i[o-3].draw="participant",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 49:case 53:i[o-1].draw="participant",i[o-1].type="addParticipant",this.$=i[o-1];break;case 50:i[o-3].draw="actor",i[o-3].type="addParticipant",i[o-3].description=r.parseMessage(i[o-1]),this.$=i[o-3];break;case 51:i[o-1].draw="actor",i[o-1].type="addParticipant",this.$=i[o-1];break;case 52:i[o-1].type="destroyParticipant",this.$=i[o-1];break;case 54:this.$=[i[o-1],{type:"addNote",placement:i[o-2],actor:i[o-1].actor,text:i[o]}];break;case 55:i[o-2]=[].concat(i[o-1],i[o-1]).slice(0,2),i[o-2][0]=i[o-2][0].actor,i[o-2][1]=i[o-2][1].actor,this.$=[i[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:i[o-2].slice(0,2),text:i[o]}];break;case 56:this.$=[i[o-1],{type:"addLinks",actor:i[o-1].actor,text:i[o]}];break;case 57:this.$=[i[o-1],{type:"addALink",actor:i[o-1].actor,text:i[o]}];break;case 58:this.$=[i[o-1],{type:"addProperties",actor:i[o-1].actor,text:i[o]}];break;case 59:this.$=[i[o-1],{type:"addDetails",actor:i[o-1].actor,text:i[o]}];break;case 62:this.$=[i[o-2],i[o]];break;case 64:this.$=r.PLACEMENT.LEFTOF;break;case 65:this.$=r.PLACEMENT.RIGHTOF;break;case 66:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o],activate:!0},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:i[o-1].actor}];break;case 67:this.$=[i[o-4],i[o-1],{type:"addMessage",from:i[o-4].actor,to:i[o-1].actor,signalType:i[o-3],msg:i[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:i[o-4].actor}];break;case 68:this.$=[i[o-3],i[o-1],{type:"addMessage",from:i[o-3].actor,to:i[o-1].actor,signalType:i[o-2],msg:i[o]}];break;case 69:this.$={type:"addParticipant",actor:i[o-1],config:i[o]};break;case 70:this.$=i[o-1].trim();break;case 71:this.$={type:"addParticipant",actor:i[o]};break;case 72:this.$=r.LINETYPE.SOLID_OPEN;break;case 73:this.$=r.LINETYPE.DOTTED_OPEN;break;case 74:this.$=r.LINETYPE.SOLID;break;case 75:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=r.LINETYPE.DOTTED;break;case 77:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=r.LINETYPE.SOLID_CROSS;break;case 79:this.$=r.LINETYPE.DOTTED_CROSS;break;case 80:this.$=r.LINETYPE.SOLID_POINT;break;case 81:this.$=r.LINETYPE.DOTTED_POINT;break;case 82:this.$=r.parseMessage(i[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:a,6:r},{1:[3]},{3:5,4:e,5:a,6:r},{3:6,4:e,5:a,6:r},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],s,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:n,8:8,9:10,12:12,13:o,14:l,17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},t(R,[2,5]),{9:47,12:12,13:o,14:l,17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:P,52:k,53:N},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:S},{22:55,71:S},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:S},{22:75,71:S},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:S},{22:92,71:S},{22:93,71:S},{22:94,71:S},t([5,51,65,76,77,78,79,80,81,82,83,84,85,86],$),t(R,[2,6]),t(R,[2,15]),t(C,[2,9],{10:95}),t(R,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},t(R,[2,21]),{5:[1,99]},{5:[1,100]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t(Y,s,{7:101}),t(Y,s,{7:102}),t(Y,s,{7:103}),t(K,s,{40:104,7:105}),t(B,s,{42:106,7:107}),t(B,s,{7:107,42:108}),t(V,s,{45:109,7:110}),t(Y,s,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},t([5,51],$,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:S},t(F,[2,72]),t(F,[2,73]),t(F,[2,74]),t(F,[2,75]),t(F,[2,76]),t(F,[2,77]),t(F,[2,78]),t(F,[2,79]),t(F,[2,80]),t(F,[2,81]),{22:123,71:S},{22:125,59:124,71:S},{71:[2,64]},{71:[2,65]},{57:126,86:W},{57:128,86:W},{57:129,86:W},{57:130,86:W},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:P,52:k,53:N},{5:[1,136]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,137],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,138],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,139],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{16:[1,140]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,46],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,49:[1,141],50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{16:[1,142]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,44],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,48:[1,143],50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{16:[1,144]},{16:[1,145]},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[2,42],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,47:[1,146],50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{4:i,5:n,8:8,9:10,12:12,13:o,14:l,16:[1,147],17:15,18:h,21:d,22:40,23:p,24:19,25:20,26:21,27:22,28:23,29:g,30:u,31:x,33:y,35:m,36:b,37:T,38:f,39:E,41:w,43:I,44:L,46:_,50:P,52:k,53:N,55:A,60:v,61:M,62:O,63:D,71:S},{15:[1,148]},t(R,[2,49]),t(R,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},t(R,[2,51]),t(R,[2,52]),{22:151,71:S},{22:152,71:S},{57:153,86:W},{57:154,86:W},{57:155,86:W},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},t(R,[2,16]),t(C,[2,10]),{12:157,50:P,52:k,53:N},t(C,[2,12]),t(C,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,158]},t(R,[2,38]),{15:[1,159]},t(R,[2,39]),t(R,[2,40]),{15:[1,160]},t(R,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:W},{57:165,86:W},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:S},t(C,[2,11]),t(K,s,{7:105,40:167}),t(B,s,{7:107,42:168}),t(V,s,{7:110,45:169}),t(R,[2,48]),{5:[2,70]},t(R,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var a=new Error(t);throw a.hash=e,a}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,a=[0],r=[],s=[null],i=[],n=this.table,o="",l=0,h=0,d=0,p=i.slice.call(arguments,1),g=Object.create(this.lexer),u={yy:{}};for(var x in this.yy)Object.prototype.hasOwnProperty.call(this.yy,x)&&(u.yy[x]=this.yy[x]);g.setInput(t,u.yy),u.yy.lexer=g,u.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var y=g.yylloc;i.push(y);var m=g.options&&g.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||g.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){a.length=a.length-2*t,s.length=s.length-t,i.length=i.length-t},"popStack"),(0,c.K2)(b,"lex");for(var T,f,E,w,I,L,_,P,k,N={};;){if(E=a[a.length-1],this.defaultActions[E]?w=this.defaultActions[E]:(null==T&&(T=b()),w=n[E]&&n[E][T]),void 0===w||!w.length||!w[0]){var A="";for(L in k=[],n[E])this.terminals_[L]&&L>2&&k.push("'"+this.terminals_[L]+"'");A=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(A,{text:g.match,token:this.terminals_[T]||T,line:g.yylineno,loc:y,expected:k})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+T);switch(w[0]){case 1:a.push(T),s.push(g.yytext),i.push(g.yylloc),a.push(w[1]),T=null,f?(T=f,f=null):(h=g.yyleng,o=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(_=this.productions_[w[1]][1],N.$=s[s.length-_],N._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},m&&(N._$.range=[i[i.length-(_||1)].range[0],i[i.length-1].range[1]]),void 0!==(I=this.performAction.apply(N,[o,h,l,u.yy,w[1],s,i].concat(p))))return I;_&&(a=a.slice(0,-1*_*2),s=s.slice(0,-1*_),i=i.slice(0,-1*_)),a.push(this.productions_[w[1]][0]),s.push(N.$),i.push(N._$),P=n[a[a.length-2]][a[a.length-1]],a.push(P);break;case 3:return!0}}return!0},"parse")},z=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===r.length?this.yylloc.first_column:0)+r[r.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var a,r,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack){for(var i in s)this[i]=s[i];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,a,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),i=0;ie[0].length)){if(e=a,r=i,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,s[i])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(t,e,a,r){switch(a){case 0:case 56:case 72:return 5;case 1:case 2:case 3:case 4:case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:case 57:return e.yytext=e.yytext.trim(),71;case 11:case 17:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:case 69:return 86;case 70:return 69;case 71:return 70;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}}}();function H(){this.yy={}}return q.lexer=z,(0,c.K2)(H,"Parser"),H.prototype=q,q.Parser=H,new H}();d.parser=d;var p=d,g={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},u={FILLED:0,OPEN:1},x={LEFTOF:0,RIGHTOF:1,OVER:2},y="actor",m="control",b="database",T="entity",f=class{constructor(){this.state=new i.m(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=o.SV,this.setAccDescription=o.EI,this.setDiagramTitle=o.ke,this.getAccTitle=o.iN,this.getAccDescription=o.m7,this.getDiagramTitle=o.ab,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap((0,o.D7)().wrap),this.LINETYPE=g,this.ARROWTYPE=u,this.PLACEMENT=x}static{(0,c.K2)(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,a,r,i){let n,o=this.state.records.currentBox;if(void 0!==i){let t;t=i.includes("\n")?i+"\n":"{\n"+i+"\n}",n=(0,s.H)(t,{schema:s.r})}r=n?.type??r;const c=this.state.records.actors.get(t);if(c){if(this.state.records.currentBox&&c.box&&this.state.records.currentBox!==c.box)throw new Error(`A same participant should only be defined in one Box: ${c.name} can't be in '${c.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=c.box?c.box:this.state.records.currentBox,c.box=o,c&&e===c.name&&null==a)return}if(null==a?.text&&(a={text:e,type:r}),null!=r&&null!=a.text||(a={text:e,type:r}),this.state.records.actors.set(t,{box:o,name:e,description:a.text,wrap:a.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??"participant"}),this.state.records.prevActor){const e=this.state.records.actors.get(this.state.records.prevActor);e&&(e.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,a=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},e}}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:a?.text??"",wrap:a?.wrap??this.autoWrap(),type:r,activate:s}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();const e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:(0,o.D7)().sequence?.wrap??!1}clear(){this.state.reset(),(0,o.IU)()}parseMessage(t){const e=t.trim(),{wrap:a,cleanedText:r}=this.extractWrap(e),s={text:r,wrap:a};return c.Rm.debug(`parseMessage: ${JSON.stringify(s)}`),s}parseBoxData(t){const e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t);let a=e?.[1]?e[1].trim():"transparent",r=e?.[2]?e[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",a)||(a="transparent",r=t.trim());else{const e=(new Option).style;e.color=a,e.color!==a&&(a="transparent",r=t.trim())}const{wrap:s,cleanedText:i}=this.extractWrap(r);return{text:i?(0,o.jZ)(i,(0,o.D7)()):void 0,color:a,wrap:s}}addNote(t,e,a){const r={actor:t,placement:e,message:a.text,wrap:a.wrap??this.autoWrap()},s=[].concat(t,t);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:s[0],to:s[1],message:a.text,wrap:a.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(t,e){const a=this.getActor(t);try{let t=(0,o.jZ)(e.text,(0,o.D7)());t=t.replace(/=/g,"="),t=t.replace(/&/g,"&");const r=JSON.parse(t);this.insertLinks(a,r)}catch(r){c.Rm.error("error while parsing actor link text",r)}}addALink(t,e){const a=this.getActor(t);try{const t={};let r=(0,o.jZ)(e.text,(0,o.D7)());const s=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const i=r.slice(0,s-1).trim(),n=r.slice(s+1).trim();t[i]=n,this.insertLinks(a,t)}catch(r){c.Rm.error("error while parsing actor link text",r)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(const a in e)t.links[a]=e[a]}addProperties(t,e){const a=this.getActor(t);try{const t=(0,o.jZ)(e.text,(0,o.D7)()),r=JSON.parse(t);this.insertProperties(a,r)}catch(r){c.Rm.error("error while parsing actor properties text",r)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(const a in e)t.properties[a]=e[a]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){const a=this.getActor(t),r=document.getElementById(e.text);try{const t=r.innerHTML,e=JSON.parse(t);e.properties&&this.insertProperties(a,e.properties),e.links&&this.insertLinks(a,e.links)}catch(s){c.Rm.error("error while parsing actor details text",s)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed&&t.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":case"criticalEnd":case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"setAccTitle":(0,o.SV)(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType)}}getConfig(){return(0,o.D7)().sequence}},E=(0,c.K2)(t=>`.actor {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n\n text.actor > tspan {\n fill: ${t.actorTextColor};\n stroke: none;\n }\n\n .actor-line {\n stroke: ${t.actorLineColor};\n }\n \n .innerArc {\n stroke-width: 1.5;\n stroke-dasharray: none;\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ${t.signalColor};\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ${t.signalColor};\n }\n\n #arrowhead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .sequenceNumber {\n fill: ${t.sequenceNumberColor};\n }\n\n #sequencenumber {\n fill: ${t.signalColor};\n }\n\n #crosshead path {\n fill: ${t.signalColor};\n stroke: ${t.signalColor};\n }\n\n .messageText {\n fill: ${t.signalTextColor};\n stroke: none;\n }\n\n .labelBox {\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBkgColor};\n }\n\n .labelText, .labelText > tspan {\n fill: ${t.labelTextColor};\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ${t.loopTextColor};\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ${t.labelBoxBorderColor};\n fill: ${t.labelBoxBorderColor};\n }\n\n .note {\n //stroke: #decc93;\n stroke: ${t.noteBorderColor};\n fill: ${t.noteBkgColor};\n }\n\n .noteText, .noteText > tspan {\n fill: ${t.noteTextColor};\n stroke: none;\n }\n\n .activation0 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation1 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .activation2 {\n fill: ${t.activationBkgColor};\n stroke: ${t.activationBorderColor};\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ${t.actorBkg};\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n }\n .actor-man circle, line {\n stroke: ${t.actorBorder};\n fill: ${t.actorBkg};\n stroke-width: 2px;\n }\n\n`,"getStyles"),w="actor-top",I="actor-bottom",L="actor-box",_="actor-man",P=(0,c.K2)(function(t,e){return(0,r.tk)(t,e)},"drawRect"),k=(0,c.K2)(function(t,e,a,r,s){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};const i=e.links,n=e.actorCnt,o=e.rectData;var c="none";s&&(c="block !important");const l=t.append("g");l.attr("id","actor"+n+"_popup"),l.attr("class","actorPopupMenu"),l.attr("display",c);var d="";void 0!==o.class&&(d=" "+o.class);let p=o.width>a?o.width:a;const g=l.append("rect");if(g.attr("class","actorPopupMenuPanel"+d),g.attr("x",o.x),g.attr("y",o.height),g.attr("fill",o.fill),g.attr("stroke",o.stroke),g.attr("width",p),g.attr("height",o.height),g.attr("rx",o.rx),g.attr("ry",o.ry),null!=i){var u=20;for(let t in i){var x=l.append("a"),y=(0,h.J)(i[t]);x.attr("xlink:href",y),x.attr("target","_blank"),st(r)(t,x,o.x+10,o.height+u,p,20,{class:"actor"},r),u+=30}}return g.attr("height",u),{height:o.height+u,width:p}},"drawPopup"),N=(0,c.K2)(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),A=(0,c.K2)(async function(t,e,a=null){let r=t.append("foreignObject");const s=await(0,o.dj)(e.text,(0,o.zj)()),i=r.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(s).node().getBoundingClientRect();if(r.attr("height",Math.round(i.height)).attr("width",Math.round(i.width)),"noteText"===e.class){const a=t.node().firstChild;a.setAttribute("height",i.height+2*e.textMargin);const s=a.getBBox();r.attr("x",Math.round(s.x+s.width/2-i.width/2)).attr("y",Math.round(s.y+s.height/2-i.height/2))}else if(a){let{startx:t,stopx:s,starty:n}=a;if(t>s){const e=t;t=s,s=e}r.attr("x",Math.round(t+Math.abs(t-s)/2-i.width/2)),"loopText"===e.class?r.attr("y",Math.round(n)):r.attr("y",Math.round(n-i.height))}return[r]},"drawKatex"),v=(0,c.K2)(function(t,e){let a=0,r=0;const s=e.text.split(o.Y2.lineBreakRegex),[i,l]=(0,n.I5)(e.fontSize);let h=[],d=0,p=(0,c.K2)(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":p=(0,c.K2)(()=>Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":p=(0,c.K2)(()=>Math.round(e.y+(a+r+e.textMargin)/2),"yfunc");break;case"bottom":case"end":p=(0,c.K2)(()=>Math.round(e.y+(a+r+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(let[o,c]of s.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==i&&(d=o*i);const s=t.append("text");s.attr("x",e.x),s.attr("y",p()),void 0!==e.anchor&&s.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&s.style("font-family",e.fontFamily),void 0!==l&&s.style("font-size",l),void 0!==e.fontWeight&&s.style("font-weight",e.fontWeight),void 0!==e.fill&&s.attr("fill",e.fill),void 0!==e.class&&s.attr("class",e.class),void 0!==e.dy?s.attr("dy",e.dy):0!==d&&s.attr("dy",d);const g=c||n.pe;if(e.tspan){const t=s.append("tspan");t.attr("x",e.x),void 0!==e.fill&&t.attr("fill",e.fill),t.text(g)}else s.text(g);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(s._groups||s)[0][0].getBBox().height,a=r),h.push(s)}return h},"drawText"),M=(0,c.K2)(function(t,e){function a(t,e,a,r,s){return t+","+e+" "+(t+a)+","+e+" "+(t+a)+","+(e+r-s)+" "+(t+a-1.2*s)+","+(e+r)+" "+t+","+(e+r)}(0,c.K2)(a,"genPoints");const r=t.append("polygon");return r.attr("points",a(e.x,e.y,e.width,e.height,7)),r.attr("class","labelBox"),e.y=e.y+e.height/2,v(t,e),r},"drawLabel"),O=-1,D=(0,c.K2)((t,e,a,r)=>{t.select&&a.forEach(a=>{const s=e.get(a),i=t.select("#actor"+s.actorCnt);!r.mirrorActors&&s.stopy?i.attr("y2",s.stopy+s.height/2):r.mirrorActors&&i.attr("y2",s.stopy)})},"fixLifeLineHeights"),S=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var h=l;s||(O++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",N(`actor${O}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=O,null!=e.links&&h.attr("id","root-"+O));const d=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",p+=s?` ${I}`:` ${w}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.rx=3,d.ry=3,d.name=e.name;const g=P(h,d);if(e.rectData=d,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(h,d.x+d.width-20,d.y+10,t.substr(1)):(0,r.aC)(h,d.x+d.width-20,d.y+10,t)}rt(a,(0,o.Wi)(e.description))(e.description,h,d.x,d.y,d.width,d.height,{class:`actor ${L}`},a);let u=e.height;if(g.node){const t=g.node().getBBox();e.height=t.height,u=t.height}return u},"drawActorTypeParticipant"),R=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();var h=l;s||(O++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",N(`actor${O}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=O,null!=e.links&&h.attr("id","root-"+O));const d=(0,r.PB)();var p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",p+=s?` ${I}`:` ${w}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name;const g={...d,x:d.x+-6,y:d.y+6,class:"actor"},u=P(h,d);if(P(h,g),e.rectData=d,e.properties?.icon){const t=e.properties.icon.trim();"@"===t.charAt(0)?(0,r.CP)(h,d.x+d.width-20,d.y+10,t.substr(1)):(0,r.aC)(h,d.x+d.width-20,d.y+10,t)}rt(a,(0,o.Wi)(e.description))(e.description,h,d.x-6,d.y+6,d.width,d.height,{class:`actor ${L}`},a);let x=e.height;if(u.node){const t=u.node().getBBox();e.height=t.height,x=t.height}return x},"drawActorTypeCollections"),$=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height,l=t.append("g").lower();let h=l;s||(O++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",N(`actor${O}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=O,null!=e.links&&h.attr("id","root-"+O));const d=(0,r.PB)();let p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",p+=s?` ${I}`:` ${w}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name;const g=d.height/2,u=g/(2.5+d.height/50),x=h.append("g"),y=h.append("g");if(x.append("path").attr("d",`M ${d.x},${d.y+g}\n a ${u},${g} 0 0 0 0,${d.height}\n h ${d.width-2*u}\n a ${u},${g} 0 0 0 0,-${d.height}\n Z\n `).attr("class",p),y.append("path").attr("d",`M ${d.x},${d.y+g}\n a ${u},${g} 0 0 0 0,${d.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",p),x.attr("transform",`translate(${u}, ${-d.height/2})`),y.attr("transform",`translate(${d.width-u}, ${-d.height/2})`),e.rectData=d,e.properties?.icon){const t=e.properties.icon.trim(),a=d.x+d.width-20,s=d.y+10;"@"===t.charAt(0)?(0,r.CP)(h,a,s,t.substr(1)):(0,r.aC)(h,a,s,t)}rt(a,(0,o.Wi)(e.description))(e.description,h,d.x,d.y,d.width,d.height,{class:`actor ${L}`},a);let m=e.height;const b=x.select("path:last-child");if(b.node()){const t=b.node().getBBox();e.height=t.height,m=t.height}return m},"drawActorTypeQueue"),C=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+75,l=t.append("g").lower();s||(O++,l.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=O);const h=t.append("g");let d=_;d+=s?` ${I}`:` ${w}`,h.attr("class",d),h.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor";const g=e.x+e.width/2,u=i+30;h.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),h.append("circle").attr("cx",g).attr("cy",u).attr("r",18).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),h.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${g}, ${u-18})`);const x=h.node().getBBox();return e.height=x.height+2*(a?.sequence?.labelBoxHeight??0),rt(a,(0,o.Wi)(e.description))(e.description,h,p.x,p.y+18+(s?5:10),p.width,p.height,{class:`actor ${_}`},a),e.height},"drawActorTypeControl"),Y=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+75,l=t.append("g").lower(),h=t.append("g");let d=_;d+=s?` ${I}`:` ${w}`,h.attr("class",d),h.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor";const g=e.x+e.width/2,u=i+(s?10:25),x=18;h.append("circle").attr("cx",g).attr("cy",u).attr("r",x).attr("width",e.width).attr("height",e.height),h.append("line").attr("x1",g-x).attr("x2",g+x).attr("y1",u+x).attr("y2",u+x).attr("stroke","#333").attr("stroke-width",2);const y=h.node().getBBox();return e.height=y.height+(a?.sequence?.labelBoxHeight??0),s||(O++,l.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=O),rt(a,(0,o.Wi)(e.description))(e.description,h,p.x,p.y+(s?(u-i+x-5)/2:(u+x-i)/2),p.width,p.height,{class:`actor ${_}`},a),h.attr("transform","translate(0, 9)"),e.height},"drawActorTypeEntity"),K=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+e.height+2*a.boxTextMargin,l=t.append("g").lower();let h=l;s||(O++,Object.keys(e.links||{}).length&&!a.forceMenus&&h.attr("onclick",N(`actor${O}_popup`)).attr("cursor","pointer"),h.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),h=l.append("g"),e.actorCnt=O,null!=e.links&&h.attr("id","root-"+O));const d=(0,r.PB)();let p="actor";e.properties?.class?p=e.properties.class:d.fill="#eaeaea",p+=s?` ${I}`:` ${w}`,d.x=e.x,d.y=i,d.width=e.width,d.height=e.height,d.class=p,d.name=e.name,d.x=e.x,d.y=i;const g=d.width/4,u=d.width/4,x=g/2,y=x/(2.5+g/50),m=h.append("g"),b=`\n M ${d.x},${d.y+y}\n a ${x},${y} 0 0 0 ${g},0\n a ${x},${y} 0 0 0 -${g},0\n l 0,${u-2*y}\n a ${x},${y} 0 0 0 ${g},0\n l 0,-${u-2*y}\n`;m.append("path").attr("d",b).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),s?m.attr("transform",`translate(${1.5*g}, ${d.height/4-2*y})`):m.attr("transform",`translate(${1.5*g}, ${(d.height+y)/4})`),e.rectData=d,rt(a,(0,o.Wi)(e.description))(e.description,h,d.x,d.y+(s?(d.height+u)/4:(d.height+y)/2),d.width,d.height,{class:`actor ${L}`},a);const T=m.select("path:last-child");if(T.node()){const t=T.node().getBBox();e.height=t.height+(a.sequence.labelBoxHeight??0)}return e.height},"drawActorTypeDatabase"),B=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+80,l=30,h=t.append("g").lower();s||(O++,h.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=O);const d=t.append("g");let p=_;p+=s?` ${I}`:` ${w}`,d.attr("class",p),d.attr("name",e.name);const g=(0,r.PB)();g.x=e.x,g.y=i,g.fill="#eaeaea",g.width=e.width,g.height=e.height,g.class="actor",d.append("line").attr("id","actor-man-torso"+O).attr("x1",e.x+e.width/2-75).attr("y1",i+10).attr("x2",e.x+e.width/2-15).attr("y2",i+10),d.append("line").attr("id","actor-man-arms"+O).attr("x1",e.x+e.width/2-75).attr("y1",i+0).attr("x2",e.x+e.width/2-75).attr("y2",i+20),d.append("circle").attr("cx",e.x+e.width/2).attr("cy",i+10).attr("r",l);const u=d.node().getBBox();return e.height=u.height+(a.sequence.labelBoxHeight??0),rt(a,(0,o.Wi)(e.description))(e.description,d,g.x,g.y+(s?11:18),g.width,g.height,{class:`actor ${_}`},a),d.attr("transform","translate(0,22)"),e.height},"drawActorTypeBoundary"),V=(0,c.K2)(function(t,e,a,s){const i=s?e.stopy:e.starty,n=e.x+e.width/2,c=i+80,l=t.append("g").lower();s||(O++,l.append("line").attr("id","actor"+O).attr("x1",n).attr("y1",c).attr("x2",n).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=O);const h=t.append("g");let d=_;d+=s?` ${I}`:` ${w}`,h.attr("class",d),h.attr("name",e.name);const p=(0,r.PB)();p.x=e.x,p.y=i,p.fill="#eaeaea",p.width=e.width,p.height=e.height,p.class="actor",p.rx=3,p.ry=3,h.append("line").attr("id","actor-man-torso"+O).attr("x1",n).attr("y1",i+25).attr("x2",n).attr("y2",i+45),h.append("line").attr("id","actor-man-arms"+O).attr("x1",n-18).attr("y1",i+33).attr("x2",n+18).attr("y2",i+33),h.append("line").attr("x1",n-18).attr("y1",i+60).attr("x2",n).attr("y2",i+45),h.append("line").attr("x1",n).attr("y1",i+45).attr("x2",n+18-2).attr("y2",i+60);const g=h.append("circle");g.attr("cx",e.x+e.width/2),g.attr("cy",i+10),g.attr("r",15),g.attr("width",e.width),g.attr("height",e.height);const u=h.node().getBBox();return e.height=u.height,rt(a,(0,o.Wi)(e.description))(e.description,h,p.x,p.y+35,p.width,p.height,{class:`actor ${_}`},a),e.height},"drawActorTypeActor"),F=(0,c.K2)(async function(t,e,a,r){switch(e.type){case"actor":return await V(t,e,a,r);case"participant":return await S(t,e,a,r);case"boundary":return await B(t,e,a,r);case"control":return await C(t,e,a,r);case"entity":return await Y(t,e,a,r);case"database":return await K(t,e,a,r);case"collections":return await R(t,e,a,r);case"queue":return await $(t,e,a,r)}},"drawActor"),W=(0,c.K2)(function(t,e,a){const r=t.append("g");j(r,e),e.name&&rt(a)(e.name,r,e.x,e.y+a.boxTextMargin+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},a),r.lower()},"drawBox"),q=(0,c.K2)(function(t){return t.append("g")},"anchorElement"),z=(0,c.K2)(function(t,e,a,s,i){const n=(0,r.PB)(),o=e.anchored;n.x=e.startx,n.y=e.starty,n.class="activation"+i%3,n.width=e.stopx-e.startx,n.height=a-e.starty,P(o,n)},"drawActivation"),H=(0,c.K2)(async function(t,e,a,s){const{boxMargin:i,boxTextMargin:n,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:d,messageFontSize:p,messageFontWeight:g}=s,u=t.append("g"),x=(0,c.K2)(function(t,e,a,r){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",a).attr("y2",r).attr("class","loopLine")},"drawLoopLine");x(e.startx,e.starty,e.stopx,e.starty),x(e.stopx,e.starty,e.stopx,e.stopy),x(e.startx,e.stopy,e.stopx,e.stopy),x(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){x(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")});let y=(0,r.HT)();y.text=a,y.x=e.startx,y.y=e.starty,y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=h||50,y.height=l||20,y.textMargin=n,y.class="labelText",M(u,y),y=et(),y.text=e.title,y.x=e.startx+h/2+(e.stopx-e.startx)/2,y.y=e.starty+i+n,y.anchor="middle",y.valign="middle",y.textMargin=n,y.class="loopText",y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.wrap=!0;let m=(0,o.Wi)(y.text)?await A(u,y,e):v(u,y);if(void 0!==e.sectionTitles)for(const[r,c]of Object.entries(e.sectionTitles))if(c.message){y.text=c.message,y.x=e.startx+(e.stopx-e.startx)/2,y.y=e.sections[r].y+i+n,y.class="loopText",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=d,y.fontSize=p,y.fontWeight=g,y.wrap=e.wrap,(0,o.Wi)(y.text)?(e.starty=e.sections[r].y,await A(u,y,e)):v(u,y);let t=Math.round(m.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));e.sections[r].height+=t-(i+n)}return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),j=(0,c.K2)(function(t,e){(0,r.lC)(t,e)},"drawBackgroundRect"),U=(0,c.K2)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),G=(0,c.K2)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),X=(0,c.K2)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),J=(0,c.K2)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Z=(0,c.K2)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Q=(0,c.K2)(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),tt=(0,c.K2)(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),et=(0,c.K2)(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),at=(0,c.K2)(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),rt=function(){function t(t,e,a,r,i,n,o){s(e.append("text").attr("x",a+i/2).attr("y",r+n/2+5).style("text-anchor","middle").text(t),o)}function e(t,e,a,r,i,c,l,h){const{actorFontSize:d,actorFontFamily:p,actorFontWeight:g}=h,[u,x]=(0,n.I5)(d),y=t.split(o.Y2.lineBreakRegex);for(let n=0;nt.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:(0,c.K2)(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:(0,c.K2)(function(t){this.boxes.push(t)},"addBox"),addActor:(0,c.K2)(function(t){this.actors.push(t)},"addActor"),addLoop:(0,c.K2)(function(t){this.loops.push(t)},"addLoop"),addMessage:(0,c.K2)(function(t){this.messages.push(t)},"addMessage"),addNote:(0,c.K2)(function(t){this.notes.push(t)},"addNote"),lastActor:(0,c.K2)(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:(0,c.K2)(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:(0,c.K2)(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:(0,c.K2)(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:(0,c.K2)(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,mt((0,o.D7)())},"init"),updateVal:(0,c.K2)(function(t,e,a,r){void 0===t[e]?t[e]=a:t[e]=r(a,t[e])},"updateVal"),updateBounds:(0,c.K2)(function(t,e,a,r){const s=this;let i=0;function n(n){return(0,c.K2)(function(o){i++;const c=s.sequenceItems.length-i+1;s.updateVal(o,"starty",e-c*nt.boxMargin,Math.min),s.updateVal(o,"stopy",r+c*nt.boxMargin,Math.max),s.updateVal(ot.data,"startx",t-c*nt.boxMargin,Math.min),s.updateVal(ot.data,"stopx",a+c*nt.boxMargin,Math.max),"activation"!==n&&(s.updateVal(o,"startx",t-c*nt.boxMargin,Math.min),s.updateVal(o,"stopx",a+c*nt.boxMargin,Math.max),s.updateVal(ot.data,"starty",e-c*nt.boxMargin,Math.min),s.updateVal(ot.data,"stopy",r+c*nt.boxMargin,Math.max))},"updateItemBounds")}(0,c.K2)(n,"updateFn"),this.sequenceItems.forEach(n()),this.activations.forEach(n("activation"))},"updateBounds"),insert:(0,c.K2)(function(t,e,a,r){const s=o.Y2.getMin(t,a),i=o.Y2.getMax(t,a),n=o.Y2.getMin(e,r),c=o.Y2.getMax(e,r);this.updateVal(ot.data,"startx",s,Math.min),this.updateVal(ot.data,"starty",n,Math.min),this.updateVal(ot.data,"stopx",i,Math.max),this.updateVal(ot.data,"stopy",c,Math.max),this.updateBounds(s,n,i,c)},"insert"),newActivation:(0,c.K2)(function(t,e,a){const r=a.get(t.from),s=bt(t.from).length||0,i=r.x+r.width/2+(s-1)*nt.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+nt.activationWidth,stopy:void 0,actor:t.from,anchored:it.anchorElement(e)})},"newActivation"),endActivation:(0,c.K2)(function(t){const e=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from);return this.activations.splice(e,1)[0]},"endActivation"),createLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:(0,c.K2)(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:(0,c.K2)(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:(0,c.K2)(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:(0,c.K2)(function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:ot.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:(0,c.K2)(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:(0,c.K2)(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=o.Y2.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:(0,c.K2)(function(){return this.verticalPos},"getVerticalPos"),getBounds:(0,c.K2)(function(){return{bounds:this.data,models:this.models}},"getBounds")},ct=(0,c.K2)(async function(t,e){ot.bumpVerticalPos(nt.boxMargin),e.height=nt.boxMargin,e.starty=ot.getVerticalPos();const a=(0,r.PB)();a.x=e.startx,a.y=e.starty,a.width=e.width||nt.width,a.class="note";const s=t.append("g"),i=it.drawRect(s,a),n=(0,r.HT)();n.x=e.startx,n.y=e.starty,n.width=a.width,n.dy="1em",n.text=e.message,n.class="noteText",n.fontFamily=nt.noteFontFamily,n.fontSize=nt.noteFontSize,n.fontWeight=nt.noteFontWeight,n.anchor=nt.noteAlign,n.textMargin=nt.noteMargin,n.valign="center";const c=(0,o.Wi)(n.text)?await A(s,n):v(s,n),l=Math.round(c.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));i.attr("height",l+2*nt.noteMargin),e.height+=l+2*nt.noteMargin,ot.bumpVerticalPos(l+2*nt.noteMargin),e.stopy=e.starty+l+2*nt.noteMargin,e.stopx=e.startx+a.width,ot.insert(e.startx,e.starty,e.stopx,e.stopy),ot.models.addNote(e)},"drawNote"),lt=(0,c.K2)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),ht=(0,c.K2)(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),dt=(0,c.K2)(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont");async function pt(t,e){ot.bumpVerticalPos(10);const{startx:a,stopx:r,message:s}=e,i=o.Y2.splitBreaks(s).length,c=(0,o.Wi)(s),l=c?await(0,o.Dl)(s,(0,o.D7)()):n._K.calculateTextDimensions(s,lt(nt));if(!c){const t=l.height/i;e.height+=t,ot.bumpVerticalPos(t)}let h,d=l.height-10;const p=l.width;if(a===r){h=ot.getVerticalPos()+d,nt.rightAngles||(d+=nt.boxMargin,h=ot.getVerticalPos()+d),d+=30;const t=o.Y2.getMax(p/2,nt.width/2);ot.insert(a-t,ot.getVerticalPos()-10+d,r+t,ot.getVerticalPos()+30+d)}else d+=nt.boxMargin,h=ot.getVerticalPos()+d,ot.insert(a,h-10,r,h);return ot.bumpVerticalPos(d),e.height+=d,e.stopy=e.starty+e.height,ot.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),h}(0,c.K2)(pt,"boundMessage");var gt=(0,c.K2)(async function(t,e,a,s){const{startx:i,stopx:c,starty:l,message:h,type:d,sequenceIndex:p,sequenceVisible:g}=e,u=n._K.calculateTextDimensions(h,lt(nt)),x=(0,r.HT)();x.x=i,x.y=l+10,x.width=c-i,x.class="messageText",x.dy="1em",x.text=h,x.fontFamily=nt.messageFontFamily,x.fontSize=nt.messageFontSize,x.fontWeight=nt.messageFontWeight,x.anchor=nt.messageAlign,x.valign="center",x.textMargin=nt.wrapPadding,x.tspan=!1,(0,o.Wi)(x.text)?await A(t,x,{startx:i,stopx:c,starty:a}):v(t,x);const y=u.width;let m;i===c?m=nt.rightAngles?t.append("path").attr("d",`M ${i},${a} H ${i+o.Y2.getMax(nt.width/2,y/2)} V ${a+25} H ${i}`):t.append("path").attr("d","M "+i+","+a+" C "+(i+60)+","+(a-10)+" "+(i+60)+","+(a+30)+" "+i+","+(a+20)):(m=t.append("line"),m.attr("x1",i),m.attr("y1",a),m.attr("x2",c),m.attr("y2",a)),d===s.db.LINETYPE.DOTTED||d===s.db.LINETYPE.DOTTED_CROSS||d===s.db.LINETYPE.DOTTED_POINT||d===s.db.LINETYPE.DOTTED_OPEN||d===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let b="";if(nt.arrowMarkerAbsolute&&(b=(0,o.ID)(!0)),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),d!==s.db.LINETYPE.SOLID&&d!==s.db.LINETYPE.DOTTED||m.attr("marker-end","url("+b+"#arrowhead)"),d!==s.db.LINETYPE.BIDIRECTIONAL_SOLID&&d!==s.db.LINETYPE.BIDIRECTIONAL_DOTTED||(m.attr("marker-start","url("+b+"#arrowhead)"),m.attr("marker-end","url("+b+"#arrowhead)")),d!==s.db.LINETYPE.SOLID_POINT&&d!==s.db.LINETYPE.DOTTED_POINT||m.attr("marker-end","url("+b+"#filled-head)"),d!==s.db.LINETYPE.SOLID_CROSS&&d!==s.db.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+b+"#crosshead)"),g||nt.showSequenceNumbers){if(d===s.db.LINETYPE.BIDIRECTIONAL_SOLID||d===s.db.LINETYPE.BIDIRECTIONAL_DOTTED){const t=6;is&&(s=c.height),c.width+a.x>i&&(i=c.width+a.x)}return{maxHeight:s,maxWidth:i}},"drawActorsPopup"),mt=(0,c.K2)(function(t){(0,o.hH)(nt,t),t.fontFamily&&(nt.actorFontFamily=nt.noteFontFamily=nt.messageFontFamily=t.fontFamily),t.fontSize&&(nt.actorFontSize=nt.noteFontSize=nt.messageFontSize=t.fontSize),t.fontWeight&&(nt.actorFontWeight=nt.noteFontWeight=nt.messageFontWeight=t.fontWeight)},"setConf"),bt=(0,c.K2)(function(t){return ot.activations.filter(function(e){return e.actor===t})},"actorActivations"),Tt=(0,c.K2)(function(t,e){const a=e.get(t),r=bt(t);return[r.reduce(function(t,e){return o.Y2.getMin(t,e.startx)},a.x+a.width/2-1),r.reduce(function(t,e){return o.Y2.getMax(t,e.stopx)},a.x+a.width/2+1)]},"activationBounds");function ft(t,e,a,r,s){ot.bumpVerticalPos(a);let i=r;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,s=lt(nt);e.message=n._K.wrapLabel(`[${e.message}]`,a-2*nt.wrapPadding,s),e.width=a,e.wrap=!0;const l=n._K.calculateTextDimensions(e.message,s),h=o.Y2.getMax(l.height,nt.labelBoxHeight);i=r+h,c.Rm.debug(`${h} - ${e.message}`)}s(e),ot.bumpVerticalPos(i)}function Et(t,e,a,r,s,i,n){function o(a,r){a.x{t.add(e.from),t.add(e.to)}),m=m.filter(e=>t.has(e))}ut(p,g,u,m,0,b,!1);const I=await Nt(b,g,w,r);function L(t,e){const a=ot.endActivation(t);a.starty+18>e&&(a.starty=e-6,e+=12),it.drawActivation(p,a,e,nt,bt(t.from).length),ot.insert(a.startx,e-10,a.stopx,e)}it.insertArrowHead(p),it.insertArrowCrossHead(p),it.insertArrowFilledHead(p),it.insertSequenceNumber(p),(0,c.K2)(L,"activeEnd");let _=1,P=1;const k=[],N=[];let A=0;for(const o of b){let t,e,a;switch(o.type){case r.db.LINETYPE.NOTE:ot.resetVerticalPos(),e=o.noteModel,await ct(p,e);break;case r.db.LINETYPE.ACTIVE_START:ot.newActivation(o,p,g);break;case r.db.LINETYPE.ACTIVE_END:L(o,ot.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t));break;case r.db.LINETYPE.LOOP_END:t=ot.endLoop(),await it.drawLoop(p,t,"loop",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:ft(I,o,nt.boxMargin,nt.boxMargin,t=>ot.newLoop(void 0,t.message));break;case r.db.LINETYPE.RECT_END:t=ot.endLoop(),N.push(t),ot.models.addLoop(t),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos());break;case r.db.LINETYPE.OPT_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t));break;case r.db.LINETYPE.OPT_END:t=ot.endLoop(),await it.drawLoop(p,t,"opt",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t));break;case r.db.LINETYPE.ALT_ELSE:ft(I,o,nt.boxMargin+nt.boxTextMargin,nt.boxMargin,t=>ot.addSectionToLoop(t));break;case r.db.LINETYPE.ALT_END:t=ot.endLoop(),await it.drawLoop(p,t,"alt",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t)),ot.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:ft(I,o,nt.boxMargin+nt.boxTextMargin,nt.boxMargin,t=>ot.addSectionToLoop(t));break;case r.db.LINETYPE.PAR_END:t=ot.endLoop(),await it.drawLoop(p,t,"par",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:_=o.message.start||_,P=o.message.step||P,o.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t));break;case r.db.LINETYPE.CRITICAL_OPTION:ft(I,o,nt.boxMargin+nt.boxTextMargin,nt.boxMargin,t=>ot.addSectionToLoop(t));break;case r.db.LINETYPE.CRITICAL_END:t=ot.endLoop(),await it.drawLoop(p,t,"critical",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:ft(I,o,nt.boxMargin,nt.boxMargin+nt.boxTextMargin,t=>ot.newLoop(t));break;case r.db.LINETYPE.BREAK_END:t=ot.endLoop(),await it.drawLoop(p,t,"break",nt),ot.bumpVerticalPos(t.stopy-ot.getVerticalPos()),ot.models.addLoop(t);break;default:try{a=o.msgModel,a.starty=ot.getVerticalPos(),a.sequenceIndex=_,a.sequenceVisible=r.db.showSequenceNumbers();const t=await pt(0,a);Et(o,a,t,A,g,u,x),k.push({messageModel:a,lineStartY:t}),ot.models.addMessage(a)}catch(Y){c.Rm.error("error while drawing message",Y)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(o.type)&&(_+=P),A++}c.Rm.debug("createdActors",u),c.Rm.debug("destroyedActors",x),await xt(p,g,m,!1);for(const o of k)await gt(p,o.messageModel,o.lineStartY,r);nt.mirrorActors&&await xt(p,g,m,!0),N.forEach(t=>it.drawBackgroundRect(p,t)),D(p,g,m,nt);for(const o of ot.models.boxes){o.height=ot.getVerticalPos()-o.y,ot.insert(o.x,o.y,o.x+o.width,o.height);const t=2*nt.boxMargin;o.startx=o.x-t,o.starty=o.y-.25*t,o.stopx=o.startx+o.width+2*t,o.stopy=o.starty+o.height+.75*t,o.stroke="rgb(0,0,0, 0.5)",it.drawBox(p,o,nt)}f&&ot.bumpVerticalPos(nt.boxMargin);const v=yt(p,g,m,d),{bounds:M}=ot.getBounds();void 0===M.startx&&(M.startx=0),void 0===M.starty&&(M.starty=0),void 0===M.stopx&&(M.stopx=0),void 0===M.stopy&&(M.stopy=0);let O=M.stopy-M.starty;O{const a=lt(nt);let r=e.actorKeys.reduce((e,a)=>e+(t.get(a).width+(t.get(a).margin||0)),0);r+=8*nt.boxMargin,r-=2*nt.boxTextMargin,e.wrap&&(e.name=n._K.wrapLabel(e.name,r-2*nt.wrapPadding,a));const i=n._K.calculateTextDimensions(e.name,a);s=o.Y2.getMax(i.height,s);const c=o.Y2.getMax(r,i.width+2*nt.wrapPadding);if(e.margin=nt.boxTextMargin,rt.textMaxHeight=s),o.Y2.getMax(r,nt.height)}(0,c.K2)(_t,"calculateActorMargins");var Pt=(0,c.K2)(async function(t,e,a){const r=e.get(t.from),s=e.get(t.to),i=r.x,l=s.x,h=t.wrap&&t.message;let d=(0,o.Wi)(t.message)?await(0,o.Dl)(t.message,(0,o.D7)()):n._K.calculateTextDimensions(h?n._K.wrapLabel(t.message,nt.width,ht(nt)):t.message,ht(nt));const p={width:h?nt.width:o.Y2.getMax(nt.width,d.width+2*nt.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===a.db.PLACEMENT.RIGHTOF?(p.width=h?o.Y2.getMax(nt.width,d.width):o.Y2.getMax(r.width/2+s.width/2,d.width+2*nt.noteMargin),p.startx=i+(r.width+nt.actorMargin)/2):t.placement===a.db.PLACEMENT.LEFTOF?(p.width=h?o.Y2.getMax(nt.width,d.width+2*nt.noteMargin):o.Y2.getMax(r.width/2+s.width/2,d.width+2*nt.noteMargin),p.startx=i-p.width+(r.width-nt.actorMargin)/2):t.to===t.from?(d=n._K.calculateTextDimensions(h?n._K.wrapLabel(t.message,o.Y2.getMax(nt.width,r.width),ht(nt)):t.message,ht(nt)),p.width=h?o.Y2.getMax(nt.width,r.width):o.Y2.getMax(r.width,nt.width,d.width+2*nt.noteMargin),p.startx=i+(r.width-p.width)/2):(p.width=Math.abs(i+r.width/2-(l+s.width/2))+nt.actorMargin,p.startx=i2,u=(0,c.K2)(t=>h?-t:t,"adjustValue");t.from===t.to?p=d:(t.activate&&!g&&(p+=u(nt.activationWidth/2-1)),[a.db.LINETYPE.SOLID_OPEN,a.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(p+=u(3)),[a.db.LINETYPE.BIDIRECTIONAL_SOLID,a.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(d-=u(3)));const x=[r,s,i,l],y=Math.abs(d-p);t.wrap&&t.message&&(t.message=n._K.wrapLabel(t.message,o.Y2.getMax(y+2*nt.wrapPadding,nt.width),lt(nt)));const m=n._K.calculateTextDimensions(t.message,lt(nt));return{width:o.Y2.getMax(t.wrap?0:m.width+2*nt.wrapPadding,y+2*nt.wrapPadding,nt.width),height:0,startx:d,stopx:p,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),Nt=(0,c.K2)(async function(t,e,a,r){const s={},i=[];let n,l,h;for(const c of t){switch(c.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:i.push({id:c.id,msg:c.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:c.message&&(n=i.pop(),s[n.id]=n,s[c.id]=n,i.push(n));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:n=i.pop(),s[n.id]=n;break;case r.db.LINETYPE.ACTIVE_START:{const t=e.get(c.from?c.from:c.to.actor),a=bt(c.from?c.from:c.to.actor).length,r=t.x+t.width/2+(a-1)*nt.activationWidth/2,s={startx:r,stopx:r+nt.activationWidth,actor:c.from,enabled:!0};ot.activations.push(s)}break;case r.db.LINETYPE.ACTIVE_END:{const t=ot.activations.map(t=>t.actor).lastIndexOf(c.from);ot.activations.splice(t,1).splice(0,1)}}void 0!==c.placement?(l=await Pt(c,e,r),c.noteModel=l,i.forEach(t=>{n=t,n.from=o.Y2.getMin(n.from,l.startx),n.to=o.Y2.getMax(n.to,l.startx+l.width),n.width=o.Y2.getMax(n.width,Math.abs(n.from-n.to))-nt.labelBoxWidth})):(h=kt(c,e,r),c.msgModel=h,h.startx&&h.stopx&&i.length>0&&i.forEach(t=>{if(n=t,h.startx===h.stopx){const t=e.get(c.from),a=e.get(c.to);n.from=o.Y2.getMin(t.x-h.width/2,t.x-t.width/2,n.from),n.to=o.Y2.getMax(a.x+h.width/2,a.x+t.width/2,n.to),n.width=o.Y2.getMax(n.width,Math.abs(n.to-n.from))-nt.labelBoxWidth}else n.from=o.Y2.getMin(h.startx,n.from),n.to=o.Y2.getMax(h.stopx,n.to),n.width=o.Y2.getMax(n.width,h.width)-nt.labelBoxWidth}))}return ot.activations=[],c.Rm.debug("Loop type widths:",s),s},"calculateLoopBounds"),At={bounds:ot,drawActors:xt,drawActorsPopup:yt,setConf:mt,draw:wt},vt={parser:p,get db(){return new f},renderer:At,styles:E,init:(0,c.K2)(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,(0,o.XV)({sequence:{wrap:t.wrap}}))},"init")}}}]); \ No newline at end of file diff --git a/assets/js/7680ac5f.43677969.js b/assets/js/7680ac5f.43677969.js new file mode 100644 index 0000000..e53b6c3 --- /dev/null +++ b/assets/js/7680ac5f.43677969.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3961],{184:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/admin/events","title":"Admin API: Event Logs","description":"HappyView logs system events \u2014 lexicon changes, record operations, script errors, user actions, and more. See the Event Logs guide for details on event types and retention.","source":"@site/docs/reference/admin/events.md","sourceDirName":"reference/admin","slug":"/reference/admin/events","permalink":"/reference/admin/events","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Backfill","permalink":"/reference/admin/backfill"},"next":{"title":"API Keys","permalink":"/reference/admin/api-keys"}}');var t=r(199),d=r(2560);const i={},c="Admin API: Event Logs",l={},o=[{value:"List event logs",id:"list-event-logs",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"admin-api-event-logs",children:"Admin API: Event Logs"})}),"\n",(0,t.jsxs)(n.p,{children:["HappyView logs system events \u2014 lexicon changes, record operations, script errors, user actions, and more. See the ",(0,t.jsx)(n.a,{href:"/guides/event-logs",children:"Event Logs guide"})," for details on event types and retention."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,t.jsx)(n.h2,{id:"list-event-logs",children:"List event logs"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"GET /admin/events\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:'curl "http://localhost:3000/admin/events?severity=error&limit=10" -H "$AUTH"\n'})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Param"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Required"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"event_type"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsxs)(n.td,{children:["Filter by exact event type (e.g. ",(0,t.jsx)(n.code,{children:"script.error"}),")"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"category"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsxs)(n.td,{children:["Filter by category prefix (e.g. ",(0,t.jsx)(n.code,{children:"lexicon"})," matches all lexicon events)"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"severity"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsxs)(n.td,{children:["Filter by severity: ",(0,t.jsx)(n.code,{children:"info"}),", ",(0,t.jsx)(n.code,{children:"warn"}),", or ",(0,t.jsx)(n.code,{children:"error"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"subject"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsx)(n.td,{children:"Filter by subject (lexicon ID, record URI, admin DID, etc.)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"cursor"})}),(0,t.jsx)(n.td,{children:"string"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsx)(n.td,{children:"Pagination cursor (ISO 8601 timestamp from previous response)"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"limit"})}),(0,t.jsx)(n.td,{children:"number"}),(0,t.jsx)(n.td,{children:"no"}),(0,t.jsxs)(n.td,{children:["Results per page (default ",(0,t.jsx)(n.code,{children:"50"}),", max ",(0,t.jsx)(n.code,{children:"100"}),")"]})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Response"}),": ",(0,t.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "events": [\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "event_type": "script.error",\n "severity": "error",\n "actor_did": "did:plc:abc123",\n "subject": "com.example.feed.like",\n "detail": {\n "error": "attempt to index nil value",\n "script_source": "function handle() ... end",\n "input": { "status": "hello" },\n "caller_did": "did:plc:abc123",\n "method": "com.example.feed.like"\n },\n "created_at": "2026-03-01T12:00:00Z"\n }\n ],\n "cursor": "2026-03-01T11:59:00Z"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Events are returned in reverse chronological order (newest first). Pass the ",(0,t.jsx)(n.code,{children:"cursor"})," value from the response to fetch the next page."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},2560:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>c});var s=r(63);const t={},d=s.createContext(t);function i(e){const n=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/774696b9.08c2c2c4.js b/assets/js/774696b9.08c2c2c4.js deleted file mode 100644 index cf57daf..0000000 --- a/assets/js/774696b9.08c2c2c4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8865],{8158(e,n,r){r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>o});const d=JSON.parse('{"id":"guides/index-hooks","title":"Index Hooks","description":"Index hooks are Lua scripts that run automatically whenever a record in a collection is created, updated, or deleted on the network. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.","source":"@site/docs/guides/index-hooks.md","sourceDirName":"guides","slug":"/guides/index-hooks","permalink":"/guides/index-hooks","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lua Scripting","permalink":"/guides/scripting"},"next":{"title":"Backfill","permalink":"/guides/backfill"}}');var s=r(4848),i=r(8453);const t={},l="Index Hooks",c={},o=[{value:"Attaching a hook",id:"attaching-a-hook",level:2},{value:"Script structure",id:"script-structure",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Available APIs",id:"available-apis",level:2},{value:"Error handling and retries",id:"error-handling-and-retries",level:2},{value:"Performance considerations",id:"performance-considerations",level:3},{value:"Dead letter table",id:"dead-letter-table",level:3},{value:"Examples",id:"examples",level:2},{value:"Filter out records missing a required field",id:"filter-out-records-missing-a-required-field",level:3},{value:"Transform a record before storage",id:"transform-a-record-before-storage",level:3},{value:"Post to a webhook",id:"post-to-a-webhook",level:3},{value:"Sync to Algolia",id:"sync-to-algolia",level:3},{value:"Sync to Meilisearch",id:"sync-to-meilisearch",level:3},{value:"Next steps",id:"next-steps",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"index-hooks",children:"Index Hooks"})}),"\n",(0,s.jsxs)(n.p,{children:["Index hooks are Lua scripts that run automatically whenever a record in a collection is created, updated, or deleted on the network. They run ",(0,s.jsx)(n.strong,{children:"before"})," the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services."]}),"\n",(0,s.jsxs)(n.p,{children:["Unlike ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"query and procedure scripts"})," that run in response to XRPC requests, index hooks are triggered by the firehose."]}),"\n",(0,s.jsx)(n.h2,{id:"attaching-a-hook",children:"Attaching a hook"}),"\n",(0,s.jsxs)(n.p,{children:["Each record-type lexicon can have one index hook. You can add it through the ",(0,s.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"}),' (click "Add Index Hook" on any record lexicon\'s detail page) or via the ',(0,s.jsx)(n.a,{href:"/reference/admin-api#upload--upsert-a-lexicon",children:"admin API"})," by including the ",(0,s.jsx)(n.code,{children:"index_hook"})," field when uploading a lexicon."]}),"\n",(0,s.jsx)(n.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,s.jsxs)(n.p,{children:["Like query and procedure scripts, index hooks must define a ",(0,s.jsx)(n.code,{children:"handle()"})," function:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n log("deleted " .. uri)\n else\n log(action .. " " .. uri)\n end\nend\n'})}),"\n",(0,s.jsx)(n.p,{children:"The function is called once per record event. The return value controls what happens next:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Return value"}),(0,s.jsx)(n.th,{children:"Effect"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"nil"})}),(0,s.jsxs)(n.td,{children:["The record is ",(0,s.jsx)(n.strong,{children:"not"})," indexed (skipped entirely)"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"A table"}),(0,s.jsx)(n.td,{children:"That table is stored as the record instead"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"true"})}),(0,s.jsx)(n.td,{children:"The original record is stored as-is"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.em,{children:"(no hook)"})}),(0,s.jsx)(n.td,{children:"The original record is stored as-is"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["On ",(0,s.jsx)(n.strong,{children:"delete"})," events, returning ",(0,s.jsx)(n.code,{children:"nil"})," skips the delete (the record stays in the database)."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Important:"})," If your hook has side effects (e.g. syncing to a search index) but you want normal indexing to proceed, return ",(0,s.jsx)(n.code,{children:"record"})," or ",(0,s.jsx)(n.code,{children:"true"})," \u2014 not nothing. A missing return statement returns ",(0,s.jsx)(n.code,{children:"nil"}),", which ",(0,s.jsx)(n.strong,{children:"skips indexing"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If the hook errors after all retries, the system ",(0,s.jsx)(n.strong,{children:"fails open"})," \u2014 the original record is stored and the failed event is dead-lettered for later inspection."]}),"\n",(0,s.jsx)(n.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,s.jsxs)(n.p,{children:["These globals are set before ",(0,s.jsx)(n.code,{children:"handle()"})," is called:"]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Global"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"action"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:'"create"'}),", ",(0,s.jsx)(n.code,{children:'"update"'}),", or ",(0,s.jsx)(n.code,{children:'"delete"'})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"uri"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:["The full AT URI (e.g. ",(0,s.jsx)(n.code,{children:"at://did:plc:abc/col/rkey"}),")"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"did"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The repo DID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"collection"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The collection NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rkey"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The record key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"record"})}),(0,s.jsx)(n.td,{children:"table?"}),(0,s.jsx)(n.td,{children:"The full record as a Lua table (nil on delete)"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["Index hooks do ",(0,s.jsx)(n.strong,{children:"not"})," have access to ",(0,s.jsx)(n.code,{children:"caller_did"}),", ",(0,s.jsx)(n.code,{children:"input"}),", ",(0,s.jsx)(n.code,{children:"params"}),", ",(0,s.jsx)(n.code,{children:"method"}),", or the ",(0,s.jsx)(n.code,{children:"Record"})," API. They run from the firehose, not from a user request."]}),"\n",(0,s.jsx)(n.h2,{id:"available-apis",children:"Available APIs"}),"\n",(0,s.jsx)(n.p,{children:"Index hooks have access to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/guides/scripting#database-api",children:"Database API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"db.query"}),", ",(0,s.jsx)(n.code,{children:"db.get"}),", ",(0,s.jsx)(n.code,{children:"db.search"}),", ",(0,s.jsx)(n.code,{children:"db.backlinks"}),", ",(0,s.jsx)(n.code,{children:"db.count"}),", ",(0,s.jsx)(n.code,{children:"db.raw"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/guides/scripting#http-api",children:"HTTP API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"http.get"}),", ",(0,s.jsx)(n.code,{children:"http.post"}),", ",(0,s.jsx)(n.code,{children:"http.put"}),", ",(0,s.jsx)(n.code,{children:"http.patch"}),", ",(0,s.jsx)(n.code,{children:"http.delete"}),", ",(0,s.jsx)(n.code,{children:"http.head"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/guides/scripting#json-api",children:"JSON API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"json.encode"}),", ",(0,s.jsx)(n.code,{children:"json.decode"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/guides/scripting#utility-globals",children:"Utility globals"})})," \u2014 ",(0,s.jsx)(n.code,{children:"log()"}),", ",(0,s.jsx)(n.code,{children:"now()"}),", ",(0,s.jsx)(n.code,{children:"TID()"}),", ",(0,s.jsx)(n.code,{children:"toarray()"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"error-handling-and-retries",children:"Error handling and retries"}),"\n",(0,s.jsx)(n.p,{children:"Index hooks are designed to be resilient:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If a hook fails, it retries up to ",(0,s.jsx)(n.strong,{children:"3 times"})," with exponential backoff (1s, 2s, 4s delays)."]}),"\n",(0,s.jsxs)(n.li,{children:["If all retries are exhausted, the failed event is inserted into the ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table for later inspection."]}),"\n",(0,s.jsxs)(n.li,{children:["On failure the system ",(0,s.jsx)(n.strong,{children:"fails open"})," \u2014 the original record is stored as-is so indexing is not permanently blocked."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Failed hooks are logged as errors. Check the ",(0,s.jsx)(n.a,{href:"/guides/event-logs",children:"event logs"})," or query the ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table directly to find and replay failures."]}),"\n",(0,s.jsx)(n.h3,{id:"performance-considerations",children:"Performance considerations"}),"\n",(0,s.jsx)(n.p,{children:"Because hooks run synchronously before indexing, they block the firehose consumer while executing. With retry logic (1s + 2s + 4s backoff), a persistently failing hook could block for ~7 seconds per record. Keep hook scripts fast and ensure external services they depend on are reliable."}),"\n",(0,s.jsx)(n.h3,{id:"dead-letter-table",children:"Dead letter table"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table stores events that failed all retry attempts:"]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Column"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"id"})}),(0,s.jsx)(n.td,{children:"UUID"}),(0,s.jsx)(n.td,{children:"Primary key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"lexicon_id"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The lexicon NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"uri"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The AT URI of the record"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"did"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The repo DID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"collection"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The collection NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rkey"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The record key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"action"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"create"}),", ",(0,s.jsx)(n.code,{children:"update"}),", or ",(0,s.jsx)(n.code,{children:"delete"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"record"})}),(0,s.jsx)(n.td,{children:"jsonb"}),(0,s.jsx)(n.td,{children:"The record data (null on delete)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"error"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The error message from the last attempt"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"attempts"})}),(0,s.jsx)(n.td,{children:"int"}),(0,s.jsx)(n.td,{children:"Total number of attempts made"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"created_at"})}),(0,s.jsx)(n.td,{children:"timestamptz"}),(0,s.jsx)(n.td,{children:"When the failure was recorded"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.h3,{id:"filter-out-records-missing-a-required-field",children:"Filter out records missing a required field"}),"\n",(0,s.jsxs)(n.p,{children:["Skip indexing any record that doesn't have a ",(0,s.jsx)(n.code,{children:"title"})," field:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n return record -- allow deletes to proceed\n end\n\n if record.title == nil or record.title == "" then\n return nil -- skip: no title\n end\n\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"transform-a-record-before-storage",children:"Transform a record before storage"}),"\n",(0,s.jsx)(n.p,{children:"Enrich a record with a computed field before it is stored:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n return record\n end\n\n record.slug = string.lower(string.gsub(record.title or "", "%s+", "-"))\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"post-to-a-webhook",children:"Post to a webhook"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n http.post("https://hooks.example.com/records", {\n headers = { ["Content-Type"] = "application/json" },\n body = json.encode({\n action = action,\n uri = uri,\n did = did,\n record = record\n })\n })\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"sync-to-algolia",children:"Sync to Algolia"}),"\n",(0,s.jsx)(n.p,{children:"Push records to an Algolia search index on create/update, and remove them on delete:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["X-Algolia-API-Key"] = "your-api-key",\n ["X-Algolia-Application-Id"] = "your-app-id",\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers\n })\n else\n http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers,\n body = json.encode({\n objectID = uri,\n collection = collection,\n did = did,\n record = record\n })\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsxs)(n.p,{children:["See the full ",(0,s.jsx)(n.a,{href:"/reference/scripts/algolia-sync",children:"Algolia sync reference"})," for more detail."]}),"\n",(0,s.jsx)(n.h3,{id:"sync-to-meilisearch",children:"Sync to Meilisearch"}),"\n",(0,s.jsx)(n.p,{children:"Push records to a self-hosted Meilisearch index on create/update, and remove them on delete:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {\n headers = headers\n })\n else\n http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {\n headers = headers,\n body = json.encode(toarray({\n {\n id = uri,\n collection = collection,\n did = did,\n record = record\n }\n }))\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsxs)(n.p,{children:["See the full ",(0,s.jsx)(n.a,{href:"/reference/scripts/meilisearch-sync",children:"Meilisearch sync reference"})," for more detail."]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Full reference for the sandbox, APIs, and debugging"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/reference/admin-api#upload--upsert-a-lexicon",children:"Admin API"}),": Upload lexicons with index hooks via the API"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453(e,n,r){r.d(n,{R:()=>t,x:()=>l});var d=r(6540);const s={},i=d.createContext(s);function t(e){const n=d.useContext(i);return d.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),d.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/774696b9.17d674a8.js b/assets/js/774696b9.17d674a8.js new file mode 100644 index 0000000..8811bf1 --- /dev/null +++ b/assets/js/774696b9.17d674a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8865],{1315:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>t,metadata:()=>d,toc:()=>o});const d=JSON.parse('{"id":"guides/index-hooks","title":"Index Hooks","description":"Index hooks are Lua scripts that run whenever a record in a collection is created, updated, or deleted. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.","source":"@site/docs/guides/index-hooks.md","sourceDirName":"guides","slug":"/guides/index-hooks","permalink":"/guides/index-hooks","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Backfill","permalink":"/guides/backfill"},"next":{"title":"Lua Scripting","permalink":"/guides/scripting"}}');var s=r(199),i=r(2560);const t={},l="Index Hooks",c={},o=[{value:"Attaching a hook",id:"attaching-a-hook",level:2},{value:"Script structure",id:"script-structure",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Available APIs",id:"available-apis",level:2},{value:"Error handling and retries",id:"error-handling-and-retries",level:2},{value:"Performance considerations",id:"performance-considerations",level:3},{value:"Dead letter table",id:"dead-letter-table",level:3},{value:"Examples",id:"examples",level:2},{value:"Filter out records missing a required field",id:"filter-out-records-missing-a-required-field",level:3},{value:"Transform a record before storage",id:"transform-a-record-before-storage",level:3},{value:"Post to a webhook",id:"post-to-a-webhook",level:3},{value:"Sync to Algolia",id:"sync-to-algolia",level:3},{value:"Sync to Meilisearch",id:"sync-to-meilisearch",level:3},{value:"Next steps",id:"next-steps",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"index-hooks",children:"Index Hooks"})}),"\n",(0,s.jsxs)(n.p,{children:["Index hooks are Lua scripts that run whenever a record in a collection is created, updated, or deleted. They run ",(0,s.jsx)(n.strong,{children:"before"})," the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services."]}),"\n",(0,s.jsxs)(n.p,{children:["Index hooks fire on ",(0,s.jsx)(n.strong,{children:"all"})," record events for the collection \u2014 including records created by HappyView procedure endpoints, not just events from the network. Unlike ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"query and procedure scripts"})," that run in response to XRPC requests, index hooks are triggered by incoming Jetstream events (which include events caused by HappyView's own PDS writes)."]}),"\n",(0,s.jsx)(n.h2,{id:"attaching-a-hook",children:"Attaching a hook"}),"\n",(0,s.jsxs)(n.p,{children:["Each record-type lexicon can have one index hook. You can add it through the ",(0,s.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"}),' (click "Add Index Hook" on any record lexicon\'s detail page) or via the ',(0,s.jsx)(n.a,{href:"/reference/admin/lexicons#upload--upsert-a-lexicon",children:"admin API"})," by including the ",(0,s.jsx)(n.code,{children:"index_hook"})," field when uploading a lexicon."]}),"\n",(0,s.jsx)(n.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,s.jsxs)(n.p,{children:["Like query and procedure scripts, index hooks must define a ",(0,s.jsx)(n.code,{children:"handle()"})," function:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n log("deleted " .. uri)\n else\n log(action .. " " .. uri)\n end\n return true\nend\n'})}),"\n",(0,s.jsx)(n.p,{children:"The function is called once per record event. The return value controls what happens next:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Return value"}),(0,s.jsx)(n.th,{children:"Effect"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"nil"})}),(0,s.jsxs)(n.td,{children:["The record is ",(0,s.jsx)(n.strong,{children:"not"})," indexed (skipped entirely)"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"A table"}),(0,s.jsx)(n.td,{children:"That table is stored as the record instead"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"true"})}),(0,s.jsx)(n.td,{children:"The original record is stored as-is"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.em,{children:"(no hook)"})}),(0,s.jsx)(n.td,{children:"The original record is stored as-is"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["On ",(0,s.jsx)(n.strong,{children:"delete"})," events, returning ",(0,s.jsx)(n.code,{children:"nil"})," skips the delete (the record stays in the database)."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Important:"})," If your hook has side effects (e.g. syncing to a search index) but you want normal indexing to proceed, return ",(0,s.jsx)(n.code,{children:"record"})," or ",(0,s.jsx)(n.code,{children:"true"})," \u2014 not nothing. A missing return statement returns ",(0,s.jsx)(n.code,{children:"nil"}),", which ",(0,s.jsx)(n.strong,{children:"skips indexing"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If the hook errors after all retries, the system ",(0,s.jsx)(n.strong,{children:"fails open"})," \u2014 the original record is stored and the failed event is dead-lettered for later inspection."]}),"\n",(0,s.jsx)(n.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,s.jsxs)(n.p,{children:["These globals are set before ",(0,s.jsx)(n.code,{children:"handle()"})," is called:"]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Global"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"action"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:'"create"'}),", ",(0,s.jsx)(n.code,{children:'"update"'}),", or ",(0,s.jsx)(n.code,{children:'"delete"'})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"uri"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsxs)(n.td,{children:["The full AT URI (e.g. ",(0,s.jsx)(n.code,{children:"at://did:plc:abc/col/rkey"}),")"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"did"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The repo DID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"collection"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The collection NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rkey"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"The record key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"record"})}),(0,s.jsx)(n.td,{children:"table?"}),(0,s.jsx)(n.td,{children:"The full record as a Lua table (nil on delete)"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["Index hooks do ",(0,s.jsx)(n.strong,{children:"not"})," have access to ",(0,s.jsx)(n.code,{children:"caller_did"}),", ",(0,s.jsx)(n.code,{children:"input"}),", ",(0,s.jsx)(n.code,{children:"params"}),", ",(0,s.jsx)(n.code,{children:"method"}),", or the ",(0,s.jsx)(n.code,{children:"Record"})," API. They run from the Jetstream event stream, not from a user request."]}),"\n",(0,s.jsx)(n.h2,{id:"available-apis",children:"Available APIs"}),"\n",(0,s.jsx)(n.p,{children:"Index hooks have access to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/reference/lua/database-api",children:"Database API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"db.query"}),", ",(0,s.jsx)(n.code,{children:"db.get"}),", ",(0,s.jsx)(n.code,{children:"db.search"}),", ",(0,s.jsx)(n.code,{children:"db.backlinks"}),", ",(0,s.jsx)(n.code,{children:"db.count"}),", ",(0,s.jsx)(n.code,{children:"db.raw"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/reference/lua/http-api",children:"HTTP API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"http.get"}),", ",(0,s.jsx)(n.code,{children:"http.post"}),", ",(0,s.jsx)(n.code,{children:"http.put"}),", ",(0,s.jsx)(n.code,{children:"http.patch"}),", ",(0,s.jsx)(n.code,{children:"http.delete"}),", ",(0,s.jsx)(n.code,{children:"http.head"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/reference/lua/json-api",children:"JSON API"})})," \u2014 ",(0,s.jsx)(n.code,{children:"json.encode"}),", ",(0,s.jsx)(n.code,{children:"json.decode"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.a,{href:"/guides/scripting#utility-globals",children:"Utility globals"})})," \u2014 ",(0,s.jsx)(n.code,{children:"log()"}),", ",(0,s.jsx)(n.code,{children:"now()"}),", ",(0,s.jsx)(n.code,{children:"TID()"}),", ",(0,s.jsx)(n.code,{children:"toarray()"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"error-handling-and-retries",children:"Error handling and retries"}),"\n",(0,s.jsx)(n.p,{children:"Index hooks are designed to be resilient:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If a hook fails, it retries up to ",(0,s.jsx)(n.strong,{children:"3 times"})," with exponential backoff (1s, 2s, 4s delays)."]}),"\n",(0,s.jsxs)(n.li,{children:["If all retries are exhausted, the failed event is inserted into the ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table for later inspection."]}),"\n",(0,s.jsxs)(n.li,{children:["On failure the system ",(0,s.jsx)(n.strong,{children:"fails open"})," \u2014 the original record is stored as-is so indexing is not permanently blocked."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Failed hooks are logged as errors. Check the ",(0,s.jsx)(n.a,{href:"/guides/event-logs",children:"event logs"})," or query the ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table directly to find and replay failures."]}),"\n",(0,s.jsx)(n.h3,{id:"performance-considerations",children:"Performance considerations"}),"\n",(0,s.jsx)(n.p,{children:"Because hooks run synchronously before indexing, they block the Jetstream consumer while executing. With retry logic (1s + 2s + 4s backoff), a persistently failing hook could block for ~7 seconds per record. Keep hook scripts fast and ensure external services they depend on are reliable."}),"\n",(0,s.jsx)(n.h3,{id:"dead-letter-table",children:"Dead letter table"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"dead_letter_hooks"})," table stores events that failed all retry attempts:"]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Column"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"id"})}),(0,s.jsx)(n.td,{children:"UUID"}),(0,s.jsx)(n.td,{children:"Primary key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"lexicon_id"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The lexicon NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"uri"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The AT URI of the record"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"did"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The repo DID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"collection"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The collection NSID"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rkey"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The record key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"action"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"create"}),", ",(0,s.jsx)(n.code,{children:"update"}),", or ",(0,s.jsx)(n.code,{children:"delete"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"record"})}),(0,s.jsx)(n.td,{children:"jsonb"}),(0,s.jsx)(n.td,{children:"The record data (null on delete)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"error"})}),(0,s.jsx)(n.td,{children:"text"}),(0,s.jsx)(n.td,{children:"The error message from the last attempt"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"attempts"})}),(0,s.jsx)(n.td,{children:"int"}),(0,s.jsx)(n.td,{children:"Total number of attempts made"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"created_at"})}),(0,s.jsx)(n.td,{children:"timestamptz"}),(0,s.jsx)(n.td,{children:"When the failure was recorded"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"examples",children:"Examples"}),"\n",(0,s.jsx)(n.h3,{id:"filter-out-records-missing-a-required-field",children:"Filter out records missing a required field"}),"\n",(0,s.jsxs)(n.p,{children:["Skip indexing any record that doesn't have a ",(0,s.jsx)(n.code,{children:"title"})," field:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n return record -- allow deletes to proceed\n end\n\n if record.title == nil or record.title == "" then\n return nil -- skip: no title\n end\n\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"transform-a-record-before-storage",children:"Transform a record before storage"}),"\n",(0,s.jsx)(n.p,{children:"Enrich a record with a computed field before it is stored:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if action == "delete" then\n return record\n end\n\n record.slug = string.lower(string.gsub(record.title or "", "%s+", "-"))\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"post-to-a-webhook",children:"Post to a webhook"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n http.post("https://hooks.example.com/records", {\n headers = { ["Content-Type"] = "application/json" },\n body = json.encode({\n action = action,\n uri = uri,\n did = did,\n record = record\n })\n })\n return record\nend\n'})}),"\n",(0,s.jsx)(n.h3,{id:"sync-to-algolia",children:"Sync to Algolia"}),"\n",(0,s.jsx)(n.p,{children:"Push records to an Algolia search index on create/update, and remove them on delete:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["X-Algolia-API-Key"] = "your-api-key",\n ["X-Algolia-Application-Id"] = "your-app-id",\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers\n })\n else\n http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {\n headers = headers,\n body = json.encode({\n objectID = uri,\n collection = collection,\n did = did,\n record = record\n })\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsxs)(n.p,{children:["See the full ",(0,s.jsx)(n.a,{href:"/reference/scripts/algolia-sync",children:"Algolia sync reference"})," for more detail."]}),"\n",(0,s.jsx)(n.h3,{id:"sync-to-meilisearch",children:"Sync to Meilisearch"}),"\n",(0,s.jsx)(n.p,{children:"Push records to a self-hosted Meilisearch index on create/update, and remove them on delete:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {\n headers = headers\n })\n else\n http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {\n headers = headers,\n body = json.encode(toarray({\n {\n id = uri,\n collection = collection,\n did = did,\n record = record\n }\n }))\n })\n end\n\n return record\nend\n'})}),"\n",(0,s.jsxs)(n.p,{children:["See the full ",(0,s.jsx)(n.a,{href:"/reference/scripts/meilisearch-sync",children:"Meilisearch sync reference"})," for more detail."]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Full reference for the sandbox, APIs, and debugging"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/reference/admin/lexicons#upload--upsert-a-lexicon",children:"Admin API \u2014 Lexicons"}),": Upload lexicons with index hooks via the API"]}),"\n"]})]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},2560:(e,n,r)=>{r.d(n,{R:()=>t,x:()=>l});var d=r(63);const s={},i=d.createContext(s);function t(e){const n=d.useContext(i);return d.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),d.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7873.c42f29b1.js b/assets/js/7873.c42f29b1.js deleted file mode 100644 index 339d06b..0000000 --- a/assets/js/7873.c42f29b1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7873],{53(e,n,t){t.d(n,{A:()=>i});var r=t(8675);const i=function(e){return(0,r.A)(e,4)}},7873(e,n,t){t.r(n),t.d(n,{render:()=>k});var r=t(5164),i=(t(8698),t(5894)),a=t(3245),o=(t(2387),t(92),t(3226),t(7633)),d=t(797),s=t(2334),c=t(9592),g=t(53),l=t(4722);t(7981);function f(e){var n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:h(e),edges:p(e)};return c.A(e.graph())||(n.value=g.A(e.graph())),n}function h(e){return l.A(e.nodes(),function(n){var t=e.node(n),r=e.parent(n),i={v:n};return c.A(t)||(i.value=t),c.A(r)||(i.parent=r),i})}function p(e){return l.A(e.edges(),function(n){var t=e.edge(n),r={v:n.v,w:n.w};return c.A(n.name)||(r.name=n.name),c.A(t)||(r.value=t),r})}var u=t(697),m=new Map,w=new Map,R=new Map,v=(0,d.K2)(()=>{w.clear(),R.clear(),m.clear()},"clear"),y=(0,d.K2)((e,n)=>{const t=w.get(n)||[];return d.Rm.trace("In isDescendant",n," ",e," = ",t.includes(e)),t.includes(e)},"isDescendant"),X=(0,d.K2)((e,n)=>{const t=w.get(n)||[];return d.Rm.info("Descendants of ",n," is ",t),d.Rm.info("Edge is ",e),e.v!==n&&e.w!==n&&(t?t.includes(e.v)||y(e.v,n)||y(e.w,n)||t.includes(e.w):(d.Rm.debug("Tilt, ",n,",not in descendants"),!1))},"edgeInCluster"),b=(0,d.K2)((e,n,t,r)=>{d.Rm.warn("Copying children of ",e,"root",r,"data",n.node(e),r);const i=n.children(e)||[];e!==r&&i.push(e),d.Rm.warn("Copying (nodes) clusterId",e,"nodes",i),i.forEach(i=>{if(n.children(i).length>0)b(i,n,t,r);else{const a=n.node(i);d.Rm.info("cp ",i," to ",r," with parent ",e),t.setNode(i,a),r!==n.parent(i)&&(d.Rm.warn("Setting parent",i,n.parent(i)),t.setParent(i,n.parent(i))),e!==r&&i!==e?(d.Rm.debug("Setting parent",i,e),t.setParent(i,e)):(d.Rm.info("In copy ",e,"root",r,"data",n.node(e),r),d.Rm.debug("Not Setting parent for node=",i,"cluster!==rootId",e!==r,"node!==clusterId",i!==e));const o=n.edges(i);d.Rm.debug("Copying Edges",o),o.forEach(i=>{d.Rm.info("Edge",i);const a=n.edge(i.v,i.w,i.name);d.Rm.info("Edge data",a,r);try{X(i,r)?(d.Rm.info("Copying as ",i.v,i.w,a,i.name),t.setEdge(i.v,i.w,a,i.name),d.Rm.info("newGraph edges ",t.edges(),t.edge(t.edges()[0]))):d.Rm.info("Skipping copy of edge ",i.v,"--\x3e",i.w," rootId: ",r," clusterId:",e)}catch(o){d.Rm.error(o)}})}d.Rm.debug("Removing node",i),n.removeNode(i)})},"copy"),E=(0,d.K2)((e,n)=>{const t=n.children(e);let r=[...t];for(const i of t)R.set(i,e),r=[...r,...E(i,n)];return r},"extractDescendants"),N=(0,d.K2)((e,n,t)=>{const r=e.edges().filter(e=>e.v===n||e.w===n),i=e.edges().filter(e=>e.v===t||e.w===t),a=r.map(e=>({v:e.v===n?t:e.v,w:e.w===n?n:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(n=>e.v===n.v&&e.w===n.w))},"findCommonEdges"),C=(0,d.K2)((e,n,t)=>{const r=n.children(e);if(d.Rm.trace("Searching children of id ",e,r),r.length<1)return e;let i;for(const a of r){const e=C(a,n,t),r=N(n,t,e);if(e){if(!(r.length>0))return e;i=e}}return i},"findNonClusterChild"),S=(0,d.K2)(e=>m.has(e)&&m.get(e).externalConnections&&m.has(e)?m.get(e).id:e,"getAnchorId"),x=(0,d.K2)((e,n)=>{if(!e||n>10)d.Rm.debug("Opting out, no graph ");else{d.Rm.debug("Opting in, graph "),e.nodes().forEach(function(n){e.children(n).length>0&&(d.Rm.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),w.set(n,E(n,e)),m.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const t=e.children(n),r=e.edges();t.length>0?(d.Rm.debug("Cluster identified",n,w),r.forEach(e=>{y(e.v,n)^y(e.w,n)&&(d.Rm.warn("Edge: ",e," leaves cluster ",n),d.Rm.warn("Descendants of XXX ",n,": ",w.get(n)),m.get(n).externalConnections=!0)})):d.Rm.debug("Not a cluster ",n,w)});for(let n of m.keys()){const t=m.get(n).id,r=e.parent(t);r!==n&&m.has(r)&&!m.get(r).externalConnections&&(m.get(n).id=r)}e.edges().forEach(function(n){const t=e.edge(n);d.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),d.Rm.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,i=n.w;if(d.Rm.warn("Fix XXX",m,"ids:",n.v,n.w,"Translating: ",m.get(n.v)," --- ",m.get(n.w)),m.get(n.v)||m.get(n.w)){if(d.Rm.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=S(n.v),i=S(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const i=e.parent(r);m.get(i).externalConnections=!0,t.fromCluster=n.v}if(i!==n.w){const r=e.parent(i);m.get(r).externalConnections=!0,t.toCluster=n.w}d.Rm.warn("Fix Replacing with XXX",r,i,n.name),e.setEdge(r,i,t,n.name)}}),d.Rm.warn("Adjusted Graph",f(e)),I(e,0),d.Rm.trace(m)}},"adjustClustersAndEdges"),I=(0,d.K2)((e,n)=>{if(d.Rm.warn("extractor - ",n,f(e),e.children("D")),n>10)return void d.Rm.error("Bailing out");let t=e.nodes(),r=!1;for(const i of t){const n=e.children(i);r=r||n.length>0}if(r){d.Rm.debug("Nodes = ",t,n);for(const r of t)if(d.Rm.debug("Extracting node",r,m,m.has(r)&&!m.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",n),m.has(r))if(!m.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){d.Rm.warn("Cluster without external connections, without a parent and with children",r,n);let t="TB"===e.graph().rankdir?"LR":"TB";m.get(r)?.clusterData?.dir&&(t=m.get(r).clusterData.dir,d.Rm.warn("Fixing dir",m.get(r).clusterData.dir,t));const i=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:t,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});d.Rm.warn("Old graph before copy",f(e)),b(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:m.get(r).clusterData,label:m.get(r).label,graph:i}),d.Rm.warn("New graph after copy node: (",r,")",f(i)),d.Rm.debug("Old graph after copy",f(e))}else d.Rm.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!m.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),n),d.Rm.debug(m);else d.Rm.debug("Not a cluster",r,n);t=e.nodes(),d.Rm.warn("New list of nodes",t);for(const r of t){const t=e.node(r);d.Rm.warn(" Now next level",r,t),t?.clusterNode&&I(t.graph,n+1)}}else d.Rm.debug("Done, no node has children",e.nodes())},"extractor"),D=(0,d.K2)((e,n)=>{if(0===n.length)return[];let t=Object.assign([],n);return n.forEach(n=>{const r=e.children(n),i=D(e,r);t=[...t,...i]}),t},"sorter"),A=(0,d.K2)(e=>D(e,e.children()),"sortNodesByHierarchy"),O=(0,d.K2)(async(e,n,t,o,c,g)=>{d.Rm.warn("Graph in recursive render:XAX",f(n),c);const l=n.graph().rankdir;d.Rm.trace("Dir in recursive render - dir:",l);const h=e.insert("g").attr("class","root");n.nodes()?d.Rm.info("Recursive render XXX",n.nodes()):d.Rm.info("No nodes found for",n),n.edges().length>0&&d.Rm.info("Recursive edges",n.edge(n.edges()[0]));const p=h.insert("g").attr("class","clusters"),u=h.insert("g").attr("class","edgePaths"),w=h.insert("g").attr("class","edgeLabels"),R=h.insert("g").attr("class","nodes");await Promise.all(n.nodes().map(async function(e){const r=n.node(e);if(void 0!==c){const t=JSON.parse(JSON.stringify(c.clusterData));d.Rm.trace("Setting data for parent cluster XXX\n Node.id = ",e,"\n data=",t.height,"\nParent cluster",c.height),n.setNode(c.id,t),n.parent(e)||(d.Rm.trace("Setting parent",e,c.id),n.setParent(e,c.id,t))}if(d.Rm.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),r?.clusterNode){d.Rm.info("Cluster identified XBX",e,r.width,n.node(e));const{ranksep:a,nodesep:s}=n.graph();r.graph.setGraph({...r.graph.graph(),ranksep:a+25,nodesep:s});const c=await O(R,r.graph,t,o,n.node(e),g),l=c.elem;(0,i.lC)(r,l),r.diff=c.diff||0,d.Rm.info("New compound node after recursive render XAX",e,"width",r.width,"height",r.height),(0,i.U7)(l,r)}else n.children(e).length>0?(d.Rm.trace("Cluster - the non recursive path XBX",e,r.id,r,r.width,"Graph:",n),d.Rm.trace(C(r.id,n)),m.set(r.id,{id:C(r.id,n),node:r})):(d.Rm.trace("Node - the non recursive path XAX",e,R,n.node(e),l),await(0,i.on)(R,n.node(e),{config:g,dir:l}))}));const v=(0,d.K2)(async()=>{const e=n.edges().map(async function(e){const t=n.edge(e.v,e.w,e.name);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.Rm.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(n.edge(e))),d.Rm.info("Fix",m,"ids:",e.v,e.w,"Translating: ",m.get(e.v),m.get(e.w)),await(0,r.jP)(w,t)});await Promise.all(e)},"processEdges");await v(),d.Rm.info("Graph before layout:",JSON.stringify(f(n))),d.Rm.info("############################################# XXX"),d.Rm.info("### Layout ### XXX"),d.Rm.info("############################################# XXX"),(0,s.Zp)(n),d.Rm.info("Graph after layout:",JSON.stringify(f(n)));let y=0,{subGraphTitleTotalMargin:X}=(0,a.O)(g);return await Promise.all(A(n).map(async function(e){const t=n.node(e);if(d.Rm.info("Position XBX => "+e+": ("+t.x,","+t.y,") width: ",t.width," height: ",t.height),t?.clusterNode)t.y+=X,d.Rm.info("A tainted cluster node XBX1",e,t.id,t.width,t.height,t.x,t.y,n.parent(e)),m.get(t.id).node=t,(0,i.U_)(t);else if(n.children(e).length>0){d.Rm.info("A pure cluster node XBX1",e,t.id,t.x,t.y,t.width,t.height,n.parent(e)),t.height+=X,n.node(t.parentId);const r=t?.padding/2||0,a=t?.labelBBox?.height||0,o=a-r||0;d.Rm.debug("OffsetY",o,"labelHeight",a,"halfPadding",r),await(0,i.U)(p,t),m.get(t.id).node=t}else{const e=n.node(t.parentId);t.y+=X/2,d.Rm.info("A regular node XBX1 - using the padding",t.id,"parent",t.parentId,t.width,t.height,t.x,t.y,"offsetY",t.offsetY,"parent",e,e?.offsetY,t),(0,i.U_)(t)}})),n.edges().forEach(function(e){const i=n.edge(e);d.Rm.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(i),i),i.points.forEach(e=>e.y+=X/2);const a=n.node(e.v);var s=n.node(e.w);const c=(0,r.Jo)(u,i,m,t,a,s,o);(0,r.T_)(i,c)}),n.nodes().forEach(function(e){const t=n.node(e);d.Rm.info(e,t.type,t.diff),t.isGroup&&(y=t.diff)}),d.Rm.warn("Returning from recursive render XAX",h,y),{elem:h,diff:y}},"recursiveRender"),k=(0,d.K2)(async(e,n)=>{const t=new u.T({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=n.select("g");(0,r.g0)(a,e.markers,e.type,e.diagramId),(0,i.gh)(),(0,r.IU)(),(0,i.IU)(),v(),e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),d.Rm.debug("Edges:",e.edges),e.edges.forEach(e=>{if(e.start===e.end){const n=e.start,r=n+"---"+n+"---1",i=n+"---"+n+"---2",a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(i,a.parentId);const o=structuredClone(e),d=structuredClone(e),s=structuredClone(e);o.label="",o.arrowTypeEnd="none",o.id=n+"-cyclic-special-1",d.arrowTypeStart="none",d.arrowTypeEnd="none",d.id=n+"-cyclic-special-mid",s.label="",a.isGroup&&(o.fromCluster=n,s.toCluster=n),s.id=n+"-cyclic-special-2",s.arrowTypeStart="none",t.setEdge(n,r,o,n+"-cyclic-special-0"),t.setEdge(r,i,d,n+"-cyclic-special-1"),t.setEdge(i,n,s,n+"-cyct.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*n.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,r=this.getChild().getNodes(),n=0;n0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i1)for(a=0;ar&&(r=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new c(g.WORLD_CENTER_X-s.x/2,g.WORLD_CENTER_Y-s.y/2))},v.radialLayout=function(t,e,i){var r=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(e,null,0,359,0,r);var n=y.calculateBounds(t),o=new E;o.setDeviceOrgX(n.getMinX()),o.setDeviceOrgY(n.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var E=y[0];y.splice(0,1);var A=g.indexOf(E);A>=0&&g.splice(A,1),p--,u--}c=null!=e?(g.indexOf(y[0])+1)%p:0;for(var N=Math.abs(r-i)/u,T=c;d!=u;T=++T%p){var L=g[T].getOtherEnd(t);if(L!=e){var _=(i+d*N)%360,m=(_+N)%360;v.branchRadialLayout(L,t,_,m,n+o,o),d++}}},v.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,i=0;ie&&(e=r)}return e},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],r=this.graphManager.getAllNodes(),n=0;n1){var r="DummyCompound_"+i;t.memberGroups[r]=e[i];var n=e[i][0].getParent(),o=new s(t.graphManager);o.id=r,o.paddingLeft=n.paddingLeft||0,o.paddingRight=n.paddingRight||0,o.paddingBottom=n.paddingBottom||0,o.paddingTop=n.paddingTop||0,t.idToDummyNode[r]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=n.getChild();h.add(o);for(var l=0;l=0;t--){var e=this.compoundOrder[t],i=e.id,r=e.paddingLeft,n=e.paddingTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,r,n)}},v.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var r=t.idToDummyNode[i],n=r.paddingLeft,o=r.paddingTop;t.adjustLocations(e[i],r.rect.x,r.rect.y,n,o)})},v.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var r=i.getNodes(),n=0;n0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},v.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,r=0;rh&&(h=g.rect.height)}i+=h+t.verticalPadding}},v.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(r){var n=e[r];i.tiledMemberPack[r]=i.tileNodes(t[r],n.paddingLeft+n.paddingRight),n.rect.width=i.tiledMemberPack[r].width,n.rect.height=i.tiledMemberPack[r].height})},v.prototype.tileNodes=function(t,e){var i={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},v.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,r=0;ri&&(e=r,i=t.rowWidth[r]);return e},v.prototype.canAddHorizontal=function(t,e,i){var r=this.getShortestRowIndex(t);if(r<0)return!0;var n=t.rowWidth[r];if(n+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[r]0&&(a=i+t.verticalPadding-t.rowHeight[r]),o=t.width-n>=e+t.horizontalPadding?(t.height+a)/(n+e+t.horizontalPadding):(t.height+a)/t.width,a=i+t.verticalPadding,(s=t.widtho&&e!=i){r.splice(-1,1),t.rows[i].push(n),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=r[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var g=n;g<=o;g++)h[0]+=this.grid[g][s-1].length+this.grid[g][s].length-1;if(o0)for(g=s;g<=a;g++)h[3]+=this.grid[n-1][g].length+this.grid[n][g].length-1;for(var u,c,d=p.MAX_VALUE,f=0;f0&&(s=i.getGraphManager().add(i.newGraph(),o),this.processChildrenList(s,u,i))}},u.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",u)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}])},t.exports=r(i(7799))},3143(t){var e;e=function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=26)}([function(t,e,i){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(8),o=i(9);function s(t,e,i){r.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(r.prototype),r)s[a]=r[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),r=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==r)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=n.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(13),s=i(0),a=i(16),h=i(4);function l(t,e,i,s){null==i&&null==s&&(s=e),r.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=n.MIN_VALUE,this.inclusionTreeDepth=n.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var g in l.prototype=Object.create(r.prototype),r)l[g]=r[g];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.target==t){if(r.source!=i)throw"Incorrect edge source!";e.push(r)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(r){if(r.source!=i&&r.target!=i)throw"Incorrect edge source and/or target";r.target!=t&&r.source!=t||e.push(r)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>i&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-i)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-i),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==n.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var r=new h(e,i),n=t.inverseTransformPoint(r);this.setLocation(n.x,n.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";function r(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(t){this.x=t},r.prototype.setY=function(t){this.y=t},r.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=r},function(t,e,i){"use strict";var r=i(2),n=i(10),o=i(0),s=i(6),a=i(3),h=i(1),l=i(13),g=i(12),u=i(11);function c(t,e,i){r.call(this,i),this.estimatedSize=n.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in c.prototype=Object.create(r.prototype),r)c[d]=r[d];c.prototype.getNodes=function(){return this.nodes},c.prototype.getEdges=function(){return this.edges},c.prototype.getGraphManager=function(){return this.graphManager},c.prototype.getParent=function(){return this.parent},c.prototype.getLeft=function(){return this.left},c.prototype.getRight=function(){return this.right},c.prototype.getTop=function(){return this.top},c.prototype.getBottom=function(){return this.bottom},c.prototype.isConnected=function(){return this.isConnected},c.prototype.add=function(t,e,i){if(null==e&&null==i){var r=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(r)>-1)throw"Node already in graph!";return r.owner=this,this.getNodes().push(r),r}var n=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(n.source=e,n.target=i,n.isInterGraph=!1,this.getEdges().push(n),e.edges.push(n),i!=e&&i.edges.push(n),n)},c.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),r=i.length,n=0;n-1&&g>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(g,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},c.prototype.updateLeftTop=function(){for(var t,e,i,r=n.MAX_VALUE,o=n.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(r=t),o>(e=l.getLeft())&&(o=e)}return r==n.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=r-i,new g(this.left,this.top))},c.prototype.updateBounds=function(t){for(var e,i,r,o,s,a=n.MAX_VALUE,h=-n.MAX_VALUE,g=n.MAX_VALUE,u=-n.MAX_VALUE,c=this.nodes,d=c.length,p=0;p(e=f.getLeft())&&(a=e),h<(i=f.getRight())&&(h=i),g>(r=f.getTop())&&(g=r),u<(o=f.getBottom())&&(u=o)}var y=new l(a,g,h-a,u-g);a==n.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=c[0].getParent().paddingLeft?c[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},c.calculateBounds=function(t){for(var e,i,r,o,s=n.MAX_VALUE,a=-n.MAX_VALUE,h=n.MAX_VALUE,g=-n.MAX_VALUE,u=t.length,c=0;c(e=d.getLeft())&&(s=e),a<(i=d.getRight())&&(a=i),h>(r=d.getTop())&&(h=r),g<(o=d.getBottom())&&(g=o)}return new l(s,h,a-s,g-h)},c.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},c.prototype.getEstimatedSize=function(){if(this.estimatedSize==n.MIN_VALUE)throw"assert failed";return this.estimatedSize},c.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,r=0;r=this.nodes.length){var h=0;n.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=c},function(t,e,i){"use strict";var r,n=i(1);function o(t){r=i(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,r,n){if(null==i&&null==r&&null==n){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}n=i,i=t;var o=(r=e).getOwner(),s=n.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,r,n);if(i.isInterGraph=!0,i.source=r,i.target=n,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof r){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=r,i[1]=h,i[2]=o,i[3]=A,!1;if(no)return i[0]=a,i[1]=n,i[2]=E,i[3]=s,!1;if(ro?(i[0]=g,i[1]=u,_=!0):(i[0]=l,i[1]=h,_=!0):O===D&&(r>o?(i[0]=a,i[1]=h,_=!0):(i[0]=c,i[1]=u,_=!0)),-I===D?o>r?(i[2]=v,i[3]=A,m=!0):(i[2]=E,i[3]=y,m=!0):I===D&&(o>r?(i[2]=f,i[3]=y,m=!0):(i[2]=N,i[3]=A,m=!0)),_&&m)return!1;if(r>o?n>s?(w=this.getCardinalDirection(O,D,4),R=this.getCardinalDirection(I,D,2)):(w=this.getCardinalDirection(-O,D,3),R=this.getCardinalDirection(-I,D,1)):n>s?(w=this.getCardinalDirection(-O,D,1),R=this.getCardinalDirection(-I,D,3)):(w=this.getCardinalDirection(O,D,2),R=this.getCardinalDirection(I,D,4)),!_)switch(w){case 1:M=h,C=r+-p/D,i[0]=C,i[1]=M;break;case 2:C=c,M=n+d*D,i[0]=C,i[1]=M;break;case 3:M=u,C=r+p/D,i[0]=C,i[1]=M;break;case 4:C=g,M=n+-d*D,i[0]=C,i[1]=M}if(!m)switch(R){case 1:x=y,G=o+-L/D,i[2]=G,i[3]=x;break;case 2:G=N,x=s+T*D,i[2]=G,i[3]=x;break;case 3:x=A,G=o+L/D,i[2]=G,i[3]=x;break;case 4:G=v,x=s+-T*D,i[2]=G,i[3]=x}}return!1},n.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},n.getIntersection=function(t,e,i,n){if(null==n)return this.getIntersection2(t,e,i);var o,s,a,h,l,g,u,c=t.x,d=t.y,p=e.x,f=e.y,y=i.x,E=i.y,v=n.x,A=n.y;return 0===(u=(o=f-d)*(h=y-v)-(s=A-E)*(a=c-p))?null:new r((a*(g=v*E-y*A)-h*(l=p*d-c*f))/u,(s*l-o*g)/u)},n.angleOfVector=function(t,e,i,r){var n=void 0;return t!==i?(n=Math.atan((r-e)/(i-t)),i0?1:t<0?-1:0},r.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},r.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=r},function(t,e,i){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,t.exports=r},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var g=a[0];a.splice(0,1),s.add(g);var u=g.getEdges();for(o=0;o-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},c.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,r=this.graphManager.calcLowestCommonAncestor(t.source,t.target),n=0;n0){for(var n=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(u,1),g.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=r.get(t)-1;1==e&&h.push(t),r.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(n=!0,o=e[0])}return o},c.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=c},function(t,e,i){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=1e4*Math.sin(r.seed++),r.x-Math.floor(r.x)},t.exports=r},function(t,e,i){"use strict";var r=i(4);function n(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}n.prototype.getWorldOrgX=function(){return this.lworldOrgX},n.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},n.prototype.getWorldOrgY=function(){return this.lworldOrgY},n.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},n.prototype.getWorldExtX=function(){return this.lworldExtX},n.prototype.setWorldExtX=function(t){this.lworldExtX=t},n.prototype.getWorldExtY=function(){return this.lworldExtY},n.prototype.setWorldExtY=function(t){this.lworldExtY=t},n.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},n.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},n.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},n.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},n.prototype.getDeviceExtX=function(){return this.ldeviceExtX},n.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},n.prototype.getDeviceExtY=function(){return this.ldeviceExtY},n.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},n.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},n.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},n.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},n.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},n.prototype.inverseTransformPoint=function(t){return new r(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=n},function(t,e,i){"use strict";var r=i(15),n=i(7),o=i(0),s=i(8),a=i(9);function h(){r.call(this),this.useSmartIdealEdgeLengthCalculation=n.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=n.DEFAULT_EDGE_LENGTH,this.springConstant=n.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=n.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=n.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=n.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=n.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=n.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=n.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=n.MAX_ITERATIONS}for(var l in h.prototype=Object.create(r.prototype),r)h[l]=r[l];h.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=n.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,r,s,a,h=this.getGraphManager().getAllEdges(),l=0;ln.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*n*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var g=0;gt}}]),t}();t.exports=o},function(t,e,i){"use strict";var r=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=r,this.mismatch_penalty=n,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var r=this.listeners[i];r.event===t&&r.callback===e&&this.listeners.splice(i,1)}},n.emit=function(t,e){for(var i=0;ip});var r=i(797),n=i(165),o=i(3457),s=i(451);function a(t,e){t.forEach(t=>{const i={id:t.id,labelText:t.label,height:t.height,width:t.width,padding:t.padding??0};Object.keys(t).forEach(e=>{["id","label","height","width","padding","x","y"].includes(e)||(i[e]=t[e])}),e.add({group:"nodes",data:i,position:{x:t.x??0,y:t.y??0}})})}function h(t,e){t.forEach(t=>{const i={id:t.id,source:t.start,target:t.end};Object.keys(t).forEach(e=>{["id","start","end"].includes(e)||(i[e]=t[e])}),e.add({group:"edges",data:i})})}function l(t){return new Promise(e=>{const i=(0,s.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),o=(0,n.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});i.remove(),a(t.nodes,o),h(t.edges,o),o.nodes().forEach(function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}});o.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),o.ready(t=>{r.Rm.info("Cytoscape ready",t),e(o)})})}function g(t){return t.nodes().map(t=>{const e=t.data(),i=t.position(),r={id:e.id,x:i.x,y:i.y};return Object.keys(e).forEach(t=>{"id"!==t&&(r[t]=e[t])}),r})}function u(t){return t.edges().map(t=>{const e=t.data(),i=t._private.rscratch,r={id:e.id,source:e.source,target:e.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(e).forEach(t=>{["id","source","target"].includes(t)||(r[t]=e[t])}),r})}async function c(t,e){r.Rm.debug("Starting cose-bilkent layout algorithm");try{d(t);const e=await l(t),i=g(e),n=u(e);return r.Rm.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(i){throw r.Rm.error("Error in cose-bilkent layout algorithm:",i),i}}function d(t){if(!t)throw new Error("Layout data is required");if(!t.config)throw new Error("Configuration is required in layout data");if(!t.rootNode)throw new Error("Root node is required");if(!t.nodes||!Array.isArray(t.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(t.edges))throw new Error("Edges array is required in layout data");return!0}n.A.use(o),(0,r.K2)(a,"addNodes"),(0,r.K2)(h,"addEdges"),(0,r.K2)(l,"createCytoscapeInstance"),(0,r.K2)(g,"extractPositionedNodes"),(0,r.K2)(u,"extractPositionedEdges"),(0,r.K2)(c,"executeCoseBilkentLayout"),(0,r.K2)(d,"validateLayoutData");var p=(0,r.K2)(async(t,e,{insertCluster:i,insertEdge:r,insertEdgeLabel:n,insertMarkers:o,insertNode:s,log:a,positionEdgeLabel:h},{algorithm:l})=>{const g={},u={},d=e.select("g");o(d,t.markers,t.type,t.diagramId);const p=d.insert("g").attr("class","subgraphs"),f=d.insert("g").attr("class","edgePaths"),y=d.insert("g").attr("class","edgeLabels"),E=d.insert("g").attr("class","nodes");a.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(t.nodes.map(async e=>{if(e.isGroup){const t={...e};u[e.id]=t,g[e.id]=t,await i(p,e)}else{const i={...e};g[e.id]=i;const r=await s(E,e,{config:t.config,dir:t.direction||"TB"}),n=r.node().getBBox();i.width=n.width,i.height=n.height,i.domId=r,a.debug(`Node ${e.id} dimensions: ${n.width}x${n.height}`)}})),a.debug("Running cose-bilkent layout algorithm");const v={...t,nodes:t.nodes.map(t=>{const e=g[t.id];return{...t,width:e.width,height:e.height}})},A=await c(v,t.config);a.debug("Positioning nodes based on layout results"),A.nodes.forEach(t=>{const e=g[t.id];e?.domId&&(e.domId.attr("transform",`translate(${t.x}, ${t.y})`),e.x=t.x,e.y=t.y,a.debug(`Positioned node ${e.id} at center (${t.x}, ${t.y})`))}),A.edges.forEach(e=>{const i=t.edges.find(t=>t.id===e.id);i&&(i.points=[{x:e.startX,y:e.startY},{x:e.midX,y:e.midY},{x:e.endX,y:e.endY}])}),a.debug("Inserting and positioning edges"),await Promise.all(t.edges.map(async e=>{await n(y,e);const i=g[e.start??""],o=g[e.end??""];if(i&&o){const n=A.edges.find(t=>t.id===e.id);if(n){a.debug("APA01 positionedEdge",n);const s={...e},l=r(f,s,u,t.type,i,o,t.diagramId);h(s,l)}else{const n={...e,points:[{x:i.x||0,y:i.y||0},{x:o.x||0,y:o.y||0}]},s=r(f,n,u,t.type,i,o,t.diagramId);h(n,s)}}})),a.debug("Cose-bilkent rendering completed")},"render")}}]); \ No newline at end of file diff --git a/assets/js/80ccde35.a9b4188c.js b/assets/js/80ccde35.a9b4188c.js new file mode 100644 index 0000000..3e30eb4 --- /dev/null +++ b/assets/js/80ccde35.a9b4188c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3164],{168:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"sdk/lex-agent","title":"Lex Agent","description":"The Lex agent adapter is the recommended way to interact with HappyView from JavaScript. It creates an @atproto/lex Agent from a HappyViewSession, so you can use @atproto/lex\'s type-safe Client to make XRPC calls with HappyView\'s DPoP authentication. All requests are routed to your HappyView instance, which handles its own lexicons locally and proxies standard atproto methods (e.g., com.atproto.repo.createRecord) to the user\'s PDS.","source":"@site/docs/sdk/lex-agent.md","sourceDirName":"sdk","slug":"/sdk/lex-agent","permalink":"/sdk/lex-agent","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Overview","permalink":"/sdk/overview"},"next":{"title":"OAuth Client","permalink":"/sdk/oauth-client"}}');var a=t(199),i=t(2560);const o={},r="Lex Agent",c={},l=[{value:"Installation",id:"installation",level:2},{value:"Usage",id:"usage",level:2},{value:"Type-safe XRPC calls",id:"type-safe-xrpc-calls",level:2},{value:"API",id:"api",level:2},{value:"createAgent(session: HappyViewSession): Agent",id:"createagentsession-happyviewsession-agent",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"lex-agent",children:"Lex Agent"})}),"\n",(0,a.jsxs)(n.p,{children:["The Lex agent adapter is the recommended way to interact with HappyView from JavaScript. It creates an ",(0,a.jsx)(n.a,{href:"https://www.npmjs.com/package/@atproto/lex",children:(0,a.jsx)(n.code,{children:"@atproto/lex"})})," ",(0,a.jsx)(n.code,{children:"Agent"})," from a ",(0,a.jsx)(n.code,{children:"HappyViewSession"}),", so you can use ",(0,a.jsx)(n.code,{children:"@atproto/lex"}),"'s type-safe ",(0,a.jsx)(n.code,{children:"Client"})," to make XRPC calls with HappyView's DPoP authentication. All requests are routed to your HappyView instance, which handles its own lexicons locally and proxies standard atproto methods (e.g., ",(0,a.jsx)(n.code,{children:"com.atproto.repo.createRecord"}),") to the user's PDS."]}),"\n",(0,a.jsxs)(n.p,{children:["The adapter gives you lexicon-level type checking on parameters, input bodies, and responses, and works with any library or tool that accepts an ",(0,a.jsx)(n.code,{children:"@atproto/lex"})," ",(0,a.jsx)(n.code,{children:"Agent"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm install @happyview/lex-agent @atproto/lex\n"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"@atproto/lex"})," is a peer dependency (",(0,a.jsx)(n.code,{children:">=0.0.20"}),")."]}),"\n",(0,a.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:'import { Client } from "@atproto/lex";\nimport { HappyViewBrowserClient } from "@happyview/oauth-client-browser";\nimport { createAgent } from "@happyview/lex-agent";\n\nconst client = new HappyViewBrowserClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n});\n\n// Authenticate (or restore a session)\nconst session = await client.restore();\n\n// Create a Lex agent from the session\nconst agent = createAgent(session);\nconst lex = new Client(agent);\n'})}),"\n",(0,a.jsx)(n.h2,{id:"type-safe-xrpc-calls",children:"Type-safe XRPC calls"}),"\n",(0,a.jsxs)(n.p,{children:["With a ",(0,a.jsx)(n.code,{children:"Client"})," instance, you can make type-safe XRPC calls using lexicon definitions:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-typescript",children:'// Query\nconst result = await lex.xrpc(myLexicons.com.example.getGame, {\n params: { slug: "celeste" },\n});\n\n// Procedure\nawait lex.xrpc(myLexicons.com.example.createPost, {\n input: { text: "Hello from HappyView!" },\n});\n'})}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"Client"})," validates parameters and return types against the lexicon schema at the type level, so your IDE catches mismatches before runtime."]}),"\n",(0,a.jsx)(n.h2,{id:"api",children:"API"}),"\n",(0,a.jsx)(n.h3,{id:"createagentsession-happyviewsession-agent",children:(0,a.jsx)(n.code,{children:"createAgent(session: HappyViewSession): Agent"})}),"\n",(0,a.jsxs)(n.p,{children:["Creates an ",(0,a.jsx)(n.code,{children:"@atproto/lex"})," ",(0,a.jsx)(n.code,{children:"Agent"})," from a ",(0,a.jsx)(n.code,{children:"HappyViewSession"}),"."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"agent.did"})," \u2014 the session user's DID"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"agent.fetchHandler(path, init)"})," \u2014 delegates to ",(0,a.jsx)(n.code,{children:"session.fetchHandler"}),", which attaches DPoP authentication headers and prepends the HappyView instance URL to relative paths"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(63);const a={},i=s.createContext(a);function o(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8142.f23a31c7.js b/assets/js/8142.f23a31c7.js deleted file mode 100644 index 1cbaa01..0000000 --- a/assets/js/8142.f23a31c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8142],{8142(t,e,a){a.d(e,{diagram:()=>R});var i,n=a(4616),r=(a(9625),a(1152),a(45),a(5164),a(8698),a(5894),a(3245),a(2387),a(92),a(3226)),d=a(7633),s=a(797),o=a(451),g=a(2334),p=a(697),h=(0,s.K2)(t=>t.append("circle").attr("class","start-state").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit),"drawStartState"),c=(0,s.K2)(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",(0,d.D7)().state.textHeight).attr("class","divider").attr("x2",2*(0,d.D7)().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),l=(0,s.K2)((t,e)=>{const a=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+2*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",i.width+2*(0,d.D7)().state.padding).attr("height",i.height+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),a},"drawSimpleState"),x=(0,s.K2)((t,e)=>{const a=(0,s.K2)(function(t,e,a){const i=t.append("tspan").attr("x",2*(0,d.D7)().state.padding).text(e);a||i.attr("dy",(0,d.D7)().state.textHeight)},"addTspan"),i=t.append("text").attr("x",2*(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.textHeight+1.3*(0,d.D7)().state.padding).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),n=i.height,r=t.append("text").attr("x",(0,d.D7)().state.padding).attr("y",n+.4*(0,d.D7)().state.padding+(0,d.D7)().state.dividerMargin+(0,d.D7)().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach(function(t){o||(a(r,t,g),g=!1),o=!1});const p=t.append("line").attr("x1",(0,d.D7)().state.padding).attr("y1",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("y2",(0,d.D7)().state.padding+n+(0,d.D7)().state.dividerMargin/2).attr("class","descr-divider"),h=r.node().getBBox(),c=Math.max(h.width,i.width);return p.attr("x2",c+3*(0,d.D7)().state.padding),t.insert("rect",":first-child").attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding).attr("width",c+2*(0,d.D7)().state.padding).attr("height",h.height+n+2*(0,d.D7)().state.padding).attr("rx",(0,d.D7)().state.radius),t},"drawDescrState"),D=(0,s.K2)((t,e,a)=>{const i=(0,d.D7)().state.padding,n=2*(0,d.D7)().state.padding,r=t.node().getBBox(),s=r.width,o=r.x,g=t.append("text").attr("x",0).attr("y",(0,d.D7)().state.titleShift).attr("font-size",(0,d.D7)().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,s);c===s&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>s&&(h=(s-c)/2+i),Math.abs(o-l.x)s&&(h=o-(p-s)/2);const x=1-(0,d.D7)().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+(0,d.D7)().state.textHeight+(0,d.D7)().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=s&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",3*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",(0,d.D7)().state.titleShift-(0,d.D7)().state.textHeight-(0,d.D7)().state.padding).attr("width",c).attr("height",l.height+3+2*(0,d.D7)().state.textHeight).attr("rx",(0,d.D7)().state.radius),t},"addTitleAndBox"),u=(0,s.K2)(t=>(t.append("circle").attr("class","end-state-outer").attr("r",(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+(0,d.D7)().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",(0,d.D7)().state.sizeUnit).attr("cx",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2).attr("cy",(0,d.D7)().state.padding+(0,d.D7)().state.sizeUnit+2)),"drawEndState"),f=(0,s.K2)((t,e)=>{let a=(0,d.D7)().state.forkWidth,i=(0,d.D7)().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",(0,d.D7)().state.padding).attr("y",(0,d.D7)().state.padding)},"drawForkJoinState"),y=(0,s.K2)((t,e,a,i)=>{let n=0;const r=i.append("text");r.style("text-anchor","start"),r.attr("class","noteText");let s=t.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");const o=s.split(d.Y2.lineBreakRegex);let g=1.25*(0,d.D7)().state.noteMargin;for(const p of o){const t=p.trim();if(t.length>0){const i=r.append("tspan");if(i.text(t),0===g){g+=i.node().getBBox().height}n+=g,i.attr("x",e+(0,d.D7)().state.noteMargin),i.attr("y",a+n+1.25*(0,d.D7)().state.noteMargin)}}return{textWidth:r.node().getBBox().width,textHeight:n}},"_drawLongText"),w=(0,s.K2)((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",(0,d.D7)().state.padding),i=e.append("g"),{textWidth:n,textHeight:r}=y(t,0,0,i);return a.attr("height",r+2*(0,d.D7)().state.noteMargin),a.attr("width",n+2*(0,d.D7)().state.noteMargin),a},"drawNote"),m=(0,s.K2)(function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&h(n),"end"===e.type&&u(n),"fork"!==e.type&&"join"!==e.type||f(n,e),"note"===e.type&&w(e.note.text,n),"divider"===e.type&&c(n),"default"===e.type&&0===e.descriptions.length&&l(n,e),"default"===e.type&&e.descriptions.length>0&&x(n,e);const r=n.node().getBBox();return i.width=r.width+2*(0,d.D7)().state.padding,i.height=r.height+2*(0,d.D7)().state.padding,i},"drawState"),b=0,B=(0,s.K2)(function(t,e,a){const i=(0,s.K2)(function(t){switch(t){case n.u4.relationType.AGGREGATION:return"aggregation";case n.u4.relationType.EXTENSION:return"extension";case n.u4.relationType.COMPOSITION:return"composition";case n.u4.relationType.DEPENDENCY:return"dependency"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));const g=e.points,p=(0,o.n8j)().x(function(t){return t.x}).y(function(t){return t.y}).curve(o.qrM),h=t.append("path").attr("d",p(g)).attr("id","edge"+b).attr("class","transition");let c="";if((0,d.D7)().state.arrowMarkerAbsolute&&(c=(0,d.ID)(!0)),h.attr("marker-end","url("+c+"#"+i(n.u4.relationType.DEPENDENCY)+"End)"),void 0!==a.title){const i=t.append("g").attr("class","stateLabel"),{x:n,y:o}=r._K.calcLabelPosition(e.points),g=d.Y2.getRows(a.title);let p=0;const h=[];let c=0,l=0;for(let t=0;t<=g.length;t++){const e=i.append("text").attr("text-anchor","middle").text(g[t]).attr("x",n).attr("y",o+p),a=e.node().getBBox();if(c=Math.max(c,a.width),l=Math.min(l,a.x),s.Rm.info(a.x,n,o+p),0===p){const t=e.node().getBBox();p=t.height,s.Rm.info("Title height",p,o)}h.push(e)}let x=p*g.length;if(g.length>1){const t=(g.length-1)*p*.5;h.forEach((e,a)=>e.attr("y",o+a*p-t)),x=p*g.length}const D=i.node().getBBox();i.insert("rect",":first-child").attr("class","box").attr("x",n-c/2-(0,d.D7)().state.padding/2).attr("y",o-x/2-(0,d.D7)().state.padding/2-3.5).attr("width",c+(0,d.D7)().state.padding).attr("height",x+(0,d.D7)().state.padding),s.Rm.info(D)}b++},"drawEdge"),k={},S=(0,s.K2)(function(){},"setConf"),N=(0,s.K2)(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),E=(0,s.K2)(function(t,e,a,n){i=(0,d.D7)().state;const r=(0,d.D7)().securityLevel;let g;"sandbox"===r&&(g=(0,o.Ltv)("#i"+e));const p="sandbox"===r?(0,o.Ltv)(g.nodes()[0].contentDocument.body):(0,o.Ltv)("body"),h="sandbox"===r?g.nodes()[0].contentDocument:document;s.Rm.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);N(c);const l=n.db.getRootDoc();M(l,c,void 0,!1,p,h,n);const x=i.padding,D=c.node().getBBox(),u=D.width+2*x,f=D.height+2*x,y=1.75*u;(0,d.a$)(c,f,y,i.useMaxWidth),c.attr("viewBox",`${D.x-i.padding} ${D.y-i.padding} `+u+" "+f)},"draw"),v=(0,s.K2)(t=>t?t.length*i.fontSizeFactor:1,"getLabelWidth"),M=(0,s.K2)((t,e,a,n,r,o,h)=>{const c=new p.T({compound:!0,multigraph:!0});let l,x=!0;for(l=0;l{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)})}else s.Rm.debug("No Node "+t+": "+JSON.stringify(c.node(t)))});let S=b.getBBox();c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(s.Rm.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),B(e,c.edge(t),c.edge(t).relation))}),S=b.getBBox();const N={id:a||"root",label:a||"root",width:0,height:0};return N.width=S.width+2*i.padding,N.height=S.height+2*i.padding,s.Rm.debug("Doc rendered",N,c),N},"renderDoc"),K={setConf:S,draw:E},R={parser:n.Zk,get db(){return new n.u4(1)},renderer:K,styles:n.tM,init:(0,s.K2)(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/8227.1a854c60.js b/assets/js/8227.1a854c60.js new file mode 100644 index 0000000..062af87 --- /dev/null +++ b/assets/js/8227.1a854c60.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8227],{8227:(e,s,a)=>{a.d(s,{createWardleyServices:()=>c.J});var c=a(6575);a(3580)}}]); \ No newline at end of file diff --git a/assets/js/8249.c71477f6.js b/assets/js/8249.c71477f6.js deleted file mode 100644 index bacc06f..0000000 --- a/assets/js/8249.c71477f6.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8249],{6527(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n{var n=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var i=[],n=!0,r=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(h){r=!0,o=h}finally{try{!n&&a.return&&a.return()}finally{if(r)throw o}}return i}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=i(140).layoutBase.LinkedList,o={getTopMostNodes:function(t){for(var e={},i=0;i0&&l.merge(t)});for(var d=0;d1){l=a[0],d=l.connectedEdges().length,a.forEach(function(t){t.connectedEdges().length0&&n.set("dummy"+(n.size+1),u),f},relocateComponent:function(t,e,i){if(!i.fixedNodeConstraint){var r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if("draft"==i.quality){var h=!0,l=!1,d=void 0;try{for(var c,g=e.nodeIndexes[Symbol.iterator]();!(h=(c=g.next()).done);h=!0){var u=c.value,f=n(u,2),p=f[0],y=f[1],v=i.cy.getElementById(p);if(v){var m=v.boundingBox(),E=e.xCoords[y]-m.w/2,N=e.xCoords[y]+m.w/2,T=e.yCoords[y]-m.h/2,A=e.yCoords[y]+m.h/2;Eo&&(o=N),Ta&&(a=A)}}}catch(_){l=!0,d=_}finally{try{!h&&g.return&&g.return()}finally{if(l)throw d}}var w=t.x-(o+r)/2,L=t.y-(a+s)/2;e.xCoords=e.xCoords.map(function(t){return t+w}),e.yCoords=e.yCoords.map(function(t){return t+L})}else{Object.keys(e).forEach(function(t){var i=e[t],n=i.getRect().x,h=i.getRect().x+i.getRect().width,l=i.getRect().y,d=i.getRect().y+i.getRect().height;no&&(o=h),la&&(a=d)});var C=t.x-(o+r)/2,I=t.y-(a+s)/2;Object.keys(e).forEach(function(t){var i=e[t];i.setCenter(i.getCenterX()+C,i.getCenterY()+I)})}}},calcBoundingBox:function(t,e,i,n){for(var r=Number.MAX_SAFE_INTEGER,o=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,h=void 0,l=void 0,d=void 0,c=void 0,g=t.descendants().not(":parent"),u=g.length,f=0;f(h=e[n.get(p.id())]-p.width()/2)&&(r=h),o<(l=e[n.get(p.id())]+p.width()/2)&&(o=l),s>(d=i[n.get(p.id())]-p.height()/2)&&(s=d),a<(c=i[n.get(p.id())]+p.height()/2)&&(a=c)}var y={};return y.topLeftX=r,y.topLeftY=s,y.width=o-r,y.height=a-s,y},calcParentsWithoutChildren:function(t,e){var i=t.collection();return e.nodes(":parent").forEach(function(t){var e=!1;t.children().forEach(function(t){"none"!=t.css("display")&&(e=!0)}),e||i.merge(t)}),i}};t.exports=o},816:(t,e,i)=>{var n=i(548),r=i(140).CoSELayout,o=i(140).CoSENode,s=i(140).layoutBase.PointD,a=i(140).layoutBase.DimensionD,h=i(140).layoutBase.LayoutConstants,l=i(140).layoutBase.FDLayoutConstants,d=i(140).CoSEConstants;t.exports={coseLayout:function(t,e){var i=t.cy,c=t.eles,g=c.nodes(),u=c.edges(),f=void 0,p=void 0,y=void 0,v={};t.randomize&&(f=e.nodeIndexes,p=e.xCoords,y=e.yCoords);var m=function(t){return"function"==typeof t},E=function(t,e){return m(t)?t(e):t},N=n.calcParentsWithoutChildren(i,c);null!=t.nestingFactor&&(d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(d.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(d.MAX_ITERATIONS=l.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(d.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(d.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),null!=t.tilingCompareBy&&(d.TILING_COMPARE_BY=t.tilingCompareBy),"proof"==t.quality?h.QUALITY=2:h.QUALITY=0,d.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=h.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!t.randomize,d.ANIMATE=l.ANIMATE=h.ANIMATE=t.animate,d.TILE=t.tile,d.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,d.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal,d.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=h.DEFAULT_INCREMENTAL=!0,d.PURE_INCREMENTAL=!t.randomize,h.DEFAULT_UNIFORM_LEAF_NODE_SIZES=t.uniformNodeDimensions,"transformed"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!1),"enforced"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!1),"cose"==t.step&&(d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!1,d.APPLY_LAYOUT=!0),"all"==t.step&&(t.randomize?d.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:d.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,d.ENFORCE_CONSTRAINTS=!0,d.APPLY_LAYOUT=!0),t.fixedNodeConstraint||t.alignmentConstraint||t.relativePlacementConstraint?d.TREE_REDUCTION_ON_INCREMENTAL=!1:d.TREE_REDUCTION_ON_INCREMENTAL=!0;var T=new r,A=T.newGraphManager();return function t(e,i,r,h){for(var l=i.length,d=0;d0&&t(r.getGraphManager().add(r.newGraph(),u),g,r,h)}}(A.addRoot(),n.getTopMostNodes(g),T,t),function(e,i,n){for(var r=0,o=0,s=0;s0?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=r/o:m(t.idealEdgeLength)?d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:d.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=t.idealEdgeLength,d.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,d.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)}(T,A,u),function(t,e){e.fixedNodeConstraint&&(t.constraints.fixedNodeConstraint=e.fixedNodeConstraint),e.alignmentConstraint&&(t.constraints.alignmentConstraint=e.alignmentConstraint),e.relativePlacementConstraint&&(t.constraints.relativePlacementConstraint=e.relativePlacementConstraint)}(T,t),T.runLayout(),v}}},212:(t,e,i)=>{var n=function(){function t(t,e){for(var i=0;i0)if(c){var g=o.getTopMostNodes(t.eles.nodes());if((h=o.connectComponents(e,t.eles,g)).forEach(function(t){var e=t.boundingBox();l.push({x:e.x1+e.w/2,y:e.y1+e.h/2})}),t.randomize&&h.forEach(function(e){t.eles=e,n.push(s(t))}),"default"==t.quality||"proof"==t.quality){var u=e.collection();if(t.tile){var f=new Map,p=0,y={nodeIndexes:f,xCoords:[],yCoords:[]},v=[];if(h.forEach(function(t,e){0==t.edges().length&&(t.nodes().forEach(function(e,i){u.merge(t.nodes()[i]),e.isParent()||(y.nodeIndexes.set(t.nodes()[i].id(),p++),y.xCoords.push(t.nodes()[0].position().x),y.yCoords.push(t.nodes()[0].position().y))}),v.push(e))}),u.length>1){var m=u.boundingBox();l.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),h.push(u),n.push(y);for(var E=v.length-1;E>=0;E--)h.splice(v[E],1),n.splice(v[E],1),l.splice(v[E],1)}}h.forEach(function(e,i){t.eles=e,r.push(a(t,n[i])),o.relocateComponent(l[i],r[i],t)})}else h.forEach(function(e,i){o.relocateComponent(l[i],n[i],t)});var N=new Set;if(h.length>1){var T=[],A=i.filter(function(t){return"none"==t.css("display")});h.forEach(function(e,i){var s=void 0;if("draft"==t.quality&&(s=n[i].nodeIndexes),e.nodes().not(A).length>0){var a={edges:[],nodes:[]},h=void 0;e.nodes().not(A).forEach(function(e){if("draft"==t.quality)if(e.isParent()){var l=o.calcBoundingBox(e,n[i].xCoords,n[i].yCoords,s);a.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else h=s.get(e.id()),a.nodes.push({x:n[i].xCoords[h]-e.boundingbox().w/2,y:n[i].yCoords[h]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else r[i][e.id()]&&a.nodes.push({x:r[i][e.id()].getLeft(),y:r[i][e.id()].getTop(),width:r[i][e.id()].getWidth(),height:r[i][e.id()].getHeight()})}),e.edges().forEach(function(e){var h=e.source(),l=e.target();if("none"!=h.css("display")&&"none"!=l.css("display"))if("draft"==t.quality){var d=s.get(h.id()),c=s.get(l.id()),g=[],u=[];if(h.isParent()){var f=o.calcBoundingBox(h,n[i].xCoords,n[i].yCoords,s);g.push(f.topLeftX+f.width/2),g.push(f.topLeftY+f.height/2)}else g.push(n[i].xCoords[d]),g.push(n[i].yCoords[d]);if(l.isParent()){var p=o.calcBoundingBox(l,n[i].xCoords,n[i].yCoords,s);u.push(p.topLeftX+p.width/2),u.push(p.topLeftY+p.height/2)}else u.push(n[i].xCoords[c]),u.push(n[i].yCoords[c]);a.edges.push({startX:g[0],startY:g[1],endX:u[0],endY:u[1]})}else r[i][h.id()]&&r[i][l.id()]&&a.edges.push({startX:r[i][h.id()].getCenterX(),startY:r[i][h.id()].getCenterY(),endX:r[i][l.id()].getCenterX(),endY:r[i][l.id()].getCenterY()})}),a.nodes.length>0&&(T.push(a),N.add(i))}});var w=d.packComponents(T,t.randomize).shifts;if("draft"==t.quality)n.forEach(function(t,e){var i=t.xCoords.map(function(t){return t+w[e].dx}),n=t.yCoords.map(function(t){return t+w[e].dy});t.xCoords=i,t.yCoords=n});else{var L=0;N.forEach(function(t){Object.keys(r[t]).forEach(function(e){var i=r[t][e];i.setCenter(i.getCenterX()+w[L].dx,i.getCenterY()+w[L].dy)}),L++})}}}else{var C=t.eles.boundingBox();if(l.push({x:C.x1+C.w/2,y:C.y1+C.h/2}),t.randomize){var I=s(t);n.push(I)}"default"==t.quality||"proof"==t.quality?(r.push(a(t,n[0])),o.relocateComponent(l[0],r[0],t)):o.relocateComponent(l[0],n[0],t)}var _=function(e,i){if("default"==t.quality||"proof"==t.quality){"number"==typeof e&&(e=i);var o=void 0,s=void 0,a=e.data("id");return r.forEach(function(t){a in t&&(o={x:t[a].getRect().getCenterX(),y:t[a].getRect().getCenterY()},s=t[a])}),t.nodeDimensionsIncludeLabels&&(s.labelWidth&&("left"==s.labelPosHorizontal?o.x+=s.labelWidth/2:"right"==s.labelPosHorizontal&&(o.x-=s.labelWidth/2)),s.labelHeight&&("top"==s.labelPosVertical?o.y+=s.labelHeight/2:"bottom"==s.labelPosVertical&&(o.y-=s.labelHeight/2))),null==o&&(o={x:e.position("x"),y:e.position("y")}),{x:o.x,y:o.y}}var h=void 0;return n.forEach(function(t){var i=t.nodeIndexes.get(e.id());null!=i&&(h={x:t.xCoords[i],y:t.yCoords[i]})}),null==h&&(h={x:e.position("x"),y:e.position("y")}),{x:h.x,y:h.y}};if("default"==t.quality||"proof"==t.quality||t.randomize){var M=o.calcParentsWithoutChildren(e,i),x=i.filter(function(t){return"none"==t.css("display")});t.eles=i.not(x),i.nodes().not(":parent").not(x).layoutPositions(this,t,_),M.length>0&&M.forEach(function(t){t.position(_(t))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),t}();t.exports=l},657:(t,e,i)=>{var n=i(548),r=i(140).layoutBase.Matrix,o=i(140).layoutBase.SVD;t.exports={spectralLayout:function(t){var e=t.cy,i=t.eles,s=i.nodes(),a=i.nodes(":parent"),h=new Map,l=new Map,d=new Map,c=[],g=[],u=[],f=[],p=[],y=[],v=[],m=[],E=void 0,N=1e8,T=1e-9,A=t.piTol,w=t.samplingType,L=t.nodeSeparation,C=void 0,I=function(t,e,i){for(var n=[],r=0,o=0,s=0,a=void 0,h=[],d=0,g=1,u=0;u=r;){s=n[r++];for(var f=c[s],v=0;vd&&(d=p[T],g=T)}return g};n.connectComponents(e,i,n.getTopMostNodes(s),h),a.forEach(function(t){n.connectComponents(e,i,n.getTopMostNodes(t.descendants().intersection(i)),h)});for(var _=0,M=0;M0&&(n.isParent()?c[e].push(d.get(n.id())):c[e].push(n.id()))})});var S=function(t){var i=l.get(t),n=void 0;h.get(t).forEach(function(r){n=e.getElementById(r).isParent()?d.get(r):r,c[i].push(n),c[l.get(n)].push(t)})},P=!0,U=!1,Y=void 0;try{for(var k,H=h.keys()[Symbol.iterator]();!(P=(k=H.next()).done);P=!0)S(k.value)}catch(K){U=!0,Y=K}finally{try{!P&&H.return&&H.return()}finally{if(U)throw Y}}var X=void 0;if((E=l.size)>2){C=E=1)break;l=h}for(var f=0;f=1)break;l=h}for(var v=0;v{var n=i(212),r=function(t){t&&t("layout","fcose",n)};"undefined"!=typeof cytoscape&&r(cytoscape),t.exports=r},140:e=>{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(579);return n})()},t.exports=n(i(1709))},1709(t,e,i){var n;n=function(t){return(()=>{"use strict";var e={45:(t,e,i)=>{var n={};n.layoutBase=i(551),n.CoSEConstants=i(806),n.CoSEEdge=i(767),n.CoSEGraph=i(880),n.CoSEGraphManager=i(578),n.CoSELayout=i(765),n.CoSENode=i(991),n.ConstraintHandler=i(902),t.exports=n},806:(t,e,i)=>{var n=i(551).FDLayoutConstants;function r(){}for(var o in n)r[o]=n[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=n.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,t.exports=r},767:(t,e,i)=>{var n=i(551).FDLayoutEdge;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},880:(t,e,i)=>{var n=i(551).LGraph;function r(t,e,i){n.call(this,t,e,i)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},578:(t,e,i)=>{var n=i(551).LGraphManager;function r(t){n.call(this,t)}for(var o in r.prototype=Object.create(n.prototype),n)r[o]=n[o];t.exports=r},765:(t,e,i)=>{var n=i(551).FDLayout,r=i(578),o=i(880),s=i(991),a=i(767),h=i(806),l=i(902),d=i(551).FDLayoutConstants,c=i(551).LayoutConstants,g=i(551).Point,u=i(551).PointD,f=i(551).DimensionD,p=i(551).Layout,y=i(551).Integer,v=i(551).IGeometry,m=i(551).LGraph,E=i(551).Transform,N=i(551).LinkedList;function T(){n.call(this),this.toBeTiled={},this.constraints={}}for(var A in T.prototype=Object.create(n.prototype),n)T[A]=n[A];T.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},T.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},T.prototype.newNode=function(t){return new s(this.graphManager,t)},T.prototype.newEdge=function(t){return new a(null,null,t)},T.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.isSubLayout||(h.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=h.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=d.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=d.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},T.prototype.initSpringEmbedder=function(){n.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/d.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},T.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},T.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental)h.TREE_REDUCTION_ON_INCREMENTAL&&(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(i));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),i=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(i),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),h.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},T.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),h.PURE_INCREMENTAL?this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var i=!this.isTreeGrowing&&!this.isGrowthFinished,n=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(i,n),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},i=0;i0&&this.updateDisplacements(),e=0;e0&&(n.fixedNodeWeight=o)}if(this.constraints.relativePlacementConstraint){var s=new Map,a=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(e){t.fixedNodesOnHorizontal.add(e),t.fixedNodesOnVertical.add(e)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical){var l=this.constraints.alignmentConstraint.vertical;for(i=0;i=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),i=t[n],t[n]=t[e],t[e]=i;return t},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var i=s.has(e.left)?s.get(e.left):e.left,n=s.has(e.right)?s.get(e.right):e.right;t.nodesInRelativeHorizontal.includes(i)||(t.nodesInRelativeHorizontal.push(i),t.nodeToRelativeConstraintMapHorizontal.set(i,[]),t.dummyToNodeForVerticalAlignment.has(i)?t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(i)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(i,t.idToNodeMap.get(i).getCenterX())),t.nodesInRelativeHorizontal.includes(n)||(t.nodesInRelativeHorizontal.push(n),t.nodeToRelativeConstraintMapHorizontal.set(n,[]),t.dummyToNodeForVerticalAlignment.has(n)?t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(t.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):t.nodeToTempPositionMapHorizontal.set(n,t.idToNodeMap.get(n).getCenterX())),t.nodeToRelativeConstraintMapHorizontal.get(i).push({right:n,gap:e.gap}),t.nodeToRelativeConstraintMapHorizontal.get(n).push({left:i,gap:e.gap})}else{var r=a.has(e.top)?a.get(e.top):e.top,o=a.has(e.bottom)?a.get(e.bottom):e.bottom;t.nodesInRelativeVertical.includes(r)||(t.nodesInRelativeVertical.push(r),t.nodeToRelativeConstraintMapVertical.set(r,[]),t.dummyToNodeForHorizontalAlignment.has(r)?t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(r)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(r,t.idToNodeMap.get(r).getCenterY())),t.nodesInRelativeVertical.includes(o)||(t.nodesInRelativeVertical.push(o),t.nodeToRelativeConstraintMapVertical.set(o,[]),t.dummyToNodeForHorizontalAlignment.has(o)?t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(t.dummyToNodeForHorizontalAlignment.get(o)[0]).getCenterY()):t.nodeToTempPositionMapVertical.set(o,t.idToNodeMap.get(o).getCenterY())),t.nodeToRelativeConstraintMapVertical.get(r).push({bottom:o,gap:e.gap}),t.nodeToRelativeConstraintMapVertical.get(o).push({top:r,gap:e.gap})}});else{var c=new Map,g=new Map;this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var e=s.has(t.left)?s.get(t.left):t.left,i=s.has(t.right)?s.get(t.right):t.right;c.has(e)?c.get(e).push(i):c.set(e,[i]),c.has(i)?c.get(i).push(e):c.set(i,[e])}else{var n=a.has(t.top)?a.get(t.top):t.top,r=a.has(t.bottom)?a.get(t.bottom):t.bottom;g.has(n)?g.get(n).push(r):g.set(n,[r]),g.has(r)?g.get(r).push(n):g.set(r,[n])}});var u=function(t,e){var i=[],n=[],r=new N,o=new Set,s=0;return t.forEach(function(a,h){if(!o.has(h)){i[s]=[],n[s]=!1;var l=h;for(r.push(l),o.add(l),i[s].push(l);0!=r.length;)l=r.shift(),e.has(l)&&(n[s]=!0),t.get(l).forEach(function(t){o.has(t)||(r.push(t),o.add(t),i[s].push(t))});s++}}),{components:i,isFixed:n}},f=u(c,t.fixedNodesOnHorizontal);this.componentsOnHorizontal=f.components,this.fixedComponentsOnHorizontal=f.isFixed;var p=u(g,t.fixedNodesOnVertical);this.componentsOnVertical=p.components,this.fixedComponentsOnVertical=p.isFixed}}},T.prototype.updateDisplacements=function(){var t=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){var i=t.idToNodeMap.get(e.nodeId);i.displacementX=0,i.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var e=this.constraints.alignmentConstraint.vertical,i=0;i1)for(a=0;an&&(n=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},T.radialLayout=function(t,e,i){var n=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(e,null,0,359,0,n);var r=m.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(i.x),o.setWorldOrgY(i.y);for(var s=0;s1;){var y=p[0];p.splice(0,1);var m=d.indexOf(y);m>=0&&d.splice(m,1),f--,c--}g=null!=e?(d.indexOf(p[0])+1)%f:0;for(var E=Math.abs(n-i)/c,N=g;u!=c;N=++N%f){var A=d[N].getOtherEnd(t);if(A!=e){var w=(i+u*E)%360,L=(w+E)%360;T.branchRadialLayout(A,t,w,L,r+o,o),u++}}},T.maxDiagonalInTree=function(t){for(var e=y.MIN_VALUE,i=0;ie&&(e=n)}return e},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var i=[],n=this.graphManager.getAllNodes(),r=0;r1){var n="DummyCompound_"+i;t.memberGroups[n]=e[i];var r=e[i][0].getParent(),o=new s(t.graphManager);o.id=n,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[n]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;lr?(n.rect.x-=(n.labelWidth-r)/2,n.setWidth(n.labelWidth),n.labelMarginLeft=(n.labelWidth-r)/2):"right"==n.labelPosHorizontal&&n.setWidth(r+n.labelWidth)),n.labelHeight&&("top"==n.labelPosVertical?(n.rect.y-=n.labelHeight,n.setHeight(o+n.labelHeight),n.labelMarginTop=n.labelHeight):"center"==n.labelPosVertical&&n.labelHeight>o?(n.rect.y-=(n.labelHeight-o)/2,n.setHeight(n.labelHeight),n.labelMarginTop=(n.labelHeight-o)/2):"bottom"==n.labelPosVertical&&n.setHeight(o+n.labelHeight))}})},T.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],i=e.id,n=e.paddingLeft,r=e.paddingTop,o=e.labelMarginLeft,s=e.labelMarginTop;this.adjustLocations(this.tiledMemberPack[i],e.rect.x,e.rect.y,n,r,o,s)}},T.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach(function(i){var n=t.idToDummyNode[i],r=n.paddingLeft,o=n.paddingTop,s=n.labelMarginLeft,a=n.labelMarginTop;t.adjustLocations(e[i],n.rect.x,n.rect.y,r,o,s,a)})},T.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var i=t.getChild();if(null==i)return this.toBeTiled[e]=!1,!1;for(var n=i.getNodes(),r=0;r0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},T.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),i=0,n=0;nd&&(d=g.rect.height)}i+=d+t.verticalPadding}},T.prototype.tileCompoundMembers=function(t,e){var i=this;this.tiledMemberPack=[],Object.keys(t).forEach(function(n){var r=e[n];if(i.tiledMemberPack[n]=i.tileNodes(t[n],r.paddingLeft+r.paddingRight),r.rect.width=i.tiledMemberPack[n].width,r.rect.height=i.tiledMemberPack[n].height,r.setCenter(i.tiledMemberPack[n].centerX,i.tiledMemberPack[n].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,h.NODE_DIMENSIONS_INCLUDE_LABELS){var o=r.rect.width,s=r.rect.height;r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(o+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>o?(r.rect.x-=(r.labelWidth-o)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-o)/2):"right"==r.labelPosHorizontal&&r.setWidth(o+r.labelWidth)),r.labelHeight&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(s+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>s?(r.rect.y-=(r.labelHeight-s)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-s)/2):"bottom"==r.labelPosVertical&&r.setHeight(s+r.labelHeight))}})},T.prototype.tileNodes=function(t,e){var i=this.tileNodesByFavoringDim(t,e,!0),n=this.tileNodesByFavoringDim(t,e,!1),r=this.getOrgRatio(i);return this.getOrgRatio(n)a&&(a=t.getWidth())});var l,d=o/r,c=s/r,g=Math.pow(i-n,2)+4*(d+n)*(c+i)*r,u=(n-i+Math.sqrt(g))/(2*(d+n));e?(l=Math.ceil(u))==u&&l++:l=Math.floor(u);var f=l*(d+n)-n;return a>f&&(f=a),f+=2*n},T.prototype.tileNodesByFavoringDim=function(t,e,i){var n=h.TILING_PADDING_VERTICAL,r=h.TILING_PADDING_HORIZONTAL,o=h.TILING_COMPARE_BY,s={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:n,horizontalPadding:r,centerX:0,centerY:0};o&&(s.idealRowWidth=this.calcIdealRowWidth(t,i));var a=function(t){return t.rect.width*t.rect.height},l=function(t,e){return a(e)-a(t)};t.sort(function(t,e){var i=l;return s.idealRowWidth?(i=o)(t.id,e.id):i(t,e)});for(var d=0,c=0,g=0;g0&&(o+=t.horizontalPadding),t.rowWidth[i]=o,t.width0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[i]&&(a=t.rowHeight[i],t.rowHeight[i]=s,a=t.rowHeight[i]-a),t.height+=a,t.rows[i].push(e)},T.prototype.getShortestRowIndex=function(t){for(var e=-1,i=Number.MAX_VALUE,n=0;ni&&(e=n,i=t.rowWidth[n]);return e},T.prototype.canAddHorizontal=function(t,e,i){if(t.idealRowWidth){var n=t.rows.length-1;return t.rowWidth[n]+e+t.horizontalPadding<=t.idealRowWidth}var r=this.getShortestRowIndex(t);if(r<0)return!0;var o=t.rowWidth[r];if(o+t.horizontalPadding+e<=t.width)return!0;var s,a,h=0;return t.rowHeight[r]0&&(h=i+t.verticalPadding-t.rowHeight[r]),s=t.width-o>=e+t.horizontalPadding?(t.height+h)/(o+e+t.horizontalPadding):(t.height+h)/t.width,h=i+t.verticalPadding,(a=t.widtho&&e!=i){n.splice(-1,1),t.rows[i].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[i]=t.rowWidth[i]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;as&&(s=n[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[i];t.rowHeight[e]=s,t.rowHeight[i]0)for(var c=r;c<=o;c++)l[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o0)for(c=s;c<=a;c++)l[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,f=y.MAX_VALUE,p=0;p{var n=i(551).FDLayoutNode,r=i(551).IMath;function o(t,e,i,r){n.call(this,t,e,i,r)}for(var s in o.prototype=Object.create(n.prototype),n)o[s]=n[s];o.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},o.prototype.propogateDisplacementToChildren=function(t,e){for(var i,n=this.getChild().getNodes(),r=0;r{function n(t){if(Array.isArray(t)){for(var e=0,i=Array(t.length);e0){var o=0;n.forEach(function(t){"horizontal"==e?(c.set(t,h.has(t)?l[h.get(t)]:r.get(t)),o+=c.get(t)):(c.set(t,h.has(t)?d[h.get(t)]:r.get(t)),o+=c.get(t))}),o/=n.length,t.forEach(function(t){i.has(t)||c.set(t,o)})}else{var s=0;t.forEach(function(t){s+="horizontal"==e?h.has(t)?l[h.get(t)]:r.get(t):h.has(t)?d[h.get(t)]:r.get(t)}),s/=t.length,t.forEach(function(t){c.set(t,s)})}});for(var f=function(){var n=u.shift();t.get(n).forEach(function(t){if(c.get(t.id)s&&(s=m),Ea&&(a=E)}}catch(_){u=!0,f=_}finally{try{!g&&y.return&&y.return()}finally{if(u)throw f}}var N=(n+s)/2-(o+a)/2,T=!0,A=!1,w=void 0;try{for(var L,C=t[Symbol.iterator]();!(T=(L=C.next()).done);T=!0){var I=L.value;c.set(I,c.get(I)+N)}}catch(_){A=!0,w=_}finally{try{!T&&C.return&&C.return()}finally{if(A)throw w}}})}return c},v=function(t){var e=0,i=0,n=0,r=0;if(t.forEach(function(t){t.left?l[h.get(t.left)]-l[h.get(t.right)]>=0?e++:i++:d[h.get(t.top)]-d[h.get(t.bottom)]>=0?n++:r++}),e>i&&n>r)for(var o=0;oi)for(var s=0;sr)for(var a=0;a1)e.fixedNodeConstraint.forEach(function(t,e){T[e]=[t.position.x,t.position.y],A[e]=[l[h.get(t.nodeId)],d[h.get(t.nodeId)]]}),w=!0;else if(e.alignmentConstraint)!function(){var t=0;if(e.alignmentConstraint.vertical){for(var i=e.alignmentConstraint.vertical,r=function(e){var r=new Set;i[e].forEach(function(t){r.add(t)});var o=new Set([].concat(n(r)).filter(function(t){return C.has(t)})),s=void 0;s=o.size>0?l[h.get(o.values().next().value)]:p(r).x,i[e].forEach(function(e){T[t]=[s,d[h.get(e)]],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},o=0;o0?l[h.get(r.values().next().value)]:p(i).y,s[e].forEach(function(e){T[t]=[l[h.get(e)],o],A[t]=[l[h.get(e)],d[h.get(e)]],t++})},c=0;cx&&(x=M[D].length,O=D);if(x<_.size/2)v(e.relativePlacementConstraint),w=!1,L=!1;else{var R=new Map,b=new Map,F=[];M[O].forEach(function(t){I.get(t).forEach(function(e){"horizontal"==e.direction?(R.has(t)?R.get(t).push(e):R.set(t,[e]),R.has(e.id)||R.set(e.id,[]),F.push({left:t,right:e.id})):(b.has(t)?b.get(t).push(e):b.set(t,[e]),b.has(e.id)||b.set(e.id,[]),F.push({top:t,bottom:e.id}))})}),v(F),L=!1;var G=y(R,"horizontal"),S=y(b,"vertical");M[O].forEach(function(t,e){A[e]=[l[h.get(t)],d[h.get(t)]],T[e]=[],G.has(t)?T[e][0]=G.get(t):T[e][0]=l[h.get(t)],S.has(t)?T[e][1]=S.get(t):T[e][1]=d[h.get(t)]}),w=!0}}if(w){for(var P,U=s.transpose(T),Y=s.transpose(A),k=0;k0){var j={x:0,y:0};e.fixedNodeConstraint.forEach(function(t,e){var i,n,r={x:l[h.get(t.nodeId)],y:d[h.get(t.nodeId)]},o=t.position,s=(n=r,{x:(i=o).x-n.x,y:i.y-n.y});j.x+=s.x,j.y+=s.y}),j.x/=e.fixedNodeConstraint.length,j.y/=e.fixedNodeConstraint.length,l.forEach(function(t,e){l[e]+=j.x}),d.forEach(function(t,e){d[e]+=j.y}),e.fixedNodeConstraint.forEach(function(t){l[h.get(t.nodeId)]=t.position.x,d[h.get(t.nodeId)]=t.position.y})}if(e.alignmentConstraint){if(e.alignmentConstraint.vertical)for(var $=e.alignmentConstraint.vertical,q=function(t){var e=new Set;$[t].forEach(function(t){e.add(t)});var i=new Set([].concat(n(e)).filter(function(t){return C.has(t)})),r=void 0;r=i.size>0?l[h.get(i.values().next().value)]:p(e).x,e.forEach(function(t){C.has(t)||(l[h.get(t)]=r)})},K=0;K<$.length;K++)q(K);if(e.alignmentConstraint.horizontal)for(var Z=e.alignmentConstraint.horizontal,Q=function(t){var e=new Set;Z[t].forEach(function(t){e.add(t)});var i=new Set([].concat(n(e)).filter(function(t){return C.has(t)})),r=void 0;r=i.size>0?d[h.get(i.values().next().value)]:p(e).y,e.forEach(function(t){C.has(t)||(d[h.get(t)]=r)})},J=0;J{e.exports=t}},i={},n=function t(n){var r=i[n];if(void 0!==r)return r.exports;var o=i[n]={exports:{}};return e[n](o,o.exports,t),o.exports}(45);return n})()},t.exports=n(i(6679))},6679(t){var e;e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=28)}([function(t,e,i){"use strict";function n(){}n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(8),o=i(9);function s(t,e,i){n.call(this,i),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=i,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(n.prototype),n)s[a]=n[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var i=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(i.getOwner()==e)return i;if(i.getOwner()==n)break;i=i.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,i){"use strict";t.exports=function(t){this.vGraphObject=t}},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(13),s=i(0),a=i(16),h=i(5);function l(t,e,i,s){null==i&&null==s&&(s=e),n.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=i&&null!=e?new o(e.x,e.y,i.width,i.height):new o}for(var d in l.prototype=Object.create(n.prototype),n)l[d]=n[d];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.target==t){if(n.source!=i)throw"Incorrect edge source!";e.push(n)}}),e},l.prototype.getEdgesBetween=function(t){var e=[],i=this;return i.edges.forEach(function(n){if(n.source!=i&&n.target!=i)throw"Incorrect edge source and/or target";n.target!=t&&n.source!=t||e.push(n)}),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach(function(i){if(i.source==e)t.add(i.target);else{if(i.target!=e)throw"Incorrect incidency!";t.add(i.source)}}),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),i=0;ie?(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(e+this.labelWidth)),this.labelHeight&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(i+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>i?(this.rect.y-=(this.labelHeight-i)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(i+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var i=this.rect.y;i>s.WORLD_BOUNDARY?i=s.WORLD_BOUNDARY:i<-s.WORLD_BOUNDARY&&(i=-s.WORLD_BOUNDARY);var n=new h(e,i),r=t.inverseTransformPoint(n);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,i){"use strict";var n=i(0);function r(){}for(var o in n)r[o]=n[o];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=r},function(t,e,i){"use strict";function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,i){"use strict";var n=i(2),r=i(10),o=i(0),s=i(7),a=i(3),h=i(1),l=i(13),d=i(12),c=i(11);function g(t,e,i){n.call(this,i),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var u in g.prototype=Object.create(n.prototype),n)g[u]=n[u];g.prototype.getNodes=function(){return this.nodes},g.prototype.getEdges=function(){return this.edges},g.prototype.getGraphManager=function(){return this.graphManager},g.prototype.getParent=function(){return this.parent},g.prototype.getLeft=function(){return this.left},g.prototype.getRight=function(){return this.right},g.prototype.getTop=function(){return this.top},g.prototype.getBottom=function(){return this.bottom},g.prototype.isConnected=function(){return this.isConnected},g.prototype.add=function(t,e,i){if(null==e&&null==i){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(n)>-1)throw"Node already in graph!";return n.owner=this,this.getNodes().push(n),n}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(i)>-1))throw"Source or target not in graph!";if(e.owner!=i.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=i.owner?null:(r.source=e,r.target=i,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),i!=e&&i.edges.push(r),r)},g.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var i=e.edges.slice(),n=i.length,r=0;r-1&&d>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(d,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},g.prototype.updateLeftTop=function(){for(var t,e,i,n=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h(t=l.getTop())&&(n=t),o>(e=l.getLeft())&&(o=e)}return n==r.MAX_VALUE?null:(i=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-i,this.top=n-i,new d(this.left,this.top))},g.prototype.updateBounds=function(t){for(var e,i,n,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,d=r.MAX_VALUE,c=-r.MAX_VALUE,g=this.nodes,u=g.length,f=0;f(e=p.getLeft())&&(a=e),h<(i=p.getRight())&&(h=i),d>(n=p.getTop())&&(d=n),c<(o=p.getBottom())&&(c=o)}var y=new l(a,d,h-a,c-d);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=g[0].getParent().paddingLeft?g[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},g.calculateBounds=function(t){for(var e,i,n,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,d=-r.MAX_VALUE,c=t.length,g=0;g(e=u.getLeft())&&(s=e),a<(i=u.getRight())&&(a=i),h>(n=u.getTop())&&(h=n),d<(o=u.getBottom())&&(d=o)}return new l(s,h,a-s,d-h)},g.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},g.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},g.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,i=e.length,n=0;n=this.nodes.length){var h=0;r.forEach(function(e){e.owner==t&&h++}),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=g},function(t,e,i){"use strict";var n,r=i(1);function o(t){n=i(6),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),i=this.add(t,e);return this.setRootGraph(i),this.rootGraph},o.prototype.add=function(t,e,i,n,r){if(null==i&&null==n&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=i,i=t;var o=(n=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return i.isInterGraph=!1,o.add(i,n,r);if(i.isInterGraph=!0,i.source=n,i.target=r,this.edges.indexOf(i)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(i),null==i.source||null==i.target)throw"Edge source and/or target is null!";if(-1!=i.source.edges.indexOf(i)||-1!=i.target.edges.indexOf(i))throw"Edge already in source and/or target incidency list!";return i.source.edges.push(i),i.target.edges.push(i),i},o.prototype.remove=function(t){if(t instanceof n){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var i,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a=e.getRight()?i[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(i[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(i[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*i[0],a=i[1]/o;i[0]s)return i[0]=n,i[1]=h,i[2]=o,i[3]=E,!1;if(ro)return i[0]=a,i[1]=r,i[2]=v,i[3]=s,!1;if(no?(i[0]=d,i[1]=c,w=!0):(i[0]=l,i[1]=h,w=!0):C===_&&(n>o?(i[0]=a,i[1]=h,w=!0):(i[0]=g,i[1]=c,w=!0)),-I===_?o>n?(i[2]=m,i[3]=E,L=!0):(i[2]=v,i[3]=y,L=!0):I===_&&(o>n?(i[2]=p,i[3]=y,L=!0):(i[2]=N,i[3]=E,L=!0)),w&&L)return!1;if(n>o?r>s?(M=this.getCardinalDirection(C,_,4),x=this.getCardinalDirection(I,_,2)):(M=this.getCardinalDirection(-C,_,3),x=this.getCardinalDirection(-I,_,1)):r>s?(M=this.getCardinalDirection(-C,_,1),x=this.getCardinalDirection(-I,_,3)):(M=this.getCardinalDirection(C,_,2),x=this.getCardinalDirection(I,_,4)),!w)switch(M){case 1:D=h,O=n+-f/_,i[0]=O,i[1]=D;break;case 2:O=g,D=r+u*_,i[0]=O,i[1]=D;break;case 3:D=c,O=n+f/_,i[0]=O,i[1]=D;break;case 4:O=d,D=r+-u*_,i[0]=O,i[1]=D}if(!L)switch(x){case 1:b=y,R=o+-A/_,i[2]=R,i[3]=b;break;case 2:R=N,b=s+T*_,i[2]=R,i[3]=b;break;case 3:b=E,R=o+A/_,i[2]=R,i[3]=b;break;case 4:R=m,b=s+-T*_,i[2]=R,i[3]=b}}return!1},r.getCardinalDirection=function(t,e,i){return t>e?i:1+i%4},r.getIntersection=function(t,e,i,r){if(null==r)return this.getIntersection2(t,e,i);var o,s,a,h,l,d,c,g=t.x,u=t.y,f=e.x,p=e.y,y=i.x,v=i.y,m=r.x,E=r.y;return 0===(c=(o=p-u)*(h=y-m)-(s=E-v)*(a=g-f))?null:new n((a*(d=m*v-y*E)-h*(l=f*u-g*p))/c,(s*l-o*d)/c)},r.angleOfVector=function(t,e,i,n){var r=void 0;return t!==i?(r=Math.atan((n-e)/(i-t)),i=0){var d=(-h+Math.sqrt(h*h-4*a*l))/(2*a),c=(-h-Math.sqrt(h*h-4*a*l))/(2*a);return d>=0&&d<=1?[d]:c>=0&&c<=1?[c]:null}return null},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,t.exports=r},function(t,e,i){"use strict";function n(){}n.sign=function(t){return t>0?1:t<0?-1:0},n.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},n.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=n},function(t,e,i){"use strict";function n(){}n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i0&&e;){for(a.push(l[0]);a.length>0&&e;){var d=a[0];a.splice(0,1),s.add(d);var c=d.getEdges();for(o=0;o-1&&l.splice(p,1)}s=new Set,h=new Map}else t=[]}return t},g.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],i=t.source,n=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r0){for(var r=this.edgeToDummyNodes.get(i),o=0;o=0&&e.splice(c,1),d.getNeighborsList().forEach(function(t){if(i.indexOf(t)<0){var e=n.get(t)-1;1==e&&h.push(t),n.set(t,e)}})}i=i.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},g.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=g},function(t,e,i){"use strict";function n(){}n.seed=1,n.x=0,n.nextDouble=function(){return n.x=1e4*Math.sin(n.seed++),n.x-Math.floor(n.x)},t.exports=n},function(t,e,i){"use strict";var n=i(5);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,i=this.lworldExtX;return 0!=i&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/i),e},r.prototype.transformY=function(t){var e=0,i=this.lworldExtY;return 0!=i&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/i),e},r.prototype.inverseTransformX=function(t){var e=0,i=this.ldeviceExtX;return 0!=i&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/i),e},r.prototype.inverseTransformY=function(t){var e=0,i=this.ldeviceExtY;return 0!=i&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/i),e},r.prototype.inverseTransformPoint=function(t){return new n(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,i){"use strict";var n=i(15),r=i(4),o=i(0),s=i(8),a=i(9);function h(){n.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(n.prototype),n)h[l]=n[l];h.prototype.initParameters=function(){n.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,i,n,s,a,h,l=this.getGraphManager().getAllEdges(),d=0;dr.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),i=0;i0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||l>=a[0].length))for(var d=0;dt}}]),t}();t.exports=o},function(t,e,i){"use strict";function n(){}n.svd=function(t){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=t.length,this.n=t[0].length;var e=Math.min(this.m,this.n);this.s=function(t){for(var e=[];t-- >0;)e.push(0);return e}(Math.min(this.m+1,this.n)),this.U=function t(e){if(0==e.length)return 0;for(var i=[],n=0;n0;)e.push(0);return e}(this.n),r=function(t){for(var e=[];t-- >0;)e.push(0);return e}(this.m),o=Math.min(this.m-1,this.n),s=Math.max(0,Math.min(this.n-2,this.m)),a=0;a=0;_--)if(0!==this.s[_]){for(var M=_+1;M=0;G--){if(function(t,e){return t&&e}(G0;){var B=void 0,V=void 0;for(B=L-2;B>=-1&&-1!==B;B--)if(Math.abs(i[B])<=z+X*(Math.abs(this.s[B])+Math.abs(this.s[B+1]))){i[B]=0;break}if(B===L-2)V=4;else{var W=void 0;for(W=L-1;W>=B&&W!==B;W--){var j=(W!==L?Math.abs(i[W]):0)+(W!==B+1?Math.abs(i[W-1]):0);if(Math.abs(this.s[W])<=z+X*j){this.s[W]=0;break}}W===B?V=3:W===L-1?V=1:(V=2,B=W)}switch(B++,V){case 1:var $=i[L-2];i[L-2]=0;for(var q=L-2;q>=B;q--){var K=n.hypot(this.s[q],$),Z=this.s[q]/K,Q=$/K;this.s[q]=K,q!==B&&($=-Q*i[q-1],i[q-1]=Z*i[q-1]);for(var J=0;J=this.s[B+1]);){var Lt=this.s[B];if(this.s[B]=this.s[B+1],this.s[B+1]=Lt,BMath.abs(e)?(i=e/t,i=Math.abs(t)*Math.sqrt(1+i*i)):0!=e?(i=t/e,i=Math.abs(e)*Math.sqrt(1+i*i)):i=0,i},t.exports=n},function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=i,this.match_score=n,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=i.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var n=this.listeners[i];n.event===t&&n.callback===e&&this.listeners.splice(i,1)}},r.emit=function(t,e){for(var i=0;iZ});var n=i(3590),r=i(92),o=i(5871),s=i(3226),a=i(7633),h=i(797),l=i(8731),d=i(165),c=i(6527),g=i(451),u={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,h.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,h.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,h.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,h.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},p={L:(0,h.K2)((t,e)=>t-e+2,"L"),R:(0,h.K2)((t,e)=>t-2,"R"),T:(0,h.K2)((t,e)=>t-e+2,"T"),B:(0,h.K2)((t,e)=>t-2,"B")},y=(0,h.K2)(function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),v=(0,h.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),m=(0,h.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),E=(0,h.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),N=(0,h.K2)(function(t,e){const i=m(t)&&E(e),n=E(t)&&m(e);return i||n},"isArchitectureDirectionXY"),T=(0,h.K2)(function(t){const e=t[0],i=t[1],n=m(e)&&E(i),r=E(e)&&m(i);return n||r},"isArchitecturePairXY"),A=(0,h.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),w=(0,h.K2)(function(t,e){const i=`${t}${e}`;return A(i)?i:void 0},"getArchitectureDirectionPair"),L=(0,h.K2)(function([t,e],i){const n=i[0],r=i[1];return m(n)?E(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:m(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),C=(0,h.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),I=(0,h.K2)(function(t,e){return N(t,e)?"bend":m(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),_=(0,h.K2)(function(t){return"service"===t.type},"isArchitectureService"),M=(0,h.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),x=(0,h.K2)(t=>t.data(),"edgeData"),O=(0,h.K2)(t=>t.data(),"nodeData"),D=a.UI.architecture,R=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=a.SV,this.getAccTitle=a.iN,this.setDiagramTitle=a.ke,this.getDiagramTitle=a.ab,this.getAccDescription=a.m7,this.setAccDescription=a.EI,this.clear()}static{(0,h.K2)(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},(0,a.IU)()}addService({id:t,icon:e,in:i,title:n,iconText:r}){if(void 0!==this.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:r,title:n,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(_)}addJunction({id:t,in:e}){this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(M)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:i,title:n}){if(void 0!==this.registeredIds?.[t])throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===this.registeredIds?.[i])throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:n,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:n,lhsInto:r,rhsInto:o,lhsGroup:s,rhsGroup:a,title:h}){if(!v(i))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(i)}`);if(!v(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(n)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);const l=this.nodes[t].in,d=this.nodes[e].in;if(s&&l&&d&&l==d)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&l&&d&&l==d)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const c={lhsId:t,lhsDir:i,lhsInto:r,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:o,rhsGroup:a,title:h};this.edges.push(c),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){const t={},e=Object.entries(this.nodes).reduce((e,[i,n])=>(e[i]=n.edges.reduce((e,n)=>{const r=this.getNode(n.lhsId)?.in,o=this.getNode(n.rhsId)?.in;if(r&&o&&r!==o){const e=I(n.lhsDir,n.rhsDir);"bend"!==e&&(t[r]??={},t[r][o]=e,t[o]??={},t[o][r]=e)}if(n.lhsId===i){const t=w(n.lhsDir,n.rhsDir);t&&(e[t]=n.rhsId)}else{const t=w(n.rhsDir,n.lhsDir);t&&(e[t]=n.lhsId)}return e},{}),e),{}),i=Object.keys(e)[0],n={[i]:1},r=Object.keys(e).reduce((t,e)=>e===i?t:{...t,[e]:1},{}),o=(0,h.K2)(t=>{const i={[t]:[0,0]},o=[t];for(;o.length>0;){const t=o.shift();if(t){n[t]=1,delete r[t];const s=e[t],[a,h]=i[t];Object.entries(s).forEach(([t,e])=>{n[e]||(i[e]=L([a,h],t),o.push(e))})}}return i},"BFS"),s=[o(i)];for(;Object.keys(r).length>0;)s.push(o(Object.keys(r)[0]));this.dataStructures={adjList:e,spatialMaps:s,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,s.$t)({...D,...(0,a.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},b=(0,h.K2)((t,e)=>{(0,o.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),F={parser:{yy:void 0},parse:(0,h.K2)(async t=>{const e=await(0,l.qg)("architecture",t);h.Rm.debug(e);const i=F.parser?.yy;if(!(i instanceof R))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b(e,i)},"parse")},G=(0,h.K2)(t=>`\n .edge {\n stroke-width: ${t.archEdgeWidth};\n stroke: ${t.archEdgeColor};\n fill: none;\n }\n\n .arrow {\n fill: ${t.archEdgeArrowColor};\n }\n\n .node-bkg {\n fill: none;\n stroke: ${t.archGroupBorderColor};\n stroke-width: ${t.archGroupBorderWidth};\n stroke-dasharray: 8;\n }\n .node-icon-text {\n display: flex; \n align-items: center;\n }\n \n .node-icon-text > div {\n color: #fff;\n margin: 1px;\n height: fit-content;\n text-align: center;\n overflow: hidden;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n }\n`,"getStyles"),S=(0,h.K2)(t=>`${t}`,"wrapIcon"),P={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:S('')},server:{body:S('')},disk:{body:S('')},internet:{body:S('')},cloud:{body:S('')},unknown:r.Gc,blank:{body:S("")}}},U=(0,h.K2)(async function(t,e,i){const n=i.getConfigField("padding"),o=i.getConfigField("iconSize"),h=o/2,l=o/6,d=l/2;await Promise.all(e.edges().map(async e=>{const{source:o,sourceDir:c,sourceArrow:g,sourceGroup:u,target:y,targetDir:v,targetArrow:A,targetGroup:L,label:I}=x(e);let{x:_,y:M}=e[0].sourceEndpoint();const{x:O,y:D}=e[0].midpoint();let{x:R,y:b}=e[0].targetEndpoint();const F=n+4;if(u&&(m(c)?_+="L"===c?-F:F:M+="T"===c?-F:F+18),L&&(m(v)?R+="L"===v?-F:F:b+="T"===v?-F:F+18),u||"junction"!==i.getNode(o)?.type||(m(c)?_+="L"===c?h:-h:M+="T"===c?h:-h),L||"junction"!==i.getNode(y)?.type||(m(v)?R+="L"===v?h:-h:b+="T"===v?h:-h),e[0]._private.rscratch){const e=t.insert("g");if(e.insert("path").attr("d",`M ${_},${M} L ${O},${D} L${R},${b} `).attr("class","edge").attr("id",(0,s.rY)(o,y,{prefix:"L"})),g){const t=m(c)?p[c](_,l):_-d,i=E(c)?p[c](M,l):M-d;e.insert("polygon").attr("points",f[c](l)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(A){const t=m(v)?p[v](R,l):R-d,i=E(v)?p[v](b,l):b-d;e.insert("polygon").attr("points",f[v](l)).attr("transform",`translate(${t},${i})`).attr("class","arrow")}if(I){const t=N(c,v)?"XY":m(c)?"X":"Y";let i=0;i="X"===t?Math.abs(_-R):"Y"===t?Math.abs(M-b)/1.5:Math.abs(_-R)/2;const n=e.append("g");if(await(0,r.GZ)(n,I,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},(0,a.D7)()),n.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"===t)n.attr("transform","translate("+O+", "+D+")");else if("Y"===t)n.attr("transform","translate("+O+", "+D+") rotate(-90)");else if("XY"===t){const t=w(c,v);if(t&&T(t)){const e=n.node().getBoundingClientRect(),[i,r]=C(t);n.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*i*r*45})`);const o=n.node().getBoundingClientRect();n.attr("transform",`\n translate(${O}, ${D-e.height/2})\n translate(${i*o.width/2}, ${r*o.height/2})\n rotate(${-1*i*r*45}, 0, ${e.height/2})\n `)}}}}}))},"drawEdges"),Y=(0,h.K2)(async function(t,e,i){const n=.75*i.getConfigField("padding"),o=i.getConfigField("fontSize"),s=i.getConfigField("iconSize")/2;await Promise.all(e.nodes().map(async e=>{const h=O(e);if("group"===h.type){const{h:l,w:d,x1:c,y1:g}=e.boundingBox(),u=t.append("rect");u.attr("id",`group-${h.id}`).attr("x",c+s).attr("y",g+s).attr("width",d).attr("height",l).attr("class","node-bkg");const f=t.append("g");let p=c,y=g;if(h.icon){const t=f.append("g");t.html(`${await(0,r.WY)(h.icon,{height:n,width:n,fallbackPrefix:P.prefix})}`),t.attr("transform","translate("+(p+s+1)+", "+(y+s+1)+")"),p+=n,y+=o/2-1-2}if(h.label){const t=f.append("g");await(0,r.GZ)(t,h.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},(0,a.D7)()),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),t.attr("transform","translate("+(p+s+4)+", "+(y+s+2)+")")}i.setElementForId(h.id,u)}}))},"drawGroups"),k=(0,h.K2)(async function(t,e,i){const n=(0,a.D7)();for(const o of i){const i=e.append("g"),s=t.getConfigField("iconSize");if(o.title){const t=i.append("g");await(0,r.GZ)(t,o.title,{useHtmlLabels:!1,width:1.5*s,classes:"architecture-service-label"},n),t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.attr("transform","translate("+s/2+", "+s+")")}const h=i.append("g");if(o.icon)h.html(`${await(0,r.WY)(o.icon,{height:s,width:s,fallbackPrefix:P.prefix})}`);else if(o.iconText){h.html(`${await(0,r.WY)("blank",{height:s,width:s,fallbackPrefix:P.prefix})}`);const t=h.append("g").append("foreignObject").attr("width",s).attr("height",s).append("div").attr("class","node-icon-text").attr("style",`height: ${s}px;`).append("div").html((0,a.jZ)(o.iconText,n)),e=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((s-2)/e)};`)}else h.append("path").attr("class","node-bkg").attr("id","node-"+o.id).attr("d",`M0 ${s} v${-s} q0,-5 5,-5 h${s} q5,0 5,5 v${s} H0 Z`);i.attr("id",`service-${o.id}`).attr("class","architecture-service");const{width:l,height:d}=i.node().getBBox();o.width=l,o.height=d,t.setElementForId(o.id,i)}return 0},"drawServices"),H=(0,h.K2)(function(t,e,i){i.forEach(i=>{const n=e.append("g"),r=t.getConfigField("iconSize");n.append("g").append("rect").attr("id","node-"+i.id).attr("fill-opacity","0").attr("width",r).attr("height",r),n.attr("class","architecture-junction");const{width:o,height:s}=n._groups[0][0].getBBox();n.width=o,n.height=s,t.setElementForId(i.id,n)})},"drawJunctions");function X(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-service"})})}function z(t,e,i){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:i.getConfigField("iconSize"),height:i.getConfigField("iconSize")},classes:"node-junction"})})}function B(t,e){e.nodes().map(e=>{const i=O(e);if("group"===i.type)return;i.x=e.position().x,i.y=e.position().y;t.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")")})}function V(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function W(t,e){t.forEach(t=>{const{lhsId:i,rhsId:n,lhsInto:r,lhsGroup:o,rhsInto:s,lhsDir:a,rhsDir:h,rhsGroup:l,title:d}=t,c=N(t.lhsDir,t.rhsDir)?"segments":"straight",g={id:`${i}-${n}`,label:d,source:i,sourceDir:a,sourceArrow:r,sourceGroup:o,sourceEndpoint:"L"===a?"0 50%":"R"===a?"100% 50%":"T"===a?"50% 0":"50% 100%",target:n,targetDir:h,targetArrow:s,targetGroup:l,targetEndpoint:"L"===h?"0 50%":"R"===h?"100% 50%":"T"===h?"50% 0":"50% 100%"};e.add({group:"edges",data:g,classes:c})})}function j(t,e,i){const n=(0,h.K2)((t,e)=>Object.entries(t).reduce((t,[n,r])=>{let o=0;const s=Object.entries(r);if(1===s.length)return t[n]=s[0][1],t;for(let a=0;a{const i={},r={};return Object.entries(e).forEach(([e,[n,o]])=>{const s=t.getNode(e)?.in??"default";i[o]??={},i[o][s]??=[],i[o][s].push(e),r[n]??={},r[n][s]??=[],r[n][s].push(e)}),{horiz:Object.values(n(i,"horizontal")).filter(t=>t.length>1),vert:Object.values(n(r,"vertical")).filter(t=>t.length>1)}}),[o,s]=r.reduce(([t,e],{horiz:i,vert:n})=>[[...t,...i],[...e,...n]],[[],[]]);return{horizontal:o,vertical:s}}function $(t,e){const i=[],n=(0,h.K2)(t=>`${t[0]},${t[1]}`,"posToStr"),r=(0,h.K2)(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{const o=Object.fromEntries(Object.entries(t).map(([t,e])=>[n(e),t])),s=[n([0,0])],a={},h={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;s.length>0;){const t=s.shift();if(t){a[t]=1;const l=o[t];if(l){const d=r(t);Object.entries(h).forEach(([t,r])=>{const h=n([d[0]+r[0],d[1]+r[1]]),c=o[h];c&&!a[h]&&(s.push(h),i.push({[u[t]]:c,[u[y(t)]]:l,gap:1.5*e.getConfigField("iconSize")}))})}}}}),i}function q(t,e,i,n,r,{spatialMaps:o,groupAlignments:s}){return new Promise(a=>{const l=(0,g.Ltv)("body").append("div").attr("id","cy").attr("style","display:none"),c=(0,d.A)({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${r.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${r.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});l.remove(),V(i,c),X(t,c,r),z(e,c,r),W(n,c);const u=j(r,o,s),f=$(o,r),p=c.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[e,i]=t.connectedNodes(),{parent:n}=O(e),{parent:o}=O(i);return n===o?1.5*r.getConfigField("iconSize"):.5*r.getConfigField("iconSize")},edgeElasticity(t){const[e,i]=t.connectedNodes(),{parent:n}=O(e),{parent:r}=O(i);return n===r?.45:.001},alignmentConstraint:u,relativePlacementConstraint:f});p.one("layoutstop",()=>{function t(t,e,i,n){let r,o;const{x:s,y:a}=t,{x:h,y:l}=e;o=(n-a+(s-i)*(a-l)/(s-h))/Math.sqrt(1+Math.pow((a-l)/(s-h),2)),r=Math.sqrt(Math.pow(n-a,2)+Math.pow(i-s,2)-Math.pow(o,2));r/=Math.sqrt(Math.pow(h-s,2)+Math.pow(l-a,2));let d=(h-s)*(n-a)-(l-a)*(i-s);switch(!0){case d>=0:d=1;break;case d<0:d=-1}let c=(h-s)*(i-s)+(l-a)*(n-a);switch(!0){case c>=0:c=1;break;case c<0:c=-1}return o=Math.abs(o)*d,r*=c,{distances:o,weights:r}}(0,h.K2)(t,"getSegmentWeights"),c.startBatch();for(const e of Object.values(c.edges()))if(e.data?.()){const{x:i,y:n}=e.source().position(),{x:r,y:o}=e.target().position();if(i!==r&&n!==o){const i=e.sourceEndpoint(),n=e.targetEndpoint(),{sourceDir:r}=x(e),[o,s]=E(r)?[i.x,n.y]:[n.x,i.y],{weights:a,distances:h}=t(i,n,o,s);e.style("segment-distances",h),e.style("segment-weights",a)}}c.endBatch(),p.run()}),p.run(),c.ready(t=>{h.Rm.info("Ready",t),a(c)})})}(0,r.pC)([{name:P.prefix,icons:P}]),d.A.use(c),(0,h.K2)(X,"addServices"),(0,h.K2)(z,"addJunctions"),(0,h.K2)(B,"positionNodes"),(0,h.K2)(V,"addGroups"),(0,h.K2)(W,"addEdges"),(0,h.K2)(j,"getAlignments"),(0,h.K2)($,"getRelativeConstraints"),(0,h.K2)(q,"layoutArchitecture");var K={draw:(0,h.K2)(async(t,e,i,r)=>{const o=r.db,s=o.getServices(),h=o.getJunctions(),l=o.getGroups(),d=o.getEdges(),c=o.getDataStructures(),g=(0,n.D)(e),u=g.append("g");u.attr("class","architecture-edges");const f=g.append("g");f.attr("class","architecture-services");const p=g.append("g");p.attr("class","architecture-groups"),await k(o,f,s),H(o,f,h);const y=await q(s,h,l,d,o,c);await U(u,y,o),await Y(p,y,o),B(o,y),(0,a.ot)(void 0,g,o.getConfigField("padding"),o.getConfigField("useMaxWidth"))},"draw")},Z={parser:F,get db(){return new R},renderer:K,styles:G}},5871(t,e,i){"use strict";function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}i.d(e,{S:()=>n}),(0,i(797).K2)(n,"populateCommonDb")}}]); \ No newline at end of file diff --git a/assets/js/846656e5.7a01fd59.js b/assets/js/846656e5.7a01fd59.js deleted file mode 100644 index d185c04..0000000 --- a/assets/js/846656e5.7a01fd59.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9492],{5231(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the official ATProto glossary.","source":"@site/docs/reference/glossary.md","sourceDirName":"reference","slug":"/reference/glossary","permalink":"/reference/glossary","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Meilisearch Sync","permalink":"/reference/scripts/meilisearch-sync"},"next":{"title":"Architecture","permalink":"/reference/architecture"}}');var o=t(4848),n=t(8453);const i={},c="Glossary",a={},d=[{value:"AT Protocol terms",id:"at-protocol-terms",level:2},{value:"HappyView-specific terms",id:"happyview-specific-terms",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,o.jsxs)(r.p,{children:["Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary",children:"official ATProto glossary"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"at-protocol-terms",children:"AT Protocol terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AppView"})," \u2014 A backend service that indexes AT Protocol records and serves them through an API. HappyView is an AppView. See the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary#app-view",children:"ATProto docs"})," for more."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"DID"})," (Decentralized Identifier) \u2014 A persistent, globally unique identifier for an account (e.g. ",(0,o.jsx)(r.code,{children:"did:plc:abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Firehose"})," \u2014 A real-time stream of all record events (creates, updates, deletes) across the AT Protocol network. HappyView consumes this via ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Handle"})," \u2014 A human-readable name for an account (e.g. ",(0,o.jsx)(r.code,{children:"user.bsky.social"}),"). Handles resolve to a DID via DNS or the PLC directory."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Lexicon"})," \u2014 A schema definition for AT Protocol data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See ",(0,o.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"NSID"})," (Namespaced Identifier) \u2014 A reverse-DNS identifier for a lexicon (e.g. ",(0,o.jsx)(r.code,{children:"xyz.statusphere.status"}),"). The authority is everything except the last segment."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PDS"})," (Personal Data Server) \u2014 The server that hosts a user's data. Users can be on any PDS \u2014 there's no single server. HappyView proxies writes back to each user's PDS."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PLC directory"})," \u2014 A public service (e.g. ",(0,o.jsx)(r.code,{children:"plc.directory"}),") that maps DIDs to their DID documents, which contain the user's PDS endpoint and other metadata."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Record"})," \u2014 A single piece of data in an AT Protocol repository, identified by an AT URI (e.g. ",(0,o.jsx)(r.code,{children:"at://did:plc:abc/xyz.statusphere.status/abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Relay"})," \u2014 A network service that aggregates repository data from many PDSes. HappyView queries the relay during ",(0,o.jsx)(r.a,{href:"/guides/backfill",children:"backfill"})," to discover which repos contain records for a given collection, then delegates the actual record fetching to Tap."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"rkey"})," (Record Key) \u2014 The unique key for a record within a collection and repo. These are most commonly TIDs (timestamp-based) or NSIDs."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"TID"})," (Timestamp Identifier) \u2014 A 13-character sortable identifier used as a record key. Generated from the current timestamp."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"XRPC"})," \u2014 The HTTP-based RPC protocol used by the AT Protocol. Query methods map to GET requests, procedure methods map to POST requests. See ",(0,o.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"happyview-specific-terms",children:"HappyView-specific terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AIP"})," \u2014 ",(0,o.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"Authentication and Identity Provider"}),". An external service that handles AT Protocol OAuth for HappyView. Issues Bearer tokens used for authentication."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Backfill"})," \u2014 The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and delegates record fetching to Tap. Runs when a new record-type lexicon is uploaded or triggered manually. See ",(0,o.jsx)(r.a,{href:"/guides/backfill",children:"Backfill"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Network lexicon"})," \u2014 A lexicon fetched directly from the AT Protocol network via DNS authority resolution, rather than uploaded manually. See ",(0,o.jsx)(r.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Tap"})," \u2014 A ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"firehose consumer and backfill worker"})," that handles real-time record streaming, cryptographic verification, and historical record fetching. HappyView connects to Tap via WebSocket to receive record events, and delegates backfill work to Tap via its HTTP API."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Target collection"})," \u2014 The record collection that a query or procedure lexicon operates on. Set via the ",(0,o.jsx)(r.code,{children:"target_collection"})," field when uploading a lexicon."]})]})}function h(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>i,x:()=>c});var s=t(6540);const o={},n=s.createContext(o);function i(e){const r=s.useContext(n);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/846656e5.ca9020b1.js b/assets/js/846656e5.ca9020b1.js new file mode 100644 index 0000000..ca212bc --- /dev/null +++ b/assets/js/846656e5.ca9020b1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9492],{7070:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the atproto, see the official ATProto glossary.","source":"@site/docs/reference/glossary.md","sourceDirName":"reference","slug":"/reference/glossary","permalink":"/reference/glossary","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Standard Libraries","permalink":"/reference/lua/standard-libraries"},"next":{"title":"Architecture","permalink":"/reference/architecture"}}');var n=s(199),o=s(2560);const i={},a="Glossary",c={},d=[{value:"atproto terms",id:"atproto-terms",level:2},{value:"HappyView-specific terms",id:"happyview-specific-terms",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,n.jsxs)(r.p,{children:["Key terms used throughout the HappyView documentation. For a broader introduction to the atproto, see the ",(0,n.jsx)(r.a,{href:"https://atproto.com/guides/glossary",children:"official ATProto glossary"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"atproto-terms",children:"atproto terms"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"AppView"})," \u2014 A backend service that indexes atproto records and serves them through an API. HappyView is an AppView. See the ",(0,n.jsx)(r.a,{href:"https://atproto.com/guides/glossary#app-view",children:"ATProto docs"})," for more."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"DID"})," (Decentralized Identifier) \u2014 A persistent, globally unique identifier for an account (e.g. ",(0,n.jsx)(r.code,{children:"did:plc:abc123"}),")."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Firehose"})," \u2014 A real-time stream of all record events (creates, updates, deletes) across the atproto network. HappyView consumes a filtered slice of this via ",(0,n.jsx)(r.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Handle"})," \u2014 A human-readable name for an account (e.g. ",(0,n.jsx)(r.code,{children:"user.bsky.social"}),"). Handles resolve to a DID via a DNS TXT record or an HTTP ",(0,n.jsx)(r.code,{children:".well-known/atproto-did"})," lookup."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Lexicon"})," \u2014 A schema definition for atproto data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See ",(0,n.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"NSID"})," (Namespaced Identifier) \u2014 A reverse-DNS identifier for a lexicon (e.g. ",(0,n.jsx)(r.code,{children:"xyz.statusphere.status"}),"). The authority is everything except the last segment."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"PDS"})," (Personal Data Server) \u2014 The server that hosts a user's data. Users can be on any PDS \u2014 there's no single server. HappyView proxies writes back to each user's PDS."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"PLC directory"})," \u2014 A public service (e.g. ",(0,n.jsx)(r.code,{children:"plc.directory"}),") that maps DIDs to their DID documents, which contain the user's PDS endpoint and other metadata."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Record"})," \u2014 A single piece of data in an atproto repository, identified by an AT URI (e.g. ",(0,n.jsx)(r.code,{children:"at://did:plc:abc/xyz.statusphere.status/abc123"}),")."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Relay"})," \u2014 A network service that aggregates repository data from many PDSes. HappyView queries the relay during ",(0,n.jsx)(r.a,{href:"/guides/backfill",children:"backfill"})," to discover which repos contain records for a given collection, then fetches each repo's records directly from its PDS."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"rkey"})," (Record Key) \u2014 The unique key for a record within a collection and repo. These are most commonly TIDs (timestamp-based) or NSIDs."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"TID"})," (Timestamp Identifier) \u2014 A 13-character sortable identifier used as a record key. Generated from the current timestamp."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"XRPC"})," \u2014 The HTTP-based RPC protocol used by the atproto. Query methods map to GET requests, procedure methods map to POST requests. See ",(0,n.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Jetstream"})," \u2014 A ",(0,n.jsx)(r.a,{href:"https://github.com/bluesky-social/jetstream",children:"filtered firehose"})," that delivers atproto record commit events as JSON over WebSocket. Not part of the core atproto spec, but widely used. HappyView subscribes to Jetstream with a collection filter built from its indexed record lexicons, and persists a cursor for resume on reconnect."]}),"\n",(0,n.jsx)(r.h2,{id:"happyview-specific-terms",children:"HappyView-specific terms"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Backfill"})," \u2014 The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and fetches each repo's records directly from its PDS. Runs when a new record-type lexicon is uploaded or triggered manually. See ",(0,n.jsx)(r.a,{href:"/guides/backfill",children:"Backfill"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Network lexicon"})," \u2014 A lexicon fetched directly from the atproto network via DNS authority resolution, rather than uploaded manually. See ",(0,n.jsx)(r.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Permission"})," \u2014 A granular access control right that authorizes a specific action in the admin API. HappyView defines 20 permissions organized by category (e.g. ",(0,n.jsx)(r.code,{children:"lexicons:create"}),", ",(0,n.jsx)(r.code,{children:"users:read"}),"). See ",(0,n.jsx)(r.a,{href:"/guides/permissions",children:"Permissions"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Permission template"})," \u2014 A predefined set of permissions that can be applied when creating a user. Templates are: ",(0,n.jsx)(r.strong,{children:"Viewer"})," (read-only access), ",(0,n.jsx)(r.strong,{children:"Operator"})," (viewer + backfill and API key management), ",(0,n.jsx)(r.strong,{children:"Manager"})," (operator + lexicon and record management), and ",(0,n.jsx)(r.strong,{children:"Full Access"})," (all 20 permissions)."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Super user"})," \u2014 The bootstrapped user created on first login to a fresh HappyView instance. The super user has unrestricted access to all endpoints regardless of permissions, can transfer super status to another user, and cannot be deleted."]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Target collection"})," \u2014 The record collection that a query or procedure lexicon operates on. Set via the ",(0,n.jsx)(r.code,{children:"target_collection"})," field when uploading a lexicon."]})]})}function h(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},2560:(e,r,s)=>{s.d(r,{R:()=>i,x:()=>a});var t=s(63);const n={},o=t.createContext(n);function i(e){const r=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),t.createElement(o.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8468a657.f4fcc9de.js b/assets/js/8468a657.f4fcc9de.js new file mode 100644 index 0000000..20041cd --- /dev/null +++ b/assets/js/8468a657.f4fcc9de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9556],{1692:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>l,toc:()=>d});const l=JSON.parse('{"id":"reference/admin/backfill","title":"Admin API: Backfill","description":"Create and monitor historical backfill jobs. See the Backfill guide for background.","source":"@site/docs/reference/admin/backfill.md","sourceDirName":"reference/admin","slug":"/reference/admin/backfill","permalink":"/reference/admin/backfill","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Stats","permalink":"/reference/admin/stats"},"next":{"title":"Event Logs","permalink":"/reference/admin/events"}}');var s=t(199),i=t(2560);const r={},c="Admin API: Backfill",a={},d=[{value:"Create a backfill job",id:"create-a-backfill-job",level:2},{value:"List backfill jobs",id:"list-backfill-jobs",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"admin-api-backfill",children:"Admin API: Backfill"})}),"\n",(0,s.jsxs)(n.p,{children:["Create and monitor historical backfill jobs. See the ",(0,s.jsx)(n.a,{href:"/guides/backfill",children:"Backfill guide"})," for background."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"create-a-backfill-job",children:"Create a backfill job"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"POST /admin/backfill\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/backfill \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "collection": "xyz.statusphere.status" }\'\n'})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Required"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"collection"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"no"}),(0,s.jsx)(n.td,{children:"Limit to a single collection (backfills all if omitted)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"did"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"no"}),(0,s.jsx)(n.td,{children:"Limit to a single DID (discovers all via relay if omitted)"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "status": "pending"\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"list-backfill-jobs",children:"List backfill jobs"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"GET /admin/backfill/status\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/backfill/status -H "$AUTH"\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "collection": "xyz.statusphere.status",\n "did": null,\n "status": "completed",\n "total_repos": 42,\n "processed_repos": 42,\n "total_records": 1000,\n "error": null,\n "started_at": "2025-01-01T00:01:00Z",\n "completed_at": "2025-01-01T00:05:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var l=t(63);const s={},i=l.createContext(s);function r(e){const n=l.useContext(i);return l.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),l.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/85480c2f.61b9b3cf.js b/assets/js/85480c2f.61b9b3cf.js new file mode 100644 index 0000000..1d38a5b --- /dev/null +++ b/assets/js/85480c2f.61b9b3cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6737],{68:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>x,frontMatter:()=>l,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"guides/developing-plugins","title":"Developing Plugins","description":"This guide covers how to build your own HappyView WASM plugins. For installing and configuring plugins, see the Plugins guide.","source":"@site/docs/guides/developing-plugins.md","sourceDirName":"guides","slug":"/guides/developing-plugins","permalink":"/guides/developing-plugins","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Plugins","permalink":"/guides/plugins"},"next":{"title":"API Keys","permalink":"/guides/api-keys"}}');var d=s(199),r=s(2560);const l={},t="Developing Plugins",c={},h=[{value:"Plugin Manifest",id:"plugin-manifest",level:2},{value:"API Endpoints",id:"api-endpoints",level:2},{value:"Public Endpoints",id:"public-endpoints",level:3},{value:"Admin Endpoints",id:"admin-endpoints",level:3},{value:"Plugin Exports",id:"plugin-exports",level:2},{value:"Host Functions",id:"host-functions",level:2},{value:"Next steps",id:"next-steps",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"developing-plugins",children:"Developing Plugins"})}),"\n",(0,d.jsxs)(n.p,{children:["This guide covers how to build your own HappyView WASM plugins. For installing and configuring plugins, see the ",(0,d.jsx)(n.a,{href:"/guides/plugins",children:"Plugins guide"}),"."]}),"\n",(0,d.jsxs)(n.p,{children:["See the ",(0,d.jsx)(n.a,{href:"https://github.com/gamesgamesgamesgamesgames/happyview-plugins",children:"happyview-plugins"})," repository for examples and the plugin SDK."]}),"\n",(0,d.jsx)(n.h2,{id:"plugin-manifest",children:"Plugin Manifest"}),"\n",(0,d.jsxs)(n.p,{children:["Each plugin has a ",(0,d.jsx)(n.code,{children:"manifest.json"})," that describes its metadata:"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "steam",\n "name": "Steam",\n "version": "1.0.0",\n "api_version": "1",\n "description": "Import your Steam game library and playtime data.",\n "icon_url": "https://example.com/steam-icon.png",\n "auth_type": "openid",\n "wasm_file": "steam.wasm",\n "required_secrets": [\n {\n "key": "PLUGIN_STEAM_API_KEY",\n "name": "Steam Web API Key",\n "description": "Get your API key at steamcommunity.com/dev/apikey"\n }\n ]\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"id"})}),(0,d.jsx)(n.td,{children:"Unique plugin identifier"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"name"})}),(0,d.jsx)(n.td,{children:"Display name"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"version"})}),(0,d.jsx)(n.td,{children:"Semantic version"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"api_version"})}),(0,d.jsx)(n.td,{children:'Plugin API version (currently "1")'})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"description"})}),(0,d.jsx)(n.td,{children:"Brief description shown during install"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"icon_url"})}),(0,d.jsx)(n.td,{children:"Optional icon URL"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"auth_type"})}),(0,d.jsxs)(n.td,{children:["Authentication type: ",(0,d.jsx)(n.code,{children:"oauth2"}),", ",(0,d.jsx)(n.code,{children:"openid"}),", or ",(0,d.jsx)(n.code,{children:"api_key"})]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"wasm_file"})}),(0,d.jsxs)(n.td,{children:["WASM binary filename (default: ",(0,d.jsx)(n.code,{children:"plugin.wasm"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"required_secrets"})}),(0,d.jsx)(n.td,{children:"Array of secrets the plugin needs"})]})]})]}),"\n",(0,d.jsx)(n.h2,{id:"api-endpoints",children:"API Endpoints"}),"\n",(0,d.jsx)(n.h3,{id:"public-endpoints",children:"Public Endpoints"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Endpoint"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /external-auth/providers"})}),(0,d.jsx)(n.td,{children:"List available auth providers"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /external-auth/accounts"})}),(0,d.jsx)(n.td,{children:"List user's linked accounts"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /external-auth/{plugin}/authorize"})}),(0,d.jsx)(n.td,{children:"Start OAuth flow"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /external-auth/{plugin}/callback"})}),(0,d.jsx)(n.td,{children:"OAuth callback handler"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /external-auth/{plugin}/sync"})}),(0,d.jsx)(n.td,{children:"Sync data from linked account"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /external-auth/{plugin}/unlink"})}),(0,d.jsx)(n.td,{children:"Unlink account"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /external-auth/{plugin}/connect"})}),(0,d.jsxs)(n.td,{children:["Connect with API key (for ",(0,d.jsx)(n.code,{children:"api_key"})," auth type)"]})]})]})]}),"\n",(0,d.jsx)(n.h3,{id:"admin-endpoints",children:"Admin Endpoints"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Endpoint"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /admin/plugins"})}),(0,d.jsx)(n.td,{children:"List installed plugins"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /admin/plugins"})}),(0,d.jsx)(n.td,{children:"Install a plugin"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /admin/plugins/preview"})}),(0,d.jsx)(n.td,{children:"Preview plugin before installing"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /admin/plugins/official"})}),(0,d.jsx)(n.td,{children:"Browse the official plugin registry catalog"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/plugins/{id}"})}),(0,d.jsx)(n.td,{children:"Remove a plugin"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /admin/plugins/{id}/reload"})}),(0,d.jsx)(n.td,{children:"Reload plugin from source"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"POST /admin/plugins/{id}/check-update"})}),(0,d.jsx)(n.td,{children:"Check whether a newer version is available"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"GET /admin/plugins/{id}/secrets"})}),(0,d.jsx)(n.td,{children:"Get configured secrets (masked)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"PUT /admin/plugins/{id}/secrets"})}),(0,d.jsx)(n.td,{children:"Update plugin secrets"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:["The dashboard's ",(0,d.jsx)(n.strong,{children:"Settings > Plugins"})," page calls ",(0,d.jsx)(n.code,{children:"GET /admin/plugins/official"})," to populate the install browser, and ",(0,d.jsx)(n.code,{children:"POST /admin/plugins/{id}/check-update"})," to display update badges on installed plugins."]}),"\n",(0,d.jsx)(n.h2,{id:"plugin-exports",children:"Plugin Exports"}),"\n",(0,d.jsx)(n.p,{children:"Plugins must export these functions:"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Export"}),(0,d.jsx)(n.th,{children:"Signature"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"alloc"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(size: u32) -> u32"})}),(0,d.jsx)(n.td,{children:"Allocate memory"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"dealloc"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, size: u32)"})}),(0,d.jsx)(n.td,{children:"Deallocate memory"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"get_authorize_url"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, len: u32) -> i64"})}),(0,d.jsx)(n.td,{children:"Generate OAuth authorize URL"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"handle_callback"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, len: u32) -> i64"})}),(0,d.jsx)(n.td,{children:"Handle OAuth callback"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"refresh_tokens"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, len: u32) -> i64"})}),(0,d.jsx)(n.td,{children:"Refresh expired tokens"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"get_profile"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, len: u32) -> i64"})}),(0,d.jsx)(n.td,{children:"Get external profile info"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"sync_account"})}),(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"(ptr: u32, len: u32) -> i64"})}),(0,d.jsx)(n.td,{children:"Sync data and return records"})]})]})]}),"\n",(0,d.jsx)(n.h2,{id:"host-functions",children:"Host Functions"}),"\n",(0,d.jsx)(n.p,{children:"Plugins can import these host functions:"}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Import"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_http_request"})}),(0,d.jsx)(n.td,{children:"Make HTTP requests"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_get_secret"})}),(0,d.jsx)(n.td,{children:"Read configured secrets"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_log"})}),(0,d.jsx)(n.td,{children:"Write to server logs"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_kv_get"})}),(0,d.jsx)(n.td,{children:"Read from KV storage"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_kv_set"})}),(0,d.jsx)(n.td,{children:"Write to KV storage"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"host_kv_delete"})}),(0,d.jsx)(n.td,{children:"Delete from KV storage"})]})]})]}),"\n",(0,d.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,d.jsxs)(n.ul,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"https://github.com/gamesgamesgamesgamesgames/happyview-plugins",children:"Official plugins repository"})," \u2014 ready-to-use plugins and the plugin SDK"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"/guides/plugins",children:"Plugins guide"})," \u2014 install and configure plugins"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys"})," \u2014 authenticate programmatic access to admin endpoints"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 configure user access to plugin management"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>t});var i=s(63);const d={},r=i.createContext(d);function l(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/866.47e1c36a.js b/assets/js/866.47e1c36a.js new file mode 100644 index 0000000..871d9e8 --- /dev/null +++ b/assets/js/866.47e1c36a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[866],{866:(t,e,s)=>{s.d(e,{Lh:()=>T,NM:()=>k,_$:()=>A,tM:()=>E});var i=s(7214),n=s(8854),a=s(7330),r=s(3830),u=s(163),l=s(2101),o=s(5691),c=s(8894),h=s(1485),d=s(8685),p=function(){var t=(0,c.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,18],s=[1,19],i=[1,20],n=[1,41],a=[1,26],r=[1,42],u=[1,24],l=[1,25],o=[1,32],h=[1,33],d=[1,34],p=[1,45],A=[1,35],y=[1,36],g=[1,37],m=[1,38],b=[1,27],C=[1,28],k=[1,29],E=[1,30],f=[1,31],T=[1,44],D=[1,46],F=[1,43],B=[1,47],_=[1,9],$=[1,8,9],x=[1,58],S=[1,59],L=[1,60],N=[1,61],v=[1,62],I=[1,63],w=[1,64],O=[1,8,9,41],R=[1,77],K=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],P=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],M=[13,60,86,100,102,103],G=[13,60,73,74,86,100,102,103],U=[13,60,68,69,70,71,72,86,100,102,103],Y=[1,102],z=[1,120],Q=[1,116],W=[1,112],j=[1,118],X=[1,113],H=[1,114],V=[1,115],q=[1,117],J=[1,119],Z=[22,50,60,61,82,86,87,88,89,90],tt=[1,8,9,39,41,44,46],et=[1,8,9,22],st=[1,150],it=[1,8,9,61],nt=[1,8,9,22,50,60,61,82,86,87,88,89,90],at={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:(0,c.K2)(function(t,e,s,i,n,a,r){var u=a.length-1;switch(n){case 8:this.$=a[u-1];break;case 9:case 10:case 13:case 15:this.$=a[u];break;case 11:case 14:this.$=a[u-2]+"."+a[u];break;case 12:case 16:case 106:this.$=a[u-1]+a[u];break;case 17:case 18:this.$=a[u-1]+"~"+a[u]+"~";break;case 19:i.addRelation(a[u]);break;case 20:a[u-1].title=i.cleanupLabel(a[u]),i.addRelation(a[u-1]);break;case 31:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 32:case 33:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 34:i.addClassesToNamespace(a[u-3],a[u-1][0],a[u-1][1]);break;case 35:i.addClassesToNamespace(a[u-4],a[u-1][0],a[u-1][1]);break;case 36:this.$=a[u],i.addNamespace(a[u]);break;case 37:this.$=[[a[u]],[]];break;case 38:this.$=[[a[u-1]],[]];break;case 39:a[u][0].unshift(a[u-2]),this.$=a[u];break;case 40:this.$=[[],[a[u]]];break;case 41:this.$=[[],[a[u-1]]];break;case 42:a[u][1].unshift(a[u-2]),this.$=a[u];break;case 44:i.setCssClass(a[u-2],a[u]);break;case 45:i.addMembers(a[u-3],a[u-1]);break;case 47:i.setCssClass(a[u-5],a[u-3]),i.addMembers(a[u-5],a[u-1]);break;case 48:i.addAnnotation(a[u-3],a[u-1]);break;case 49:i.addAnnotation(a[u-6],a[u-4]),i.addMembers(a[u-6],a[u-1]);break;case 50:i.addAnnotation(a[u-5],a[u-3]);break;case 51:this.$=a[u],i.addClass(a[u]);break;case 52:this.$=a[u-1],i.addClass(a[u-1]),i.setClassLabel(a[u-1],a[u]);break;case 56:i.addAnnotation(a[u],a[u-2]);break;case 57:case 70:case 103:this.$=[a[u]];break;case 58:a[u].push(a[u-1]),this.$=a[u];break;case 59:case 61:case 62:break;case 60:i.addMember(a[u-1],i.cleanupLabel(a[u]));break;case 63:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 64:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 65:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 66:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 67:this.$=i.addNote(a[u],a[u-1]);break;case 68:this.$=i.addNote(a[u]);break;case 69:this.$=a[u-2],i.defineClass(a[u-1],a[u]);break;case 71:this.$=a[u-2].concat([a[u]]);break;case 72:i.setDirection("TB");break;case 73:i.setDirection("BT");break;case 74:i.setDirection("RL");break;case 75:i.setDirection("LR");break;case 76:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 77:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 78:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 79:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 80:this.$=i.relationType.AGGREGATION;break;case 81:this.$=i.relationType.EXTENSION;break;case 82:this.$=i.relationType.COMPOSITION;break;case 83:this.$=i.relationType.DEPENDENCY;break;case 84:this.$=i.relationType.LOLLIPOP;break;case 85:this.$=i.lineType.LINE;break;case 86:this.$=i.lineType.DOTTED_LINE;break;case 87:case 93:this.$=a[u-2],i.setClickEvent(a[u-1],a[u]);break;case 88:case 94:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 89:this.$=a[u-2],i.setLink(a[u-1],a[u]);break;case 90:this.$=a[u-3],i.setLink(a[u-2],a[u-1],a[u]);break;case 91:this.$=a[u-3],i.setLink(a[u-2],a[u-1]),i.setTooltip(a[u-2],a[u]);break;case 92:this.$=a[u-4],i.setLink(a[u-3],a[u-2],a[u]),i.setTooltip(a[u-3],a[u-1]);break;case 95:this.$=a[u-3],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 96:this.$=a[u-4],i.setClickEvent(a[u-3],a[u-2],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 97:this.$=a[u-3],i.setLink(a[u-2],a[u]);break;case 98:this.$=a[u-4],i.setLink(a[u-3],a[u-1],a[u]);break;case 99:this.$=a[u-4],i.setLink(a[u-3],a[u-1]),i.setTooltip(a[u-3],a[u]);break;case 100:this.$=a[u-5],i.setLink(a[u-4],a[u-2],a[u]),i.setTooltip(a[u-4],a[u-1]);break;case 101:this.$=a[u-2],i.setCssStyle(a[u-1],a[u]);break;case 102:i.setCssClass(a[u-1],a[u]);break;case 104:a[u-2].push(a[u]),this.$=a[u-2]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,48:r,51:u,52:l,54:o,56:h,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:E,83:f,86:T,100:D,102:F,103:B},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(_,[2,5],{8:[1,48]}),{8:[1,49]},t($,[2,19],{22:[1,50]}),t($,[2,21]),t($,[2,22]),t($,[2,23]),t($,[2,24]),t($,[2,25]),t($,[2,26]),t($,[2,27]),t($,[2,28]),t($,[2,29]),t($,[2,30]),{34:[1,51]},{36:[1,52]},t($,[2,33]),t($,[2,59],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:x,69:S,70:L,71:N,72:v,73:I,74:w}),{39:[1,65]},t(O,[2,43],{39:[1,67],44:[1,66],46:[1,68]}),t($,[2,61]),t($,[2,62]),{16:69,60:p,86:T,100:D,102:F},{16:39,17:40,19:70,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:71,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:72,60:p,86:T,100:D,102:F,103:B},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:T,100:D,102:F,103:B},{13:R,55:76},{58:78,60:[1,79]},t($,[2,72]),t($,[2,73]),t($,[2,74]),t($,[2,75]),t(K,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:T,100:D,102:F,103:B}),t(K,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:T,100:D,102:F,103:B},{16:39,17:40,19:87,60:p,86:T,100:D,102:F,103:B},t(P,[2,129]),t(P,[2,130]),t(P,[2,131]),t(P,[2,132]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,133]),t(_,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:e,35:s,37:i,42:n,46:a,48:r,51:u,52:l,54:o,56:h,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:E,83:f,86:T,100:D,102:F,103:B}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:e,35:s,37:i,38:22,42:n,43:23,46:a,48:r,51:u,52:l,54:o,56:h,57:d,60:p,62:A,63:y,64:g,65:m,75:b,76:C,78:k,82:E,83:f,86:T,100:D,102:F,103:B},t($,[2,20]),t($,[2,31]),t($,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:T,100:D,102:F,103:B},{53:92,66:56,67:57,68:x,69:S,70:L,71:N,72:v,73:I,74:w},t($,[2,60]),{67:93,73:I,74:w},t(M,[2,79],{66:94,68:x,69:S,70:L,71:N,72:v}),t(G,[2,80]),t(G,[2,81]),t(G,[2,82]),t(G,[2,83]),t(G,[2,84]),t(U,[2,85]),t(U,[2,86]),{8:[1,96],24:97,30:98,40:95,43:23,48:r,54:o,56:h},{16:99,60:p,86:T,100:D,102:F},{41:[1,101],45:100,51:Y},{16:103,60:p,86:T,100:D,102:F},{47:[1,104]},{13:[1,105]},{13:[1,106]},{79:[1,107],81:[1,108]},{22:z,50:Q,59:109,60:W,82:j,84:110,85:111,86:X,87:H,88:V,89:q,90:J},{60:[1,121]},{13:R,55:122},t(O,[2,68]),t(O,[2,134]),{22:z,50:Q,59:123,60:W,61:[1,124],82:j,84:110,85:111,86:X,87:H,88:V,89:q,90:J},t(Z,[2,70]),{16:39,17:40,19:125,60:p,86:T,100:D,102:F,103:B},t(K,[2,16]),t(K,[2,17]),t(K,[2,18]),{39:[2,36]},{15:127,16:85,17:86,18:[1,126],39:[2,9],60:p,86:T,100:D,102:F,103:B},{39:[2,10]},t(tt,[2,51],{11:128,12:[1,129]}),t(_,[2,7]),{9:[1,130]},t(et,[2,63]),{16:39,17:40,19:131,60:p,86:T,100:D,102:F,103:B},{13:[1,133],16:39,17:40,19:132,60:p,86:T,100:D,102:F,103:B},t(M,[2,78],{66:134,68:x,69:S,70:L,71:N,72:v}),t(M,[2,77]),{41:[1,135]},{24:97,30:98,40:136,43:23,48:r,54:o,56:h},{8:[1,137],41:[2,37]},{8:[1,138],41:[2,40]},t(O,[2,44],{39:[1,139]}),{41:[1,140]},t(O,[2,46]),{41:[2,57],45:141,51:Y},{47:[1,142]},{16:39,17:40,19:143,60:p,86:T,100:D,102:F,103:B},t($,[2,87],{13:[1,144]}),t($,[2,89],{13:[1,146],77:[1,145]}),t($,[2,93],{13:[1,147],80:[1,148]}),{13:[1,149]},t($,[2,101],{61:st}),t(it,[2,103],{85:151,22:z,50:Q,60:W,82:j,86:X,87:H,88:V,89:q,90:J}),t(nt,[2,105]),t(nt,[2,107]),t(nt,[2,108]),t(nt,[2,109]),t(nt,[2,110]),t(nt,[2,111]),t(nt,[2,112]),t(nt,[2,113]),t(nt,[2,114]),t(nt,[2,115]),t($,[2,102]),t(O,[2,67]),t($,[2,69],{61:st}),{60:[1,152]},t(K,[2,14]),{15:153,16:85,17:86,60:p,86:T,100:D,102:F,103:B},{39:[2,12]},t(tt,[2,52]),{13:[1,154]},{1:[2,4]},t(et,[2,65]),t(et,[2,64]),{16:39,17:40,19:155,60:p,86:T,100:D,102:F,103:B},t(M,[2,76]),t($,[2,34]),{41:[1,156]},{24:97,30:98,40:157,41:[2,38],43:23,48:r,54:o,56:h},{24:97,30:98,40:158,41:[2,41],43:23,48:r,54:o,56:h},{45:159,51:Y},t(O,[2,45]),{41:[2,58]},t(O,[2,48],{39:[1,160]}),t($,[2,56]),t($,[2,88]),t($,[2,90]),t($,[2,91],{77:[1,161]}),t($,[2,94]),t($,[2,95],{13:[1,162]}),t($,[2,97],{13:[1,164],77:[1,163]}),{22:z,50:Q,60:W,82:j,84:165,85:111,86:X,87:H,88:V,89:q,90:J},t(nt,[2,106]),t(Z,[2,71]),{39:[2,11]},{14:[1,166]},t(et,[2,66]),t($,[2,35]),{41:[2,39]},{41:[2,42]},{41:[1,167]},{41:[1,169],45:168,51:Y},t($,[2,92]),t($,[2,96]),t($,[2,98]),t($,[2,99],{77:[1,170]}),t(it,[2,104],{85:151,22:z,50:Q,60:W,82:j,86:X,87:H,88:V,89:q,90:J}),t(tt,[2,8]),t(O,[2,47]),{41:[1,171]},t(O,[2,50]),t($,[2,100]),t(O,[2,49])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],84:[2,36],86:[2,10],127:[2,12],130:[2,4],141:[2,58],153:[2,11],157:[2,39],158:[2,42]},parseError:(0,c.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,c.K2)(function(t){var e=this,s=[0],i=[],n=[null],a=[],r=this.table,u="",l=0,o=0,h=0,d=a.slice.call(arguments,1),p=Object.create(this.lexer),A={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(A.yy[y]=this.yy[y]);p.setInput(t,A.yy),A.yy.lexer=p,A.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var g=p.yylloc;a.push(g);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof A.yy.parseError?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,c.K2)(b,"lex");for(var C,k,E,f,T,D,F,B,_,$={};;){if(E=s[s.length-1],this.defaultActions[E]?f=this.defaultActions[E]:(null==C&&(C=b()),f=r[E]&&r[E][C]),void 0===f||!f.length||!f[0]){var x="";for(D in _=[],r[E])this.terminals_[D]&&D>2&&_.push("'"+this.terminals_[D]+"'");x=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[C]||C)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==C?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(x,{text:p.match,token:this.terminals_[C]||C,line:p.yylineno,loc:g,expected:_})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+C);switch(f[0]){case 1:s.push(C),n.push(p.yytext),a.push(p.yylloc),s.push(f[1]),C=null,k?(C=k,k=null):(o=p.yyleng,u=p.yytext,l=p.yylineno,g=p.yylloc,h>0&&h--);break;case 2:if(F=this.productions_[f[1]][1],$.$=n[n.length-F],$._$={first_line:a[a.length-(F||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(F||1)].first_column,last_column:a[a.length-1].last_column},m&&($._$.range=[a[a.length-(F||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[u,o,l,A.yy,f[1],n,a].concat(d))))return T;F&&(s=s.slice(0,-1*F*2),n=n.slice(0,-1*F),a=a.slice(0,-1*F)),s.push(this.productions_[f[1]][0]),n.push($.$),a.push($._$),B=r[s[s.length-2]][s[s.length-1]],s.push(B);break;case 3:return!0}}return!0},"parse")},rt=function(){return{EOF:1,parseError:(0,c.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;ae[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,s,i){switch(s){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:case 5:case 14:case 31:case 36:case 40:case 47:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 19:case 22:case 24:case 58:case 61:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 35:return 8;case 15:case 16:return 7;case 17:case 37:case 45:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 23:return 80;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:case 39:return this.popState(),8;case 32:return this.begin("namespace-body"),39;case 33:case 43:return this.popState(),41;case 34:case 44:return"EOF_IN_STRUCT";case 38:return this.begin("class"),48;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 46:return"OPEN_IN_STRUCT";case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 46;case 56:return 47;case 57:return 81;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:case 65:case 66:case 67:return 77;case 68:case 69:return 69;case 70:case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:case 85:return 89;case 86:return 90;case 87:case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:case 96:return 50;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}}}();function ut(){this.yy={}}return at.lexer=rt,(0,c.K2)(ut,"Parser"),ut.prototype=at,at.Parser=ut,new ut}();p.parser=p;var A=p,y=["#","+","~","-",""],g=class{static{(0,c.K2)(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="";const s=(0,o.jZ)(t,(0,o.D7)());this.parseMember(s)}getDisplayDetails(){let t=this.visibility+(0,o.QO)(this.id);"method"===this.memberType&&(t+=`(${(0,o.QO)(this.parameters.trim())})`,this.returnType&&(t+=" : "+(0,o.QO)(this.returnType))),t=t.trim();return{displayText:t,cssStyle:this.parseClassifier()}}parseMember(t){let e="";if("method"===this.memberType){const s=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(s){const t=s[1]?s[1].trim():"";if(y.includes(t)&&(this.visibility=t),this.id=s[2],this.parameters=s[3]?s[3].trim():"",e=s[4]?s[4].trim():"",this.returnType=s[5]?s[5].trim():"",""===e){const t=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(t)&&(e=t,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const s=t.length,i=t.substring(0,1),n=t.substring(s-1);y.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?s:s-1)}this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const s=`${this.visibility?"\\"+this.visibility:""}${(0,o.QO)(this.id)}${"method"===this.memberType?`(${(0,o.QO)(this.parameters)})${this.returnType?" : "+(0,o.QO)(this.returnType):""}`:""}`;this.text=s.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},m="classId-",b=0,C=(0,c.K2)(t=>o.Y2.sanitizeText(t,(0,o.D7)()),"sanitizeText"),k=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=(0,c.K2)(t=>{const e=(0,n.Ck)();(0,h.Ltv)(t).select("svg").selectAll("g").filter(function(){return null!==(0,h.Ltv)(this).attr("title")}).on("mouseover",t=>{const s=(0,h.Ltv)(t.currentTarget),i=s.attr("title");if(!i)return;const n=t.currentTarget.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(d.A.sanitize(i)).style("left",`${window.scrollX+n.left+n.width/2}px`).style("top",`${window.scrollY+n.bottom+4}px`),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,h.Ltv)(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=o.SV,this.getAccTitle=o.iN,this.setAccDescription=o.EI,this.getAccDescription=o.m7,this.setDiagramTitle=o.ke,this.getDiagramTitle=o.ab,this.getConfig=(0,c.K2)(()=>(0,o.D7)().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{(0,c.K2)(this,"ClassDB")}splitClassNameAndType(t){const e=o.Y2.sanitizeText(t,(0,o.D7)());let s="",i=e;if(e.indexOf("~")>0){const t=e.split("~");i=C(t[0]),s=C(t[1])}return{className:i,type:s}}setClassLabel(t,e){const s=o.Y2.sanitizeText(t,(0,o.D7)());e&&(e=C(e));const{className:i}=this.splitClassNameAndType(s);this.classes.get(i).label=e,this.classes.get(i).text=`${e}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){const e=o.Y2.sanitizeText(t,(0,o.D7)()),{className:s,type:i}=this.splitClassNameAndType(e);if(this.classes.has(s))return;const n=o.Y2.sanitizeText(s,(0,o.D7)());this.classes.set(n,{id:n,type:i,label:n,text:`${n}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:m+n+"-"+b}),b++}addInterface(t,e){const s={id:`interface${this.interfaces.length}`,label:t,classId:e};this.interfaces.push(s)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){const e=o.Y2.sanitizeText(t,(0,o.D7)());if(this.classes.has(e)){const t=this.classes.get(e).domId;return this.diagramId?`${this.diagramId}-${t}`:t}throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.diagramId="",this.direction="TB",(0,o.IU)()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){const e="number"==typeof t?`note${t}`:t;return this.notes.get(e)}getNotes(){return this.notes}addRelation(t){c.Rm.debug("Adding relation: "+JSON.stringify(t));const e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=o.Y2.sanitizeText(t.relationTitle1.trim(),(0,o.D7)()),t.relationTitle2=o.Y2.sanitizeText(t.relationTitle2.trim(),(0,o.D7)()),this.relations.push(t)}addAnnotation(t,e){const s=this.splitClassNameAndType(t).className;this.classes.get(s).annotations.push(e)}addMember(t,e){this.addClass(t);const s=this.splitClassNameAndType(t).className,i=this.classes.get(s);if("string"==typeof e){const t=e.trim();t.startsWith("<<")&&t.endsWith(">>")?i.annotations.push(C(t.substring(2,t.length-2))):t.indexOf(")")>0?i.methods.push(new g(t,"method")):t&&i.members.push(new g(t,"attribute"))}}addMembers(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(e=>this.addMember(t,e)))}addNote(t,e){const s=this.notes.size,i={id:`note${s}`,class:e,text:t,index:s};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),C(t.trim())}setCssClass(t,e){t.split(",").forEach(t=>{let s=t;/\d/.exec(t[0])&&(s=m+s);const i=this.classes.get(s);i&&(i.cssClasses+=" "+e)})}defineClass(t,e){for(const s of t){let t=this.styleClasses.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.styleClasses.set(s,t)),e&&e.forEach(e=>{if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.classes.forEach(t=>{t.cssClasses.includes(s)&&t.styles.push(...e.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=C(e))})}getTooltip(t,e){return e&&this.namespaces.has(e)?this.namespaces.get(e).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,e,s){const i=(0,o.D7)();t.split(",").forEach(t=>{let n=t;/\d/.exec(t[0])&&(n=m+n);const a=this.classes.get(n);a&&(a.link=l._K.formatUrl(e,i),"sandbox"===i.securityLevel?a.linkTarget="_top":a.linkTarget="string"==typeof s?C(s):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFunc(t,e,s),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,e,s){const i=o.Y2.sanitizeText(t,(0,o.D7)());if("loose"!==(0,o.D7)().securityLevel)return;if(void 0===e)return;const n=i;if(this.classes.has(n)){let t=[];if("string"==typeof s){t=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{const s=this.lookUpDomId(n),i=document.querySelector(`[id="${s}"]`);null!==i&&i.addEventListener("click",()=>{l._K.runFunc(e,...t)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,notes:new Map,children:new Map,domId:m+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e,s){if(this.namespaces.has(t)){for(const s of e){const{className:e}=this.splitClassNameAndType(s),i=this.getClass(e);i.parent=t,this.namespaces.get(t).classes.set(e,i)}for(const e of s){const s=this.getNote(e);s.parent=t,this.namespaces.get(t).notes.set(e,s)}}}setCssStyle(t,e){const s=this.classes.get(t);if(e&&s)for(const i of e)i.includes(",")?s.styles.push(...i.split(",")):s.styles.push(i)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){const t=[],e=[],s=(0,o.D7)();for(const n of this.namespaces.values()){const e={id:n.id,label:n.id,isGroup:!0,padding:s.class.padding??16,shape:"rect",cssStyles:[],look:s.look};t.push(e)}for(const n of this.classes.values()){const e={...n,type:void 0,isGroup:!1,parentId:n.parent,look:s.look};t.push(e)}for(const n of this.notes.values()){const i={id:n.id,label:n.text,isGroup:!1,shape:"note",padding:s.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${s.themeVariables.noteBkgColor}`,`stroke: ${s.themeVariables.noteBorderColor}`],look:s.look,parentId:n.parent,labelType:"markdown"};t.push(i);const a=this.classes.get(n.class)?.id;if(a){const t={id:`edgeNote${n.index}`,start:n.id,end:a,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:s.look};e.push(t)}}for(const n of this.interfaces){const e={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:s.look};t.push(e)}let i=0;for(const n of this.relations){i++;const t={id:(0,l.rY)(n.id1,n.id2,{prefix:"id",counter:i}),start:n.id1,end:n.id2,type:"normal",label:n.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(n.relation.type1),arrowTypeEnd:this.getArrowMarker(n.relation.type2),startLabelRight:"none"===n.relationTitle1?"":n.relationTitle1,endLabelLeft:"none"===n.relationTitle2?"":n.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:n.style||"",pattern:1==n.relation.lineType?"dashed":"solid",look:s.look,labelType:"markdown"};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:this.getDirection()}}},E=(0,c.K2)(t=>`g.classGroup text {\n fill: ${t.nodeBorder||t.classText};\n stroke: none;\n font-family: ${t.fontFamily};\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n\n.nodeLabel, .edgeLabel {\n color: ${t.classText};\n}\n\n.noteLabel .nodeLabel, .noteLabel .edgeLabel {\n color: ${t.noteTextColor};\n}\n.edgeLabel .label rect {\n fill: ${t.mainBkg};\n}\n.label text {\n fill: ${t.classText};\n}\n\n.labelBkg {\n background: ${t.mainBkg};\n}\n.edgeLabel .label span {\n background: ${t.mainBkg};\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth};\n }\n\n\n.divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n}\n\ng.classGroup line {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ${t.mainBkg};\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ${t.nodeBorder};\n font-size: 10px;\n}\n\n.relation {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth};\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n.dotted-line{\n stroke-dasharray: 1 2;\n}\n\n[id$="-compositionStart"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-compositionEnd"], .composition {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyStart"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-dependencyEnd"], .dependency {\n fill: ${t.lineColor} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionStart"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-extensionEnd"], .extension {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationStart"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-aggregationEnd"], .aggregation {\n fill: transparent !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopStart"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n[id$="-lollipopEnd"], .lollipop {\n fill: ${t.mainBkg} !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n line-height: initial;\n}\n\n.classTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n}\n\n.edgeLabel[data-look="neo"] {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n}\n ${(0,i.o)()}\n`,"getStyles"),f=(0,c.K2)((t,e="TB")=>{if(!t.doc)return e;let s=e;for(const i of t.doc)"dir"===i.stmt&&(s=i.value);return s},"getDir"),T={getClasses:(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,c.K2)(async function(t,e,s,i){c.Rm.info("REF0:"),c.Rm.info("Drawing class diagram (v3)",e);const{securityLevel:n,state:h,layout:d}=(0,o.D7)();i.db.setDiagramId(e);const p=i.db.getData(),A=(0,a.A)(e,n);p.type=i.type,p.layoutAlgorithm=(0,u.q7)(d),p.nodeSpacing=h?.nodeSpacing||50,p.rankSpacing=h?.rankSpacing||50,p.markers=["aggregation","extension","composition","dependency","lollipop"],p.diagramId=e,await(0,u.XX)(p,A);l._K.insertTitle(A,"classDiagramTitleText",h?.titleTopMargin??25,i.db.getDiagramTitle()),(0,r.P)(A,8,"classDiagram",h?.useMaxWidth??!0)},"draw"),getDir:f}},7330:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(8894),n=s(1485),a=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},3830:(t,e,s)=>{s.d(e,{P:()=>a});var i=s(5691),n=s(8894),a=(0,n.K2)((t,e,s,a)=>{t.attr("class",s);const{width:l,height:o,x:c,y:h}=r(t,e);(0,i.a$)(t,o,l,a);const d=u(c,h,l,o,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),r=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),u=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},7214:(t,e,s)=>{s.d(e,{o:()=>i});var i=(0,s(8894).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},8854:(t,e,s)=>{s.d(e,{CP:()=>h,Ck:()=>A,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>l,m:()=>o,tk:()=>u});var i=s(5691),n=s(8894),a=s(9627),r=s(1485),u=(0,n.K2)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)s.attr(i,e.attrs[i]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,n.K2)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};u(t,s).lower()},"drawBackgroundRect"),o=(0,n.K2)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const a=n.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),n},"drawText"),c=(0,n.K2)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const r=(0,a.J)(i);n.attr("xlink:href",r)},"drawImage"),h=(0,n.K2)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const r=(0,a.J)(i);n.attr("xlink:href",`#${r}`)},"drawEmbeddedImage"),d=(0,n.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),A=(0,n.K2)(()=>{let t=(0,r.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,r.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")}}]); \ No newline at end of file diff --git a/assets/js/8705.d6a6d1e2.js b/assets/js/8705.d6a6d1e2.js new file mode 100644 index 0000000..8eb9de9 --- /dev/null +++ b/assets/js/8705.d6a6d1e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8705],{3571:(e,a,l)=>{l.d(a,{K:()=>s});var r=Object.defineProperty,s=(e,a)=>r(e,"name",{value:a,configurable:!0})},8705:(e,a,l)=>{l.r(a),l.d(a,{default:()=>s});var r=(0,l(3571).K)(async()=>await Promise.all([l.e(1485),l.e(4266)]).then(l.bind(l,4266)),"loader"),s=[{name:"elk",loader:r,algorithm:"elk.layered"},...["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap"].map(e=>({name:e,loader:r,algorithm:e}))]}}]); \ No newline at end of file diff --git a/assets/js/8731.da0fb09f.js b/assets/js/8731.da0fb09f.js deleted file mode 100644 index 82124ae..0000000 --- a/assets/js/8731.da0fb09f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8731],{6087(e,t,n){e.exports=n(6439)},6439(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0;n(4615).default.install();const s=n(3281);i(n(3281),t);class o extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=o;class a extends s.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=a,t.createMessageConnection=function(e,t,n,r){return void 0===n&&(n=s.NullLogger),s.ConnectionStrategy.is(r)&&(r={connectionStrategy:r}),(0,s.createMessageConnection)(e,t,n,r)}},4615(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});const r=n(3281);class i extends r.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}i.emptyBuffer=new Uint8Array(0);class s{constructor(e){this.socket=e,this._onData=new r.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,r.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}onData(e){return this._onData.event(e)}}class o{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),r.Disposable.create(()=>this.socket.removeEventListener("close",e))}onError(e){return this.socket.addEventListener("error",e),r.Disposable.create(()=>this.socket.removeEventListener("error",e))}onEnd(e){return this.socket.addEventListener("end",e),r.Disposable.create(()=>this.socket.removeEventListener("end",e))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const a=new TextEncoder,c=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new o(e)}),console:console,timer:Object.freeze({setTimeout(e,t,...n){const r=setTimeout(e,t,...n);return{dispose:()=>clearTimeout(r)}},setImmediate(e,...t){const n=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(n)}},setInterval(e,t,...n){const r=setInterval(e,t,...n);return{dispose:()=>clearInterval(r)}}})});function l(){return c}!function(e){e.install=function(){r.RAL.install(c)}}(l||(l={})),t.default=l},3281(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const r=n(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return r.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return r.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return r.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return r.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return r.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return r.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return r.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return r.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return r.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return r.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return r.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return r.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return r.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return r.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return r.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return r.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return r.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return r.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return r.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return r.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return r.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return r.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return r.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return r.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return r.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return r.ParameterStructures}});const i=n(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=n(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const o=n(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return o.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return o.Emitter}});const a=n(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=n(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=n(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=n(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=n(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const h=n(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return h.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return h.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return h.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return h.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return h.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return h.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return h.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return h.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return h.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return h.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return h.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return h.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return h.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return h.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return h.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return h.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return h.MessageStrategy}});const f=n(9590);t.RAL=f.default},9850(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const r=n(9590),i=n(966),s=n(2676);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o||(t.CancellationToken=o={}));const a=Object.freeze(function(e,t){const n=(0,r.default)().timer.setTimeout(e.bind(t),0);return{dispose(){n.dispose()}}});class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=o.None}}},577(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const r=n(9590),i=n(966),s=n(6177),o=n(3352),a=n(2676),c=n(9850);var l,u,d,h,f,p,m,g,y,T,R,v,A,E,k,S,C,$,b;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u||(t.ProgressToken=u={})),function(e){e.type=new s.NotificationType("$/progress")}(d||(d={}));t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(h||(h={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(f||(t.Trace=f={})),function(e){e.Off="off",e.Messages="messages",e.Compact="compact",e.Verbose="verbose"}(p||(t.TraceValues=p={})),function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(f||(t.Trace=f={})),function(e){e.Text="text",e.JSON="json"}(m||(t.TraceFormat=m={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(m||(t.TraceFormat=m={})),function(e){e.type=new s.NotificationType("$/setTrace")}(g||(t.SetTraceNotification=g={})),function(e){e.type=new s.NotificationType("$/logTrace")}(y||(t.LogTraceNotification=y={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(T||(t.ConnectionErrors=T={}));class w extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,w.prototype)}}t.ConnectionError=w,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(R||(t.ConnectionStrategy=R={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(v||(t.IdCancellationReceiverStrategy=v={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&i.func(t.createCancellationTokenSource)&&(void 0===t.dispose||i.func(t.dispose))}}(A||(t.RequestCancellationReceiverStrategy=A={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return v.is(e)||A.is(e)}}(E||(t.CancellationReceiverStrategy=E={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(k||(t.CancellationSenderStrategy=k={})),function(e){e.Message=Object.freeze({receiver:E.Message,sender:k.Message}),e.is=function(e){const t=e;return t&&E.is(t.receiver)&&k.is(t.sender)}}(S||(t.CancellationStrategy=S={})),function(e){e.is=function(e){const t=e;return t&&i.func(t.handleMessage)}}(C||(t.MessageStrategy=C={})),function(e){e.is=function(e){const t=e;return t&&(S.is(t.cancellationStrategy)||R.is(t.connectionStrategy)||C.is(t.messageStrategy))}}($||(t.ConnectionOptions=$={})),function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(b||(b={})),t.createMessageConnection=function(e,n,p,R){const A=void 0!==p?p:t.NullLogger;let E=0,k=0,$=0;const x="2.0";let N;const I=new Map;let P;const _=new Map,L=new Map;let O,D,M=new o.LinkedMap,F=new Map,q=new Set,U=new Map,j=f.Off,G=m.Text,z=b.New;const K=new a.Emitter,B=new a.Emitter,W=new a.Emitter,V=new a.Emitter,H=new a.Emitter,Y=R&&R.cancellationStrategy?R.cancellationStrategy:S.Message;function X(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e,t){var n;s.Message.isRequest(t)?e.set(X(t.id),t):s.Message.isResponse(t)?e.set(null===(n=t.id)?"res-unknown-"+(++$).toString():"res-"+n.toString(),t):e.set("not-"+(++k).toString(),t)}function J(e){}function Z(){return z===b.Listening}function ee(){return z===b.Closed}function te(){return z===b.Disposed}function ne(){z!==b.New&&z!==b.Listening||(z=b.Closed,B.fire(void 0))}function re(){O||0===M.size||(O=(0,r.default)().timer.setImmediate(()=>{O=void 0,function(){if(0===M.size)return;const e=M.shift();try{const t=R?.messageStrategy;C.is(t)?t.handleMessage(e,ie):ie(e)}finally{re()}}()}))}function ie(e){s.Message.isRequest(e)?function(e){if(te())return;function t(t,r,i){const o={jsonrpc:x,id:e.id};t instanceof s.ResponseError?o.error=t.toJson():o.result=void 0===t?null:t,ae(o,r,i),n.write(o).catch(()=>A.error("Sending response failed."))}function r(t,r,i){const s={jsonrpc:x,id:e.id,error:t.toJson()};ae(s,r,i),n.write(s).catch(()=>A.error("Sending response failed."))}function o(t,r,i){void 0===t&&(t=null);const s={jsonrpc:x,id:e.id,result:t};ae(s,r,i),n.write(s).catch(()=>A.error("Sending response failed."))}!function(e){if(j===f.Off||!D)return;if(G===m.Text){let t;j!==f.Verbose&&j!==f.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),D.log(`Received request '${e.method} - (${e.id})'.`,t)}else le("receive-request",e)}(e);const a=I.get(e.method);let c,l;a&&(c=a.type,l=a.handler);const u=Date.now();if(l||N){const n=e.id??String(Date.now()),a=v.is(Y.receiver)?Y.receiver.createCancellationTokenSource(n):Y.receiver.createCancellationTokenSource(e);null!==e.id&&q.has(e.id)&&a.cancel(),null!==e.id&&U.set(n,a);try{let d;if(l)if(void 0===e.params){if(void 0!==c&&0!==c.numberOfParams)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${c.numberOfParams} params but received none.`),e.method,u);d=l(a.token)}else if(Array.isArray(e.params)){if(void 0!==c&&c.parameterStructures===s.ParameterStructures.byName)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);d=l(...e.params,a.token)}else{if(void 0!==c&&c.parameterStructures===s.ParameterStructures.byPosition)return void r(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);d=l(e.params,a.token)}else N&&(d=N(e.method,e.params,a.token));const h=d;d?h.then?h.then(r=>{U.delete(n),t(r,e.method,u)},t=>{U.delete(n),t instanceof s.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(U.delete(n),t(d,e.method,u)):(U.delete(n),o(d,e.method,u))}catch(d){U.delete(n),d instanceof s.ResponseError?t(d,e.method,u):d&&i.string(d.message)?r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${d.message}`),e.method,u):r(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):s.Message.isNotification(e)?function(e){if(te())return;let t,n;if(e.method===l.type.method){const t=e.params.id;return q.delete(t),void ce(e)}{const r=_.get(e.method);r&&(n=r.handler,t=r.type)}if(n||P)try{if(ce(e),n)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&A.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){const r=e.params;e.method===d.type.method&&2===r.length&&u.is(r[0])?n({token:r[0],value:r[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&A.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&A.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${r.length} arguments`)),n(...r))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&A.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else P&&P(e.method,e.params)}catch(r){r.message?A.error(`Notification handler '${e.method}' failed with message: ${r.message}`):A.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):s.Message.isResponse(e)?function(e){if(te())return;if(null===e.id)e.error?A.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):A.error("Received response message without id. No further error information provided.");else{const n=e.id,r=F.get(n);if(function(e,t){if(j===f.Off||!D)return;if(G===m.Text){let n;if(j!==f.Verbose&&j!==f.Compact||(e.error&&e.error.data?n=`Error data: ${oe(e.error.data)}\n\n`:e.result?n=`Result: ${oe(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){const r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";D.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else D.log(`Received response ${e.id} without active response promise.`,n)}else le("receive-response",e)}(e,r),void 0!==r){F.delete(n);try{if(e.error){const t=e.error;r.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(t){t.message?A.error(`Response handler '${r.method}' failed with message: ${t.message}`):A.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void A.error("Received empty message.");A.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,n=F.get(e);n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(ne),e.onError(function(e){K.fire([e,void 0,void 0])}),n.onClose(ne),n.onError(function(e){K.fire(e)});const se=e=>{try{if(s.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,r=X(t),i=M.get(r);if(s.Message.isRequest(i)){const s=R?.connectionStrategy,o=s&&s.cancelUndispatched?s.cancelUndispatched(i,J):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return M.delete(r),U.delete(t),o.id=i.id,ae(o,e.method,Date.now()),void n.write(o).catch(()=>A.error("Sending response for canceled message failed."))}const o=U.get(t);if(void 0!==o)return o.cancel(),void ce(e);q.add(t)}Q(M,e)}finally{re()}};function oe(e){if(null!=e)switch(j){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}function ae(e,t,n){if(j!==f.Off&&D)if(G===m.Text){let r;j!==f.Verbose&&j!==f.Compact||(e.error&&e.error.data?r=`Error data: ${oe(e.error.data)}\n\n`:e.result?r=`Result: ${oe(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),D.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else le("send-response",e)}function ce(e){if(j!==f.Off&&D&&e.method!==y.type.method)if(G===m.Text){let t;j!==f.Verbose&&j!==f.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Received notification '${e.method}'.`,t)}else le("receive-notification",e)}function le(e,t){if(!D||j===f.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};D.log(n)}function ue(){if(ee())throw new w(T.Closed,"Connection is closed.");if(te())throw new w(T.Disposed,"Connection is disposed.")}function de(e){return void 0===e?null:e}function he(e){return null===e?void 0:e}function fe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pe(e,t){switch(e){case s.ParameterStructures.auto:return fe(t)?he(t):[de(t)];case s.ParameterStructures.byName:if(!fe(t))throw new Error("Received parameters by name but param is not an object literal.");return he(t);case s.ParameterStructures.byPosition:return[de(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function me(e,t){let n;const r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=pe(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{let r,o;if(ue(),i.string(e)){r=e;const n=t[0];let i=0,a=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(i=1,a=n);let c=t.length;const l=c-i;switch(l){case 0:o=void 0;break;case 1:o=pe(a,t[i]);break;default:if(a===s.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);o=t.slice(i,c).map(e=>de(e))}}else{const n=t;r=e.method,o=me(e,n)}const a={jsonrpc:x,method:r,params:o};return function(e){if(j!==f.Off&&D)if(G===m.Text){let t;j!==f.Verbose&&j!==f.Compact||(t=e.params?`Params: ${oe(e.params)}\n\n`:"No parameters provided.\n\n"),D.log(`Sending notification '${e.method}'.`,t)}else le("send-notification",e)}(a),n.write(a).catch(e=>{throw A.error("Sending notification failed."),e})},onNotification:(e,t)=>{let n;return ue(),i.func(e)?P=e:t&&(i.string(e)?(n=e,_.set(e,{type:void 0,handler:t})):(n=e.method,_.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==n?_.delete(n):P=void 0}}},onProgress:(e,t,n)=>{if(L.has(t))throw new Error(`Progress handler for token ${t} already registered`);return L.set(t,n),{dispose:()=>{L.delete(t)}}},sendProgress:(e,t,n)=>ge.sendNotification(d.type,{token:t,value:n}),onUnhandledProgress:V.event,sendRequest:(e,...t)=>{let r,o,a;if(ue(),function(){if(!Z())throw new Error("Call listen() first.")}(),i.string(e)){r=e;const n=t[0],i=t[t.length-1];let l=0,u=s.ParameterStructures.auto;s.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;c.CancellationToken.is(i)&&(d-=1,a=i);const h=d-l;switch(h){case 0:o=void 0;break;case 1:o=pe(u,t[l]);break;default:if(u===s.ParameterStructures.byName)throw new Error(`Received ${h} parameters for 'by Name' request parameter structure.`);o=t.slice(l,d).map(e=>de(e))}}else{const n=t;r=e.method,o=me(e,n);const i=e.numberOfParams;a=c.CancellationToken.is(n[i])?n[i]:void 0}const l=E++;let u;a&&(u=a.onCancellationRequested(()=>{const e=Y.sender.sendCancellation(ge,l);return void 0===e?(A.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{A.log(`Sending cancellation messages for id ${l} failed`)})}));const d={jsonrpc:x,id:l,method:r,params:o};return function(e){if(j!==f.Off&&D)if(G===m.Text){let t;j!==f.Verbose&&j!==f.Compact||!e.params||(t=`Params: ${oe(e.params)}\n\n`),D.log(`Sending request '${e.method} - (${e.id})'.`,t)}else le("send-request",e)}(d),"function"==typeof Y.sender.enableCancellation&&Y.sender.enableCancellation(d),new Promise(async(e,t)=>{const i={method:r,timerStart:Date.now(),resolve:t=>{e(t),Y.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),Y.sender.cleanup(l),u?.dispose()}};try{await n.write(d),F.set(l,i)}catch(o){throw A.error("Sending request failed."),i.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,o.message?o.message:"Unknown reason")),o}})},onRequest:(e,t)=>{ue();let n=null;return h.is(e)?(n=void 0,N=e):i.string(e)?(n=null,void 0!==t&&(n=e,I.set(e,{handler:t,type:void 0}))):void 0!==t&&(n=e.method,I.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==n&&(void 0!==n?I.delete(n):N=void 0)}}},hasPendingResponse:()=>F.size>0,trace:async(e,t,n)=>{let r=!1,s=m.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,s=n.traceFormat||m.Text)),j=e,G=s,D=j===f.Off?void 0:t,!r||ee()||te()||await ge.sendNotification(g.type,{value:f.toString(e)})},onError:K.event,onClose:B.event,onUnhandledNotification:W.event,onDispose:H.event,end:()=>{n.end()},dispose:()=>{if(te())return;z=b.Disposed,H.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of F.values())e.reject(t);F=new Map,U=new Map,q=new Set,M=new o.LinkedMap,i.func(n.dispose)&&n.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ue(),function(){if(Z())throw new w(T.AlreadyListening,"Connection is already listening")}(),z=b.Listening,e.listen(se)},inspect:()=>{(0,r.default)().console.log("inspect")}};return ge.onNotification(y.type,e=>{if(j===f.Off||!D)return;const t=j===f.Verbose||j===f.Compact;D.log(e.message,t?e.verbose:void 0)}),ge.onNotification(d.type,e=>{const t=L.get(e.token);t?t(e.value):V.fire(e)}),ge}},4019(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,function(e){e.create=function(e){return{dispose:e}}}(n||(t.Disposable=n={}))},2676(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const r=n(9590);var i;!function(e){const t={dispose(){}};e.None=function(){return t}}(i||(t.Event=i={}));class s{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||(this._callbacks=new s),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const r={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),r.dispose=o._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(n)&&n.push(r),r}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=o,o._noop=function(){}},966(e,t){function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every(e=>n(e))}},3352(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(r||(t.Touch=r={}));class i{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=r.None){const n=this._map.get(e);if(n)return t!==r.None&&this.touch(n,t),n.value}set(e,t,n=r.None){let i=this._map.get(e);if(i)i.value=t,n!==r.None&&this.touch(i,n);else{switch(i={key:e,value:t,next:void 0,previous:void 0},n){case r.None:this.addItemLast(i);break;case r.First:this.addItemFirst(i);break;case r.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const n=this._state;let r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this._state;let t=this._head;const n={[Symbol.iterator]:()=>n,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return n}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===r.First||t===r.Last)if(t===r.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===r.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(const[t,n]of e)this.set(t,n)}}t.LinkedMap=i;t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=r.AsNew){return super.get(e,t)}peek(e){return super.get(e,r.None)}set(e,t){return super.set(e,t,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0;t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,n=0,r=0,i=0;e:for(;nthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}const t=this.allocNative(e);let n=0;for(;e>0;){const r=this._chunks[0];if(r.byteLength>e){const i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}},9085(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const r=n(9590),i=n(966),s=n(2676),o=n(4323);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)}}(a||(t.MessageReader=a={}));class l{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l,function(e){e.fromOptions=function(e){let t,n;const i=new Map;let s;const o=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(n=e.contentDecoder,i.set(n.name,n)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,o.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)o.set(t.name,t)}return void 0===s&&(s=(0,r.default)().applicationJson.decoder,o.set(s.name,s)),{charset:t,contentDecoder:n,contentDecoders:i,contentTypeDecoder:s,contentTypeDecoders:o}}}(c||(c={}));t.ReadableStreamMessageReader=class extends l{constructor(e,t){super(),this.readable=e,this.options=c.fromOptions(t),this.buffer=(0,r.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new o.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error(`Header must provide a Content-Length property.\n${JSON.stringify(Object.fromEntries(e))}`));const n=parseInt(t);if(isNaN(n))return void this.fireError(new Error(`Content-Length value must be a number. Got ${t}`));this.nextMessageLength=n}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(t){this.fireError(t)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,r.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const r=n(9590),i=n(966),s=n(4323),o=n(2676);var a,c;!function(e){e.is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)}}(a||(t.MessageWriter=a={}));class l{constructor(){this.errorEmitter=new o.Emitter,this.closeEmitter=new o.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=l,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,r.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,r.default)().applicationJson.encoder}}}(c||(c={}));t.WriteableStreamMessageWriter=class extends l{constructor(e,t){super(),this.writable=e,this.options=c.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const n=[];return n.push("Content-Length: ",t.byteLength.toString(),"\r\n"),n.push("\r\n"),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(n)}catch(r){return this.handleError(r,e),Promise.reject(r)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const r=n(966);var i,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i||(t.ErrorCodes=i={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=o;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c;t.RequestType0=class extends c{constructor(e){super(e,0)}};t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.RequestType2=class extends c{constructor(e){super(e,2)}};t.RequestType3=class extends c{constructor(e){super(e,3)}};t.RequestType4=class extends c{constructor(e){super(e,4)}};t.RequestType5=class extends c{constructor(e){super(e,5)}};t.RequestType6=class extends c{constructor(e){super(e,6)}};t.RequestType7=class extends c{constructor(e){super(e,7)}};t.RequestType8=class extends c{constructor(e){super(e,8)}};t.RequestType9=class extends c{constructor(e){super(e,9)}};t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType0=class extends c{constructor(e){super(e,0)}};t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}};t.NotificationType2=class extends c{constructor(e){super(e,2)}};t.NotificationType3=class extends c{constructor(e){super(e,3)}};t.NotificationType4=class extends c{constructor(e){super(e,4)}};t.NotificationType5=class extends c{constructor(e){super(e,5)}};t.NotificationType6=class extends c{constructor(e){super(e,6)}};t.NotificationType7=class extends c{constructor(e){super(e,7)}};t.NotificationType8=class extends c{constructor(e){super(e,8)}};t.NotificationType9=class extends c{constructor(e){super(e,9)}},function(e){e.isRequest=function(e){const t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},e.isNotification=function(e){const t=e;return t&&r.string(t.method)&&void 0===e.id},e.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}}(s||(t.Message=s={}))},9590(e,t){let n;function r(){if(void 0===n)throw new Error("No runtime abstraction layer installed");return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");n=e}}(r||(r={})),t.default=r},4323(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const r=n(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,r.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const r=n(9850);var i;!function(e){e.Continue=0,e.Cancelled=1}(i||(i={}));t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=i.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const n=this.buffers.get(t);if(void 0===n)return;const r=new Int32Array(n,0,1);Atomics.store(r,0,i.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class s{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===i.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class o{constructor(e){this.token=new s(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new r.CancellationTokenSource:new o(t)}}},4512(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=n(6087);i(n(6087),t),i(n(8766),t),t.createProtocolConnection=function(e,t,n,r){return(0,s.createMessageConnection)(e,t,n,r)}},8766(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(n(6439),t),i(n(6203),t),i(n(372),t),i(n(1560),t);var s,o=n(1580);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return o.createProtocolConnection}}),function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800}(s||(t.LSPErrorCodes=s={}))},1580(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const r=n(6439);t.createProtocolConnection=function(e,t,n,i){return r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}},372(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const r=n(6439);var i;!function(e){e.clientToServer="clientToServer",e.serverToClient="serverToClient",e.both="both"}(i||(t.MessageDirection=i={}));t.RegistrationType=class{constructor(e){this.method=e}};class s extends r.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=s;class o extends r.RequestType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolRequestType=o;class a extends r.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=a;class c extends r.NotificationType{constructor(e){super(e,r.ParameterStructures.byName)}}t.ProtocolNotificationType=c},8765(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/prepareCallHierarchy",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.CallHierarchyPrepareRequest=i={})),function(e){e.method="callHierarchy/incomingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.CallHierarchyIncomingCallsRequest=s={})),function(e){e.method="callHierarchy/outgoingCalls",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.CallHierarchyOutgoingCallsRequest=o={}))},7672(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/documentColor",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DocumentColorRequest=i={})),function(e){e.method="textDocument/colorPresentation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.ColorPresentationRequest=s={}))},1660(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const r=n(372);var i;!function(e){e.method="workspace/configuration",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ConfigurationRequest=i={}))},6914(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/declaration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.DeclarationRequest=i={}))},6011(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const r=n(6439),i=n(6217),s=n(372);var o,a,c,l,u;!function(e){e.is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)}}(o||(t.DiagnosticServerCancellationData=o={})),function(e){e.Full="full",e.Unchanged="unchanged"}(a||(t.DocumentDiagnosticReportKind=a={})),function(e){e.method="textDocument/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(c||(t.DocumentDiagnosticRequest=c={})),function(e){e.method="workspace/diagnostic",e.messageDirection=s.MessageDirection.clientToServer,e.type=new s.ProtocolRequestType(e.method),e.partialResult=new r.ProgressType}(l||(t.WorkspaceDiagnosticRequest=l={})),function(e){e.method="workspace/diagnostic/refresh",e.messageDirection=s.MessageDirection.serverToClient,e.type=new s.ProtocolRequestType0(e.method)}(u||(t.DiagnosticRefreshRequest=u={}))},9840(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const r=n(372);var i,s,o,a,c,l,u;!function(e){e.file="file",e.folder="folder"}(i||(t.FileOperationPatternKind=i={})),function(e){e.method="workspace/willCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.WillCreateFilesRequest=s={})),function(e){e.method="workspace/didCreateFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(o||(t.DidCreateFilesNotification=o={})),function(e){e.method="workspace/willRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(a||(t.WillRenameFilesRequest=a={})),function(e){e.method="workspace/didRenameFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(c||(t.DidRenameFilesNotification=c={})),function(e){e.method="workspace/didDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(l||(t.DidDeleteFilesNotification=l={})),function(e){e.method="workspace/willDeleteFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(u||(t.WillDeleteFilesRequest=u={}))},2874(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/foldingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.FoldingRangeRequest=i={})),function(e){e.method="workspace/foldingRange/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.FoldingRangeRefreshRequest=s={}))},9574(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/implementation",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.ImplementationRequest=i={}))},7752(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const r=n(372);var i,s,o;!function(e){e.method="textDocument/inlayHint",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlayHintRequest=i={})),function(e){e.method="inlayHint/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(s||(t.InlayHintResolveRequest=s={})),function(e){e.method="workspace/inlayHint/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(o||(t.InlayHintRefreshRequest=o={}))},3307(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineCompletionRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/inlineCompletion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineCompletionRequest=i={}))},3124(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const r=n(372);var i,s;!function(e){e.method="textDocument/inlineValue",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.InlineValueRequest=i={})),function(e){e.method="workspace/inlineValue/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}(s||(t.InlineValueRefreshRequest=s={}))},1560(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRefreshRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangesFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.InlineCompletionRequest=t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=void 0;const r=n(372),i=n(6203),s=n(6217),o=n(9574);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return o.ImplementationRequest}});const a=n(8461);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return a.TypeDefinitionRequest}});const c=n(9935);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return c.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return c.DidChangeWorkspaceFoldersNotification}});const l=n(1660);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const u=n(7672);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return u.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return u.ColorPresentationRequest}});const d=n(2874);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return d.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return d.FoldingRangeRefreshRequest}});const h=n(6914);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return h.DeclarationRequest}});const f=n(3487);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const p=n(2687);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return p.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return p.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return p.WorkDoneProgressCancelNotification}});const m=n(8765);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return m.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return m.CallHierarchyPrepareRequest}});const g=n(2478);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return g.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return g.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return g.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return g.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return g.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return g.SemanticTokensRegistrationType}});const y=n(908);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return y.ShowDocumentRequest}});const T=n(5316);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return T.LinkedEditingRangeRequest}});const R=n(9840);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return R.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return R.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return R.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return R.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return R.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return R.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return R.WillDeleteFilesRequest}});const v=n(9047);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return v.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return v.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return v.MonikerRequest}});const A=n(645);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return A.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return A.TypeHierarchySupertypesRequest}});const E=n(3124);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return E.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return E.InlineValueRefreshRequest}});const k=n(7752);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return k.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return k.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return k.InlayHintRefreshRequest}});const S=n(6011);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return S.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return S.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return S.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return S.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return S.DiagnosticRefreshRequest}});const C=n(3557);Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return C.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return C.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return C.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return C.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return C.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return C.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return C.DidCloseNotebookDocumentNotification}});const $=n(3307);var b,w,x,N,I,P,_,L,O,D,M,F,q,U,j,G,z,K,B,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,fe,pe,me,ge,ye,Te,Re,ve,Ae,Ee,ke,Se,Ce,$e,be,we,xe,Ne,Ie,Pe,_e,Le,Oe,De,Me;Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return $.InlineCompletionRequest}}),function(e){e.is=function(e){const t=e;return s.string(t)||s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(b||(t.TextDocumentFilter=b={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}(w||(t.NotebookDocumentFilter=w={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||w.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(x||(t.NotebookCellTextDocumentFilter=x={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!b.is(t)&&!x.is(t))return!1;return!0}}(N||(t.DocumentSelector=N={})),function(e){e.method="client/registerCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(I||(t.RegistrationRequest=I={})),function(e){e.method="client/unregisterCapability",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(P||(t.UnregistrationRequest=P={})),function(e){e.Create="create",e.Rename="rename",e.Delete="delete"}(_||(t.ResourceOperationKind=_={})),function(e){e.Abort="abort",e.Transactional="transactional",e.TextOnlyTransactional="textOnlyTransactional",e.Undo="undo"}(L||(t.FailureHandlingKind=L={})),function(e){e.UTF8="utf-8",e.UTF16="utf-16",e.UTF32="utf-32"}(O||(t.PositionEncodingKind=O={})),function(e){e.hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0}}(D||(t.StaticRegistrationOptions=D={})),function(e){e.is=function(e){const t=e;return t&&(null===t.documentSelector||N.is(t.documentSelector))}}(M||(t.TextDocumentRegistrationOptions=M={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},e.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)}}(F||(t.WorkDoneProgressOptions=F={})),function(e){e.method="initialize",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(q||(t.InitializeRequest=q={})),function(e){e.unknownProtocolVersion=1}(U||(t.InitializeErrorCodes=U={})),function(e){e.method="initialized",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(j||(t.InitializedNotification=j={})),function(e){e.method="shutdown",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType0(e.method)}(G||(t.ShutdownRequest=G={})),function(e){e.method="exit",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType0(e.method)}(z||(t.ExitNotification=z={})),function(e){e.method="workspace/didChangeConfiguration",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(K||(t.DidChangeConfigurationNotification=K={})),function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5}(B||(t.MessageType=B={})),function(e){e.method="window/showMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(W||(t.ShowMessageNotification=W={})),function(e){e.method="window/showMessageRequest",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType(e.method)}(V||(t.ShowMessageRequest=V={})),function(e){e.method="window/logMessage",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(H||(t.LogMessageNotification=H={})),function(e){e.method="telemetry/event",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(Y||(t.TelemetryEventNotification=Y={})),function(e){e.None=0,e.Full=1,e.Incremental=2}(X||(t.TextDocumentSyncKind=X={})),function(e){e.method="textDocument/didOpen",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Q||(t.DidOpenTextDocumentNotification=Q={})),function(e){e.isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}(J||(t.TextDocumentContentChangeEvent=J={})),function(e){e.method="textDocument/didChange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(Z||(t.DidChangeTextDocumentNotification=Z={})),function(e){e.method="textDocument/didClose",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(ee||(t.DidCloseTextDocumentNotification=ee={})),function(e){e.method="textDocument/didSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(te||(t.DidSaveTextDocumentNotification=te={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(ne||(t.TextDocumentSaveReason=ne={})),function(e){e.method="textDocument/willSave",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(re||(t.WillSaveTextDocumentNotification=re={})),function(e){e.method="textDocument/willSaveWaitUntil",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ie||(t.WillSaveTextDocumentWaitUntilRequest=ie={})),function(e){e.method="workspace/didChangeWatchedFiles",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method)}(se||(t.DidChangeWatchedFilesNotification=se={})),function(e){e.Created=1,e.Changed=2,e.Deleted=3}(oe||(t.FileChangeType=oe={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)}}(ae||(t.RelativePattern=ae={})),function(e){e.Create=1,e.Change=2,e.Delete=4}(ce||(t.WatchKind=ce={})),function(e){e.method="textDocument/publishDiagnostics",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolNotificationType(e.method)}(le||(t.PublishDiagnosticsNotification=le={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3}(ue||(t.CompletionTriggerKind=ue={})),function(e){e.method="textDocument/completion",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(de||(t.CompletionRequest=de={})),function(e){e.method="completionItem/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(he||(t.CompletionResolveRequest=he={})),function(e){e.method="textDocument/hover",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(fe||(t.HoverRequest=fe={})),function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3}(pe||(t.SignatureHelpTriggerKind=pe={})),function(e){e.method="textDocument/signatureHelp",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(me||(t.SignatureHelpRequest=me={})),function(e){e.method="textDocument/definition",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ge||(t.DefinitionRequest=ge={})),function(e){e.method="textDocument/references",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ye||(t.ReferencesRequest=ye={})),function(e){e.method="textDocument/documentHighlight",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Te||(t.DocumentHighlightRequest=Te={})),function(e){e.method="textDocument/documentSymbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Re||(t.DocumentSymbolRequest=Re={})),function(e){e.method="textDocument/codeAction",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ve||(t.CodeActionRequest=ve={})),function(e){e.method="codeAction/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ae||(t.CodeActionResolveRequest=Ae={})),function(e){e.method="workspace/symbol",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ee||(t.WorkspaceSymbolRequest=Ee={})),function(e){e.method="workspaceSymbol/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(ke||(t.WorkspaceSymbolResolveRequest=ke={})),function(e){e.method="textDocument/codeLens",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Se||(t.CodeLensRequest=Se={})),function(e){e.method="codeLens/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ce||(t.CodeLensResolveRequest=Ce={})),function(e){e.method="workspace/codeLens/refresh",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)}($e||(t.CodeLensRefreshRequest=$e={})),function(e){e.method="textDocument/documentLink",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(be||(t.DocumentLinkRequest=be={})),function(e){e.method="documentLink/resolve",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(we||(t.DocumentLinkResolveRequest=we={})),function(e){e.method="textDocument/formatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(xe||(t.DocumentFormattingRequest=xe={})),function(e){e.method="textDocument/rangeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ne||(t.DocumentRangeFormattingRequest=Ne={})),function(e){e.method="textDocument/rangesFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Ie||(t.DocumentRangesFormattingRequest=Ie={})),function(e){e.method="textDocument/onTypeFormatting",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Pe||(t.DocumentOnTypeFormattingRequest=Pe={})),function(e){e.Identifier=1}(_e||(t.PrepareSupportDefaultBehavior=_e={})),function(e){e.method="textDocument/rename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Le||(t.RenameRequest=Le={})),function(e){e.method="textDocument/prepareRename",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(Oe||(t.PrepareRenameRequest=Oe={})),function(e){e.method="workspace/executeCommand",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(De||(t.ExecuteCommandRequest=De={})),function(e){e.method="workspace/applyEdit",e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType("workspace/applyEdit")}(Me||(t.ApplyWorkspaceEditRequest=Me={}))},5316(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const r=n(372);var i;!function(e){e.method="textDocument/linkedEditingRange",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(i||(t.LinkedEditingRangeRequest=i={}))},9047(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const r=n(372);var i,s,o;!function(e){e.document="document",e.project="project",e.group="group",e.scheme="scheme",e.global="global"}(i||(t.UniquenessLevel=i={})),function(e){e.$import="import",e.$export="export",e.local="local"}(s||(t.MonikerKind=s={})),function(e){e.method="textDocument/moniker",e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method)}(o||(t.MonikerRequest=o={}))},3557(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const r=n(6203),i=n(6217),s=n(372);var o,a,c,l,u,d,h,f,p,m;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(o||(t.NotebookCellKind=o={})),function(e){e.create=function(e,t){const n={executionOrder:e};return!0!==t&&!1!==t||(n.success=t),n},e.is=function(e){const t=e;return i.objectLiteral(t)&&r.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&(e.executionOrder===t.executionOrder&&e.success===t.success)}}(a||(t.ExecutionSummary=a={})),function(e){function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(typeof e!=typeof n)return!1;if("object"!=typeof e)return!1;const r=Array.isArray(e),s=Array.isArray(n);if(r!==s)return!1;if(r&&s){if(e.length!==n.length)return!1;for(let r=0;rn(e))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},5186(e,t,n){function r(e){return e.charCodeAt(0)}function i(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function s(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t];e[t]=!0}function o(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function a(){throw Error("Internal Error - Should never get here!")}function c(e){return"Character"===e.type}n.d(t,{z:()=>g,H:()=>m});const l=[];for(let y=r("0");y<=r("9");y++)l.push(y);const u=[r("_")].concat(l);for(let y=r("a");y<=r("z");y++)u.push(y);for(let y=r("A");y<=r("Z");y++)u.push(y);const d=[r(" "),r("\f"),r("\n"),r("\r"),r("\t"),r("\v"),r("\t"),r("\xa0"),r("\u1680"),r("\u2000"),r("\u2001"),r("\u2002"),r("\u2003"),r("\u2004"),r("\u2005"),r("\u2006"),r("\u2007"),r("\u2008"),r("\u2009"),r("\u200a"),r("\u2028"),r("\u2029"),r("\u202f"),r("\u205f"),r("\u3000"),r("\ufeff")],h=/[0-9a-fA-F]/,f=/[0-9]/,p=/[1-9]/;class m{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");const t=this.disjunction();this.consumeChar("/");const n={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":s(n,"global");break;case"i":s(n,"ignoreCase");break;case"m":s(n,"multiLine");break;case"u":s(n,"unicode");break;case"y":s(n,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t,loc:this.loc(0)}}disjunction(){const e=[],t=this.idx;for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){const e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){const e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":let t;switch(this.consumeChar("?"),this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}}o(t);const n=this.disjunction();return this.consumeChar(")"),{type:t,value:n,loc:this.loc(e)}}return a()}quantifier(e=!1){let t;const n=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":const n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;o(t)}if(!0!==e||void 0!==t)return o(t)?("?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(n),t):void 0}atom(){let e;const t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group()}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),o(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):a()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[r("\n"),r("\r"),r("\u2028"),r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=l;break;case"D":e=l,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=u;break;case"W":e=u,t=!0}return o(e)?{type:"Set",value:e,complement:t}:a()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=r("\f");break;case"n":e=r("\n");break;case"r":e=r("\r");break;case"t":e=r("\t");break;case"v":e=r("\v")}return o(e)?{type:"Character",value:e}:a()}controlLetterEscapeAtom(){this.consumeChar("c");const e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:r(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:r(this.popChar())}}}characterClass(){const e=[];let t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){const t=this.classAtom();t.type;if(c(t)&&this.isRangeDash()){this.consumeChar("-");const n=this.classAtom();n.type;if(c(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class g{visitChildren(e){for(const t in e){const n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}},722(e,t,n){n.d(t,{b:()=>l});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.d$,c);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}(0,r.K2)(l,"createGitGraphServices")},8562(e,t,n){n.d(t,{d:()=>f});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},c=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,l=class extends r.dg{static{(0,r.K2)(this,"TreemapValueConverter")}runCustomConverter(e,t,n){if("NUMBER2"===e.name)return parseFloat(t.replace(/,/g,""));if("SEPARATOR"===e.name)return t.substring(1,t.length-1);if("STRING2"===e.name)return t.substring(1,t.length-1);if("INDENTATION"===e.name)return t.length;if("ClassDef"===e.name){if("string"!=typeof t)return t;const e=c.exec(t);if(e)return{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}}}};function u(e){const t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){const e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}(0,r.K2)(u,"registerValidationChecks");var d=class{static{(0,r.K2)(this,"TreemapValidator")}checkSingleRoot(e,t){let n;for(const r of e.TreemapRows)r.item&&(void 0===n&&void 0===r.indent?n=0:(void 0===r.indent||void 0!==n&&n>=parseInt(r.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},h={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new l,"ValueConverter")},validation:{TreemapValidator:(0,r.K2)(()=>new d,"TreemapValidator")}};function f(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.XE,h);return t.ServiceRegistry.register(n),u(n),{shared:t,Treemap:n}}(0,r.K2)(f,"createTreemapServices")},2963(e,t,n){n.d(t,{v:()=>l});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.FZ,c);return t.ServiceRegistry.register(n),{shared:t,Info:n}}(0,r.K2)(l,"createInfoServices")},888(e,t,n){n.d(t,{f:()=>u});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},c=class extends r.dg{static{(0,r.K2)(this,"PieValueConverter")}runCustomConverter(e,t,n){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.D_,l);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}(0,r.K2)(u,"createPieServices")},5626(e,t,n){n.d(t,{$:()=>l});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.p5,c);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}(0,r.K2)(l,"createPacketServices")},808(e,t,n){n.d(t,{mR:()=>kn,dg:()=>An,wV:()=>fn,Tm:()=>En,d$:()=>pn,FZ:()=>mn,sr:()=>hn,p5:()=>gn,D_:()=>yn,Bg:()=>Tn,XE:()=>Rn,K2:()=>E});var r=n(2479),i=n(1999),s=n(9364),o=n(2151),a=n(4298),c=n(7608);const l={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},u={AstReflection:()=>new o.QX};function d(e){const t=function(){const e=(0,s.WQ)((0,i.u)(a.D),u),t=(0,s.WQ)((0,i.t)({shared:e}),l);return e.ServiceRegistry.register(t),t}(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,c.r.parse(`memory:/${n.name??"grammar"}.langium`)),n}var h,f,p,m,g,y,T,R=n(5033),v=n(1945),A=Object.defineProperty,E=(e,t)=>A(e,"name",{value:t,configurable:!0});(h||(h={})).Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[[\w ]+\]/},(f||(f={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/},(p||(p={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(m||(m={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(g||(g={})).Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(y||(y={})).Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/},(T||(T={})).Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/};h.Terminals,f.Terminals,p.Terminals,m.Terminals,g.Terminals,y.Terminals,T.Terminals;var k="Architecture",S="accDescr",C="accTitle",$="edges",b="groups",w="junctions",x="services",N="title";E(function(e){return Xt.isInstance(e,k)},"isArchitecture");var I="Axis",P="label",_="name",L="Branch",O="name",D="order";E(function(e){return Xt.isInstance(e,L)},"isBranch");var M="Checkout",F="branch",q="CherryPicking",U="id",j="parent",G="tags",z="ClassDefStatement",K="className",B="styleText",W="Commit",V="id",H="message",Y="tags",X="type";E(function(e){return Xt.isInstance(e,W)},"isCommit");var Q="Curve",J="entries",Z="label",ee="name",te="Direction",ne="accDescr",re="accTitle",ie="dir",se="statements",oe="title",ae="Edge",ce="lhsDir",le="lhsGroup",ue="lhsId",de="lhsInto",he="rhsDir",fe="rhsGroup",pe="rhsId",me="rhsInto",ge="title",ye="Entry",Te="axis",Re="value",ve="GitGraph",Ae="accDescr",Ee="accTitle",ke="statements",Se="title";E(function(e){return Xt.isInstance(e,ve)},"isGitGraph");var Ce="Group",$e="icon",be="id",we="in",xe="title",Ne="Info",Ie="accDescr",Pe="accTitle",_e="title";E(function(e){return Xt.isInstance(e,Ne)},"isInfo");var Le="Item",Oe="classSelector",De="name",Me="Junction",Fe="id",qe="in",Ue="Leaf",je="classSelector",Ge="name",ze="value",Ke="Merge",Be="branch",We="id",Ve="tags",He="type";E(function(e){return Xt.isInstance(e,Ke)},"isMerge");var Ye="Option",Xe="name",Qe="value",Je="Packet",Ze="accDescr",et="accTitle",tt="blocks",nt="title";E(function(e){return Xt.isInstance(e,Je)},"isPacket");var rt="PacketBlock",it="bits",st="end",ot="label",at="start";E(function(e){return Xt.isInstance(e,rt)},"isPacketBlock");var ct="Pie",lt="accDescr",ut="accTitle",dt="sections",ht="showData",ft="title";E(function(e){return Xt.isInstance(e,ct)},"isPie");var pt="PieSection",mt="label",gt="value";E(function(e){return Xt.isInstance(e,pt)},"isPieSection");var yt="Radar",Tt="accDescr",Rt="accTitle",vt="axes",At="curves",Et="options",kt="title",St="Section",Ct="classSelector",$t="name",bt="Service",wt="icon",xt="iconText",Nt="id",It="in",Pt="title",_t="Statement",Lt="Treemap",Ot="accDescr",Dt="accTitle",Mt="title",Ft="TreemapRows";E(function(e){return Xt.isInstance(e,Lt)},"isTreemap");var qt,Ut,jt,Gt,zt,Kt,Bt,Wt="TreemapRow",Vt="indent",Ht="item",Yt=class extends r.kD{constructor(){super(...arguments),this.types={Architecture:{name:k,properties:{accDescr:{name:S},accTitle:{name:C},edges:{name:$,defaultValue:[]},groups:{name:b,defaultValue:[]},junctions:{name:w,defaultValue:[]},services:{name:x,defaultValue:[]},title:{name:N}},superTypes:[]},Axis:{name:I,properties:{label:{name:P},name:{name:_}},superTypes:[]},Branch:{name:L,properties:{name:{name:O},order:{name:D}},superTypes:[_t]},Checkout:{name:M,properties:{branch:{name:F}},superTypes:[_t]},CherryPicking:{name:q,properties:{id:{name:U},parent:{name:j},tags:{name:G,defaultValue:[]}},superTypes:[_t]},ClassDefStatement:{name:z,properties:{className:{name:K},styleText:{name:B}},superTypes:[]},Commit:{name:W,properties:{id:{name:V},message:{name:H},tags:{name:Y,defaultValue:[]},type:{name:X}},superTypes:[_t]},Curve:{name:Q,properties:{entries:{name:J,defaultValue:[]},label:{name:Z},name:{name:ee}},superTypes:[]},Direction:{name:te,properties:{accDescr:{name:ne},accTitle:{name:re},dir:{name:ie},statements:{name:se,defaultValue:[]},title:{name:oe}},superTypes:[ve]},Edge:{name:ae,properties:{lhsDir:{name:ce},lhsGroup:{name:le,defaultValue:!1},lhsId:{name:ue},lhsInto:{name:de,defaultValue:!1},rhsDir:{name:he},rhsGroup:{name:fe,defaultValue:!1},rhsId:{name:pe},rhsInto:{name:me,defaultValue:!1},title:{name:ge}},superTypes:[]},Entry:{name:ye,properties:{axis:{name:Te,referenceType:I},value:{name:Re}},superTypes:[]},GitGraph:{name:ve,properties:{accDescr:{name:Ae},accTitle:{name:Ee},statements:{name:ke,defaultValue:[]},title:{name:Se}},superTypes:[]},Group:{name:Ce,properties:{icon:{name:$e},id:{name:be},in:{name:we},title:{name:xe}},superTypes:[]},Info:{name:Ne,properties:{accDescr:{name:Ie},accTitle:{name:Pe},title:{name:_e}},superTypes:[]},Item:{name:Le,properties:{classSelector:{name:Oe},name:{name:De}},superTypes:[]},Junction:{name:Me,properties:{id:{name:Fe},in:{name:qe}},superTypes:[]},Leaf:{name:Ue,properties:{classSelector:{name:je},name:{name:Ge},value:{name:ze}},superTypes:[Le]},Merge:{name:Ke,properties:{branch:{name:Be},id:{name:We},tags:{name:Ve,defaultValue:[]},type:{name:He}},superTypes:[_t]},Option:{name:Ye,properties:{name:{name:Xe},value:{name:Qe,defaultValue:!1}},superTypes:[]},Packet:{name:Je,properties:{accDescr:{name:Ze},accTitle:{name:et},blocks:{name:tt,defaultValue:[]},title:{name:nt}},superTypes:[]},PacketBlock:{name:rt,properties:{bits:{name:it},end:{name:st},label:{name:ot},start:{name:at}},superTypes:[]},Pie:{name:ct,properties:{accDescr:{name:lt},accTitle:{name:ut},sections:{name:dt,defaultValue:[]},showData:{name:ht,defaultValue:!1},title:{name:ft}},superTypes:[]},PieSection:{name:pt,properties:{label:{name:mt},value:{name:gt}},superTypes:[]},Radar:{name:yt,properties:{accDescr:{name:Tt},accTitle:{name:Rt},axes:{name:vt,defaultValue:[]},curves:{name:At,defaultValue:[]},options:{name:Et,defaultValue:[]},title:{name:kt}},superTypes:[]},Section:{name:St,properties:{classSelector:{name:Ct},name:{name:$t}},superTypes:[Le]},Service:{name:bt,properties:{icon:{name:wt},iconText:{name:xt},id:{name:Nt},in:{name:It},title:{name:Pt}},superTypes:[]},Statement:{name:_t,properties:{},superTypes:[]},Treemap:{name:Lt,properties:{accDescr:{name:Ot},accTitle:{name:Dt},title:{name:Mt},TreemapRows:{name:Ft,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Wt,properties:{indent:{name:Vt},item:{name:Ht}},superTypes:[]}}}static{E(this,"MermaidAstReflection")}},Xt=new Yt,Qt=E(()=>qt??(qt=d('{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"ArchitectureGrammarGrammar"),Jt=E(()=>Ut??(Ut=d('{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}')),"GitGraphGrammarGrammar"),Zt=E(()=>jt??(jt=d('{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"InfoGrammarGrammar"),en=E(()=>Gt??(Gt=d('{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PacketGrammarGrammar"),tn=E(()=>zt??(zt=d('{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}')),"PieGrammarGrammar"),nn=E(()=>Kt??(Kt=d('{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|\'([^\'\\\\\\\\]|\\\\\\\\.)*\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}')),"RadarGrammarGrammar"),rn=E(()=>Bt??(Bt=d('{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|\'[^\']*\'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}')),"TreemapGrammarGrammar"),sn={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},on={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},an={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},cn={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},ln={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},un={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},dn={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},hn={AstReflection:E(()=>new Yt,"AstReflection")},fn={Grammar:E(()=>Qt(),"Grammar"),LanguageMetaData:E(()=>sn,"LanguageMetaData"),parser:{}},pn={Grammar:E(()=>Jt(),"Grammar"),LanguageMetaData:E(()=>on,"LanguageMetaData"),parser:{}},mn={Grammar:E(()=>Zt(),"Grammar"),LanguageMetaData:E(()=>an,"LanguageMetaData"),parser:{}},gn={Grammar:E(()=>en(),"Grammar"),LanguageMetaData:E(()=>cn,"LanguageMetaData"),parser:{}},yn={Grammar:E(()=>tn(),"Grammar"),LanguageMetaData:E(()=>ln,"LanguageMetaData"),parser:{}},Tn={Grammar:E(()=>nn(),"Grammar"),LanguageMetaData:E(()=>un,"LanguageMetaData"),parser:{}},Rn={Grammar:E(()=>rn(),"Grammar"),LanguageMetaData:E(()=>dn,"LanguageMetaData"),parser:{}},vn={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},An=class extends R.d{static{E(this,"AbstractMermaidValueConverter")}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return void 0===r&&(r=this.runCustomConverter(e,t,n)),void 0===r?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){const r=vn[e.name];if(void 0===r)return;const i=r.exec(t);return null!==i?void 0!==i[1]?i[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==i[2]?i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,"\n"):void 0:void 0}},En=class extends An{static{E(this,"CommonValueConverter")}runCustomConverter(e,t,n){}},kn=class extends v.Q{static{E(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){const r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&void 0!==e.PATTERN&&(e.PATTERN=new RegExp(e.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends kn{static{E(this,"CommonTokenBuilder")}})},6645(e,t,n){n.d(t,{f:()=>l});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},c={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new r.Tm,"ValueConverter")}};function l(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.Bg,c);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}(0,r.K2)(l,"createRadarServices")},7713(e,t,n){n.d(t,{S:()=>u});var r=n(808),i=n(1999),s=n(9364),o=n(4298),a=class extends r.mR{static{(0,r.K2)(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},c=class extends r.dg{static{(0,r.K2)(this,"ArchitectureValueConverter")}runCustomConverter(e,t,n){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},l={parser:{TokenBuilder:(0,r.K2)(()=>new a,"TokenBuilder"),ValueConverter:(0,r.K2)(()=>new c,"ValueConverter")}};function u(e=o.D){const t=(0,s.WQ)((0,i.u)(e),r.sr),n=(0,s.WQ)((0,i.t)({shared:t}),r.wV,l);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}(0,r.K2)(u,"createArchitectureServices")},8731(e,t,n){n.d(t,{qg:()=>o});n(722),n(2963),n(5626),n(888),n(7713),n(6645),n(8562);var r=n(808),i={},s={info:(0,r.K2)(async()=>{const{createInfoServices:e}=await n.e(3356).then(n.bind(n,3356)),t=e().Info.parser.LangiumParser;i.info=t},"info"),packet:(0,r.K2)(async()=>{const{createPacketServices:e}=await n.e(5149).then(n.bind(n,5149)),t=e().Packet.parser.LangiumParser;i.packet=t},"packet"),pie:(0,r.K2)(async()=>{const{createPieServices:e}=await n.e(8795).then(n.bind(n,8795)),t=e().Pie.parser.LangiumParser;i.pie=t},"pie"),architecture:(0,r.K2)(async()=>{const{createArchitectureServices:e}=await n.e(225).then(n.bind(n,225)),t=e().Architecture.parser.LangiumParser;i.architecture=t},"architecture"),gitGraph:(0,r.K2)(async()=>{const{createGitGraphServices:e}=await n.e(2217).then(n.bind(n,2217)),t=e().GitGraph.parser.LangiumParser;i.gitGraph=t},"gitGraph"),radar:(0,r.K2)(async()=>{const{createRadarServices:e}=await n.e(1903).then(n.bind(n,1903)),t=e().Radar.parser.LangiumParser;i.radar=t},"radar"),treemap:(0,r.K2)(async()=>{const{createTreemapServices:e}=await n.e(4732).then(n.bind(n,4732)),t=e().Treemap.parser.LangiumParser;i.treemap=t},"treemap")};async function o(e,t){const n=s[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();const r=i[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new a(r);return r.value}(0,r.K2)(o,"parse");var a=class extends Error{constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join("\n")} ${e.parserErrors.map(e=>e.message).join("\n")}`),this.result=e}static{(0,r.K2)(this,"MermaidParseError")}}},9637(e,t,n){n.d(t,{ak:()=>K,mT:()=>Dr,LT:()=>Xt,jr:()=>Fr,T6:()=>hr,JG:()=>Mt,wL:()=>D,c$:()=>q,Y2:()=>G,$P:()=>U,Cy:()=>j,Pp:()=>z,BK:()=>B,PW:()=>Lt,my:()=>Zt,jk:()=>Sn,Sk:()=>Ft,G:()=>Jt});var r=n(8058),i=n(8207),s=n(6401),o=n(4722),a=n(8585),c=n(53);function l(e){function t(){}t.prototype=e;const n=new t;function r(){return typeof n.bar}return r(),r(),e}const u=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var s=Array(i);++r{t.accept(e)})}}class D extends O{constructor(e){super([]),this.idx=1,A(this,$(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class M extends O{constructor(e){super(e.definition),this.orgText="",A(this,$(e,e=>void 0!==e))}}class F extends O{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,A(this,$(e,e=>void 0!==e))}}class q extends O{constructor(e){super(e.definition),this.idx=1,A(this,$(e,e=>void 0!==e))}}class U extends O{constructor(e){super(e.definition),this.idx=1,A(this,$(e,e=>void 0!==e))}}class j extends O{constructor(e){super(e.definition),this.idx=1,A(this,$(e,e=>void 0!==e))}}class G extends O{constructor(e){super(e.definition),this.idx=1,A(this,$(e,e=>void 0!==e))}}class z extends O{constructor(e){super(e.definition),this.idx=1,A(this,$(e,e=>void 0!==e))}}class K extends O{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,A(this,$(e,e=>void 0!==e))}}class B{constructor(e){this.idx=1,A(this,$(e,e=>void 0!==e))}accept(e){e.visit(this)}}function W(e){function t(e){return(0,o.A)(e,W)}if(e instanceof D){const t={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,f.A)(e.label)&&(t.label=e.label),t}if(e instanceof F)return{type:"Alternative",definition:t(e.definition)};if(e instanceof q)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof U)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof j)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:W(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof z)return{type:"RepetitionWithSeparator",idx:e.idx,separator:W(new B({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof G)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof K)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof B){const t={type:"Terminal",name:e.terminalType.name,label:L(e.terminalType),idx:e.idx};(0,f.A)(e.label)&&(t.terminalLabel=e.label);const n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=_(n)?n.source:n),t}if(e instanceof M)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}class V{visit(e){const t=e;switch(t.constructor){case D:return this.visitNonTerminal(t);case F:return this.visitAlternative(t);case q:return this.visitOption(t);case U:return this.visitRepetitionMandatory(t);case j:return this.visitRepetitionMandatoryWithSeparator(t);case z:return this.visitRepetitionWithSeparator(t);case G:return this.visitRepetition(t);case K:return this.visitAlternation(t);case B:return this.visitTerminal(t);case M:return this.visitRule(t);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}var H=n(3736),Y=n(6240);const X=function(e,t){var n;return(0,Y.A)(e,function(e,r,i){return!(n=t(e,r,i))}),!!n};var Q=n(2049),J=n(6832);const Z=function(e,t,n){var r=(0,Q.A)(e)?H.A:X;return n&&(0,J.A)(e,t,n)&&(t=void 0),r(e,(0,k.A)(t,3))};var ee=n(818),te=Math.max;const ne=function(e,t,n,r){e=(0,y.A)(e)?e:(0,i.A)(e),n=n&&!r?(0,d.A)(n):0;var s=e.length;return n<0&&(n=te(s+n,0)),(0,f.A)(e)?n<=s&&e.indexOf(t,n)>-1:!!s&&(0,ee.A)(e,t,n)>-1};const re=function(e,t){for(var n=-1,r=null==e?0:e.length;++noe(e,t)):!(e instanceof D&&ne(t,e))&&(e instanceof O&&(e instanceof D&&t.push(e),se(e.definition,e=>oe(e,t)))))}function ae(e){if(e instanceof D)return"SUBRULE";if(e instanceof q)return"OPTION";if(e instanceof K)return"OR";if(e instanceof U)return"AT_LEAST_ONE";if(e instanceof j)return"AT_LEAST_ONE_SEP";if(e instanceof z)return"MANY_SEP";if(e instanceof G)return"MANY";if(e instanceof B)return"CONSUME";throw Error("non exhaustive match")}class ce{walk(e,t=[]){(0,r.A)(e.definition,(n,r)=>{const i=h(e.definition,r+1);if(n instanceof D)this.walkProdRef(n,i,t);else if(n instanceof B)this.walkTerminal(n,i,t);else if(n instanceof F)this.walkFlat(n,i,t);else if(n instanceof q)this.walkOption(n,i,t);else if(n instanceof U)this.walkAtLeastOne(n,i,t);else if(n instanceof j)this.walkAtLeastOneSep(n,i,t);else if(n instanceof z)this.walkManySep(n,i,t);else if(n instanceof G)this.walkMany(n,i,t);else{if(!(n instanceof K))throw Error("non exhaustive match");this.walkOr(n,i,t)}})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){const r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){const r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){const r=[new q({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){const r=le(e,t,n);this.walk(e,r)}walkMany(e,t,n){const r=[new q({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){const r=le(e,t,n);this.walk(e,r)}walkOr(e,t,n){const i=t.concat(n);(0,r.A)(e.definition,e=>{const t=new F({definition:[e]});this.walk(t,i)})}}function le(e,t,n){return[new q({definition:[new B({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var ue=n(9902);const de=function(e){return e&&e.length?(0,ue.A)(e):[]};var he=n(4098);function fe(e){if(e instanceof D)return fe(e.referencedRule);if(e instanceof B)return[e.terminalType];if(function(e){return e instanceof F||e instanceof q||e instanceof G||e instanceof U||e instanceof j||e instanceof z||e instanceof B||e instanceof M}(e))return function(e){let t=[];const n=e.definition;let r,i=0,s=n.length>i,o=!0;for(;s&&o;)r=n[i],o=oe(r),t=t.concat(fe(r)),i+=1,s=n.length>i;return de(t)}(e);if(function(e){return e instanceof K}(e))return function(e){const t=(0,o.A)(e.definition,e=>fe(e));return de((0,he.A)(t))}(e);throw Error("non exhaustive match")}const pe="_~IN~_";class me extends ce{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){const r=(i=e.referencedRule,s=e.idx,i.name+s+pe+this.topProd.name);var i,s;const o=t.concat(n),a=fe(new F({definition:o}));this.follows[r]=a}}var ge=n(9592),ye=n(5186),Te=n(3068),Re=n(2634),ve=n(1790);const Ae=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};const Ee=function(e,t){return((0,Q.A)(e)?Re.A:ve.A)(e,Ae((0,k.A)(t,3)))};var ke=n(9610),Se=Math.max;const Ce=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:(0,d.A)(n);return i<0&&(i=Se(r+i,0)),(0,ee.A)(e,t,i)};var $e=n(9463),be=n(4092),we=n(2062),xe=n(5530),Ne=n(7809),Ie=n(4099);const Pe=function(e,t,n,r){var i=-1,s=xe.A,o=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=(0,E.A)(t,(0,N.A)(n))),r?(s=Ne.A,o=!1):t.length>=200&&(s=Ie.A,o=!1,t=new we.A(t));e:for(;++i\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),je(`${Ve}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function Ye(e,t,n){switch(e.type){case"Disjunction":for(let r=0;r{if("number"==typeof e)Xe(e,t,n);else{const r=e;if(!0===n)for(let e=r.from;e<=r.to;e++)Xe(e,t,n);else{for(let e=r.from;e<=r.to&&e=Tt){const e=r.from>=Tt?r.from:Tt,n=r.to,i=vt(e),s=vt(n);for(let r=i;r<=s;r++)t[r]=r}}}});break;case"Group":Ye(o.value,t,n);break;default:throw Error("Non Exhaustive Match")}const a=void 0!==o.quantifier&&0===o.quantifier.atLeast;if("Group"===o.type&&!1===Je(o)||"Group"!==o.type&&!1===a)break}break;default:throw Error("non exhaustive match!")}return(0,i.A)(t)}function Xe(e,t,n){const r=vt(e);t[r]=r,!0===n&&function(e,t){const n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){const e=vt(r.charCodeAt(0));t[e]=e}else{const e=n.toLowerCase();if(e!==n){const n=vt(e.charCodeAt(0));t[n]=n}}}(e,t)}function Qe(e,t){return(0,Ue.A)(e.value,e=>{if("number"==typeof e)return ne(t,e);{const n=e;return void 0!==(0,Ue.A)(t,e=>n.from<=e&&e<=n.to)}})}function Je(e){const t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&((0,Q.A)(e.value)?se(e.value,Je):Je(e.value))}class Ze extends ye.z{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(!0!==this.found){switch(e.type){case"Lookahead":return void this.visitLookahead(e);case"NegativeLookahead":return void this.visitNegativeLookahead(e);case"Lookbehind":return void this.visitLookbehind(e);case"NegativeLookbehind":return void this.visitNegativeLookbehind(e)}super.visitChildren(e)}}visitCharacter(e){ne(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Qe(e,this.targetCharCodes)&&(this.found=!0):void 0!==Qe(e,this.targetCharCodes)&&(this.found=!0)}}function et(e,t){if(t instanceof RegExp){const n=Be(t),r=new Ze(e);return r.visit(n),r.found}return void 0!==(0,Ue.A)(t,t=>ne(e,t.charCodeAt(0)))}const tt="PATTERN",nt="defaultMode",rt="modes";let it="boolean"==typeof new RegExp("(?:)").sticky;function st(e,t){const n=(t=(0,Te.A)(t,{useSticky:it,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:(e,t)=>t()})).tracer;let i;n("initCharCodeToOptimizedIndexMap",()=>{!function(){if((0,s.A)(Rt)){Rt=new Array(65536);for(let e=0;e<65536;e++)Rt[e]=e>255?255+~~(e/255):e}}()}),n("Reject Lexer.NA",()=>{i=Ee(e,e=>e[tt]===Mt.NA)});let c,l,u,d,h,p,m,g,y,T,R,v=!1;n("Transform Patterns",()=>{v=!1,c=(0,o.A)(i,e=>{const n=e[tt];if(_(n)){const e=n.source;return 1!==e.length||"^"===e||"$"===e||"."===e||n.ignoreCase?2!==e.length||"\\"!==e[0]||ne(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?t.useSticky?ut(n):lt(n):e[1]:e}if((0,ke.A)(n))return v=!0,{exec:n};if("object"==typeof n)return v=!0,n;if("string"==typeof n){if(1===n.length)return n;{const e=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),r=new RegExp(e);return t.useSticky?ut(r):lt(r)}}throw Error("non exhaustive match")})}),n("misc mapping",()=>{l=(0,o.A)(i,e=>e.tokenTypeIdx),u=(0,o.A)(i,e=>{const t=e.GROUP;if(t!==Mt.SKIPPED){if((0,f.A)(t))return t;if((0,ge.A)(t))return!1;throw Error("non exhaustive match")}}),d=(0,o.A)(i,e=>{const t=e.LONGER_ALT;if(t){return(0,Q.A)(t)?(0,o.A)(t,e=>Ce(i,e)):[Ce(i,t)]}}),h=(0,o.A)(i,e=>e.PUSH_MODE),p=(0,o.A)(i,e=>(0,a.A)(e,"POP_MODE"))}),n("Line Terminator Handling",()=>{const e=gt(t.lineTerminatorCharacters);m=(0,o.A)(i,e=>!1),"onlyOffset"!==t.positionTracking&&(m=(0,o.A)(i,t=>(0,a.A)(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===mt(t,e)&&et(e,t.PATTERN)))}),n("Misc Mapping #2",()=>{g=(0,o.A)(i,ht),y=(0,o.A)(c,ft),T=(0,$e.A)(i,(e,t)=>{const n=t.GROUP;return(0,f.A)(n)&&n!==Mt.SKIPPED&&(e[n]=[]),e},{}),R=(0,o.A)(c,(e,t)=>({pattern:c[t],longerAlt:d[t],canLineTerminator:m[t],isCustom:g[t],short:y[t],group:u[t],push:h[t],pop:p[t],tokenTypeIdx:l[t],tokenType:i[t]}))});let A=!0,E=[];return t.safeMode||n("First Char Optimization",()=>{E=(0,$e.A)(i,(e,n,i)=>{if("string"==typeof n.PATTERN){const t=vt(n.PATTERN.charCodeAt(0));yt(e,t,R[i])}else if((0,Q.A)(n.START_CHARS_HINT)){let t;(0,r.A)(n.START_CHARS_HINT,n=>{const r=vt("string"==typeof n?n.charCodeAt(0):n);t!==r&&(t=r,yt(e,r,R[i]))})}else if(_(n.PATTERN))if(n.PATTERN.unicode)A=!1,t.ensureOptimizations&&je(`${Ve}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const o=He(n.PATTERN,t.ensureOptimizations);(0,s.A)(o)&&(A=!1),(0,r.A)(o,t=>{yt(e,t,R[i])})}else t.ensureOptimizations&&je(`${Ve}\tTokenType: <${n.name}> is using a custom token pattern without providing parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),A=!1;return e},[])}),{emptyGroups:T,patternIdxToConfig:R,charCodeToPatternIdxToConfig:E,hasCustom:v,canBeOptimized:A}}function ot(e,t){let n=[];const i=function(e){const t=(0,be.A)(e,e=>!(0,a.A)(e,tt)),n=(0,o.A)(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Ot.MISSING_PATTERN,tokenTypes:[e]})),r=Me(e,t);return{errors:n,valid:r}}(e);n=n.concat(i.errors);const s=function(e){const t=(0,be.A)(e,e=>{const t=e[tt];return!(_(t)||(0,ke.A)(t)||(0,a.A)(t,"exec")||(0,f.A)(t))}),n=(0,o.A)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Ot.INVALID_PATTERN,tokenTypes:[e]})),r=Me(e,t);return{errors:n,valid:r}}(i.valid),c=s.valid;return n=n.concat(s.errors),n=n.concat(function(e){let t=[];const n=(0,be.A)(e,e=>_(e[tt]));return t=t.concat(function(e){class t extends ye.z{constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}const n=(0,be.A)(e,e=>{const n=e.PATTERN;try{const e=Be(n),r=new t;return r.visit(e),r.found}catch(r){return at.test(n.source)}}),r=(0,o.A)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Ot.EOI_ANCHOR_FOUND,tokenTypes:[e]}));return r}(n)),t=t.concat(function(e){class t extends ye.z{constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}const n=(0,be.A)(e,e=>{const n=e.PATTERN;try{const e=Be(n),r=new t;return r.visit(e),r.found}catch(r){return ct.test(n.source)}}),r=(0,o.A)(n,e=>({message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:Ot.SOI_ANCHOR_FOUND,tokenTypes:[e]}));return r}(n)),t=t.concat(function(e){const t=(0,be.A)(e,e=>{const t=e[tt];return t instanceof RegExp&&(t.multiline||t.global)}),n=(0,o.A)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Ot.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}));return n}(n)),t=t.concat(function(e){const t=[];let n=(0,o.A)(e,n=>(0,$e.A)(e,(e,r)=>(n.PATTERN.source!==r.PATTERN.source||ne(t,r)||r.PATTERN===Mt.NA||(t.push(r),e.push(r)),e),[]));n=Fe(n);const r=(0,be.A)(n,e=>e.length>1),i=(0,o.A)(r,e=>{const t=(0,o.A)(e,e=>e.name);return{message:`The same RegExp pattern ->${qe(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:Ot.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}});return i}(n)),t=t.concat(function(e){const t=(0,be.A)(e,e=>e.PATTERN.test("")),n=(0,o.A)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Ot.EMPTY_MATCH_PATTERN,tokenTypes:[e]}));return n}(n)),t}(c)),n=n.concat(function(e){const t=(0,be.A)(e,e=>{if(!(0,a.A)(e,"GROUP"))return!1;const t=e.GROUP;return t!==Mt.SKIPPED&&t!==Mt.NA&&!(0,f.A)(t)}),n=(0,o.A)(t,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Ot.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}));return n}(c)),n=n.concat(function(e,t){const n=(0,be.A)(e,e=>void 0!==e.PUSH_MODE&&!ne(t,e.PUSH_MODE)),r=(0,o.A)(n,e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:Ot.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}));return r}(c,t)),n=n.concat(function(e){const t=[],n=(0,$e.A)(e,(e,t,n)=>{const r=t.PATTERN;return r===Mt.NA||((0,f.A)(r)?e.push({str:r,idx:n,tokenType:t}):_(r)&&function(e){const t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===(0,Ue.A)(t,t=>-1!==e.source.indexOf(t))}(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return(0,r.A)(e,(e,i)=>{(0,r.A)(n,({str:n,idx:r,tokenType:s})=>{if(i${s.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:Ot.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}})}),t}(c)),n}const at=/[^\\][$]/;const ct=/[^\\[][\^]|^\^/;function lt(e){const t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ut(e){const t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function dt(e,t,n){const s=[];let o=!1;const c=Fe((0,he.A)((0,i.A)(e.modes))),l=Ee(c,e=>e[tt]===Mt.NA),u=gt(n);return t&&(0,r.A)(l,e=>{const t=mt(e,u);if(!1!==t){const n=function(e,t){if(t.issue===Ot.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Ot.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}(e,t),r={message:n,type:t.issue,tokenType:e};s.push(r)}else(0,a.A)(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(o=!0):et(u,e.PATTERN)&&(o=!0)}),t&&!o&&s.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:Ot.NO_LINE_BREAKS_FLAGS}),s}function ht(e){const t=e.PATTERN;if(_(t))return!1;if((0,ke.A)(t))return!0;if((0,a.A)(t,"exec"))return!0;if((0,f.A)(t))return!1;throw Error("non exhaustive match")}function ft(e){return!(!(0,f.A)(e)||1!==e.length)&&e.charCodeAt(0)}const pt={test:function(e){const t=e.length;for(let n=this.lastIndex;n(0,f.A)(e)?e.charCodeAt(0):e)}function yt(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}const Tt=256;let Rt=[];function vt(e){return ee.CATEGORIES)));const e=Me(n,t);t=t.concat(e),(0,s.A)(e)?r=!1:n=e}return t}(e);!function(e){(0,r.A)(e,e=>{var t;It(e)||(wt[bt]=e,e.tokenTypeIdx=bt++),Pt(e)&&!(0,Q.A)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Pt(e)||(e.CATEGORIES=[]),t=e,(0,a.A)(t,"categoryMatches")||(e.categoryMatches=[]),function(e){return(0,a.A)(e,"categoryMatchesMap")}(e)||(e.categoryMatchesMap={})})}(t),function(e){(0,r.A)(e,e=>{Nt([],e)})}(t),function(e){(0,r.A)(e,e=>{e.categoryMatches=[],(0,r.A)(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(wt[n].tokenTypeIdx)})})}(t),(0,r.A)(t,e=>{e.isParent=e.categoryMatches.length>0})}function Nt(e,t){(0,r.A)(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),(0,r.A)(t.CATEGORIES,n=>{const r=e.concat(t);ne(r,n)||Nt(r,n)})}function It(e){return(0,a.A)(e,"tokenTypeIdx")}function Pt(e){return(0,a.A)(e,"CATEGORIES")}function _t(e){return(0,a.A)(e,"tokenTypeIdx")}const Lt={buildUnableToPopLexerModeMessage:e=>`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,buildUnexpectedCharactersMessage:(e,t,n,r,i,s)=>`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`};var Ot;!function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"}(Ot||(Ot={}));const Dt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Lt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Dt);class Mt{constructor(e,t=Dt){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=St(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()},"boolean"==typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=A({},Dt,t);const n=this.config.traceInitPerf;!0===n?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof n&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let n,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Dt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=pt;else if(this.config.lineTerminatorCharacters===Dt.lineTerminatorCharacters)throw Error("Error: Missing property on the Lexer config.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),(0,Q.A)(e)?n={modes:{defaultMode:(0,c.A)(e)},defaultMode:nt}:(i=!1,n=(0,c.A)(e))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(function(e){const t=[];return(0,a.A)(e,nt)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+nt+"> property in its definition\n",type:Ot.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,a.A)(e,rt)||t.push({message:"A MultiMode Lexer cannot be initialized without a property in its definition\n",type:Ot.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,a.A)(e,rt)&&(0,a.A)(e,nt)&&!(0,a.A)(e.modes,e.defaultMode)&&t.push({message:`A MultiMode Lexer cannot be initialized with a ${nt}: <${e.defaultMode}>which does not exist\n`,type:Ot.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,a.A)(e,rt)&&(0,r.A)(e.modes,(e,n)=>{(0,r.A)(e,(i,s)=>{if((0,ge.A)(i))t.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${s}>\n`,type:Ot.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,a.A)(i,"LONGER_ALT")){const s=(0,Q.A)(i.LONGER_ALT)?i.LONGER_ALT:[i.LONGER_ALT];(0,r.A)(s,r=>{(0,ge.A)(r)||ne(e,r)||t.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${r.name}> on token <${i.name}> outside of mode <${n}>\n`,type:Ot.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),t}(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(dt(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},(0,r.A)(n.modes,(e,t)=>{n.modes[t]=Ee(e,e=>(0,ge.A)(e))});const u=(0,R.A)(n.modes);if((0,r.A)(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(ot(e,u))}),(0,s.A)(this.lexerDefinitionErrors)){let r;xt(e),this.TRACE_INIT("analyzeTokenTypes",()=>{r=st(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=A({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!(0,s.A)(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const e=(0,o.A)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+e)}(0,r.A)(this.lexerDefinitionWarning,e=>{Ge(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(it?(this.chopInput=At.A,this.match=this.matchWithTest):(this.updateLastIndex=Et.A,this.match=this.matchWithExec),i&&(this.handleModes=Et.A),!1===this.trackStartLines&&(this.computeNewColumn=At.A),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=Et.A),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const e=(0,$e.A)(this.canModeBeOptimized,(e,t,n)=>(!1===t&&e.push(n),e),[]);if(t.ensureOptimizations&&!(0,s.A)(e))throw Error(`Lexer Modes: < ${e.join(", ")} > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{ze={}}),this.TRACE_INIT("toFastProperties",()=>{l(this)})})}tokenize(e,t=this.defaultMode){if(!(0,s.A)(this.lexerDefinitionErrors)){const e=(0,o.A)(this.lexerDefinitionErrors,e=>e.message).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,i,s,o,a,c,l,u,d,h,f,p,m,g,y;const T=e,v=T.length;let A=0,E=0;const k=this.hasCustom?0:Math.floor(e.length/10),S=new Array(k),C=[];let $=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0;const w=function(e){const t={},n=(0,R.A)(e);return(0,r.A)(n,n=>{const r=e[n];if(!(0,Q.A)(r))throw Error("non exhaustive match");t[n]=[]}),t}(this.emptyGroups),x=this.trackStartLines,N=this.config.lineTerminatorsPattern;let I=0,P=[],_=[];const L=[],O=[];let D;function M(){return P}function F(e){const t=vt(e),n=_[t];return void 0===n?O:n}Object.freeze(O);const q=e=>{if(1===L.length&&void 0===e.tokenType.PUSH_MODE){const t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{L.pop();const e=(0,kt.A)(L);P=this.patternIdxToConfig[e],_=this.charCodeToPatternIdxToConfig[e],I=P.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=_&&t?F:M}};function U(e){L.push(e),_=this.charCodeToPatternIdxToConfig[e],P=this.patternIdxToConfig[e],I=P.length,I=P.length;const t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=_&&t?F:M}let j;U.call(this,t);const G=this.config.recoveryEnabled;for(;Ac.length){c=o,l=u,j=t;break}}}break}}if(null!==c){if(d=c.length,h=j.group,void 0!==h&&(f=j.tokenTypeIdx,p=this.createTokenInstance(c,A,f,j.tokenType,$,b,d),this.handlePayload(p,l),!1===h?E=this.addToken(S,E,p):w[h].push(p)),e=this.chopInput(e,d),A+=d,b=this.computeNewColumn(b,d),!0===x&&!0===j.canLineTerminator){let e,t,n=0;N.lastIndex=0;do{e=N.test(c),!0===e&&(t=N.lastIndex-1,n++)}while(!0===e);0!==n&&($+=n,b=d-t,this.updateTokenEndLineColumnLocation(p,h,t,n,$,b,d))}this.handleModes(j,q,U,p)}else{const t=A,n=$,r=b;let s=!1===G;for(;!1===s&&A`Expecting ${qt(e)?`--\x3e ${Ft(e)} <--`:`token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,buildNotAllInputParsedMessage:({firstRedundant:e,ruleName:t})=>"Redundant input, expecting EOF but found: "+e.image,buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",a="\nbut found: '"+qe(t).image+"'";if(r)return s+r+a;{const t=(0,$e.A)(e,(e,t)=>e.concat(t),[]),n=(0,o.A)(t,e=>`[${(0,o.A)(e,e=>Ft(e)).join(", ")}]`);return s+`one of these possible Token sequences:\n${(0,o.A)(n,(e,t)=>` ${t+1}. ${e}`).join("\n")}`+a}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){const i="Expecting: ",s="\nbut found: '"+qe(t).image+"'";if(n)return i+n+s;return i+`expecting at least one iteration which starts with one of these possible Token sequences::\n <${(0,o.A)(e,e=>`[${(0,o.A)(e,e=>Ft(e)).join(",")}]`).join(" ,")}>`+s}};Object.freeze(Zt);const en={buildRuleNotFoundError:(e,t)=>"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"},tn={buildDuplicateFoundError(e,t){const n=e.name,r=qe(t),i=r.idx,s=ae(r),o=(a=r)instanceof B?a.terminalType.name:a instanceof D?a.nonTerminalName:"";var a;let c=`->${s}${i>0?i:""}<- ${o?`with argument: ->${o}<-`:""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildNamespaceConflictError:e=>`Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,buildAlternationPrefixAmbiguityError(e){const t=(0,o.A)(e.prefixPath,e=>Ft(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`},buildAlternationAmbiguityError(e){const t=(0,o.A)(e.prefixPath,e=>Ft(e)).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError(e){let t=ae(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);return`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`},buildTokenNameError:e=>"deprecated",buildEmptyAlternationError:e=>`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule.\nOnly the last alternative may be an empty alternative.`,buildTooManyAlternativesError:e=>`An Alternation cannot have more than 256 alternatives:\n inside <${e.topLevelRule.name}> Rule.\n has ${e.alternation.definition.length+1} alternatives.`,buildLeftRecursionError(e){const t=e.topLevelRule.name;return`Left Recursion found in grammar.\nrule: <${t}> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n ${`${t} --\x3e ${(0,o.A)(e.leftRecursionPath,e=>e.name).concat([t]).join(" --\x3e ")}`}\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError:e=>"deprecated",buildDuplicateRuleNameError(e){let t;t=e.topLevelRule instanceof M?e.topLevelRule.name:e.topLevelRule;return`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};class nn extends V{constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){(0,r.A)((0,i.A)(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{const t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:Lr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}var rn=n(8139),sn=n(2528);const on=function(e,t,n,r){for(var i=-1,s=null==e?0:e.length;++i{!1===(0,s.A)(e.definition)&&(i=a(e.definition))}),i;if(!(t instanceof B))throw Error("non exhaustive match");n.push(t.terminalType)}}o++}return i.push({partialPath:n,suffixDef:h(e,o)}),i}function vn(e,t,n,r){const i="EXIT_NONE_TERMINAL",o=[i],a="EXIT_ALTERNATIVE";let l=!1;const u=t.length,d=u-r-1,f=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,s.A)(p);){const e=p.pop();if(e===a){l&&(0,kt.A)(p).idx<=d&&p.pop();continue}const r=e.def,m=e.idx,g=e.ruleStack,y=e.occurrenceStack;if((0,s.A)(r))continue;const T=r[0];if(T===i){const e={idx:m,def:h(r),ruleStack:dn(g),occurrenceStack:dn(y)};p.push(e)}else if(T instanceof B)if(m=0;t--){const e={idx:m,def:T.definition[t].definition.concat(h(r)),ruleStack:g,occurrenceStack:y};p.push(e),p.push(a)}else if(T instanceof F)p.push({idx:m,def:T.definition.concat(h(r)),ruleStack:g,occurrenceStack:y});else{if(!(T instanceof M))throw Error("non exhaustive match");p.push(An(T,m,g,y))}}return f}function An(e,t,n,r){const i=(0,c.A)(n);i.push(e.name);const s=(0,c.A)(r);return s.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:s}}var En;function kn(e){if(e instanceof q||"Option"===e)return En.OPTION;if(e instanceof G||"Repetition"===e)return En.REPETITION;if(e instanceof U||"RepetitionMandatory"===e)return En.REPETITION_MANDATORY;if(e instanceof j||"RepetitionMandatoryWithSeparator"===e)return En.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof z||"RepetitionWithSeparator"===e)return En.REPETITION_WITH_SEPARATOR;if(e instanceof K||"Alternation"===e)return En.ALTERNATION;throw Error("non exhaustive match")}function Sn(e){const{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,s=kn(r);return s===En.ALTERNATION?_n(t,n,i):Ln(t,n,s,i)}function Cn(e,t,n,i){const s=e.length,c=se(e,e=>se(e,e=>1===e.length));if(t)return function(t){const r=(0,o.A)(t,e=>e.GATE);for(let i=0;i(0,he.A)(e)),n=(0,$e.A)(t,(e,t,n)=>((0,r.A)(t,t=>{(0,a.A)(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),(0,r.A)(t.categoryMatches,t=>{(0,a.A)(e,t)||(e[t]=n)})}),e),{});return function(){const e=this.LA(1);return n[e.tokenTypeIdx]}}return function(){for(let t=0;t1===e.length),o=e.length;if(i&&!n){const t=(0,he.A)(e);if(1===t.length&&(0,s.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,$e.A)(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,(0,r.A)(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){e:for(let n=0;nRn([e],1)),i=xn(n.length),a=(0,o.A)(n,e=>{const t={};return(0,r.A)(e,e=>{const n=Nn(e.partialPath);(0,r.A)(n,e=>{t[e]=!0})}),t});let c=n;for(let o=1;o<=t;o++){const e=c;c=xn(e.length);for(let n=0;n{const t=Nn(e.partialPath);(0,r.A)(t,e=>{a[n][e]=!0})})}}}}return i}function _n(e,t,n,r){const i=new wn(e,En.ALTERNATION,r);return t.accept(i),Pn(i.result,n)}function Ln(e,t,n,r){const i=new wn(e,n);t.accept(i);const s=i.result,o=new bn(t,e,n).startWalking();return Pn([new F({definition:s}),new F({definition:o})],r)}function On(e,t){e:for(let n=0;nse(e,e=>se(e,e=>(0,s.A)(e.categoryMatches))))}function Mn(e,t,n,s){const a=(0,rn.A)(e,e=>function(e,t){const n=new Un;e.accept(n);const r=n.allProductions,s=un(r,Fn),a=$(s,e=>e.length>1),c=(0,o.A)((0,i.A)(a),n=>{const r=qe(n),i=t.buildDuplicateFoundError(e,n),s=ae(r),o={message:i,type:Lr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:s,occurrence:r.idx},a=qn(r);return a&&(o.parameter=a),o});return c}(e,n)),c=function(e,t,n){const i=[],s=(0,o.A)(t,e=>e.name);return(0,r.A)(e,e=>{const t=e.name;if(ne(s,t)){const r=n.buildNamespaceConflictError(e);i.push({message:r,type:Lr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),i}(e,t,n),l=(0,rn.A)(e,e=>function(e,t){const n=new zn;e.accept(n);const r=n.alternations,i=(0,rn.A)(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:Lr.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[]);return i}(e,n)),u=(0,rn.A)(e,t=>function(e,t,n,r){const i=[],s=(0,$e.A)(t,(t,n)=>n.name===e.name?t+1:t,0);if(s>1){const t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:Lr.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}(t,e,s,n));return a.concat(c,l,u)}function Fn(e){return`${ae(e)}_#_${e.idx}_#_${qn(e)}`}function qn(e){return e instanceof B?e.terminalType.name:e instanceof D?e.nonTerminalName:""}class Un extends V{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function jn(e,t,n,r=[]){const i=[],o=Gn(t.definition);if((0,s.A)(o))return[];{const t=e.name;ne(o,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Lr.LEFT_RECURSION,ruleName:t});const s=Me(o,r.concat([e])),a=(0,rn.A)(s,t=>{const i=(0,c.A)(r);return i.push(t),jn(e,t,n,i)});return i.concat(a)}}function Gn(e){let t=[];if((0,s.A)(e))return t;const n=qe(e);if(n instanceof D)t.push(n.referencedRule);else if(n instanceof F||n instanceof q||n instanceof U||n instanceof j||n instanceof z||n instanceof G)t=t.concat(Gn(n.definition));else if(n instanceof K)t=(0,he.A)((0,o.A)(n.definition,e=>Gn(e.definition)));else if(!(n instanceof B))throw Error("non exhaustive match");const r=oe(n),i=e.length>1;if(r&&i){const n=h(e);return t.concat(Gn(n))}return t}class zn extends V{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function Kn(e,t,n){const i=new zn;e.accept(i);let s=i.alternations;s=Ee(s,e=>!0===e.ignoreAmbiguities);const a=(0,rn.A)(s,i=>{const s=i.idx,a=i.maxLookahead||t,c=_n(s,e,a,i),l=function(e,t,n,i){const s=[],a=(0,$e.A)(e,(n,i,o)=>(!0===t.definition[o].ignoreAmbiguities||(0,r.A)(i,i=>{const a=[o];(0,r.A)(e,(e,n)=>{o!==n&&On(e,i)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)}),a.length>1&&!On(s,i)&&(s.push(i),n.push({alts:a,path:i}))}),n),[]),c=(0,o.A)(a,e=>{const r=(0,o.A)(e.alts,e=>e+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path}),type:Lr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}});return c}(c,i,e,n),u=function(e,t,n,r){const i=(0,$e.A)(e,(e,t,n)=>{const r=(0,o.A)(t,e=>({idx:n,path:e}));return e.concat(r)},[]),s=Fe((0,rn.A)(i,e=>{if(!0===t.definition[e.idx].ignoreAmbiguities)return[];const s=e.idx,a=e.path,c=(0,be.A)(i,e=>{return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx{const n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]}));var n,r});return(0,o.A)(c,e=>{const i=[e.idx+1,s+1],o=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:Lr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})}));return s}(c,i,e,n);return l.concat(u)});return a}class Bn extends V{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function Wn(e){const t=(0,Te.A)(e,{errMsgProvider:en}),n={};return(0,r.A)(e.rules,e=>{n[e.name]=e}),function(e,t){const n=new nn(e,t);return n.resolveRefs(),n.errors}(n,t.errMsgProvider)}const Vn="MismatchedTokenException",Hn="NoViableAltException",Yn="EarlyExitException",Xn="NotAllInputParsedException",Qn=[Vn,Hn,Yn,Xn];function Jn(e){return ne(Qn,e.name)}Object.freeze(Qn);class Zn extends Error{constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class er extends Zn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Vn}}class tr extends Zn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Hn}}class nr extends Zn{constructor(e,t){super(e,t),this.name=Xn}}class rr extends Zn{constructor(e,t,n){super(e,t),this.previousToken=n,this.name=Yn}}const ir={},sr="InRuleRecoveryException";class or extends Error{constructor(e){super(e),this.name=sr}}function ar(e,t,n,r,i,s,o){const a=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[a];if(void 0===c){const e=this.getCurrRuleFullName();c=new s(this.getGAstProductions()[e],i).startWalking(),this.firstAfterRepMap[a]=c}let l=c.token,u=c.occurrence;const d=c.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===l&&(l=Xt,u=1),void 0!==l&&void 0!==u&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}const cr=1024,lr=1280,ur=1536;function dr(e,t,n){return n|t|e}class hr{constructor(e){var t;this.maxLookahead=null!==(t=null==e?void 0:e.maxLookahead)&&void 0!==t?t:Pr.maxLookahead}validate(e){const t=this.validateNoLeftRecursion(e.rules);if((0,s.A)(t)){const n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return(0,rn.A)(e,e=>jn(e,e,tn))}validateEmptyOrAlternatives(e){return(0,rn.A)(e,e=>function(e,t){const n=new zn;e.accept(n);const r=n.alternations;return(0,rn.A)(r,n=>{const r=dn(n.definition);return(0,rn.A)(r,(r,i)=>{const o=vn([r],[],Ct,1);return(0,s.A)(o)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:Lr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]})})}(e,tn))}validateAmbiguousAlternationAlternatives(e,t){return(0,rn.A)(e,e=>Kn(e,t,tn))}validateSomeNonEmptyLookaheadPath(e,t){return function(e,t,n){const i=[];return(0,r.A)(e,e=>{const o=new Bn;e.accept(o);const a=o.allProductions;(0,r.A)(a,r=>{const o=kn(r),a=r.maxLookahead||t,c=Ln(r.idx,e,o,a)[0];if((0,s.A)((0,he.A)(c))){const t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:r});i.push({message:t,type:Lr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),i}(e,t,tn)}buildLookaheadForAlternation(e){return function(e,t,n,r,i,s){const o=_n(e,t,n);return s(o,r,Dn(o)?$t:Ct,i)}(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Cn)}buildLookaheadForOptional(e){return function(e,t,n,r,i,s){const o=Ln(e,t,i,n),a=Dn(o)?$t:Ct;return s(o[0],a,r)}(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,kn(e.prodType),$n)}}const fr=new class extends V{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function pr(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset!1===(0,ke.A)(e[t])),r=(0,o.A)(n,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Rr.MISSING_METHOD,methodName:t}));return Fe(r)}(e,t);return n}(this,t);if(!(0,s.A)(e)){const t=(0,o.A)(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:\n\t${t.join("\n\n").replace(/\n/g,"\n\t")}`)}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}var Rr;!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Rr||(Rr={}));var vr=n(3149);const Ar={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ar);const Er=!0,kr=Math.pow(2,8)-1,Sr=Yt({name:"RECORDING_PHASE_TOKEN",pattern:Mt.NA});xt([Sr]);const Cr=Qt(Sr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Cr);const $r={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",children:{}};function br(e,t,n,r=!1){Nr(n);const i=(0,kt.A)(this.recordingProdStack),s=(0,ke.A)(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),(0,a.A)(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),i.definition.push(o),this.recordingProdStack.pop(),Ar}function wr(e,t){Nr(t);const n=(0,kt.A)(this.recordingProdStack),i=!1===(0,Q.A)(e),s=!1===i?e:e.DEF,o=new K({definition:[],idx:t,ignoreAmbiguities:i&&!0===e.IGNORE_AMBIGUITIES});(0,a.A)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);const c=Z(s,e=>(0,ke.A)(e.GATE));return o.hasPredicates=c,n.definition.push(o),(0,r.A)(s,e=>{const t=new F({definition:[]});o.definition.push(t),(0,a.A)(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:(0,a.A)(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Ar}function xr(e){return 0===e?"":`${e}`}function Nr(e){if(e<0||e>kr){const t=new Error(`Invalid DSL Method idx value: <${e}>\n\tIdx value must be a none negative value smaller than ${kr+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}const Ir=Qt(Xt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Ir);const Pr=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Zt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),_r=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var Lr,Or;function Dr(e=void 0){return function(){return e}}!function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"}(Lr||(Lr={}));class Mr{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const t=this.className;this.TRACE_INIT("toFastProps",()=>{l(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),(0,r.A)(this.definedRulesNames,e=>{const t=this[e].originalGrammarAction;let n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Wn({rules:(0,i.A)(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if((0,s.A)(n)&&!1===this.skipValidations){const n=(e={rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),errMsgProvider:tn,grammarName:t},Mn((e=(0,Te.A)(e,{errMsgProvider:tn})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)),r=function(e){const t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,o.A)(t,e=>Object.assign({type:Lr.CUSTOM_LOOKAHEAD_VALIDATION},e))}({lookaheadStrategy:this.lookaheadStrategy,rules:(0,i.A)(this.gastProductionsCache),tokenTypes:(0,i.A)(this.tokensMap),grammarName:t});this.definitionErrors=this.definitionErrors.concat(n,r)}var e}),(0,s.A)(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const e=function(e){const t={};return(0,r.A)(e,e=>{const n=new me(e).startWalking();A(t,n)}),t}((0,i.A)(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null===(t=(e=this.lookaheadStrategy).initialize)||void 0===t||t.call(e,{rules:(0,i.A)(this.gastProductionsCache)}),this.preComputeLookaheadFunctions((0,i.A)(this.gastProductionsCache))})),!Mr.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,s.A)(this.definitionErrors))throw e=(0,o.A)(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected:\n ${e.join("\n-------------------------------\n")}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;const n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),(0,a.A)(t,"ignoredIssues"))throw new Error("The IParserConfig property has been deprecated.\n\tPlease use the flag on the relevant DSL method instead.\n\tSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES\n\tFor further details.");this.skipValidations=(0,a.A)(t,"skipValidations")?t.skipValidations:Pr.skipValidations}}Mr.DEFER_DEFINITION_ERRORS_HANDLING=!1,Or=Mr,[class{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,a.A)(e,"recoveryEnabled")?e.recoveryEnabled:Pr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=ar)}getTokenToInsert(e){const t=Qt(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){const i=this.findReSyncTokenType(),s=this.exportLexerState(),o=[];let a=!1;const c=this.LA(1);let l=this.LA(1);const u=()=>{const e=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:this.getCurrRuleFullName()}),n=new er(t,c,this.LA(0));n.resyncedTokens=dn(o),this.SAVE_ERROR(n)};for(;!a;){if(this.tokenMatcher(l,r))return void u();if(n.call(this))return u(),void e.apply(this,t);this.tokenMatcher(l,i)?a=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,o))}this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(e,t,n){return!1!==n&&!this.tokenMatcher(this.LA(1),e)&&!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t))}getFollowsForInRuleRecovery(e,t){const n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new or("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if((0,s.A)(t))return!1;const n=this.LA(1);return void 0!==(0,Ue.A)(t,e=>this.tokenMatcher(n,e))}canRecoverWithSingleTokenDeletion(e){return!!this.canTokenTypeBeDeletedInRecovery(e)&&this.tokenMatcher(this.LA(2),e)}isInCurrentRuleReSyncSet(e){const t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return ne(n,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let t=this.LA(1),n=2;for(;;){const r=(0,Ue.A)(e,e=>Jt(t,e));if(void 0!==r)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(1===this.RULE_STACK.length)return ir;const e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return(0,o.A)(e,(n,r)=>0===r?ir:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){const e=(0,o.A)(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return(0,he.A)(e)}getFollowSetFromFollowKey(e){if(e===ir)return[Xt];const t=e.ruleName+e.idxInCallingRule+pe+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Xt)||t.push(e),t}reSyncTo(e){const t=[];let n=this.LA(1);for(;!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return dn(t)}attemptInRepetitionRecovery(e,t,n,r,i,s,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:(0,c.A)(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return(0,o.A)(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},class{initLooksAhead(e){this.dynamicTokensEnabled=(0,a.A)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Pr.dynamicTokensEnabled,this.maxLookahead=(0,a.A)(e,"maxLookahead")?e.maxLookahead:Pr.maxLookahead,this.lookaheadStrategy=(0,a.A)(e,"lookaheadStrategy")?e.lookaheadStrategy:new hr({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){(0,r.A)(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{const{alternation:t,repetition:n,option:i,repetitionMandatory:s,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:a}=function(e){fr.reset(),e.accept(fr);const t=fr.dslMethods;return fr.reset(),t}(e);(0,r.A)(t,t=>{const n=0===t.idx?"":t.idx;this.TRACE_INIT(`${ae(t)}${n}`,()=>{const n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=dr(this.fullRuleNameToShort[e.name],256,t.idx);this.setLaFuncCache(r,n)})}),(0,r.A)(n,t=>{this.computeLookaheadFunc(e,t.idx,768,"Repetition",t.maxLookahead,ae(t))}),(0,r.A)(i,t=>{this.computeLookaheadFunc(e,t.idx,512,"Option",t.maxLookahead,ae(t))}),(0,r.A)(s,t=>{this.computeLookaheadFunc(e,t.idx,cr,"RepetitionMandatory",t.maxLookahead,ae(t))}),(0,r.A)(o,t=>{this.computeLookaheadFunc(e,t.idx,ur,"RepetitionMandatoryWithSeparator",t.maxLookahead,ae(t))}),(0,r.A)(a,t=>{this.computeLookaheadFunc(e,t.idx,lr,"RepetitionWithSeparator",t.maxLookahead,ae(t))})})})}computeLookaheadFunc(e,t,n,r,i,s){this.TRACE_INIT(`${s}${0===t?"":t}`,()=>{const s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=dr(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,s)})}getKeyForAutomaticLookahead(e,t){return dr(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},class{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,a.A)(e,"nodeLocationTracking")?e.nodeLocationTracking:Pr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=mr,this.setNodeLocationFromNode=mr,this.cstPostRule=Et.A,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Et.A,this.setNodeLocationFromNode=Et.A,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=pr,this.setNodeLocationFromNode=pr,this.cstPostRule=Et.A,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Et.A,this.setNodeLocationFromNode=Et.A,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=Et.A,this.setNodeLocationFromNode=Et.A,this.cstPostRule=Et.A,this.setInitialNodeLocation=Et.A}else this.cstInvocationStateUpdate=Et.A,this.cstFinallyStateUpdate=Et.A,this.cstPostTerminal=Et.A,this.cstPostNonTerminal=Et.A,this.cstPostRule=Et.A}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){const t=this.LA(0),n=e.location;n.startOffset<=t.startOffset==1?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];var r,i,s;i=t,s=e,void 0===(r=n).children[s]?r.children[s]=[i]:r.children[s].push(i),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){const n=this.CST_STACK[this.CST_STACK.length-1];!function(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if((0,ge.A)(this.baseCstVisitorConstructor)){const e=Tr(this.className,(0,R.A)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if((0,ge.A)(this.baseCstVisitorWithDefaultsConstructor)){const e=function(e,t,n){const i=function(){};gr(i,e+"BaseSemanticsWithDefaults");const s=Object.create(n.prototype);return(0,r.A)(t,e=>{s[e]=yr}),(i.prototype=s).constructor=i,i}(this.className,(0,R.A)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Ir}LA(e){const t=this.currIdx+e;return t<0||this.tokVectorLength<=t?Ir:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},class{initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$t,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,a.A)(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a property.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if((0,Q.A)(e)){if((0,s.A)(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"==typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if((0,Q.A)(e))this.tokensMap=(0,$e.A)(e,(e,t)=>(e[t.name]=t,e),{});else if((0,a.A)(e,"modes")&&se((0,he.A)((0,i.A)(e.modes)),_t)){const t=(0,he.A)((0,i.A)(e.modes)),n=de(t);this.tokensMap=(0,$e.A)(n,(e,t)=>(e[t.name]=t,e),{})}else{if(!(0,vr.A)(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=(0,c.A)(e)}this.tokensMap.EOF=Xt;const n=(0,a.A)(e,"modes")?(0,he.A)((0,i.A)(e.modes)):(0,i.A)(e),r=se(n,e=>(0,s.A)(e.categoryMatches));this.tokenMatcher=r?$t:Ct,xt((0,i.A)(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const r=(0,a.A)(n,"resyncEnabled")?n.resyncEnabled:_r.resyncEnabled,i=(0,a.A)(n,"recoveryValueFunc")?n.recoveryValueFunc:_r.recoveryValueFunc,s=this.ruleShortNameIdx<<12;let o;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,o=!0===this.outputCst?function(...n){try{this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n);const r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}}:function(...n){try{return this.ruleInvocationStateUpdate(s,e,this.subruleIdx),t.apply(this,n)}catch(o){return this.invokeRuleCatch(o,r,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){const r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Jn(e)){const t=e;if(i){const r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){const e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){const n=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof e){r=e.DEF;const t=e.GATE;if(void 0!==t){const e=i;i=()=>t.call(this)&&e.call(this)}}else r=e;if(!0===i.call(this))return r.call(this)}atLeastOneInternal(e,t){const n=this.getKeyForAutomaticLookahead(cr,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;if(!0!==i.call(this))throw this.raiseEarlyExitException(e,En.REPETITION_MANDATORY,t.ERR_MSG);{let e=this.doSingleRepetition(r);for(;!0===i.call(this)&&!0===e;)e=this.doSingleRepetition(r)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,cr,e,yn)}atLeastOneSepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(ur,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,En.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);{r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,Tn],t,ur,e,Tn)}}manyInternal(e,t){const n=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r,i=this.getLaFuncFromCache(n);if("function"!=typeof t){r=t.DEF;const e=t.GATE;if(void 0!==e){const t=i;i=()=>e.call(this)&&t.call(this)}}else r=t;let s=!0;for(;!0===i.call(this)&&!0===s;)s=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,768,e,mn,s)}manySepFirstInternal(e,t){const n=this.getKeyForAutomaticLookahead(lr,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){const r=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){r.call(this);const t=()=>this.tokenMatcher(this.LA(1),i);for(;!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,gn],t,lr,e,gn)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,ur,e,i)}doSingleRepetition(e){const t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){const n=this.getKeyForAutomaticLookahead(256,t),r=(0,Q.A)(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(void 0!==i)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){const e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new nr(t,e))}}subruleInternal(e,t,n){let r;try{const i=void 0!==n?n.ARGS:void 0;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(i){throw this.subruleInternalError(i,n,e.ruleName)}}subruleInternalError(e,t,n){throw Jn(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{const t=this.LA(1);!0===this.tokenMatcher(t,e)?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(i){r=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r;const i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new er(r,t,i))}consumeInternalRecovery(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;{const i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(r){throw r.name===sr?n:r}}}saveRecogState(){const e=this.errors,t=(0,c.A)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Xt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},class{ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=_r){if(ne(this.definedRulesNames,e)){const t={message:tn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:Lr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);const r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=_r){const r=function(e,t,n){const r=[];let i;return ne(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:Lr.INVALID_RULE_OVERRIDE,ruleName:e})),r}(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);const i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);const n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(Jn(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return e=(0,i.A)(this.gastProductionsCache),(0,o.A)(e,W);var e}},class{initErrorHandler(e){this._errors=[],this.errorMessageProvider=(0,a.A)(e,"errorMessageProvider")?e.errorMessageProvider:Pr.errorMessageProvider}SAVE_ERROR(e){if(Jn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,c.A)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return(0,c.A)(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){const r=this.getCurrRuleFullName(),i=Ln(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],s=[];for(let a=1;a<=this.maxLookahead;a++)s.push(this.LA(a));const o=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:i,actual:s,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new rr(o,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){const n=this.getCurrRuleFullName(),r=_n(e,this.getGAstProductions()[n],this.maxLookahead),i=[];for(let a=1;a<=this.maxLookahead;a++)i.push(this.LA(a));const s=this.LA(0),o=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:i,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new tr(o,this.LA(1),s))}},class{initContentAssist(){}computeContentAssist(e,t){const n=this.gastProductionsCache[e];if((0,ge.A)(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return vn([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const t=qe(e.ruleStack),n=this.getGAstProductions()[t];return new fn(n,e).startWalking()}},class{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const t=e>0?e:"";this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let t=0;t<10;t++){const n=t>0?t:"";delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return Ir}topLevelRuleRecord(e,t){try{const n=new M({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(n){if(!0!==n.KNOWN_RECORDER_ERROR)try{n.message=n.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://chevrotain.io/docs/guide/internals.html#grammar-recording'}catch(r){throw n}throw n}}optionInternalRecord(e,t){return br.call(this,q,e,t)}atLeastOneInternalRecord(e,t){br.call(this,U,t,e)}atLeastOneSepFirstInternalRecord(e,t){br.call(this,j,t,e,Er)}manyInternalRecord(e,t){br.call(this,G,t,e)}manySepFirstInternalRecord(e,t){br.call(this,z,t,e,Er)}orInternalRecord(e,t){return wr.call(this,e,t)}subruleInternalRecord(e,t,n){if(Nr(t),!e||!1===(0,a.A)(e,"ruleName")){const n=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,kt.A)(this.recordingProdStack),i=e.ruleName,s=new D({idx:t,nonTerminalName:i,label:null==n?void 0:n.LABEL,referencedRule:void 0});return r.definition.push(s),this.outputCst?$r:Ar}consumeInternalRecord(e,t,n){if(Nr(t),!It(e)){const n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}const r=(0,kt.A)(this.recordingProdStack),i=new B({idx:t,terminalType:e,label:null==n?void 0:n.LABEL});return r.definition.push(i),Cr}},class{initPerformanceTracer(e){if((0,a.A)(e,"traceInitPerf")){const t=e.traceInitPerf,n="number"==typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Pr.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;const n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent`);const{time:r,value:i}=St(t),s=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}return t()}}].forEach(e=>{const t=e.prototype;Object.getOwnPropertyNames(t).forEach(n=>{if("constructor"===n)return;const r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(Or.prototype,n,r):Or.prototype[n]=e.prototype[n]})});class Fr extends Mr{constructor(e,t=Pr){const n=(0,c.A)(t);n.outputCst=!1,super(e,n)}}},1999(e,t,n){n.d(t,{t:()=>Tn,u:()=>Rn});var r=n(6373),i=n(418),s=n(2806),o=n(2151);var a=n(9637),c=n(4722),l=n(4092);function u(e,t,n){return`${e.name}_${t}_${n}`}class d{constructor(e){this.target=e}isEpsilon(){return!1}}class h extends d{constructor(e,t){super(e),this.tokenType=t}}class f extends d{constructor(e){super(e)}isEpsilon(){return!0}}class p extends d{constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}}function m(e){const t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};!function(e,t){const n=t.length;for(let r=0;rg(e,t,n)),s=A(e,t,r,n,...i);return s}(e,t,n):n instanceof a.c$?function(e,t,n){const r=C(e,t,n,{type:1});v(e,r);const i=A(e,t,r,n,y(e,t,n));return function(e,t,n,r){const i=r.left,s=r.right;return S(i,s),e.decisionMap[u(t,"Option",n.idx)]=i,r}(e,t,n,i)}(e,t,n):n instanceof a.Y2?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);const i=A(e,t,r,n,y(e,t,n));return R(e,t,n,i)}(e,t,n):n instanceof a.Pp?function(e,t,n){const r=C(e,t,n,{type:5});v(e,r);const i=A(e,t,r,n,y(e,t,n)),s=E(e,t,n.separator,n);return R(e,t,n,i,s)}(e,t,n):n instanceof a.$P?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);const i=A(e,t,r,n,y(e,t,n));return T(e,t,n,i)}(e,t,n):n instanceof a.Cy?function(e,t,n){const r=C(e,t,n,{type:4});v(e,r);const i=A(e,t,r,n,y(e,t,n)),s=E(e,t,n.separator,n);return T(e,t,n,i,s)}(e,t,n):y(e,t,n)}function y(e,t,n){const r=(0,l.A)((0,c.A)(n.definition,n=>g(e,t,n)),e=>void 0!==e);return 1===r.length?r[0]:0===r.length?void 0:function(e,t){const n=t.length;for(let s=0;se.alt)}get key(){let e="";for(const t in this.map)e+=t+":";return e}}function N(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join("_")}`}var I=n(6452),P=n(8139),_=n(3958),L=n(9902);const O=function(e,t){return e&&e.length?(0,L.A)(e,(0,_.A)(t,2)):[]};var D=n(4098),M=n(8058),F=n(6401),q=n(9463);function U(e,t){const n={};return r=>{const i=r.toString();let s=n[i];return void 0!==s||(s={atnStartState:e,decision:t,states:{}},n[i]=s),s}}class j{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="";const t=this.predicates.length;for(let n=0;nconsole.log(e)}initialize(e){this.atn=m(e.rules),this.dfas=function(e){const t=e.decisionStates.length,n=Array(t);for(let r=0;r(0,c.A)(e,e=>e[0]));if(K(h,!1)&&!i){const e=(0,q.A)(h,(e,t,n)=>((0,M.A)(t,t=>{t&&(e[t.tokenTypeIdx]=n,(0,M.A)(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){var n;const r=this.LA(1),i=e[r.tokenTypeIdx];if(void 0!==t&&void 0!==i){const e=null===(n=t[i])||void 0===n?void 0:n.GATE;if(void 0!==e&&!1===e.call(this))return}return i}:function(){const t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){const t=new j,n=void 0===e?0:e.length;for(let i=0;i(0,c.A)(e,e=>e[0]));if(K(h)&&h[0][0]&&!i){const e=h[0],t=(0,D.A)(e);if(1===t.length&&(0,F.A)(t[0].categoryMatches)){const e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{const e=(0,q.A)(t,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,(0,M.A)(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){const t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){const e=B.call(this,s,d,G,o);return"object"!=typeof e&&0===e}}}function K(e,t=!0){const n=new Set;for(const r of e){const e=new Set;for(const i of r){if(void 0===i){if(t)break;return!1}const r=[i.tokenTypeIdx].concat(i.categoryMatches);for(const t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function B(e,t,n,r){const i=e[t](n);let s=i.start;if(void 0===s){s=ee(i,J(te(i.atnStartState))),i.start=s}return W.apply(this,[i,s,n,r])}function W(e,t,n,r){let i=t,s=1;const o=[];let a=this.LA(s++);for(;;){let t=X(i,a);if(void 0===t&&(t=V.apply(this,[e,i,a,s,n,r])),t===w)return Y(o,i,a);if(!0===t.isAcceptState)return t.prediction;i=t,o.push(a),a=this.LA(s++)}}function V(e,t,n,r,i,s){const o=function(e,t,n){const r=new x,i=[];for(const o of e.elements){if(!1===n.is(o.alt))continue;if(7===o.state.type){i.push(o);continue}const e=o.state.transitions.length;for(let n=0;n0&&!function(e){for(const t of e.elements)if(7===t.state.type)return!0;return!1}(s))for(const o of i)s.add(o);return s}(t.configs,n,i);if(0===o.size)return Z(e,t,n,w),w;let a=J(o);const c=function(e,t){let n;for(const r of e.elements)if(!0===t.is(r.alt))if(void 0===n)n=r.alt;else if(n!==r.alt)return;return n}(o,i);if(void 0!==c)a.isAcceptState=!0,a.prediction=c,a.configs.uniqueAlt=c;else if(function(e){if(function(e){for(const t of e.elements)if(7!==t.state.type)return!1;return!0}(e))return!0;const t=function(e){const t=new Map;for(const n of e){const e=N(n,!1);let r=t.get(e);void 0===r&&(r={},t.set(e,r)),r[n.alt]=!0}return t}(e.elements);return function(e){for(const t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}(t)&&!function(e){for(const t of Array.from(e.values()))if(1===Object.keys(t).length)return!0;return!1}(t)}(o)){const t=(0,I.A)(o.alts);a.isAcceptState=!0,a.prediction=t,a.configs.uniqueAlt=t,H.apply(this,[e,r,o.alts,s])}return a=Z(e,t,n,a),a}function H(e,t,n,r){const i=[];for(let o=1;o<=t;o++)i.push(this.LA(o).tokenType);const s=e.atnStartState;r(function(e){const t=(0,c.A)(e.prefixPath,e=>(0,a.Sk)(e)).join(", "),n=0===e.production.idx?"":e.production.idx;let r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${function(e){if(e instanceof a.wL)return"SUBRULE";if(e instanceof a.c$)return"OPTION";if(e instanceof a.ak)return"OR";if(e instanceof a.$P)return"AT_LEAST_ONE";if(e instanceof a.Cy)return"AT_LEAST_ONE_SEP";if(e instanceof a.Pp)return"MANY_SEP";if(e instanceof a.Y2)return"MANY";if(e instanceof a.BK)return"CONSUME";throw Error("non exhaustive match")}(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\n`;return r+="See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r}({topLevelRule:s.rule,ambiguityIndices:n,production:s.production,prefixPath:i}))}function Y(e,t,n){const r=(0,P.A)(t.configs.elements,e=>e.state.transitions);return{actualToken:n,possibleTokenTypes:O(r.filter(e=>e instanceof h).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function X(e,t){return e.edges[t.tokenTypeIdx]}function Q(e,t){if(e instanceof h&&(0,a.G)(t,e.tokenType))return e.target}function J(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function Z(e,t,n,r){return r=ee(e,r),t.edges[n.tokenTypeIdx]=r,r}function ee(e,t){if(t===w)return t;const n=t.configs.key,r=e.states[n];return void 0!==r?r:(t.configs.finalize(),e.states[n]=t,t)}function te(e){const t=new x,n=e.transitions.length;for(let r=0;r0){const n=[...e.stack];ne({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);const r=n.transitions.length;for(let i=0;i=0&&t.content.splice(n,1)}}addHiddenNodes(e){const t=[];for(const s of e){const e=new ce(s.startOffset,s.image.length,(0,r.wf)(s),s.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,i=!1;if(n.content.length>0)n.content.push(...t);else{for(;n.container;){const e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),i=!0;break}n=n.container}i||this.rootNode.content.unshift(...t)}}construct(e){const t=this.current;"string"!=typeof e.$type||e.$infixName||(this.current.astNode=e),e.$cstNode=t;const n=this.nodeStack.pop();0===n?.content.length&&this.removeNode(n)}}class ae{get hidden(){return!1}get astNode(){const e="string"==typeof this._astNode?.$type?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}}class ce extends ae{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}}class le extends ae{constructor(){super(...arguments),this.content=new ue(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){const e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(void 0===this._rangeCache){const{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line=0;e--){const t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}}class ue extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,ue.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(const t of e)t.container=this.parent}}class de extends le{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const he=Symbol("Datatype");function fe(e){return e.$type===he}const pe=e=>e.endsWith("\u200b")?e:e+"\u200b";class me{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const t=this.lexer.definition,n="production"===e.LanguageMetaData.mode;e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new Ee(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new Ae(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class ge extends me{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new oe,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){const n=this.computeRuleType(e);let r;(0,o.NT)(e)&&(r=e.name,this.registerPrecedenceMap(e));const i=this.wrapper.DEFINE_RULE(pe(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),(0,o.s7)(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){const t=e.name,n=new Map;for(let r=0;r0&&(t=this.construct()),void 0===t)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,n){return r=>{const i=!this.isRecording()&&void 0!==e;if(i){const n={$type:e};this.stack.push(n),e===he?n.value="":void 0!==t&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){const t=this.lexerResult.hidden;if(!t.length)return[];const n=e.startOffset;for(let r=0;rn)return t.splice(0,r)}return t.splice(0,t.length)}consume(e,t,n){const r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){const e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);const t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:s}=this.getAssignment(n),a=this.current;if(i){const e=(0,o.wb)(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,s)}else if(fe(a)){let e=r.image;(0,o.wb)(n)||(e=this.converter.convert(e,t).toString()),a.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&"number"==typeof e.endOffset&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let s,o;this.isRecording()||n||(s=this.nodeBuilder.buildCompositeNode(r));try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(void 0!==o||n||(o=this.construct()),void 0!==o&&s&&s.length>0&&this.performSubruleAssignment(o,r,s))}}performSubruleAssignment(e,t,n){const{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){const t=this.current;if(fe(t))t.value+=e.toString();else if("object"==typeof e&&e){const n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode);this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);const r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;const e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):fe(e)?this.converter.convert(e.value,e.$cstNode):((0,ie.OP)(this.astReflection,e),e)}constructInfix(e,t){const n=e.parts;if(!Array.isArray(n)||0===n.length)return;const r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,s=-1;for(let p=0;ps?(s=n.precedence,i=p):n.precedence===s&&(n.rightAssoc||(i=p))}const o=r.slice(0,i),a=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:a},h=this.constructInfix(u,t),f=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:h,operator:r[i],right:f}}getAssignment(e){if(!this.assignmentMap.has(e)){const t=(0,ie.XG)(e,o.wh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&(0,o._c)(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){const s=this.current;let o;switch(o="single"===i&&"string"==typeof n?this.linker.buildReference(s,t,r,n):"multi"===i&&"string"==typeof n?this.linker.buildMultiReference(s,t,r,n):n,e){case"=":s[t]=o;break;case"?=":s[t]=!0;break;case"+=":Array.isArray(s[t])||(s[t]=[]),s[t].push(o)}}assignWithoutOverride(e,t){for(const[r,i]of Object.entries(t)){const t=e[r];void 0===t?e[r]=i:Array.isArray(t)&&Array.isArray(i)&&(i.push(...t),e[r]=i)}const n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class ye{buildMismatchTokenMessage(e){return a.my.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return a.my.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return a.my.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return a.my.buildEarlyExitMessage(e)}}class Te extends ye{buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class Re extends me{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){const n=this.wrapper.DEFINE_RULE(pe(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{const n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}}const ve={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Te};class Ae extends a.jr{constructor(e,t){super(e,{...ve,lookaheadStrategy:t&&"maxLookahead"in t?new a.T6({maxLookahead:t.maxLookahead}):new z({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}}class Ee extends Ae{constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}}var ke=n(1564),Se=n(1719);function Ce(e,t,n){return function(e,t){const n=(0,i.YV)(t,!1),r=(0,Se.Td)(t.rules).filter(o.s7).filter(e=>n.has(e));for(const i of r){const t={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(i,be(t,i.definition))}const s=(0,Se.Td)(t.rules).filter(o.NT).filter(e=>n.has(e));for(const i of s)e.parser.rule(i,$e(e,i))}({parser:t,tokens:n,ruleNames:new Map},e),t}function $e(e,t){const n=t.call.rule.ref;if(!n)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if((0,o.rE)(n))throw new Error("Cannot use terminal rule in infix expression");const r=t.operators.precedences.flatMap(e=>e.operators),i={$type:"Group",elements:[]},s={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},a={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(s,a);const c={$container:a,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:r}},l={...s,$container:a};a.elements.push(c,l);const u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:()=>e.parser.consume(n,t,c)}));let d;return t=>{d??(d=Pe(e,n)),e.parser.subrule(0,d,!1,s,t),e.parser.many(0,{DEF:()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)}})}}function be(e,t,n=!1){let r;if((0,o.wb)(t))r=function(e,t){const n=e.consume++,r=e.tokens[t.value];if(!r)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(n,r,t)}(e,t);else if((0,o.ve)(t))r=function(e,t){const n=(0,i.Uz)(t);return()=>e.parser.action(n,t)}(e,t);else if((0,o.wh)(t))r=be(e,t.terminal);else if((0,o._c)(t))r=Ne(e,t);else if((0,o.$g)(t))r=function(e,t){const n=t.rule.ref;if((0,o.cM)(n)){const r=e.subrule++,i=(0,o.s7)(n)&&n.fragment,s=t.arguments.length>0?function(e,t){if(t.some(e=>e.calledByName)){const e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:we(e.value)}));return t=>{const n={};for(const{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{const n=t.map(e=>we(e.value));return t=>{const r={};for(let i=0;i({});let a;return o=>{a??(a=Pe(e,n)),e.parser.subrule(r,a,i,t,s(o))}}if((0,o.rE)(n)){const r=e.consume++,i=_e(e,n.name);return()=>e.parser.consume(r,i,t)}if(!n)throw new ke.WB(t.$cstNode,`Undefined rule: ${t.rule.$refText}`);(0,ke.dr)(n)}(e,t);else if((0,o.jp)(t))r=function(e,t){if(1===t.elements.length)return be(e,t.elements[0]);{const n=[];for(const i of t.elements){const t={ALT:be(e,i,!0)},r=xe(i);r&&(t.GATE=we(r)),n.push(t)}const r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{const n={ALT:()=>e.ALT(t)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}(e,t);else if((0,o.cY)(t))r=function(e,t){if(1===t.elements.length)return be(e,t.elements[0]);const n=[];for(const a of t.elements){const t={ALT:be(e,a,!0)},r=xe(a);r&&(t.GATE=we(r)),n.push(t)}const r=e.or++,i=(e,t)=>`uGroup_${e}_${t.getRuleStack().join("-")}`,s=t=>e.parser.alternatives(r,n.map((n,s)=>{const o={ALT:()=>!0},a=e.parser;o.ALT=()=>{if(n.ALT(t),!a.isRecording()){const e=i(r,a);a.unorderedGroups.get(e)||a.unorderedGroups.set(e,[]);const t=a.unorderedGroups.get(e);void 0===t?.[s]&&(t[s]=!0)}};const c=n.GATE;return o.GATE=c?()=>c(t):()=>{const e=a.unorderedGroups.get(i(r,a));return!e?.[s]},o})),o=Ie(e,xe(t),s,"*");return t=>{o(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}(e,t);else if((0,o.IZ)(t))r=function(e,t){const n=t.elements.map(t=>be(e,t));return e=>n.forEach(t=>t(e))}(e,t);else{if(!(0,o.FO)(t))throw new ke.WB(t.$cstNode,`Unexpected element type: ${t.$type}`);{const n=e.consume++;r=()=>e.parser.consume(n,a.LT,t)}}return Ie(e,n?void 0:xe(t),r,t.cardinality)}function we(e){if((0,o.RP)(e)){const t=we(e.left),n=we(e.right);return e=>t(e)||n(e)}if((0,o.Tu)(e)){const t=we(e.left),n=we(e.right);return e=>t(e)&&n(e)}if((0,o.Ct)(e)){const t=we(e.value);return e=>!t(e)}if((0,o.TF)(e)){const t=e.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if((0,o.Cz)(e)){const t=Boolean(e.true);return()=>t}(0,ke.dr)(e)}function xe(e){if((0,o.IZ)(e))return e.guardCondition}function Ne(e,t,n=t.terminal){if(n){if((0,o.$g)(n)&&(0,o.s7)(n.rule.ref)){const r=n.rule.ref,i=e.subrule++;let s;return n=>{s??(s=Pe(e,r)),e.parser.subrule(i,s,!1,t,n)}}if((0,o.$g)(n)&&(0,o.rE)(n.rule.ref)){const r=e.consume++,i=_e(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if((0,o.wb)(n)){const r=e.consume++,i=_e(e,n.value);return()=>e.parser.consume(r,i,t)}throw new Error("Could not build cross reference parser")}{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);const n=(0,i.U5)(t.type.ref),r=n?.terminal;if(!r)throw new Error("Could not find name assignment for type: "+(0,i.Uz)(t.type.ref));return Ne(e,t,r)}}function Ie(e,t,n,r){const i=t&&we(t);if(!r){if(i){const t=e.or++;return r=>e.parser.alternatives(t,[{ALT:()=>n(r),GATE:()=>i(r)},{ALT:(0,a.mT)(),GATE:()=>!i(r)}])}return n}if("*"===r){const t=e.many++;return r=>e.parser.many(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}if("+"===r){const t=e.many++;if(i){const r=e.or++;return s=>e.parser.alternatives(r,[{ALT:()=>e.parser.atLeastOne(t,{DEF:()=>n(s)}),GATE:()=>i(s)},{ALT:(0,a.mT)(),GATE:()=>!i(s)}])}return r=>e.parser.atLeastOne(t,{DEF:()=>n(r)})}if("?"===r){const t=e.optional++;return r=>e.parser.optional(t,{DEF:()=>n(r),GATE:i?()=>i(r):void 0})}(0,ke.dr)(r)}function Pe(e,t){const n=function(e,t){if((0,o.cM)(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!(0,o.s7)(r);){if((0,o.IZ)(r)||(0,o.jp)(r)||(0,o.cY)(r)){i=r.elements.indexOf(n).toString()+":"+i}n=r,r=r.$container}return i=r.name+":"+i,e.ruleNames.set(t,i),i}}(e,t),r=e.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function _e(e,t){const n=e.tokens[t];if(!n)throw new Error(`Token "${t}" not found."`);return n}function Le(e){const t=function(e){const t=e.Grammar,n=e.parser.Lexer,r=new ge(e);return Ce(t,r,n.definition)}(e);return t.finalize(),t}var Oe=n(1945),De=n(5033),Me=n(9850),Fe=n(2479);let qe=0,Ue=10;const je=Symbol("OperationCancelled");function Ge(e){return e===je}async function ze(e){if(e===Me.CancellationToken.None)return;const t=performance.now();if(t-qe>=Ue&&(qe=t,await new Promise(e=>{"undefined"==typeof setImmediate?setTimeout(e,0):setImmediate(e)}),qe=performance.now()),e.isCancellationRequested)throw je}class Ke{constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}}class Be{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){for(const n of e)if(Be.isIncremental(n)){const e=Xe(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);const i=Math.max(e.start.line,0),s=Math.max(e.end.line,0);let o=this._lineOffsets;const a=He(n.text,!1,t);if(s-i===a.length)for(let n=0,l=a.length;ne?r=i:n=i+1}const i=n-1;return{line:i,character:(e=this.ensureBeforeEOL(e,t[i]))-t[i]}}offsetAt(e){const t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;const n=t[e.line];if(e.character<=0)return n;const r=e.line+1t&&Ye(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)}static isFull(e){const t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength}}var We;function Ve(e,t){if(e.length<=1)return e;const n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Ve(r,t),Ve(i,t);let s=0,o=0,a=0;for(;sn.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Qe(e){const t=Xe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Be(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Be)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){const n=e.getText(),r=Ve(t.map(Qe),(e,t)=>{const n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n});let i=0;const s=[];for(const o of r){const t=e.offsetAt(o.range.start);if(ti&&s.push(n.substring(i,t)),o.newText.length&&s.push(o.newText),i=e.offsetAt(o.range.end)}return s.push(n.substr(i)),s.join("")}}(We||(We={}));var Je,Ze,et=n(7608);!function(e){e.basename=et.A.basename,e.dirname=et.A.dirname,e.extname=et.A.extname,e.joinPath=et.A.joinPath,e.resolvePath=et.A.resolvePath;const t="object"==typeof process&&"win32"===process?.platform;e.equals=function(e,t){return e?.toString()===t?.toString()},e.relative=function(e,n){const r="string"==typeof e?et.r.parse(e).path:e.path,i="string"==typeof n?et.r.parse(n).path:n.path,s=r.split("/").filter(e=>e.length>0),o=i.split("/").filter(e=>e.length>0);if(t){const e=/^[A-Z]:$/;if(s[0]&&e.test(s[0])&&(s[0]=s[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),s[0]!==o[0])return i.substring(1)}let a=0;for(;a({name:e.name,uri:Je.joinPath(et.r.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const t=this.getNode(Je.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){const n=e.split("/");"/"===e.charAt(e.length-1)&&n.pop();let r=this.root;for(const i of n){let e=r.children.get(i);if(!e){if(!t)return;e={name:i,children:new Map,parent:r},r.children.set(i,e)}r=e}return r}collectValues(e){const t=[];e.element&&t.push(e.element);for(const n of e.children.values())t.push(...this.collectValues(n));return t}}!function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"}(Ze||(Ze={}));class nt{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Me.CancellationToken.None){const n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t=t??et.r.parse(e.uri),Me.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Me.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if("string"==typeof t){const r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if("$model"in t){const n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{const r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if("string"==typeof t){const r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{const r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Ze.Parsed,references:[],textDocument:n};else{const n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Ze.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){const n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{const t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Ze.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){const n=this.serviceRegistry;let r;return()=>r??(r=We.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??""))}}class rt{constructor(e){this.documentTrie=new tt,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return(0,Se.Td)(this.documentTrie.all())}addDocument(e){const t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){const t=e.toString();return this.documentTrie.find(t)}getDocuments(e){const t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{const n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Ze.Changed),n}deleteDocument(e){const t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Ze.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){const t=e.toString(),n=this.documentTrie.findAll(t);for(const r of n)r.state=Ze.Changed;return this.documentTrie.delete(t),n}}const it=Symbol("RefResolving");class st{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Me.CancellationToken.None){if(this.profiler?.isActive("linking")){const n=this.profiler.createTask("linking",this.languageId);n.start();try{for(const r of(0,ie.jm)(e.parseResult.value))await ze(t),(0,ie.DM)(r).forEach(t=>{const i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(const n of(0,ie.jm)(e.parseResult.value))await ze(t),(0,ie.DM)(n).forEach(t=>this.doLink(t,e))}doLink(e,t){const n=e.reference;if("_ref"in n&&void 0===n._ref){n._ref=it;try{const t=this.getCandidate(e);if((0,Fe.Zl)(t))n._ref=t;else{n._nodeDescription=t;const r=this.loadAstNode(t);n._ref=r??this.createLinkingError(e,t)}}catch(r){console.error(`An error occurred while resolving reference to '${n.$refText}':`,r);const t=r.message??String(r);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`}}t.references.push(n)}else if("_items"in n&&void 0===n._items){n._items=it;try{const t=this.getCandidates(e),r=[];if((0,Fe.Zl)(t))n._linkingError=t;else for(const e of t){const t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(r){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`},n._items=[]}t.references.push(n)}}unlink(e){for(const t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){const t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){const i=this,s={$refNode:n,$refText:r,_ref:void 0,get ref(){if((0,Fe.ng)(this._ref))return this._ref;if((0,Fe.Nr)(this._nodeDescription)){const n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:s,container:e,property:t},this._nodeDescription)}else if(void 0===this._ref){this._ref=it;const n=(0,ie.cQ)(e).$document,r=i.getLinkedNode({reference:s,container:e,property:t});if(r.error&&n&&n.state0?void 0:this._linkingError=i.createLinkingError({reference:s,container:e,property:t})}};return s}throwCyclicReferenceError(e,t,n){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{const t=this.getCandidate(e);if((0,Fe.Zl)(t))return{error:t};const n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);const n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;const t=this.langiumDocuments().getDocument(e.documentUri);return t?this.astNodeLocator.getAstNode(t.parseResult.value,e.path):void 0}createLinkingError(e,t){const n=(0,ie.cQ)(e.container).$document;n&&n.state(0,o._c)(e)&&e.isMulti)}findDeclarations(e){if(e){const t=(0,i.Rp)(e),n=e.astNode;if(t&&n){const r=n[t.feature];if((0,Fe.A_)(r)||(0,Fe.Dm)(r))return(0,ie.tC)(r);if(Array.isArray(r))for(const t of r)if(((0,Fe.A_)(t)||(0,Fe.Dm)(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return(0,ie.tC)(t)}if(n){const t=this.nameProvider.getNameNode(n);if(t&&(t===e||(0,r.pO)(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){const t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n)for(const r of(0,ie.DM)(n))if((0,Fe.Dm)(r.reference)&&r.reference.items.some(t=>t.ref===e))return r.reference.items.map(e=>e.ref);return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;const t=this.documents.getDocument(e.sourceUri);return t?this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath):void 0}findDeclarationNodes(e){const t=this.findDeclarations(e),n=[];for(const r of t){const e=this.nameProvider.getNameNode(r)??r.$cstNode;e&&n.push(e)}return n}findReferences(e,t){const n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>Je.equals(e.sourceUri,t.documentUri))),n.push(...r),(0,Se.Td)(n)}getSelfReferences(e){const t=this.getSelfNodes(e),n=[];for(const i of t){const e=this.nameProvider.getNameNode(i);if(e){const t=(0,ie.YE)(i),s=this.nodeLocator.getAstNodePath(i);n.push({sourceUri:t.uri,sourcePath:s,targetUri:t.uri,targetPath:s,segment:(0,r.SX)(e),local:!0})}}return n}}class ct{constructor(e){if(this.map=new Map,e)for(const[t,n]of e)this.add(t,n)}get size(){return Se.iD.sum((0,Se.Td)(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(void 0===t)return this.map.delete(e);{const n=this.map.get(e);if(n){const r=n.indexOf(t);if(r>=0)return 1===n.length?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){const t=this.map.get(e);return t?(0,Se.Td)(t):Se.B5}has(e,t){if(void 0===t)return this.map.has(e);{const n=this.map.get(e);return!!n&&n.indexOf(t)>=0}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return(0,Se.Td)(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return(0,Se.Td)(this.map.keys())}values(){return(0,Se.Td)(this.map.values()).flat()}entriesGroupedByKey(){return(0,Se.Td)(this.map.entries())}}class lt{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const t=this.map.get(e);return void 0!==t&&(this.map.delete(e),this.inverse.delete(t),!0)}}class ut{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Me.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=ie.VN,r=Me.CancellationToken.None){const i=[];this.addExportedSymbol(e,i,t);for(const s of n(e))await ze(r),this.addExportedSymbol(s,i,t);return i}addExportedSymbol(e,t,n){const r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Me.CancellationToken.None){const n=e.parseResult.value,r=new ct;for(const i of(0,ie.Uo)(n))await ze(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){const r=e.$container;if(r){const i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}}class dt{constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);return n||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}}class ht{constructor(e,t,n){this.elements=new ct,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(const r of e){const e=this.caseInsensitive?r.name.toLowerCase():r.name;this.elements.add(e,r)}this.outerScope=t}getElement(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];return n||(this.outerScope?this.outerScope.getElement(e):void 0)}getElements(e){const t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||0===n.length)&&this.outerScope?(0,Se.Td)(n).concat(this.outerScope.getElements(e)):(0,Se.Td)(n)}getAllElements(){let e=(0,Se.Td)(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class ft{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class pt extends ft{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){const n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class mt extends ft{constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();const r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){const e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){const t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){const t=this.converter(e);let n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}}class gt extends pt{constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class yt{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new gt(e.shared)}getScope(e){const t=[],n=this.reflection.getReferenceType(e),r=(0,ie.YE)(e.container).localSymbols;if(r){let i=e.container;do{r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container}while(i)}let i=this.getGlobalScope(n,e);for(let s=t.length-1;s>=0;s--)i=this.createScope(t[s],i);return i}createScope(e,t,n){return new dt((0,Se.Td)(e),t,n)}createScopeForNodes(e,t,n){const r=(0,Se.Td)(e).map(e=>{const t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable();return new dt(r,t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new ht(this.indexManager.allElements(e)))}}function Tt(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}class Rt{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){const n=t??{},r=t?.replacer,i=(e,t)=>this.replacer(e,t,n),s=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=(0,ie.YE)(e),JSON.stringify(e,s,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){const n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if((0,Fe.A_)(t)){const e=t.ref,r=n?t.$refText:void 0;if(e){const t=(0,ie.YE)(e);let n="";this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());return{$ref:`${n}#${this.astNodeLocator.getAstNodePath(e)}`,$refText:r}}return{$error:t.error?.message??"Could not resolve reference",$refText:r}}if((0,Fe.Dm)(t)){const e=n?t.$refText:void 0,r=[];for(const n of t.items){const e=n.ref,t=(0,ie.YE)(n.ref);let i="";this.currentDocument&&this.currentDocument!==t&&(i=o?o(t.uri,e):t.uri.toString());const s=this.astNodeLocator.getAstNodePath(e);r.push(`${i}#${s}`)}return{$refs:r,$refText:e}}if((0,Fe.ng)(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),e&&!t.$document||!n?.$textRegion||(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??(n={...t}),n.$sourceText=t.$cstNode?.text),s){n??(n={...t});const e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,""))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){const t=e=>({offset:e.offset,end:e.end,length:e.length,range:e.range});if(e.$cstNode){const n=(e.$textRegion=t(e.$cstNode)).assignments={};return Object.keys(e).filter(e=>!e.startsWith("$")).forEach(r=>{const s=(0,i.Bd)(e.$cstNode,r).map(t);0!==s.length&&(n[r]=s)}),e}}linkNode(e,t,n,r,i,s){for(const[a,c]of Object.entries(e))if(Array.isArray(c))for(let r=0;r{await this.handleException(()=>e.call(t,n,r,i),"An error occurred during validation",r,n)}}async handleException(e,t,n,r){try{await e()}catch(i){if(Ge(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);n("error",`${t}: ${i instanceof Error?i.message:String(i)}`,{node:r})}}addEntry(e,t){if("AstNode"!==e)for(const n of this.reflection.getAllSubTypes(e))this.entries.add(n,t);else this.entries.add("AstNode",t)}getChecks(e,t){let n=(0,Se.Td)(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,n){return async(r,i,s,o)=>{await this.handleException(()=>e.call(n,r,i,s,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}}const St=Object.freeze({validateNode:!0,validateChildren:!0});class Ct{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Me.CancellationToken.None){const r=e.parseResult,i=[];if(await ze(n),!t.categories||t.categories.includes("built-in")){if(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===xt.LexingError))return i;if(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===xt.ParsingError))return i;if(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===xt.LinkingError))return i}try{i.push(...await this.validateAst(r.value,t,n))}catch(s){if(Ge(s))throw s;console.error("An error occurred during validation:",s)}return await ze(n),i}processLexingErrors(e,t,n){const r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(const i of r){const e=i.severity??"error",n={severity:bt(e),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:wt(e),source:this.getSource()};t.push(n)}}processParsingErrors(e,t,n){for(const i of e.parserErrors){let e;if(isNaN(i.token.startOffset)){if("previousToken"in i){const t=i.previousToken;if(isNaN(t.startOffset)){const t={line:0,character:0};e={start:t,end:t}}else{const n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=(0,r.wf)(i.token);if(e){const n={severity:bt("error"),range:e,message:i.message,data:At(xt.ParsingError),source:this.getSource()};t.push(n)}}}processLinkingErrors(e,t,n){for(const r of e.references){const e=r.error;if(e){const n={node:e.info.container,range:r.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:xt.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic("error",e.message,n))}}}async validateAst(e,t,n=Me.CancellationToken.None){const r=[],i=(e,t,n)=>{r.push(this.toDiagnostic(e,t,n))};return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Me.CancellationToken.None){const i=this.validationRegistry.checksBefore;for(const s of i)await ze(r),await s(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Me.CancellationToken.None){if(this.profiler?.isActive("validating")){const i=this.profiler.createTask("validating",this.languageId);i.start();try{const s=(0,ie.jm)(e).iterator();for(const e of s){i.startSubTask(e.$type);const o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||s.prune()}}finally{i.stop()}}else{const i=(0,ie.jm)(e).iterator();for(const e of i){await ze(r);const s=this.validateSingleNodeOptions(e,t);if(s.validateNode){const i=this.validationRegistry.getChecks(e.$type,t.categories);for(const t of i)await t(e,n,r)}s.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return St}async validateAstAfter(e,t,n,r=Me.CancellationToken.None){const i=this.validationRegistry.checksAfter;for(const s of i)await ze(r),await s(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:$t(n),severity:bt(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function $t(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=(0,i.qO)(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=(0,i.SS)(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function bt(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function wt(e){switch(e){case"error":return At(xt.LexingError);case"warning":return At(xt.LexingWarning);case"info":return At(xt.LexingInfo);case"hint":return At(xt.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var xt;!function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}(xt||(xt={}));class Nt{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){const i=n??(0,ie.YE)(e);t??(t=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${s} has no name.`);let o;const a=()=>o??(o=(0,r.SX)(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:t,get nameSegment(){return a()},selectionSegment:(0,r.SX)(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class It{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Me.CancellationToken.None){const n=[],r=e.parseResult.value;for(const i of(0,ie.jm)(r))await ze(t),(0,ie.DM)(i).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){const t=e.reference;if(t.error||!t.$refNode)return[];let n=[];(0,Fe.A_)(t)&&t.$nodeDescription?n=[t.$nodeDescription]:(0,Fe.Dm)(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>void 0!==e));const i=(0,ie.YE)(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),o=[],a=(0,r.SX)(t.$refNode);for(const r of n)o.push({sourceUri:i,sourcePath:s,targetUri:r.documentUri,targetPath:r.path,segment:a,local:Je.equals(r.documentUri,i)});return o}}class Pt{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return void 0!==t?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||0===t.length)return e;const n=t.indexOf(this.indexSeparator);if(n>0){const r=t.substring(0,n),i=parseInt(t.substring(n+1)),s=e[r];return s?.[i]}return e[t]},e)}}var _t=n(2676);class Lt{constructor(e){this._ready=new Ke,this.onConfigurationSectionUpdateEmitter=new _t.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){const t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){"object"==typeof e.settings&&null!==e.settings&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;const n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var Ot,Dt=n(4512);!function(e){e.create=function(e){return{dispose:async()=>await e()}}}(Ot||(Ot={}));class Mt{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new ct,this.documentPhaseListeners=new ct,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Ze.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Me.CancellationToken.None){for(const r of e){const e=r.uri.toString();if(r.state===Ze.Validated){if("boolean"==typeof t.validation&&t.validation)this.resetToState(r,Ze.IndexedReferences);else if("object"==typeof t.validation){const n=this.findMissingValidationCategories(r,t);n.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:n}},result:this.buildState.get(e)?.result}),r.state=Ze.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Ze.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Me.CancellationToken.None){this.currentState=Ze.Changed;const r=[];for(const a of t){const e=this.langiumDocuments.deleteDocuments(a);for(const t of e)r.push(t.uri),this.cleanUpDeleted(t)}const i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(const a of i){let e=this.langiumDocuments.getDocument(a);void 0===e&&(e=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a),e.state=Ze.Changed,this.langiumDocuments.addDocument(e)),this.resetToState(e,Ze.Changed)}const s=(0,Se.Td)(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>this.resetToState(e,Ze.ComputedScopes)),await this.emitUpdate(i,r),await ze(n);const o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state=1}findMissingValidationCategories(e,t){const n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set,s=void 0===t||!0===t.validation?r:"object"==typeof t.validation?t.validation.categories??r:[];return(0,Se.Td)(s).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{const t=await this.fileSystemProvider.stat(e);if(t.isDirectory){return await this.workspaceManager().searchFolder(e)}if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t=0&&!this.hasTextDocument(e[n]);)n--;tvoid 0!==e.error)||this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),Ot.create(()=>{const t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Ze.Changed:case Ze.Parsed:this.indexManager.removeContent(e.uri);case Ze.IndexedContent:e.localSymbols=void 0;case Ze.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Ze.Linked:this.indexManager.removeReferences(e.uri);case Ze.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Ze.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Ze.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Ze.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Ze.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Ze.ComputedScopes,n,async e=>{const t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.localSymbols=await t.collectLocalSymbols(e,n)});const r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Ze.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Ze.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));const i=e.filter(e=>!!this.shouldValidate(e)||(this.markAsCompleted(e),!1));await this.runCancelable(i,Ze.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){const t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(const n of e){const e=n.uri.toString(),r=this.buildState.get(e);r&&!r.completed||this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(const s of e)s.statee.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),Ot.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),Ot.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&"path"in t?r=t:n=t,n??(n=Me.CancellationToken.None),r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){const r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(je):this.currentState>=e&&e>r.state?Promise.reject(new Dt.ResponseError(Dt.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Ze[r.state]}, requiring ${Ze[e]}, but workspace state is already ${Ze[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{const s=this.onDocumentPhase(e,e=>{Je.equals(e.uri,t)&&(s.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{s.dispose(),o.dispose(),i(je)})}):Promise.reject(new Dt.ResponseError(Dt.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(je):new Promise((n,r)=>{const i=this.onBuildPhase(e,()=>{i.dispose(),s.dispose(),n()}),s=t.onCancellationRequested(()=>{i.dispose(),s.dispose(),r(je)})})}async notifyDocumentPhase(e,t,n){const r=this.documentPhaseListeners.get(t).slice();for(const s of r)try{await ze(n),await s(e,n)}catch(i){if(!Ge(i))throw i}}async notifyBuildPhase(e,t,n){if(0===e.length)return;const r=this.buildPhaseListeners.get(t).slice();for(const i of r)await ze(n),await i(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return Boolean(this.getBuildOptions(e).validation)}async validate(e,t){const n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i="object"==typeof r.validation?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);const s=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...s):e.diagnostics=s;const o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=(0,Se.Td)(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}}class Ft{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new mt,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){const n=(0,ie.YE)(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Je.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),(0,Se.Td)(r)}allElements(e,t){let n=(0,Se.Td)(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){if(!t)return this.symbolIndex.get(e)??[];return this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t)))}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){const t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){const t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Me.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Me.CancellationToken.None){const n=this.serviceRegistry.getServices(e.uri),r=await n.workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){const n=this.referenceIndex.get(e.uri.toString());return!!n&&n.some(e=>!e.local&&t.has(e.targetUri.toString()))}}class qt{constructor(e){this.initialBuildOptions={},this._ready=new Ke,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Me.CancellationToken.None){const n=await this.performStartup(e);await ze(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){const t=[],n=e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)};await this.loadAdditionalDocuments(e,n);const r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));const i=(0,Se.Td)(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{const n=await this.langiumDocuments.getOrCreateDocument(e);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return et.r.parse(e.uri)}async traverseFolder(e,t){try{const n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(n){console.error("Failure to read directory content of "+e.toString(!0),n)}}async searchFolder(e){const t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){const t=Je.basename(e.uri);return!t.startsWith(".")&&(e.isDirectory?"node_modules"!==t&&"out"!==t:!!e.isFile&&this.serviceRegistry.hasServices(e.uri))}}class Ut{buildUnexpectedCharactersMessage(e,t,n,r,i){return a.PW.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return a.PW.buildUnableToPopLexerModeMessage(e)}}const jt={mode:"full"};class Gt{constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);const n=Kt(t)?Object.values(t):t,r="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new a.JG(n,{positionTracking:"full",skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=jt){const n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Kt(e))return e;const t=zt(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}}function zt(e){return e&&"modes"in e&&"defaultMode"in e}function Kt(e){return!function(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}(e)&&!zt(e)}function Bt(e,t,n){let r,i;"string"==typeof e?(i=t,r=n):(i=e.range.start,r=t),i||(i=se.Position.create(0,0));const s=function(e){const t=[];let n=e.position.line,r=e.position.character;for(let i=0;i=a.length){if(t.length>0){const e=se.Position.create(n,r);t.push({type:"break",content:"",range:se.Range.create(e,e)})}}else{Vt.lastIndex=c;const e=Vt.exec(a);if(e){const i=e[0],s=e[1],o=se.Position.create(n,r+c),l=se.Position.create(n,r+c+i.length);t.push({type:"tag",content:s,range:se.Range.create(o,l)}),c+=i.length,c=Jt(a,c)}if(c0&&"break"===t[t.length-1].type)return t.slice(0,-1);return t}({lines:Wt(e),position:i,options:on(r)});return function(e){const t=se.Position.create(e.position.line,e.position.character);if(0===e.tokens.length)return new cn([],se.Range.create(t,t));const n=[];for(;e.index0&&i.push({type:"text",content:t.substring(s,e),range:se.Range.create(se.Position.create(n,s+r),se.Position.create(n,e+r))});let c=o.length+1;const l=a[1];if(i.push({type:"inline-tag",content:l,range:se.Range.create(se.Position.create(n,s+c+r),se.Position.create(n,s+c+l.length+r))}),c+=l.length,4===a.length){c+=a[2].length;const e=a[3];i.push({type:"text",content:e,range:se.Range.create(se.Position.create(n,s+c+r),se.Position.create(n,s+c+e.length+r))})}else i.push({type:"text",content:"",range:se.Range.create(se.Position.create(n,s+c+r),se.Position.create(n,s+c+r))});s=e+a[0].length}const o=t.substring(s);o.length>0&&i.push({type:"text",content:o,range:se.Range.create(se.Position.create(n,s+r),se.Position.create(n,s+r+o.length))})}return i}const Xt=/\S/,Qt=/\s*$/;function Jt(e,t){const n=e.substring(t).match(Xt);return n?t+n.index:e.length}function Zt(e){const t=e.match(Qt);if(t&&"number"==typeof t.index)return t.index}function en(e,t){const n=e.tokens[e.index];return"tag"===n.type?rn(e,!1):"text"===n.type||"inline-tag"===n.type?tn(e):(function(e,t){if(t){const n=new dn("",e.range);"inlines"in t?t.inlines.push(n):t.content.inlines.push(n)}}(n,t),void e.index++)}function tn(e){let t=e.tokens[e.index];const n=t;let r=t;const i=[];for(;t&&"break"!==t.type&&"tag"!==t.type;)i.push(nn(e)),r=t,t=e.tokens[e.index];return new un(i,se.Range.create(n.range.start,r.range.end))}function nn(e){return"inline-tag"===e.tokens[e.index].type?rn(e,!0):sn(e)}function rn(e,t){const n=e.tokens[e.index++],r=n.content.substring(1),i=e.tokens[e.index];if("text"===i?.type){if(t){const i=sn(e);return new ln(r,new un([i],i.range),t,se.Range.create(n.range.start,i.range.end))}{const i=tn(e);return new ln(r,i,t,se.Range.create(n.range.start,i.range.end))}}{const e=n.range;return new ln(r,new un([],e),t,e)}}function sn(e){const t=e.tokens[e.index++];return new dn(t.content,t.range)}function on(e){if(!e)return on({start:"/**",end:"*/",line:"*"});const{start:t,end:n,line:r}=e;return{start:an(t,!0),end:an(n,!1),line:an(r,!0)}}function an(e,t){if("string"==typeof e||"object"==typeof e){const n="string"==typeof e?(0,s.Nt)(e):e.source;return t?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}return e}class cn{constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const t of this.elements)if(0===e.length)e=t.toString();else{const n=t.toString();e+=hn(e)+n}return e.trim()}toMarkdown(e){let t="";for(const n of this.elements)if(0===t.length)t=n.toMarkdown(e);else{const r=n.toMarkdown(e);t+=hn(t)+r}return t.trim()}}class ln{constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`;const t=this.content.toString();return 1===this.content.inlines.length?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}\n${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){const t=this.content.toMarkdown(e);if(this.inline){const n=function(e,t,n){if("linkplain"===e||"linkcode"===e||"link"===e){const r=t.indexOf(" ");let i=t;if(r>0){const e=Jt(t,r);i=t.substring(e),t=t.substring(0,r)}("linkcode"===e||"link"===e&&"code"===n.link)&&(i=`\`${i}\``);const s=n.renderLink?.(t,i)??function(e,t){try{return et.r.parse(e,!0),`[${t}](${e})`}catch{return e}}(t,i);return s}return}(this.name,t,e??{});if("string"==typeof n)return n}let n="";"italic"===e?.tag||void 0===e?.tag?n="*":"bold"===e?.tag?n="**":"bold-italic"===e?.tag&&(n="***");let r=`${n}@${this.name}${n}`;return 1===this.content.inlines.length?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}\n${t}`),this.inline?`{${r}}`:r}}class un{constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tn.range.start.line&&(e+="\n")}return e}toMarkdown(e){let t="";for(let n=0;nr.range.start.line&&(t+="\n")}return t}}class dn{constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}}function hn(e){return e.endsWith("\n")?"\n":"\n\n"}class fn{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const t=this.commentProvider.getComment(e);if(t&&function(e,t){const n=on(t),r=Wt(e);if(0===r.length)return!1;const i=r[0],s=r[r.length-1],o=n.start,a=n.end;return Boolean(o?.exec(i))&&Boolean(a?.exec(s))}(t)){return Bt(t).toMarkdown({renderLink:(t,n)=>this.documentationLinkRenderer(e,t,n),renderTag:t=>this.documentationTagRenderer(e,t)})}}documentationLinkRenderer(e,t,n){const r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){const e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){const n=(0,ie.YE)(e).localSymbols;if(!n)return;let r=e;do{const e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}class pn{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return function(e){return"string"==typeof e.$comment}(e)?e.$comment:(0,r.v)(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}}class mn{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}}class gn{constructor(){this.previousTokenSource=new Me.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const t=(qe=performance.now(),new Me.CancellationTokenSource);return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=Me.CancellationToken.None){const r=new Ke,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else{if(!(this.readQueue.length>0))return;e.push(...this.readQueue.splice(0,this.readQueue.length))}this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{const r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(r){Ge(r)?t.resolve(void 0):t.reject(r)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class yn{constructor(e){this.grammarElementIdMap=new lt,this.tokenTypeIdMap=new lt,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const t=new Map,n=new Map;for(const r of(0,ie.jm)(e))t.set(r,{});if(e.$cstNode)for(const i of(0,r.NS)(e.$cstNode))n.set(i,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const n of i)(0,Fe.ng)(n)?e.push(this.dehydrateAstNode(n,t)):(0,Fe.A_)(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else(0,Fe.ng)(i)?n[r]=this.dehydrateAstNode(i,t):(0,Fe.A_)(i)?n[r]=this.dehydrateReference(i,t):void 0!==i&&(n[r]=i);return n}dehydrateReference(e,t){const n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){const n=t.cstNodes.get(e);return(0,Fe.br)(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),(0,Fe.mD)(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):(0,Fe.FC)(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){const t=e.value,n=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){const t=new Map,n=new Map;for(const r of(0,ie.jm)(e))t.set(r,{});let i;if(e.$cstNode)for(const s of(0,r.NS)(e.$cstNode)){let e;"fullText"in s?(e=new de(s.fullText),i=e):"content"in s?e=new le:"tokenType"in s&&(e=this.hydrateCstLeafNode(s)),e&&(n.set(s,e),e.root=i)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){const n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(const[r,i]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(i)){const e=[];n[r]=e;for(const s of i)(0,Fe.ng)(s)?e.push(this.setParent(this.hydrateAstNode(s,t),n)):(0,Fe.A_)(s)?e.push(this.hydrateReference(s,n,r,t)):e.push(s)}else(0,Fe.ng)(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):(0,Fe.A_)(i)?n[r]=this.hydrateReference(i,n,r,t):void 0!==i&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){const r=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),(0,Fe.mD)(r))for(const i of e.content){const e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){const t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,s=e.startColumn,o=e.endLine,a=e.endColumn,c=e.hidden;return new ce(n,r,{start:{line:i,character:s},end:{line:o,character:a}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();return this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const t of(0,ie.jm)(this.grammar))(0,o.r1)(t)&&this.grammarElementIdMap.set(t,e++)}}function Tn(e){return{documentation:{CommentProvider:e=>new pn(e),DocumentationProvider:e=>new fn(e)},parser:{AsyncParser:e=>new mn(e),GrammarConfig:e=>function(e){const t=[],n=e.Grammar;for(const r of n.rules)(0,o.rE)(r)&&(0,i.eb)(r)&&(0,s.lU)((0,i.S)(r))&&t.push(r.name);return{multilineCommentRules:t,nameRegexp:r.El}}(e),LangiumParser:e=>Le(e),CompletionParser:e=>function(e){const t=e.Grammar,n=e.parser.Lexer,r=new Re(e);return Ce(t,r,n.definition),r.finalize(),r}(e),ValueConverter:()=>new De.d,TokenBuilder:()=>new Oe.Q,Lexer:e=>new Gt(e),ParserErrorMessageProvider:()=>new Te,LexerErrorMessageProvider:()=>new Ut},workspace:{AstNodeLocator:()=>new Pt,AstNodeDescriptionProvider:e=>new Nt(e),ReferenceDescriptionProvider:e=>new It(e)},references:{Linker:e=>new st(e),NameProvider:()=>new ot,ScopeProvider:e=>new yt(e),ScopeComputation:e=>new ut(e),References:e=>new at(e)},serializer:{Hydrator:e=>new yn(e),JsonSerializer:e=>new Rt(e)},validation:{DocumentValidator:e=>new Ct(e),ValidationRegistry:e=>new kt(e)},shared:()=>e.shared}}function Rn(e){return{ServiceRegistry:e=>new vt(e),workspace:{LangiumDocuments:e=>new rt(e),LangiumDocumentFactory:e=>new nt(e),DocumentBuilder:e=>new Mt(e),IndexManager:e=>new Ft(e),WorkspaceManager:e=>new qt(e),FileSystemProvider:t=>e.fileSystemProvider(t),WorkspaceLock:()=>new gn,ConfigurationProvider:e=>new Lt(e)},profilers:{}}}},9364(e,t,n){var r;function i(e,t,n,r,i,s,a,c,u){return o([e,t,n,r,i,s,a,c,u].reduce(l,{}))}n.d(t,{WQ:()=>i}),function(e){e.merge=(e,t)=>l(l({},e),t)}(r||(r={}));const s=Symbol("isProxy");function o(e,t){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===s||c(r,i,e,t||n),getOwnPropertyDescriptor:(r,i)=>(c(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),has:(t,n)=>n in e,ownKeys:()=>[...Object.getOwnPropertyNames(e)]});return n}const a=Symbol();function c(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===a)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}if(t in n){const s=n[t];e[t]=a;try{e[t]="function"==typeof s?s(r):o(s,r)}catch(i){throw e[t]=i instanceof Error?i:void 0,i}return e[t]}}function l(e,t){if(t)for(const[n,r]of Object.entries(t))if(null!=r)if("object"==typeof r){const t=e[n];e[n]=l("object"==typeof t&&null!==t?t:{},r)}else e[n]=r;return e}},2151(e,t,n){n.d(t,{$g:()=>zt,Bg:()=>G,Ct:()=>ct,Cz:()=>O,D8:()=>Ht,FO:()=>ae,Fy:()=>nn,GL:()=>st,IZ:()=>Ee,Mz:()=>Hn,NT:()=>Le,O4:()=>fn,QX:()=>tr,RP:()=>ie,S2:()=>Ke,SP:()=>Ce,TF:()=>mt,Tu:()=>V,Xj:()=>Nn,_c:()=>ee,cM:()=>c,cY:()=>Gn,fG:()=>Mt,jp:()=>A,lF:()=>$n,r1:()=>o,rE:()=>vn,s7:()=>Ct,vd:()=>Lt,ve:()=>y,wb:()=>Ye,wh:()=>P,z2:()=>er});var r=n(2479);const i="AbstractElement",s="cardinality";function o(e){return nr.isInstance(e,i)}const a="AbstractParserRule";function c(e){return nr.isInstance(e,a)}const l="AbstractRule";const u="AbstractType";const d="Action",h="cardinality",f="feature",p="inferredType",m="operator",g="type";function y(e){return nr.isInstance(e,d)}const T="Alternatives",R="cardinality",v="elements";function A(e){return nr.isInstance(e,T)}const E="ArrayLiteral",k="elements";const S="ArrayType",C="elementType";const $="Assignment",b="cardinality",w="feature",x="operator",N="predicate",I="terminal";function P(e){return nr.isInstance(e,$)}const _="BooleanLiteral",L="true";function O(e){return nr.isInstance(e,_)}const D="CharacterRange",M="cardinality",F="left",q="lookahead",U="parenthesized",j="right";function G(e){return nr.isInstance(e,D)}const z="Condition";const K="Conjunction",B="left",W="right";function V(e){return nr.isInstance(e,K)}const H="CrossReference",Y="cardinality",X="deprecatedSyntax",Q="isMulti",J="terminal",Z="type";function ee(e){return nr.isInstance(e,H)}const te="Disjunction",ne="left",re="right";function ie(e){return nr.isInstance(e,te)}const se="EndOfFile",oe="cardinality";function ae(e){return nr.isInstance(e,se)}const ce="Grammar",le="imports",ue="interfaces",de="isDeclared",he="name",fe="rules",pe="types";const me="GrammarImport",ge="path";const ye="Group",Te="cardinality",Re="elements",ve="guardCondition",Ae="predicate";function Ee(e){return nr.isInstance(e,ye)}const ke="InferredType",Se="name";function Ce(e){return nr.isInstance(e,ke)}const $e="InfixRule",be="call",we="dataType",xe="inferredType",Ne="name",Ie="operators",Pe="parameters",_e="returnType";function Le(e){return nr.isInstance(e,$e)}const Oe="InfixRuleOperatorList",De="associativity",Me="operators";const Fe="InfixRuleOperators",qe="precedences";const Ue="Interface",je="attributes",Ge="name",ze="superTypes";function Ke(e){return nr.isInstance(e,Ue)}const Be="Keyword",We="cardinality",Ve="predicate",He="value";function Ye(e){return nr.isInstance(e,Be)}const Xe="NamedArgument",Qe="calledByName",Je="parameter",Ze="value";const et="NegatedToken",tt="cardinality",nt="lookahead",rt="parenthesized",it="terminal";function st(e){return nr.isInstance(e,et)}const ot="Negation",at="value";function ct(e){return nr.isInstance(e,ot)}const lt="NumberLiteral",ut="value";const dt="Parameter",ht="name";const ft="ParameterReference",pt="parameter";function mt(e){return nr.isInstance(e,ft)}const gt="ParserRule",yt="dataType",Tt="definition",Rt="entry",vt="fragment",At="inferredType",Et="name",kt="parameters",St="returnType";function Ct(e){return nr.isInstance(e,gt)}const $t="ReferenceType",bt="isMulti",wt="referenceType";const xt="RegexToken",Nt="cardinality",It="lookahead",Pt="parenthesized",_t="regex";function Lt(e){return nr.isInstance(e,xt)}const Ot="ReturnType",Dt="name";function Mt(e){return nr.isInstance(e,Ot)}const Ft="RuleCall",qt="arguments",Ut="cardinality",jt="predicate",Gt="rule";function zt(e){return nr.isInstance(e,Ft)}const Kt="SimpleType",Bt="primitiveType",Wt="stringType",Vt="typeRef";function Ht(e){return nr.isInstance(e,Kt)}const Yt="StringLiteral",Xt="value";const Qt="TerminalAlternatives",Jt="cardinality",Zt="elements",en="lookahead",tn="parenthesized";function nn(e){return nr.isInstance(e,Qt)}const rn="TerminalElement",sn="cardinality",on="lookahead",an="parenthesized";const cn="TerminalGroup",ln="cardinality",un="elements",dn="lookahead",hn="parenthesized";function fn(e){return nr.isInstance(e,cn)}const pn="TerminalRule",mn="definition",gn="fragment",yn="hidden",Tn="name",Rn="type";function vn(e){return nr.isInstance(e,pn)}const An="TerminalRuleCall",En="cardinality",kn="lookahead",Sn="parenthesized",Cn="rule";function $n(e){return nr.isInstance(e,An)}const bn="Type",wn="name",xn="type";function Nn(e){return nr.isInstance(e,bn)}const In="TypeAttribute",Pn="defaultValue",_n="isOptional",Ln="name",On="type";const Dn="TypeDefinition";const Mn="UnionType",Fn="types";const qn="UnorderedGroup",Un="cardinality",jn="elements";function Gn(e){return nr.isInstance(e,qn)}const zn="UntilToken",Kn="cardinality",Bn="lookahead",Wn="parenthesized",Vn="terminal";function Hn(e){return nr.isInstance(e,zn)}const Yn="ValueLiteral";const Xn="Wildcard",Qn="cardinality",Jn="lookahead",Zn="parenthesized";function er(e){return nr.isInstance(e,Xn)}class tr extends r.kD{constructor(){super(...arguments),this.types={AbstractElement:{name:i,properties:{cardinality:{name:s}},superTypes:[]},AbstractParserRule:{name:a,properties:{},superTypes:[l,u]},AbstractRule:{name:l,properties:{},superTypes:[]},AbstractType:{name:u,properties:{},superTypes:[]},Action:{name:d,properties:{cardinality:{name:h},feature:{name:f},inferredType:{name:p},operator:{name:m},type:{name:g,referenceType:u}},superTypes:[i]},Alternatives:{name:T,properties:{cardinality:{name:R},elements:{name:v,defaultValue:[]}},superTypes:[i]},ArrayLiteral:{name:E,properties:{elements:{name:k,defaultValue:[]}},superTypes:[Yn]},ArrayType:{name:S,properties:{elementType:{name:C}},superTypes:[Dn]},Assignment:{name:$,properties:{cardinality:{name:b},feature:{name:w},operator:{name:x},predicate:{name:N},terminal:{name:I}},superTypes:[i]},BooleanLiteral:{name:_,properties:{true:{name:L,defaultValue:!1}},superTypes:[z,Yn]},CharacterRange:{name:D,properties:{cardinality:{name:M},left:{name:F},lookahead:{name:q},parenthesized:{name:U,defaultValue:!1},right:{name:j}},superTypes:[rn]},Condition:{name:z,properties:{},superTypes:[]},Conjunction:{name:K,properties:{left:{name:B},right:{name:W}},superTypes:[z]},CrossReference:{name:H,properties:{cardinality:{name:Y},deprecatedSyntax:{name:X,defaultValue:!1},isMulti:{name:Q,defaultValue:!1},terminal:{name:J},type:{name:Z,referenceType:u}},superTypes:[i]},Disjunction:{name:te,properties:{left:{name:ne},right:{name:re}},superTypes:[z]},EndOfFile:{name:se,properties:{cardinality:{name:oe}},superTypes:[i]},Grammar:{name:ce,properties:{imports:{name:le,defaultValue:[]},interfaces:{name:ue,defaultValue:[]},isDeclared:{name:de,defaultValue:!1},name:{name:he},rules:{name:fe,defaultValue:[]},types:{name:pe,defaultValue:[]}},superTypes:[]},GrammarImport:{name:me,properties:{path:{name:ge}},superTypes:[]},Group:{name:ye,properties:{cardinality:{name:Te},elements:{name:Re,defaultValue:[]},guardCondition:{name:ve},predicate:{name:Ae}},superTypes:[i]},InferredType:{name:ke,properties:{name:{name:Se}},superTypes:[u]},InfixRule:{name:$e,properties:{call:{name:be},dataType:{name:we},inferredType:{name:xe},name:{name:Ne},operators:{name:Ie},parameters:{name:Pe,defaultValue:[]},returnType:{name:_e,referenceType:u}},superTypes:[a]},InfixRuleOperatorList:{name:Oe,properties:{associativity:{name:De},operators:{name:Me,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Fe,properties:{precedences:{name:qe,defaultValue:[]}},superTypes:[]},Interface:{name:Ue,properties:{attributes:{name:je,defaultValue:[]},name:{name:Ge},superTypes:{name:ze,defaultValue:[],referenceType:u}},superTypes:[u]},Keyword:{name:Be,properties:{cardinality:{name:We},predicate:{name:Ve},value:{name:He}},superTypes:[i]},NamedArgument:{name:Xe,properties:{calledByName:{name:Qe,defaultValue:!1},parameter:{name:Je,referenceType:dt},value:{name:Ze}},superTypes:[]},NegatedToken:{name:et,properties:{cardinality:{name:tt},lookahead:{name:nt},parenthesized:{name:rt,defaultValue:!1},terminal:{name:it}},superTypes:[rn]},Negation:{name:ot,properties:{value:{name:at}},superTypes:[z]},NumberLiteral:{name:lt,properties:{value:{name:ut}},superTypes:[Yn]},Parameter:{name:dt,properties:{name:{name:ht}},superTypes:[]},ParameterReference:{name:ft,properties:{parameter:{name:pt,referenceType:dt}},superTypes:[z]},ParserRule:{name:gt,properties:{dataType:{name:yt},definition:{name:Tt},entry:{name:Rt,defaultValue:!1},fragment:{name:vt,defaultValue:!1},inferredType:{name:At},name:{name:Et},parameters:{name:kt,defaultValue:[]},returnType:{name:St,referenceType:u}},superTypes:[a]},ReferenceType:{name:$t,properties:{isMulti:{name:bt,defaultValue:!1},referenceType:{name:wt}},superTypes:[Dn]},RegexToken:{name:xt,properties:{cardinality:{name:Nt},lookahead:{name:It},parenthesized:{name:Pt,defaultValue:!1},regex:{name:_t}},superTypes:[rn]},ReturnType:{name:Ot,properties:{name:{name:Dt}},superTypes:[]},RuleCall:{name:Ft,properties:{arguments:{name:qt,defaultValue:[]},cardinality:{name:Ut},predicate:{name:jt},rule:{name:Gt,referenceType:l}},superTypes:[i]},SimpleType:{name:Kt,properties:{primitiveType:{name:Bt},stringType:{name:Wt},typeRef:{name:Vt,referenceType:u}},superTypes:[Dn]},StringLiteral:{name:Yt,properties:{value:{name:Xt}},superTypes:[Yn]},TerminalAlternatives:{name:Qt,properties:{cardinality:{name:Jt},elements:{name:Zt,defaultValue:[]},lookahead:{name:en},parenthesized:{name:tn,defaultValue:!1}},superTypes:[rn]},TerminalElement:{name:rn,properties:{cardinality:{name:sn},lookahead:{name:on},parenthesized:{name:an,defaultValue:!1}},superTypes:[i]},TerminalGroup:{name:cn,properties:{cardinality:{name:ln},elements:{name:un,defaultValue:[]},lookahead:{name:dn},parenthesized:{name:hn,defaultValue:!1}},superTypes:[rn]},TerminalRule:{name:pn,properties:{definition:{name:mn},fragment:{name:gn,defaultValue:!1},hidden:{name:yn,defaultValue:!1},name:{name:Tn},type:{name:Rn}},superTypes:[l]},TerminalRuleCall:{name:An,properties:{cardinality:{name:En},lookahead:{name:kn},parenthesized:{name:Sn,defaultValue:!1},rule:{name:Cn,referenceType:pn}},superTypes:[rn]},Type:{name:bn,properties:{name:{name:wn},type:{name:xn}},superTypes:[u]},TypeAttribute:{name:In,properties:{defaultValue:{name:Pn},isOptional:{name:_n,defaultValue:!1},name:{name:Ln},type:{name:On}},superTypes:[]},TypeDefinition:{name:Dn,properties:{},superTypes:[]},UnionType:{name:Mn,properties:{types:{name:Fn,defaultValue:[]}},superTypes:[Dn]},UnorderedGroup:{name:qn,properties:{cardinality:{name:Un},elements:{name:jn,defaultValue:[]}},superTypes:[i]},UntilToken:{name:zn,properties:{cardinality:{name:Kn},lookahead:{name:Bn},parenthesized:{name:Wn,defaultValue:!1},terminal:{name:Vn}},superTypes:[rn]},ValueLiteral:{name:Yn,properties:{},superTypes:[]},Wildcard:{name:Xn,properties:{cardinality:{name:Qn},lookahead:{name:Jn},parenthesized:{name:Zn,defaultValue:!1}},superTypes:[rn]}}}}const nr=new tr},1945(e,t,n){n.d(t,{Q:()=>l});var r=n(9637),i=n(2151),s=n(9683),o=n(418),a=n(2806),c=n(1719);class l{constructor(){this.diagnostics=[]}buildTokens(e,t){const n=(0,c.Td)((0,o.YV)(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(i.rE).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){const t=(0,o.S)(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:n};return"function"==typeof n&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=(0,a.Yv)(t)?r.JG.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!(!e.flags.includes("u")&&!e.flags.includes("s"))}regexPatternFunction(e){const t=new RegExp(e,e.flags+"y");return(e,n)=>{t.lastIndex=n;return t.exec(e)}}buildKeywordTokens(e,t,n){return e.filter(i.cM).flatMap(e=>(0,s.Uo)(e).filter(i.wb)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,Boolean(n?.caseInsensitive)))}buildKeywordToken(e,t,n){const r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return"function"==typeof r&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp((0,a.Nt)(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{const r=n?.PATTERN;return r?.source&&(0,a.PC)("^"+r.source+"$",e.value)&&t.push(n),t},[])}}},5033(e,t,n){n.d(t,{d:()=>o});var r,i=n(2151),s=n(418);class o{convert(e,t){let n=t.grammarSource;if((0,i._c)(n)&&(n=(0,s.g4)(n)),(0,i.$g)(n)){const r=n.rule.ref;if(!r)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case"INT":return r.convertInt(t);case"STRING":return r.convertString(t);case"ID":return r.convertID(t)}switch((0,s.P3)(e)?.toLowerCase()){case"number":return r.convertNumber(t);case"boolean":return r.convertBoolean(t);case"bigint":return r.convertBigint(t);case"date":return r.convertDate(t);default:return t}}}!function(e){function t(e){switch(e){case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";case"v":return"\v";case"0":return"\0";default:return e}}e.convertString=function(e){let n="";for(let r=1;ri,Dm:()=>s,FC:()=>u,Nr:()=>o,Zl:()=>a,br:()=>d,kD:()=>c,mD:()=>l,ng:()=>r});class c{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){const t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const n=t.properties[e.property]?.referenceType;if(!n)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){const t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return r(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||(n=this.subtypes[e]={});const r=n[t];if(void 0!==r)return r;{const r=this.types[e],i=!!r&&r.superTypes.some(e=>this.isSubtype(e,t));return n[t]=i,i}}getAllSubTypes(e){const t=this.allSubtypes[e];if(t)return t;{const t=this.getAllTypes(),n=[];for(const r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}}function l(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function u(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function d(e){return l(e)&&"string"==typeof e.fullText}},9683(e,t,n){n.d(t,{DM:()=>m,OP:()=>g,SD:()=>o,Uo:()=>h,VN:()=>d,XG:()=>a,YE:()=>c,cQ:()=>l,jm:()=>f,tC:()=>u});var r=n(2479),i=n(1719),s=n(6373);function o(e,t={}){for(const[n,i]of Object.entries(e))n.startsWith("$")||(Array.isArray(i)?i.forEach((i,s)=>{(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,i.$containerIndex=s,t.deep&&o(i,t))}):(0,r.ng)(i)&&(i.$container=e,i.$containerProperty=n,t.deep&&o(i,t)))}function a(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function c(e){const t=l(e).$document;if(!t)throw new Error("AST node has no document.");return t}function l(e){for(;e.$container;)e=e.$container;return e}function u(e){return(0,r.A_)(e)?e.ref?[e.ref]:[]:(0,r.Dm)(e)?e.items.map(e=>e.ref):[]}function d(e,t){if(!e)throw new Error("Node must be an AstNode.");const n=t?.range;return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexd(e,t))}function f(e,t){if(!e)throw new Error("Root node must be an AstNode.");return t?.range&&!p(e,t.range)?new i.Vj(e,()=>[]):new i.Vj(e,e=>d(e,t),{includeRoot:!0})}function p(e,t){if(!t)return!0;const n=e.$cstNode?.range;return!!n&&(0,s.r4)(n,t)}function m(e){return new i.fq(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexd,NS:()=>o,SX:()=>l,pO:()=>a,r4:()=>u,v:()=>h,wf:()=>c});var r,i=n(2479),s=n(1719);function o(e){return new s.Vj(e,e=>(0,i.mD)(e)?e.content:[],{includeRoot:!0})}function a(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function c(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function l(e){if(!e)return;const{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function u(e,t){const n=function(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return r.After;const n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.liner.After}!function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"}(r||(r={}));const d=/^[\w\p{L}]$/u;function h(e,t){if(e){const n=function(e,t=!0){for(;e.container;){const n=e.container;let r=n.content.indexOf(e);for(;r>0;){r--;const e=n.content[r];if(t||!e.hidden)return e}e=n}return}(e,!0);if(n&&f(n,t))return n;if((0,i.br)(e)){for(let n=e.content.findIndex(e=>!e.hidden)-1;n>=0;n--){const r=e.content[n];if(f(r,t))return r}}}}function f(e,t){return(0,i.FC)(e)&&t.includes(e.tokenType.name)}},1564(e,t,n){n.d(t,{WB:()=>r,dr:()=>i});class r extends Error{constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}}function i(e,t="Error: Got unexpected value."){throw new Error(t)}},418(e,t,n){n.d(t,{Bd:()=>f,P3:()=>C,Rp:()=>T,S:()=>$,SS:()=>g,U5:()=>R,Uz:()=>S,Xq:()=>A,YV:()=>l,eb:()=>h,g4:()=>d,qO:()=>p});var r=n(1564),i=n(2151),s=n(2479),o=n(9683),a=n(6373),c=n(2806);function l(e,t){const n=new Set,r=function(e){return e.rules.find(e=>i.s7(e)&&e.entry)}(e);if(!r)return new Set(e.rules);const s=[r].concat(function(e){return e.rules.filter(e=>i.rE(e)&&e.hidden)}(e));for(const i of s)u(i,n,t);const o=new Set;for(const a of e.rules)(n.has(a.name)||i.rE(a)&&a.hidden)&&o.add(a);return o}function u(e,t,n){t.add(e.name),(0,o.Uo)(e).forEach(e=>{if(i.$g(e)||n&&i.lF(e)){const r=e.rule.ref;r&&!t.has(r.name)&&u(r,t,n)}})}function d(e){if(e.terminal)return e.terminal;if(e.type.ref){const t=R(e.type.ref);return t?.terminal}}function h(e){return e.hidden&&!(0,c.Yv)($(e))}function f(e,t){return e&&t?m(e,t,e.astNode,!0):[]}function p(e,t,n){if(!e||!t)return;const r=m(e,t,e.astNode,!0);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function m(e,t,n,r){if(!r){const n=(0,o.XG)(e.grammarSource,i.wh);if(n&&n.feature===t)return[e]}return(0,s.mD)(e)&&e.astNode===n?e.content.flatMap(e=>m(e,t,n,!1)):[]}function g(e,t,n){if(!e)return;const r=y(e,t,e?.astNode);return 0!==r.length?r[n=void 0!==n?Math.max(0,Math.min(n,r.length-1)):0]:void 0}function y(e,t,n){if(e.astNode!==n)return[];if(i.wb(e.grammarSource)&&e.grammarSource.value===t)return[e];const r=(0,a.NS)(e).iterator();let s;const o=[];do{if(s=r.next(),!s.done){const e=s.value;e.astNode===n?i.wb(e.grammarSource)&&e.grammarSource.value===t&&o.push(e):r.prune()}}while(!s.done);return o}function T(e){const t=e.astNode;for(;t===e.container?.astNode;){const t=(0,o.XG)(e.grammarSource,i.wh);if(t)return t;e=e.container}}function R(e){let t=e;return i.SP(t)&&(i.ve(t.$container)?t=t.$container.$container:i.cM(t.$container)?t=t.$container:(0,r.dr)(t.$container)),v(e,t,new Map)}function v(e,t,n){function r(t,r){let s;return(0,o.XG)(t,i.wh)||(s=v(r,r,n)),n.set(e,s),s}if(n.has(e))return n.get(e);n.set(e,void 0);for(const s of(0,o.Uo)(t)){if(i.wh(s)&&"name"===s.feature.toLowerCase())return n.set(e,s),s;if(i.$g(s)&&i.s7(s.rule.ref))return r(s,s.rule.ref);if(i.D8(s)&&s.typeRef?.ref)return r(s,s.typeRef.ref)}}function A(e){return E(e,new Set)}function E(e,t){if(t.has(e))return!0;t.add(e);for(const n of(0,o.Uo)(e))if(i.$g(n)){if(!n.rule.ref)return!1;if(i.s7(n.rule.ref)&&!E(n.rule.ref,t))return!1;if(i.NT(n.rule.ref))return!1}else{if(i.wh(n))return!1;if(i.ve(n))return!1}return Boolean(e.definition)}function k(e){if(!i.rE(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){const t=e.returnType.ref;if(t)return t.name}}}function S(e){if(i.cM(e))return i.s7(e)&&A(e)?e.name:k(e)??e.name;if(i.S2(e)||i.Xj(e)||i.fG(e))return e.name;if(i.ve(e)){const t=function(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return S(e.type.ref);return}(e);if(t)return t}else if(i.SP(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function C(e){return i.rE(e)?e.type?.name??"string":k(e)??e.name}function $(e){const t={s:!1,i:!1,u:!1},n=w(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join("");return new RegExp(n,r)}const b=/[\s\S]/.source;function w(e,t){if(i.Fy(e))return N((o=e).elements.map(e=>w(e)).join("|"),{cardinality:o.cardinality,lookahead:o.lookahead,parenthesized:o.parenthesized,wrap:!1});if(i.O4(e))return N((s=e).elements.map(e=>w(e)).join(""),{cardinality:s.cardinality,lookahead:s.lookahead,parenthesized:s.parenthesized,wrap:!1});if(i.Bg(e))return function(e){if(e.right)return N(`[${x(e.left)}-${x(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1});return N(x(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}(e);if(i.lF(e)){const t=e.rule.ref;if(!t)throw new Error("Missing rule reference.");return N(w(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(i.GL(e))return N(`(?!${w((r=e).terminal)})${b}*?`,{cardinality:r.cardinality,lookahead:r.lookahead,parenthesized:r.parenthesized});if(i.Mz(e))return N(`${b}*?${w((n=e).terminal)}`,{cardinality:n.cardinality,lookahead:n.lookahead,parenthesized:n.parenthesized});if(i.vd(e)){const n=e.regex.lastIndexOf("/"),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),N(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(i.z2(e))return N(b,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`);var n,r,s,o}function x(e){return(0,c.Nt)(e.value)}function N(e,t){if(t.parenthesized||t.lookahead||!1!==t.wrap){e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`}return t.cardinality?`${e}${t.cardinality}`:e}},2806(e,t,n){n.d(t,{Nt:()=>d,PC:()=>h,TH:()=>i,Yv:()=>u,lU:()=>c});var r=n(5186);const i=/\r?\n/gm,s=new r.H;class o extends r.z{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const t=String.fromCharCode(e.value);if(this.multiline||"\n"!==t||(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const e=d(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){const t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=Boolean("\n".match(n))}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){if("Group"===e.type){if(e.quantifier)return}super.visitChildren(e)}}const a=new o;function c(e){try{return"string"==typeof e&&(e=new RegExp(e)),e=e.toString(),a.reset(e),a.visit(s.pattern(e)),a.multiline}catch{return!1}}const l="\f\n\r\t\v \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000\ufeff".split("");function u(e){const t="string"==typeof e?new RegExp(e):e;return l.some(e=>t.test(e))}function d(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function h(e,t){const n=function(e){"string"==typeof e&&(e=new RegExp(e));const t=e,n=e.source;let r=0;function i(){let e,s="";function o(e){s+=n.substr(r,e),r+=e}function a(e){s+="(?:"+n.substr(r,e)+"|$)",r+=e}for(;r",r)-r+1);break;default:a(2)}break;case"[":e=/\[(?:\\.|.)*?\]/g,e.lastIndex=r,e=e.exec(n)||[],a(e[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":e=/\{\d+,?\d*\}/g,e.lastIndex=r,e=e.exec(n),e?o(e[0].length):a(1);break;case"(":if("?"===n[r+1])switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":e=r,r+=3,i(),s+=n.substr(e,r-e);break;case"<":switch(n[r+3]){case"=":case"!":e=r,r+=4,i(),s+=n.substr(e,r-e);break;default:o(n.indexOf(">",r)-r+1),s+=i()+"|$)"}}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:a(1)}return s}return new RegExp(i(),e.flags)}(e),r=t.match(n);return!!r&&r[0].length>0}},1719(e,t,n){n.d(t,{B5:()=>o,Rf:()=>a,Td:()=>c,Vj:()=>l,fq:()=>r,iD:()=>u});class r{constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){const e=this.iterator();return Boolean(e.next().done)}count(){const e=this.iterator();let t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){const e=[],t=this.iterator();let n;do{n=t.next(),void 0!==n.value&&e.push(n.value)}while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){const n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(e){return new r(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do{if(t=this.nextFn(e.first),!t.done)return t}while(!t.done);e.firstDone=!0}do{if(t=e.iterator.next(),!t.done)return t}while(!t.done);return a})}join(e=","){const t=this.iterator();let n,r="",s=!1;do{n=t.next(),n.done||(s&&(r+=e),r+=i(n.value)),s=!0}while(!n.done);return r}indexOf(e,t=0){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(e){return new r(this.startFn,t=>{const{done:n,value:r}=this.nextFn(t);return n?a:{done:!1,value:e(r)}})}filter(e){return new r(this.startFn,t=>{let n;do{if(n=this.nextFn(t),!n.done&&e(n.value))return n}while(!n.done);return a})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){const n=this.iterator();let r=t,i=n.next();for(;!i.done;)r=void 0===r?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){const r=e.next();if(r.done)return n;const i=this.recursiveReduce(e,t,n);return void 0===i?r.value:t(i,r.value)}find(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){const t=this.iterator();let n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){const t=this.iterator();let n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(e){return new r(()=>({this:this.startFn()}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}const{done:n,value:r}=this.nextFn(t.this);if(!n){const n=e(r);if(!s(n))return{done:!1,value:n};t.iterator=n[Symbol.iterator]()}}while(t.iterator);return a})}flat(e){if(void 0===e&&(e=1),e<=0)return this;const t=e>1?this.flat(e-1):this;return new r(()=>({this:t.startFn()}),e=>{do{if(e.iterator){const t=e.iterator.next();if(!t.done)return t;e.iterator=void 0}const{done:n,value:r}=t.nextFn(e.this);if(!n){if(!s(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return a})}head(){const e=this.iterator().next();if(!e.done)return e.value}tail(e=1){return new r(()=>{const t=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?a:this.nextFn(t.state)))}distinct(e){return new r(()=>({set:new Set,internalState:this.startFn()}),t=>{let n;do{if(n=this.nextFn(t.internalState),!n.done){const r=e?e(n.value):n.value;if(!t.set.has(r))return t.set.add(r),n}}while(!n.done);return a})}exclude(e,t){const n=new Set;for(const r of e){const e=t?t(r):r;n.add(e)}return this.filter(e=>{const r=t?t(e):e;return!n.has(r)})}}function i(e){return"string"==typeof e?e:void 0===e?"undefined":"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e)}function s(e){return!!e&&"function"==typeof e[Symbol.iterator]}const o=new r(()=>{},()=>a),a=Object.freeze({done:!0,value:void 0});function c(...e){if(1===e.length){const t=e[0];if(t instanceof r)return t;if(s(t))return new r(()=>t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new r(()=>({index:0}),e=>e.index1?new r(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){const e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&(e.iterators.pop(),e.pruned=!1);e.iterators.length>0;){const n=e.iterators[e.iterators.length-1].next();if(!n.done)return e.iterators.push(t(n.value)[Symbol.iterator]()),n;e.iterators.pop()}return a})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var u;!function(e){e.sum=function(e){return e.reduce((e,t)=>e+t,0)},e.product=function(e){return e.reduce((e,t)=>e*t,0)},e.min=function(e){return e.reduce((e,t)=>Math.min(e,t))},e.max=function(e){return e.reduce((e,t)=>Math.max(e,t))}}(u||(u={}))},4298(e,t,n){n.d(t,{D:()=>i});class r{stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}}const i={fileSystemProvider:()=>new r}},2559(e,t,n){n.d(t,{A:()=>i});var r=n(1882);const i=function(e,t,n){for(var i=-1,s=e.length;++ir});const r=function(e,t){return es});var r=n(6240),i=n(8446);const s=function(e,t){var n=-1,s=(0,i.A)(e)?Array(e.length):[];return(0,r.A)(e,function(e,r,i){s[++n]=t(e,r,i)}),s}},9354(e,t,n){n.d(t,{A:()=>u});var r=n(6318),i=n(2851),s=n(7819),o=n(5353),a=n(3149),c=n(901);const l=function(e,t,n,r){if(!(0,a.A)(e))return e;for(var l=-1,u=(t=(0,s.A)(t,e)).length,d=u-1,h=e;null!=h&&++li});var r=n(8675);const i=function(e){return(0,r.A)(e,4)}},3068(e,t,n){n.d(t,{A:()=>l});var r=n(4326),i=n(6984),s=n(6832),o=n(5615),a=Object.prototype,c=a.hasOwnProperty;const l=(0,r.A)(function(e,t){e=Object(e);var n=-1,r=t.length,l=r>2?t[2]:void 0;for(l&&(0,s.A)(t[0],t[1],l)&&(r=1);++nu});var r=n(3958),i=n(8446),s=n(7422);const o=function(e){return function(t,n,o){var a=Object(t);if(!(0,i.A)(t)){var c=(0,r.A)(n,3);t=(0,s.A)(t),n=function(e){return c(a[e],e,a)}}var l=e(t,n,o);return l>-1?a[c?t[l]:l]:void 0}};var a=n(5707),c=n(8593),l=Math.max;const u=o(function(e,t,n){var i=null==e?0:e.length;if(!i)return-1;var s=null==n?0:(0,c.A)(n);return s<0&&(s=l(i+s,0)),(0,a.A)(e,(0,r.A)(t,3),s)})},8139(e,t,n){n.d(t,{A:()=>s});var r=n(3588),i=n(4722);const s=function(e,t){return(0,r.A)((0,i.A)(e,t),1)}},4098(e,t,n){n.d(t,{A:()=>i});var r=n(3588);const i=function(e){return(null==e?0:e.length)?(0,r.A)(e,1):[]}},8585(e,t,n){n.d(t,{A:()=>o});var r=Object.prototype.hasOwnProperty;const i=function(e,t){return null!=e&&r.call(e,t)};var s=n(5054);const o=function(e,t){return null!=e&&(0,s.A)(e,t,i)}},9703(e,t,n){n.d(t,{A:()=>o});var r=n(8496),i=n(2049),s=n(3098);const o=function(e){return"string"==typeof e||!(0,i.A)(e)&&(0,s.A)(e)&&"[object String]"==(0,r.A)(e)}},6666(e,t,n){n.d(t,{A:()=>r});const r=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},4722(e,t,n){n.d(t,{A:()=>a});var r=n(5572),i=n(3958),s=n(2568),o=n(2049);const a=function(e,t){return((0,o.A)(e)?r.A:s.A)(e,(0,i.A)(t,3))}},6452(e,t,n){n.d(t,{A:()=>o});var r=n(2559),i=n(6224),s=n(9008);const o=function(e){return e&&e.length?(0,r.A)(e,s.A,i.A):void 0}},4342(e,t,n){n.d(t,{A:()=>m});var r=/\s/;const i=function(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t};var s=/^\s+/;const o=function(e){return e?e.slice(0,i(e)+1).replace(s,""):e};var a=n(3149),c=n(1882),l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,c.A)(e))return NaN;if((0,a.A)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,a.A)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=o(e);var n=u.test(e);return n||d.test(e)?h(e.slice(2),n?2:8):l.test(e)?NaN:+e};var p=1/0;const m=function(e){return e?(e=f(e))===p||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8593(e,t,n){n.d(t,{A:()=>i});var r=n(4342);const i=function(e){var t=(0,r.A)(e),n=t%1;return t==t?n?t-n:t:0}},6203(e,t,n){var r,i,s,o,a,c,l,u,d,h,f,p,m,g,y,T,R,v,A,E,k,S,C,$,b,w,x,N,I,P,_,L,O,D,M,F,q,U,j,G,z,K,B,W,V,H,Y,X,Q,J,Z,ee,te,ne,re,ie,se,oe,ae,ce,le,ue,de,he,fe,pe,me,ge,ye,Te,Re,ve,Ae,Ee,ke,Se,Ce,$e;n.r(t),n.d(t,{AnnotatedTextEdit:()=>C,ChangeAnnotation:()=>k,ChangeAnnotationIdentifier:()=>S,CodeAction:()=>se,CodeActionContext:()=>ie,CodeActionKind:()=>ne,CodeActionTriggerKind:()=>re,CodeDescription:()=>R,CodeLens:()=>oe,Color:()=>d,ColorInformation:()=>h,ColorPresentation:()=>f,Command:()=>A,CompletionItem:()=>z,CompletionItemKind:()=>M,CompletionItemLabelDetails:()=>G,CompletionItemTag:()=>q,CompletionList:()=>K,CreateFile:()=>b,DeleteFile:()=>x,Diagnostic:()=>v,DiagnosticRelatedInformation:()=>g,DiagnosticSeverity:()=>y,DiagnosticTag:()=>T,DocumentHighlight:()=>X,DocumentHighlightKind:()=>Y,DocumentLink:()=>ce,DocumentSymbol:()=>te,DocumentUri:()=>r,EOL:()=>Ne,FoldingRange:()=>m,FoldingRangeKind:()=>p,FormattingOptions:()=>ae,Hover:()=>W,InlayHint:()=>Re,InlayHintKind:()=>ye,InlayHintLabelPart:()=>Te,InlineCompletionContext:()=>Ce,InlineCompletionItem:()=>Ae,InlineCompletionList:()=>Ee,InlineCompletionTriggerKind:()=>ke,InlineValueContext:()=>ge,InlineValueEvaluatableExpression:()=>me,InlineValueText:()=>fe,InlineValueVariableLookup:()=>pe,InsertReplaceEdit:()=>U,InsertTextFormat:()=>F,InsertTextMode:()=>j,Location:()=>l,LocationLink:()=>u,MarkedString:()=>B,MarkupContent:()=>D,MarkupKind:()=>O,OptionalVersionedTextDocumentIdentifier:()=>_,ParameterInformation:()=>V,Position:()=>a,Range:()=>c,RenameFile:()=>w,SelectedCompletionInfo:()=>Se,SelectionRange:()=>le,SemanticTokenModifiers:()=>de,SemanticTokenTypes:()=>ue,SemanticTokens:()=>he,SignatureInformation:()=>H,StringValue:()=>ve,SymbolInformation:()=>Z,SymbolKind:()=>Q,SymbolTag:()=>J,TextDocument:()=>Ie,TextDocumentEdit:()=>$,TextDocumentIdentifier:()=>I,TextDocumentItem:()=>L,TextEdit:()=>E,URI:()=>i,VersionedTextDocumentIdentifier:()=>P,WorkspaceChange:()=>xe,WorkspaceEdit:()=>N,WorkspaceFolder:()=>$e,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>o}),function(e){e.is=function(e){return"string"==typeof e}}(r||(r={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(o||(o={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=o.MAX_VALUE),t===Number.MAX_VALUE&&(t=o.MAX_VALUE),{line:e,character:t}},e.is=function(e){let t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}}(a||(a={})),function(e){e.create=function(e,t,n,r){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(n)&&Pe.uinteger(r))return{start:a.create(e,t),end:a.create(n,r)};if(a.is(e)&&a.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)},e.is=function(e){let t=e;return Pe.objectLiteral(t)&&a.is(t.start)&&a.is(t.end)}}(c||(c={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){let t=e;return Pe.objectLiteral(t)&&c.is(t.range)&&(Pe.string(t.uri)||Pe.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){let t=e;return Pe.objectLiteral(t)&&c.is(t.targetRange)&&Pe.string(t.targetUri)&&c.is(t.targetSelectionRange)&&(c.is(t.originSelectionRange)||Pe.undefined(t.originSelectionRange))}}(u||(u={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}}(d||(d={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&c.is(t.range)&&d.is(t.color)}}(h||(h={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||E.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,E.is))}}(f||(f={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(p||(p={})),function(e){e.create=function(e,t,n,r,i,s){const o={startLine:e,endLine:t};return Pe.defined(n)&&(o.startCharacter=n),Pe.defined(r)&&(o.endCharacter=r),Pe.defined(i)&&(o.kind=i),Pe.defined(s)&&(o.collapsedText=s),o},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}}(m||(m={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){let t=e;return Pe.defined(t)&&l.is(t.location)&&Pe.string(t.message)}}(g||(g={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(y||(y={})),function(e){e.Unnecessary=1,e.Deprecated=2}(T||(T={})),function(e){e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}}(R||(R={})),function(e){e.create=function(e,t,n,r,i,s){let o={range:e,message:t};return Pe.defined(n)&&(o.severity=n),Pe.defined(r)&&(o.code=r),Pe.defined(i)&&(o.source=i),Pe.defined(s)&&(o.relatedInformation=s),o},e.is=function(e){var t;let n=e;return Pe.defined(n)&&c.is(n.range)&&Pe.string(n.message)&&(Pe.number(n.severity)||Pe.undefined(n.severity))&&(Pe.integer(n.code)||Pe.string(n.code)||Pe.undefined(n.code))&&(Pe.undefined(n.codeDescription)||Pe.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(n.source)||Pe.undefined(n.source))&&(Pe.undefined(n.relatedInformation)||Pe.typedArray(n.relatedInformation,g.is))}}(v||(v={})),function(e){e.create=function(e,t,...n){let r={title:e,command:t};return Pe.defined(n)&&n.length>0&&(r.arguments=n),r},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}}(A||(A={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&c.is(t.range)}}(E||(E={})),function(e){e.create=function(e,t,n){const r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}}(k||(k={})),function(e){e.is=function(e){const t=e;return Pe.string(t)}}(S||(S={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){const t=e;return E.is(t)&&(k.is(t.annotationId)||S.is(t.annotationId))}}(C||(C={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){let t=e;return Pe.defined(t)&&_.is(t.textDocument)&&Array.isArray(t.edits)}}($||($={})),function(e){e.create=function(e,t,n){let r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(b||(b={})),function(e){e.create=function(e,t,n,r){let i={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(i.options=n),void 0!==r&&(i.annotationId=r),i},e.is=function(e){let t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(w||(w={})),function(e){e.create=function(e,t,n){let r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){let t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||S.is(t.annotationId))}}(x||(x={})),function(e){e.is=function(e){let t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every(e=>Pe.string(e.kind)?b.is(e)||w.is(e)||x.is(e):$.is(e)))}}(N||(N={}));class be{constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(void 0===n?r=E.insert(e,t):S.is(n)?(i=n,r=C.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=C.insert(e,t,i)),this.edits.push(r),void 0!==i)return i}replace(e,t,n){let r,i;if(void 0===n?r=E.replace(e,t):S.is(n)?(i=n,r=C.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=C.replace(e,t,i)),this.edits.push(r),void 0!==i)return i}delete(e,t){let n,r;if(void 0===t?n=E.del(e):S.is(t)?(r=t,n=C.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=C.del(e,r)),this.edits.push(n),void 0!==r)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")}}class we{constructor(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(S.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error(`Id ${n} is already in use.`);if(void 0===t)throw new Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}}class xe{constructor(e){this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new we(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if($.is(e)){const t=new be(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{const n=new be(e.changes[t]);this._textEditChanges[t]=n})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(_.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");const t={uri:e.uri,version:e.version};let n=this._textEditChanges[t.uri];if(!n){const e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new be(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new be(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new we,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(k.is(t)||S.is(t)?r=t:n=t,void 0===r?i=b.create(e,n):(s=S.is(r)?r:this._changeAnnotations.manage(r),i=b.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}renameFile(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let i,s,o;if(k.is(n)||S.is(n)?i=n:r=n,void 0===i?s=w.create(e,t,r):(o=S.is(i)?i:this._changeAnnotations.manage(i),s=w.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(s),void 0!==o)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");let r,i,s;if(k.is(t)||S.is(t)?r=t:n=t,void 0===r?i=x.create(e,n):(s=S.is(r)?r:this._changeAnnotations.manage(r),i=x.create(e,n,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s}}!function(e){e.create=function(e){return{uri:e}},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)}}(I||(I={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}}(P||(P={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}}(_||(_={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}}(L||(L={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){const n=t;return n===e.PlainText||n===e.Markdown}}(O||(O={})),function(e){e.is=function(e){const t=e;return Pe.objectLiteral(e)&&O.is(t.kind)&&Pe.string(t.value)}}(D||(D={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(M||(M={})),function(e){e.PlainText=1,e.Snippet=2}(F||(F={})),function(e){e.Deprecated=1}(q||(q={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){const t=e;return t&&Pe.string(t.newText)&&c.is(t.insert)&&c.is(t.replace)}}(U||(U={})),function(e){e.asIs=1,e.adjustIndentation=2}(j||(j={})),function(e){e.is=function(e){const t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}}(G||(G={})),function(e){e.create=function(e){return{label:e}}}(z||(z={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(K||(K={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){const t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}}(B||(B={})),function(e){e.is=function(e){let t=e;return!!t&&Pe.objectLiteral(t)&&(D.is(t.contents)||B.is(t.contents)||Pe.typedArray(t.contents,B.is))&&(void 0===e.range||c.is(e.range))}}(W||(W={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(V||(V={})),function(e){e.create=function(e,t,...n){let r={label:e};return Pe.defined(t)&&(r.documentation=t),Pe.defined(n)?r.parameters=n:r.parameters=[],r}}(H||(H={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Y||(Y={})),function(e){e.create=function(e,t){let n={range:e};return Pe.number(t)&&(n.kind=t),n}}(X||(X={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Q||(Q={})),function(e){e.Deprecated=1}(J||(J={})),function(e){e.create=function(e,t,n,r,i){let s={name:e,kind:t,location:{uri:r,range:n}};return i&&(s.containerName=i),s}}(Z||(Z={})),function(e){e.create=function(e,t,n,r){return void 0!==r?{name:e,kind:t,location:{uri:n,range:r}}:{name:e,kind:t,location:{uri:n}}}}(ee||(ee={})),function(e){e.create=function(e,t,n,r,i,s){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==s&&(o.children=s),o},e.is=function(e){let t=e;return t&&Pe.string(t.name)&&Pe.number(t.kind)&&c.is(t.range)&&c.is(t.selectionRange)&&(void 0===t.detail||Pe.string(t.detail))&&(void 0===t.deprecated||Pe.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(te||(te={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(ne||(ne={})),function(e){e.Invoked=1,e.Automatic=2}(re||(re={})),function(e){e.create=function(e,t,n){let r={diagnostics:e};return null!=t&&(r.only=t),null!=n&&(r.triggerKind=n),r},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.typedArray(t.diagnostics,v.is)&&(void 0===t.only||Pe.typedArray(t.only,Pe.string))&&(void 0===t.triggerKind||t.triggerKind===re.Invoked||t.triggerKind===re.Automatic)}}(ie||(ie={})),function(e){e.create=function(e,t,n){let r={title:e},i=!0;return"string"==typeof t?(i=!1,r.kind=t):A.is(t)?r.command=t:r.edit=t,i&&void 0!==n&&(r.kind=n),r},e.is=function(e){let t=e;return t&&Pe.string(t.title)&&(void 0===t.diagnostics||Pe.typedArray(t.diagnostics,v.is))&&(void 0===t.kind||Pe.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||A.is(t.command))&&(void 0===t.isPreferred||Pe.boolean(t.isPreferred))&&(void 0===t.edit||N.is(t.edit))}}(se||(se={})),function(e){e.create=function(e,t){let n={range:e};return Pe.defined(t)&&(n.data=t),n},e.is=function(e){let t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.command)||A.is(t.command))}}(oe||(oe={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){let t=e;return Pe.defined(t)&&Pe.uinteger(t.tabSize)&&Pe.boolean(t.insertSpaces)}}(ae||(ae={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){let t=e;return Pe.defined(t)&&c.is(t.range)&&(Pe.undefined(t.target)||Pe.string(t.target))}}(ce||(ce={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){let n=t;return Pe.objectLiteral(n)&&c.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(le||(le={})),function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"}(ue||(ue={})),function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"}(de||(de={})),function(e){e.is=function(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}}(he||(he={})),function(e){e.create=function(e,t){return{range:e,text:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Pe.string(t.text)}}(fe||(fe={})),function(e){e.create=function(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&Pe.boolean(t.caseSensitiveLookup)&&(Pe.string(t.variableName)||void 0===t.variableName)}}(pe||(pe={})),function(e){e.create=function(e,t){return{range:e,expression:t}},e.is=function(e){const t=e;return null!=t&&c.is(t.range)&&(Pe.string(t.expression)||void 0===t.expression)}}(me||(me={})),function(e){e.create=function(e,t){return{frameId:e,stoppedLocation:t}},e.is=function(e){const t=e;return Pe.defined(t)&&c.is(e.stoppedLocation)}}(ge||(ge={})),function(e){e.Type=1,e.Parameter=2,e.is=function(e){return 1===e||2===e}}(ye||(ye={})),function(e){e.create=function(e){return{value:e}},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&(void 0===t.tooltip||Pe.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.location||l.is(t.location))&&(void 0===t.command||A.is(t.command))}}(Te||(Te={})),function(e){e.create=function(e,t,n){const r={position:e,label:t};return void 0!==n&&(r.kind=n),r},e.is=function(e){const t=e;return Pe.objectLiteral(t)&&a.is(t.position)&&(Pe.string(t.label)||Pe.typedArray(t.label,Te.is))&&(void 0===t.kind||ye.is(t.kind))&&void 0===t.textEdits||Pe.typedArray(t.textEdits,E.is)&&(void 0===t.tooltip||Pe.string(t.tooltip)||D.is(t.tooltip))&&(void 0===t.paddingLeft||Pe.boolean(t.paddingLeft))&&(void 0===t.paddingRight||Pe.boolean(t.paddingRight))}}(Re||(Re={})),function(e){e.createSnippet=function(e){return{kind:"snippet",value:e}}}(ve||(ve={})),function(e){e.create=function(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}}(Ae||(Ae={})),function(e){e.create=function(e){return{items:e}}}(Ee||(Ee={})),function(e){e.Invoked=0,e.Automatic=1}(ke||(ke={})),function(e){e.create=function(e,t){return{range:e,text:t}}}(Se||(Se={})),function(e){e.create=function(e,t){return{triggerKind:e,selectedCompletionInfo:t}}}(Ce||(Ce={})),function(e){e.is=function(e){const t=e;return Pe.objectLiteral(t)&&i.is(t.uri)&&Pe.string(t.name)}}($e||($e={}));const Ne=["\n","\r\n","\r"];var Ie,Pe;!function(e){function t(e,n){if(e.length<=1)return e;const r=e.length/2|0,i=e.slice(0,r),s=e.slice(r);t(i,n),t(s,n);let o=0,a=0,c=0;for(;o{let n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}),s=r.length;for(let t=i.length-1;t>=0;t--){let n=i[t],o=e.offsetAt(n.range.start),a=e.offsetAt(n.range.end);if(!(a<=s))throw new Error("Overlapping edit");r=r.substring(0,o)+n.newText+r.substring(a,r.length),s=o}return r}}(Ie||(Ie={}));class _e{constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(void 0===this._lineOffsets){let e=[],t=this._content,n=!0;for(let r=0;r0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return a.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return a.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1s,r:()=>i}),(()=>{var e={975:e=>{function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function n(e,t){for(var n,r="",i=0,s=-1,o=0,a=0;a<=e.length;++a){if(a2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),s=a,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,s=a,o=0;continue}t&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+e.slice(s+1,a):r=e.slice(s+1,a),i=a-s-1;s=a,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var e,r="",i=!1,s=arguments.length-1;s>=-1&&!i;s--){var o;s>=0?o=arguments[s]:(void 0===e&&(e=process.cwd()),o=e),t(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(e){if(t(e),0===e.length)return".";var r=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=n(e,!r)).length||r||(e="."),e.length>0&&i&&(e+="/"),r?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,n=0;n0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":r.normalize(e)},relative:function(e,n){if(t(e),t(n),e===n)return"";if((e=r.resolve(e))===(n=r.resolve(n)))return"";for(var i=1;il){if(47===n.charCodeAt(a+d))return n.slice(a+d+1);if(0===d)return n.slice(a+d)}else o>l&&(47===e.charCodeAt(i+d)?u=d:0===d&&(u=0));break}var h=e.charCodeAt(i+d);if(h!==n.charCodeAt(a+d))break;47===h&&(u=d)}var f="";for(d=i+u+1;d<=s;++d)d!==s&&47!==e.charCodeAt(d)||(0===f.length?f+="..":f+="/..");return f.length>0?f+n.slice(a+u):(a+=u,47===n.charCodeAt(a)&&++a,n.slice(a))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var n=e.charCodeAt(0),r=47===n,i=-1,s=!0,o=e.length-1;o>=1;--o)if(47===(n=e.charCodeAt(o))){if(!s){i=o;break}}else s=!1;return-1===i?r?"/":".":r&&1===i?"//":e.slice(0,i)},basename:function(e,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');t(e);var r,i=0,s=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return"";var a=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(47===l){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),a>=0&&(l===n.charCodeAt(a)?-1==--a&&(s=r):(a=-1,s=c))}return i===s?s=c:-1===s&&(s=e.length),e.slice(i,s)}for(r=e.length-1;r>=0;--r)if(47===e.charCodeAt(r)){if(!o){i=r+1;break}}else-1===s&&(o=!1,s=r+1);return-1===s?"":e.slice(i,s)},extname:function(e){t(e);for(var n=-1,r=0,i=-1,s=!0,o=0,a=e.length-1;a>=0;--a){var c=e.charCodeAt(a);if(47!==c)-1===i&&(s=!1,i=a+1),46===c?-1===n?n=a:1!==o&&(o=1):-1!==n&&(o=-1);else if(!s){r=a+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":e.slice(n,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+"/"+r:r}(0,e)},parse:function(e){t(e);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return n;var r,i=e.charCodeAt(0),s=47===i;s?(n.root="/",r=1):r=0;for(var o=-1,a=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if(47!==(i=e.charCodeAt(u)))-1===c&&(l=!1,c=u+1),46===i?-1===o?o=u:1!==d&&(d=1):-1!==o&&(d=-1);else if(!l){a=u+1;break}return-1===o||-1===c||0===d||1===d&&o===c-1&&o===a+1?-1!==c&&(n.base=n.name=0===a&&s?e.slice(1,c):e.slice(a,c)):(0===a&&s?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(a,o),n.base=e.slice(a,c)),n.ext=e.slice(o,c)),a>0?n.dir=e.slice(0,a-1):s&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};let s;if(n.r(i),n.d(i,{URI:()=>f,Utils:()=>b}),"object"==typeof process)s="win32"===process.platform;else if("object"==typeof navigator){let e=navigator.userAgent;s=e.indexOf("Windows")>=0}const o=/^\w[\w\d+.-]*$/,a=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!a.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(c.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const u="",d="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static isUri(e){return e instanceof f||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,s=!1){"object"==typeof e?(this.scheme=e.scheme||u,this.authority=e.authority||u,this.path=e.path||u,this.query=e.query||u,this.fragment=e.fragment||u):(this.scheme=function(e,t){return e||t?e:"file"}(e,s),this.authority=t||u,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==d&&(t=d+t):t=d}return t}(this.scheme,n||u),this.query=r||u,this.fragment=i||u,l(this,s))}get fsPath(){return R(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:s}=e;return void 0===t?t=this.scheme:null===t&&(t=u),void 0===n?n=this.authority:null===n&&(n=u),void 0===r?r=this.path:null===r&&(r=u),void 0===i?i=this.query:null===i&&(i=u),void 0===s?s=this.fragment:null===s&&(s=u),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&s===this.fragment?this:new m(t,n,r,i,s)}static parse(e,t=!1){const n=h.exec(e);return n?new m(n[2]||u,k(n[4]||u),k(n[5]||u),k(n[7]||u),k(n[9]||u),t):new m(u,u,u,u,u)}static file(e){let t=u;if(s&&(e=e.replace(/\\/g,d)),e[0]===d&&e[1]===d){const n=e.indexOf(d,2);-1===n?(t=e.substring(2),e=d):(t=e.substring(2,n),e=e.substring(n)||d)}return new m("file",t,e,u,u)}static from(e){const t=new m(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof f)return e;{const t=new m(e);return t._formatted=e.external,t._fsPath=e._sep===p?e.fsPath:null,t}}return e}}const p=s?1:void 0;class m extends f{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=R(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=p),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function y(e,t,n){let r,i=-1;for(let s=0;s=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o||n&&91===o||n&&93===o||n&&58===o)-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),void 0!==r&&(r+=e.charAt(s));else{void 0===r&&(r=e.substr(0,s));const t=g[o];void 0!==t?(-1!==i&&(r+=encodeURIComponent(e.substring(i,s)),i=-1),r+=t):-1===i&&(i=s)}}return-1!==i&&(r+=encodeURIComponent(e.substring(i))),void 0!==r?r:e}function T(e){let t;for(let n=0;n1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,s&&(n=n.replace(/\//g,"\\")),n}function v(e,t){const n=t?T:y;let r="",{scheme:i,authority:s,path:o,query:a,fragment:c}=e;if(i&&(r+=i,r+=":"),(s||"file"===i)&&(r+=d,r+=d),s){let e=s.indexOf("@");if(-1!==e){const t=s.substr(0,e);s=s.substr(e+1),e=t.lastIndexOf(":"),-1===e?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=":",r+=n(t.substr(e+1),!1,!0)),r+="@"}s=s.toLowerCase(),e=s.lastIndexOf(":"),-1===e?r+=n(s,!1,!0):(r+=n(s.substr(0,e),!1,!0),r+=s.substr(e))}if(o){if(o.length>=3&&47===o.charCodeAt(0)&&58===o.charCodeAt(2)){const e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&58===o.charCodeAt(1)){const e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return a&&(r+="?",r+=n(a,!1,!1)),c&&(r+="#",r+=t?c:y(c,!1,!1)),r}function A(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+A(e.substr(3)):e}}const E=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(e){return e.match(E)?e.replace(E,e=>A(e)):e}var S=n(975);const C=S.posix||S,$="/";var b;!function(e){e.joinPath=function(e,...t){return e.with({path:C.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==$&&(n=$+n,r=!0);let i=C.resolve(n,...t);return r&&i[0]===$&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(0===e.path.length||e.path===$)return e;let t=C.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},e.basename=function(e){return C.basename(e.path)},e.extname=function(e){return C.extname(e.path)}}(b||(b={})),r=i})();const{URI:i,Utils:s}=r}}]); \ No newline at end of file diff --git a/assets/js/8756.2c2f045b.js b/assets/js/8756.2c2f045b.js deleted file mode 100644 index 72d577d..0000000 --- a/assets/js/8756.2c2f045b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8756],{5937(t,e,s){s.d(e,{A:()=>r});var i=s(2453),n=s(4886);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},9625(t,e,s){s.d(e,{A:()=>r});var i=s(797),n=s(451),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},1152(t,e,s){s.d(e,{P:()=>r});var i=s(7633),n=s(797),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:o,height:l,x:h,y:u}=a(t,e);(0,i.a$)(t,l,o,r);const y=c(h,u,o,l,e);t.attr("viewBox",y),n.Rm.debug(`viewBox configured: ${y} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),c=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},8756(t,e,s){s.d(e,{diagram:()=>f});var i=s(9625),n=s(1152),r=s(45),a=(s(5164),s(8698),s(5894),s(3245),s(2387),s(92),s(3226)),c=s(7633),o=s(797),l=s(451),h=s(5582),u=s(5937),y=function(){var t=(0,o.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],s=[1,10],i=[1,11],n=[1,12],r=[1,13],a=[1,20],c=[1,21],l=[1,22],h=[1,23],u=[1,24],y=[1,19],d=[1,25],p=[1,26],_=[1,18],g=[1,33],b=[1,34],m=[1,35],f=[1,36],E=[1,37],k=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],S=[1,42],O=[1,43],T=[1,52],A=[40,50,68,69],R=[1,63],N=[1,61],I=[1,58],C=[1,62],x=[1,64],v=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],D=[63,64,65,66,67],$=[1,81],w=[1,80],K=[1,78],L=[1,79],M=[6,10,42,47],B=[6,10,13,41,42,47,48,49],F=[1,89],P=[1,88],Y=[1,87],G=[19,56],z=[1,98],U=[1,97],Z=[19,56,58,60],j={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:(0,o.K2)(function(t,e,s,i,n,r,a){var c=r.length-1;switch(n){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:r[c-1].push(r[c]),this.$=r[c-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=r[c];break;case 8:i.addEntity(r[c-4]),i.addEntity(r[c-2]),i.addRelationship(r[c-4],r[c],r[c-2],r[c-3]);break;case 9:i.addEntity(r[c-8]),i.addEntity(r[c-4]),i.addRelationship(r[c-8],r[c],r[c-4],r[c-5]),i.setClass([r[c-8]],r[c-6]),i.setClass([r[c-4]],r[c-2]);break;case 10:i.addEntity(r[c-6]),i.addEntity(r[c-2]),i.addRelationship(r[c-6],r[c],r[c-2],r[c-3]),i.setClass([r[c-6]],r[c-4]);break;case 11:i.addEntity(r[c-6]),i.addEntity(r[c-4]),i.addRelationship(r[c-6],r[c],r[c-4],r[c-5]),i.setClass([r[c-4]],r[c-2]);break;case 12:i.addEntity(r[c-3]),i.addAttributes(r[c-3],r[c-1]);break;case 13:i.addEntity(r[c-5]),i.addAttributes(r[c-5],r[c-1]),i.setClass([r[c-5]],r[c-3]);break;case 14:i.addEntity(r[c-2]);break;case 15:i.addEntity(r[c-4]),i.setClass([r[c-4]],r[c-2]);break;case 16:i.addEntity(r[c]);break;case 17:i.addEntity(r[c-2]),i.setClass([r[c-2]],r[c]);break;case 18:i.addEntity(r[c-6],r[c-4]),i.addAttributes(r[c-6],r[c-1]);break;case 19:i.addEntity(r[c-8],r[c-6]),i.addAttributes(r[c-8],r[c-1]),i.setClass([r[c-8]],r[c-3]);break;case 20:i.addEntity(r[c-5],r[c-3]);break;case 21:i.addEntity(r[c-7],r[c-5]),i.setClass([r[c-7]],r[c-2]);break;case 22:i.addEntity(r[c-3],r[c-1]);break;case 23:i.addEntity(r[c-5],r[c-3]),i.setClass([r[c-5]],r[c]);break;case 24:case 25:this.$=r[c].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[c].trim(),i.setAccDescription(this.$);break;case 32:i.setDirection("TB");break;case 33:i.setDirection("BT");break;case 34:i.setDirection("RL");break;case 35:i.setDirection("LR");break;case 36:this.$=r[c-3],i.addClass(r[c-2],r[c-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[r[c]];break;case 39:case 40:this.$=r[c-2].concat([r[c]]);break;case 41:this.$=r[c-2],i.setClass(r[c-1],r[c]);break;case 42:this.$=r[c-3],i.addCssStyles(r[c-2],r[c-1]);break;case 44:case 65:r[c-2].push(r[c]),this.$=r[c-2];break;case 46:this.$=r[c-1]+r[c];break;case 54:case 76:case 77:case 67:this.$=r[c].replace(/"/g,"");break;case 57:r[c].push(r[c-1]),this.$=r[c];break;case 58:this.$={type:r[c-1],name:r[c]};break;case 59:this.$={type:r[c-2],name:r[c-1],keys:r[c]};break;case 60:this.$={type:r[c-2],name:r[c-1],comment:r[c]};break;case 61:this.$={type:r[c-3],name:r[c-2],keys:r[c-1],comment:r[c]};break;case 68:this.$={cardA:r[c],relType:r[c-1],cardB:r[c-2]};break;case 69:this.$=i.Cardinality.ZERO_OR_ONE;break;case 70:this.$=i.Cardinality.ZERO_OR_MORE;break;case 71:this.$=i.Cardinality.ONE_OR_MORE;break;case 72:this.$=i.Cardinality.ONLY_ONE;break;case 73:this.$=i.Cardinality.MD_PARENT;break;case 74:this.$=i.Identification.NON_IDENTIFYING;break;case 75:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:l,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:27,11:9,22:s,24:i,26:n,28:r,29:14,30:15,31:16,32:17,33:a,34:c,35:l,36:h,37:u,40:y,43:d,44:p,50:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:g,64:b,65:m,66:f,67:E}),{23:[1,38]},{25:[1,39]},{27:[1,40]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),t(e,[2,30]),t(e,[2,31]),t(k,[2,54]),t(k,[2,55]),t(e,[2,32]),t(e,[2,33]),t(e,[2,34]),t(e,[2,35]),{16:41,40:S,41:O},{16:44,40:S,41:O},{16:45,40:S,41:O},t(e,[2,4]),{11:46,40:y,50:_},{16:47,40:S,41:O},{18:48,19:[1,49],51:50,52:51,56:T},{11:53,40:y,50:_},{62:54,68:[1,55],69:[1,56]},t(A,[2,69]),t(A,[2,70]),t(A,[2,71]),t(A,[2,72]),t(A,[2,73]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),{13:R,38:57,41:N,42:I,45:59,46:60,48:C,49:x},t(v,[2,37]),t(v,[2,38]),{16:65,40:S,41:O,42:I},{13:R,38:66,41:N,42:I,45:59,46:60,48:C,49:x},{13:[1,67],15:[1,68]},t(e,[2,17],{61:32,12:69,17:[1,70],42:I,63:g,64:b,65:m,66:f,67:E}),{19:[1,71]},t(e,[2,14]),{18:72,19:[2,56],51:50,52:51,56:T},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:g,64:b,65:m,66:f,67:E},t(D,[2,74]),t(D,[2,75]),{6:$,10:w,39:77,42:K,47:L},{40:[1,82],41:[1,83]},t(M,[2,43],{46:84,13:R,41:N,48:C,49:x}),t(B,[2,45]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),t(B,[2,53]),t(e,[2,41],{42:I}),{6:$,10:w,39:85,42:K,47:L},{14:86,40:F,50:P,70:Y},{16:90,40:S,41:O},{11:91,40:y,50:_},{18:92,19:[1,93],51:50,52:51,56:T},t(e,[2,12]),{19:[2,57]},t(G,[2,58],{54:94,55:95,57:96,59:z,60:U}),t([19,56,59,60],[2,63]),t(e,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(e,[2,36]),{13:R,41:N,45:101,46:60,48:C,49:x},t(e,[2,47]),t(e,[2,48]),t(e,[2,49]),t(v,[2,39]),t(v,[2,40]),t(B,[2,46]),t(e,[2,42]),t(e,[2,8]),t(e,[2,76]),t(e,[2,77]),t(e,[2,78]),{13:[1,102],42:I},{13:[1,104],15:[1,103]},{19:[1,105]},t(e,[2,15]),t(G,[2,59],{55:106,58:[1,107],60:U}),t(G,[2,60]),t(Z,[2,64]),t(G,[2,67]),t(Z,[2,66]),{18:108,19:[1,109],51:50,52:51,56:T},{16:110,40:S,41:O},t(M,[2,44],{46:84,13:R,41:N,48:C,49:x}),{14:111,40:F,50:P,70:Y},{16:112,40:S,41:O},{14:113,40:F,50:P,70:Y},t(e,[2,13]),t(G,[2,61]),{57:114,59:z},{19:[1,115]},t(e,[2,20]),t(e,[2,23],{17:[1,116],42:I}),t(e,[2,11]),{13:[1,117],42:I},t(e,[2,10]),t(Z,[2,65]),t(e,[2,18]),{18:118,19:[1,119],51:50,52:51,56:T},{14:120,40:F,50:P,70:Y},{19:[1,121]},t(e,[2,21]),t(e,[2,9]),t(e,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:(0,o.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,c="",l=0,h=0,u=0,y=r.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(p.yy[_]=this.yy[_]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var g=d.yylloc;r.push(g);var b=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,o.K2)(m,"lex");for(var f,E,k,S,O,T,A,R,N,I={};;){if(k=s[s.length-1],this.defaultActions[k]?S=this.defaultActions[k]:(null==f&&(f=m()),S=a[k]&&a[k][f]),void 0===S||!S.length||!S[0]){var C="";for(T in N=[],a[k])this.terminals_[T]&&T>2&&N.push("'"+this.terminals_[T]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+N.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:g,expected:N})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+f);switch(S[0]){case 1:s.push(f),n.push(d.yytext),r.push(d.yylloc),s.push(S[1]),f=null,E?(f=E,E=null):(h=d.yyleng,c=d.yytext,l=d.yylineno,g=d.yylloc,u>0&&u--);break;case 2:if(A=this.productions_[S[1]][1],I.$=n[n.length-A],I._$={first_line:r[r.length-(A||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(A||1)].first_column,last_column:r[r.length-1].last_column},b&&(I._$.range=[r[r.length-(A||1)].range[0],r[r.length-1].range[1]]),void 0!==(O=this.performAction.apply(I,[c,h,l,p.yy,S[1],n,r].concat(y))))return O;A&&(s=s.slice(0,-1*A*2),n=n.slice(0,-1*A),r=r.slice(0,-1*A)),s.push(this.productions_[S[1]][0]),n.push(I.$),r.push(I._$),R=a[s[s.length-2]][s[s.length-1]],s.push(R);break;case 3:return!0}}return!0},"parse")},W=function(){return{EOF:1,parseError:(0,o.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,o.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,o.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:case 23:case 28:case 35:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:case 19:case 38:return 49;case 20:case 37:return 42;case 21:return 15;case 22:case 36:return 13;case 24:return 59;case 25:case 26:return 56;case 27:return 60;case 29:return this.popState(),19;case 30:case 73:return e.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 39:return this.begin("style"),37;case 40:return 43;case 41:case 45:case 46:case 59:return 63;case 42:case 43:case 44:case 52:case 54:case 61:return 65;case 47:case 48:case 49:case 50:case 51:case 53:case 60:return 64;case 55:case 56:case 57:case 58:return 66;case 62:return 67;case 63:case 66:case 67:case 68:return 68;case 64:case 65:return 69;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}}}();function X(){this.yy={}}return j.lexer=W,(0,o.K2)(X,"Parser"),X.prototype=j,j.Parser=X,new X}();y.parser=y;var d=y,p=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=c.SV,this.getAccTitle=c.iN,this.setAccDescription=c.EI,this.getAccDescription=c.m7,this.setDiagramTitle=c.ke,this.getDiagramTitle=c.ab,this.getConfig=(0,o.K2)(()=>(0,c.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,o.K2)(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,o.Rm.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:(0,c.D7)().look??"default",cssClasses:"default",cssStyles:[]}),o.Rm.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),o.Rm.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){const n=this.entities.get(t),r=this.entities.get(s);if(!n||!r)return;const a={entityA:n.id,roleA:e,entityB:r.id,relSpec:i};this.relationships.push(a),o.Rm.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s);if(!e||!t)return;for(const s of e)t.cssStyles.push(s)}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],(0,c.IU)()}getData(){const t=[],e=[],s=(0,c.D7)();for(const n of this.entities.keys()){const e=this.entities.get(n);e&&(e.cssCompiledStyles=this.getCompiledStyles(e.cssClasses.split(" ")),t.push(e))}let i=0;for(const n of this.relationships){const t={id:(0,a.rY)(n.entityA,n.entityB,{prefix:"id",counter:i++}),type:"normal",curve:"basis",start:n.entityA,end:n.entityB,label:n.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:n.relSpec.cardB.toLowerCase(),arrowTypeEnd:n.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==n.relSpec.relType?"solid":"dashed",look:s.look};e.push(t)}return{nodes:t,edges:e,other:{},config:s,direction:"TB"}}},_={};(0,o.VA)(_,{draw:()=>g});var g=(0,o.K2)(async function(t,e,s,h){o.Rm.info("REF0:"),o.Rm.info("Drawing er diagram (unified)",e);const{securityLevel:u,er:y,layout:d}=(0,c.D7)(),p=h.db.getData(),_=(0,i.A)(e,u);p.type=h.type,p.layoutAlgorithm=(0,r.q7)(d),p.config.flowchart.nodeSpacing=y?.nodeSpacing||140,p.config.flowchart.rankSpacing=y?.rankSpacing||80,p.direction=h.db.getDirection(),p.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],p.diagramId=e,await(0,r.XX)(p,_),"elk"===p.layoutAlgorithm&&_.select(".edges").lower();const g=_.selectAll('[id*="-background"]');Array.from(g).length>0&&g.each(function(){const t=(0,l.Ltv)(this),e=t.attr("id").replace("-background",""),s=_.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}});a._K.insertTitle(_,"erDiagramTitleText",y?.titleTopMargin??25,h.db.getDiagramTitle()),(0,n.P)(_,8,"erDiagram",y?.useMaxWidth??!0)},"draw"),b=(0,o.K2)((t,e)=>{const s=u.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return h.A(i,n,r,e)},"fade"),m=(0,o.K2)(t=>`\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${b(t.tertiaryColor,.5)};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: 1;\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n`,"getStyles"),f={parser:d,get db(){return new p},renderer:_,styles:m}}}]); \ No newline at end of file diff --git a/assets/js/8795.1c60dc80.js b/assets/js/8795.1c60dc80.js deleted file mode 100644 index 298217d..0000000 --- a/assets/js/8795.1c60dc80.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8795],{8795(e,s,c){c.d(s,{createPieServices:()=>p.f});var p=c(888);c(808)}}]); \ No newline at end of file diff --git a/assets/js/89877b86.b544ad88.js b/assets/js/89877b86.b544ad88.js deleted file mode 100644 index ec48fdc..0000000 --- a/assets/js/89877b86.b544ad88.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7520],{2749(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs the full HappyView stack locally using Docker Compose: Postgres, Tap, HappyView, and the web dashboard.","source":"@site/docs/getting-started/deployment/docker.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/docker","permalink":"/getting-started/deployment/docker","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Railway","permalink":"/getting-started/deployment/railway"},"next":{"title":"Other","permalink":"/getting-started/deployment/other"}}');var r=s(4848),i=s(8453);const o={},c="Local Development with Docker",d={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Start the stack",id:"2-start-the-stack",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"local-development-with-docker",children:"Local Development with Docker"})}),"\n",(0,r.jsxs)(t.p,{children:["This guide runs the full HappyView stack locally using Docker Compose: Postgres, ",(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", HappyView, and the web dashboard."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," and Docker Compose"]}),"\n",(0,r.jsxs)(t.li,{children:["An ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The Docker Compose config points at the public AIP instance at ",(0,r.jsx)(t.code,{children:"aip.gamesgamesgamesgames.games"})," by default."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["This public AIP instance is provided for development convenience only. Production deployments should run their own AIP instance or risk being blocked. See the ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]})}),"\n",(0,r.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Set ",(0,r.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})," in your ",(0,r.jsx)(t.code,{children:".env"}),". This shared secret is used by both Tap and HappyView:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"TAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"docker-compose.yml"})," configures everything else (database URLs, service connections) automatically."]}),"\n",(0,r.jsx)(t.h2,{id:"2-start-the-stack",children:"2. Start the stack"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"docker compose up\n"})}),"\n",(0,r.jsx)(t.p,{children:"This starts:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Service"}),(0,r.jsx)(t.th,{children:"Port"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"postgres"})}),(0,r.jsx)(t.td,{children:"5432"}),(0,r.jsx)(t.td,{children:"PostgreSQL 17 (databases for both HappyView and Tap)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"tap"})}),(0,r.jsx)(t.td,{children:"2480"}),(0,r.jsx)(t.td,{children:"Firehose consumer, backfill worker"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"happyview"})}),(0,r.jsx)(t.td,{children:"3000"}),(0,r.jsx)(t.td,{children:"HappyView API server"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"web"})}),(0,r.jsx)(t.td,{children:"3001"}),(0,r.jsx)(t.td,{children:"Next.js dashboard"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"HappyView runs migrations automatically on startup. The first build will take a few minutes while Rust compiles."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.p,{children:["Your HappyView stack is running. Follow the ",(0,r.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453(e,t,s){s.d(t,{R:()=>o,x:()=>c});var n=s(6540);const r={},i=n.createContext(r);function o(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89877b86.d43afb4c.js b/assets/js/89877b86.d43afb4c.js new file mode 100644 index 0000000..f086214 --- /dev/null +++ b/assets/js/89877b86.d43afb4c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7520],{724:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>h,frontMatter:()=>d,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs HappyView and the dashboard locally using Docker Compose.","source":"@site/docs/getting-started/deployment/docker.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/docker","permalink":"/getting-started/deployment/docker","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Railway","permalink":"/getting-started/deployment/railway"},"next":{"title":"From Source","permalink":"/getting-started/deployment/other"}}');var r=n(199),i=n(2560);const d={},o="Local Development with Docker",a={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Start the stack",id:"2-start-the-stack",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"local-development-with-docker",children:"Local Development with Docker"})}),"\n",(0,r.jsx)(t.p,{children:"This guide runs HappyView and the dashboard locally using Docker Compose."}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," and Docker Compose"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Edit ",(0,r.jsx)(t.code,{children:".env"})," and set at least ",(0,r.jsx)(t.code,{children:"PUBLIC_URL"})," (e.g. ",(0,r.jsx)(t.code,{children:"http://localhost:3000"}),") and ",(0,r.jsx)(t.code,{children:"SESSION_SECRET"})," (at least 64 characters). The defaults work for everything else. See ",(0,r.jsx)(t.a,{href:"/getting-started/configuration",children:"Configuration"})," for the full list of environment variables."]}),"\n",(0,r.jsx)(t.h2,{id:"2-start-the-stack",children:"2. Start the stack"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"docker compose up\n"})}),"\n",(0,r.jsx)(t.p,{children:"This starts:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Service"}),(0,r.jsx)(t.th,{children:"Port"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"happyview"})}),(0,r.jsx)(t.td,{children:"3000"}),(0,r.jsx)(t.td,{children:"HappyView API server"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"web"})}),(0,r.jsx)(t.td,{children:"3001"}),(0,r.jsx)(t.td,{children:"Next.js dashboard"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"HappyView runs migrations automatically on startup. The first build will take a few minutes while Rust compiles."}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"happyview"})," container serves its own bundled dashboard at ",(0,r.jsx)(t.code,{children:"http://localhost:3000"}),", but that copy is baked in at container build time and only updates when you rebuild the image. For day-to-day development, use the dev dashboard at ",(0,r.jsx)(t.code,{children:"http://localhost:3001"})," \u2014 it hot-reloads on changes to the ",(0,r.jsx)(t.code,{children:"web/"})," source."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["SQLite is the default and requires no extra services. To use Postgres instead, uncomment the ",(0,r.jsx)(t.code,{children:"postgres"})," service in ",(0,r.jsx)(t.code,{children:"docker-compose.yml"})," and update ",(0,r.jsx)(t.code,{children:"DATABASE_URL"})," in ",(0,r.jsx)(t.code,{children:".env"}),". See the ",(0,r.jsx)(t.a,{href:"/guides/database-setup",children:"database setup guide"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.p,{children:["Your HappyView stack is running. Follow the ",(0,r.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},2560:(e,t,n)=>{n.d(t,{R:()=>d,x:()=>o});var s=n(63);const r={},i=s.createContext(r);function d(e){const t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89d775e6.ffddc2da.js b/assets/js/89d775e6.ffddc2da.js new file mode 100644 index 0000000..a7451a6 --- /dev/null +++ b/assets/js/89d775e6.ffddc2da.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8856],{4554:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/admin/settings","title":"Admin API: Instance Settings","description":"Instance settings override environment variables at runtime \u2014 things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the settings:manage permission.","source":"@site/docs/reference/admin/settings.md","sourceDirName":"reference/admin","slug":"/reference/admin/settings","permalink":"/reference/admin/settings","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Labelers","permalink":"/reference/admin/labelers"},"next":{"title":"Domains","permalink":"/reference/admin/domains"}}');var i=t(199),r=t(2560);const a={},l="Admin API: Instance Settings",d={},o=[{value:"List settings",id:"list-settings",level:2},{value:"Upsert a setting",id:"upsert-a-setting",level:2},{value:"Delete a setting",id:"delete-a-setting",level:2},{value:"Upload / delete logo",id:"upload--delete-logo",level:2}];function c(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"admin-api-instance-settings",children:"Admin API: Instance Settings"})}),"\n",(0,i.jsxs)(n.p,{children:["Instance settings override environment variables at runtime \u2014 things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the ",(0,i.jsx)(n.code,{children:"settings:manage"})," permission."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,i.jsx)(n.h2,{id:"list-settings",children:"List settings"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"GET /admin/settings\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/settings -H "$AUTH"\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Returns all key/value pairs stored in the ",(0,i.jsx)(n.code,{children:"instance_settings"})," table."]}),"\n",(0,i.jsx)(n.h2,{id:"upsert-a-setting",children:"Upsert a setting"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"PUT /admin/settings/{key}\n"})}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:'curl -X PUT http://localhost:3000/admin/settings/app_name \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "value": "My HappyView" }\'\n'})}),"\n",(0,i.jsx)(n.h2,{id:"delete-a-setting",children:"Delete a setting"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"DELETE /admin/settings/{key}\n"})}),"\n",(0,i.jsx)(n.p,{children:"Removes the override; the corresponding environment variable (if any) takes effect again."}),"\n",(0,i.jsx)(n.h2,{id:"upload--delete-logo",children:"Upload / delete logo"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"PUT /admin/settings/logo\nDELETE /admin/settings/logo\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"PUT"})," accepts a binary image body and stores it as the instance logo (served via the public dashboard). ",(0,i.jsx)(n.code,{children:"DELETE"})," removes the stored logo."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>l});var s=t(63);const i={},r=s.createContext(i);function a(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8eefb1eb.cd8a45a8.js b/assets/js/8eefb1eb.cd8a45a8.js new file mode 100644 index 0000000..f8ac502 --- /dev/null +++ b/assets/js/8eefb1eb.cd8a45a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2009],{6273:(e,r,a)=>{a.r(r),a.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>l,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"reference/lua/utility-globals","title":"Utility Globals","description":"Global functions available in queries, procedures, and index hooks. These don\'t belong to a specific API table \u2014 they\'re available at the top level of any Lua script.","source":"@site/docs/reference/lua/utility-globals.md","sourceDirName":"reference/lua","slug":"/reference/lua/utility-globals","permalink":"/reference/lua/utility-globals","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"JSON API","permalink":"/reference/lua/json-api"},"next":{"title":"Standard Libraries","permalink":"/reference/lua/standard-libraries"}}');var t=a(199),s=a(2560);const l={},i="Utility Globals",o={},c=[{value:"now",id:"now",level:2},{value:"log",id:"log",level:2},{value:"TID",id:"tid",level:2},{value:"toarray",id:"toarray",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"utility-globals",children:"Utility Globals"})}),"\n",(0,t.jsxs)(r.p,{children:["Global functions available in queries, procedures, and ",(0,t.jsx)(r.a,{href:"/guides/index-hooks",children:"index hooks"}),". These don't belong to a specific API table \u2014 they're available at the top level of any Lua script."]}),"\n",(0,t.jsx)(r.h2,{id:"now",children:"now"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'local timestamp = now()\n-- "2026-04-19T15:30:00Z"\n'})}),"\n",(0,t.jsxs)(r.p,{children:["Returns the current UTC time as an ISO 8601 string. Use this for ",(0,t.jsx)(r.code,{children:"createdAt"}),", ",(0,t.jsx)(r.code,{children:"updatedAt"}),", and similar timestamp fields."]}),"\n",(0,t.jsx)(r.h2,{id:"log",children:"log"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'log("processing record: " .. uri)\nlog("count: " .. tostring(n))\n'})}),"\n",(0,t.jsxs)(r.p,{children:["Writes a message to the server logs at debug level. Useful for debugging scripts during development. Log output appears in HappyView's stdout \u2014 check your platform's log viewer (Railway logs, ",(0,t.jsx)(r.code,{children:"docker logs"}),", terminal output) to see it."]}),"\n",(0,t.jsx)(r.h2,{id:"tid",children:"TID"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'local id = TID()\n-- "3abc123def456"\n'})}),"\n",(0,t.jsx)(r.p,{children:"Generates a fresh atproto TID (Timestamp Identifier) \u2014 a 13-character, base32-sortable string derived from the current timestamp. TIDs are the standard record key format in atproto. Use this when creating records with a specific rkey:"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'local r = Record(collection, { text = "hello" })\nr:set_rkey(TID())\nr:save()\n'})}),"\n",(0,t.jsx)(r.h2,{id:"toarray",children:"toarray"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:"return { items = toarray(results) }\n"})}),"\n",(0,t.jsxs)(r.p,{children:["Marks a Lua table so it serializes as a JSON array rather than a JSON object. This matters for empty tables \u2014 without ",(0,t.jsx)(r.code,{children:"toarray"}),", an empty ",(0,t.jsx)(r.code,{children:"{}"})," becomes a JSON object ",(0,t.jsx)(r.code,{children:"{}"})," instead of an array ",(0,t.jsx)(r.code,{children:"[]"}),"."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'-- Without toarray:\nreturn { items = {} }\n-- \u2192 {"items": {}}\n\n-- With toarray:\nreturn { items = toarray({}) }\n-- \u2192 {"items": []}\n'})}),"\n",(0,t.jsxs)(r.p,{children:["You don't need ",(0,t.jsx)(r.code,{children:"toarray()"})," on results from ",(0,t.jsx)(r.code,{children:"db.query"}),", ",(0,t.jsx)(r.code,{children:"db.search"}),", ",(0,t.jsx)(r.code,{children:"db.backlinks"}),", or ",(0,t.jsx)(r.code,{children:"db.raw"})," \u2014 those already return properly marked arrays. Use it when you build a table yourself with ",(0,t.jsx)(r.code,{children:"table.insert()"})," or array-index assignment."]})]})}function u(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},2560:(e,r,a)=>{a.d(r,{R:()=>l,x:()=>i});var n=a(63);const t={},s=n.createContext(t);function l(e){const r=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9032.6c8ca03c.js b/assets/js/9032.6c8ca03c.js deleted file mode 100644 index 4c904fc..0000000 --- a/assets/js/9032.6c8ca03c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9032],{9625(e,t,s){s.d(t,{A:()=>r});var i=s(797),n=s(451),r=(0,i.K2)((e,t)=>{let s;"sandbox"===t&&(s=(0,n.Ltv)("#i"+e));return("sandbox"===t?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${e}"]`)},"getDiagramElement")},1152(e,t,s){s.d(t,{P:()=>r});var i=s(7633),n=s(797),r=(0,n.K2)((e,t,s,r)=>{e.attr("class",s);const{width:c,height:o,x:h,y:u}=a(e,t);(0,i.a$)(e,o,c,r);const y=l(h,u,c,o,t);e.attr("viewBox",y),n.Rm.debug(`viewBox configured: ${y} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,n.K2)((e,t)=>{const s=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*t,height:s.height+2*t,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,n.K2)((e,t,s,i,n)=>`${e-n} ${t-n} ${s} ${i}`,"createViewBox")},9032(e,t,s){s.d(t,{diagram:()=>E});var i=s(9625),n=s(1152),r=s(45),a=(s(5164),s(8698),s(5894),s(3245),s(2387),s(92),s(3226)),l=s(7633),c=s(797),o=function(){var e=(0,c.K2)(function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s},"o"),t=[1,3],s=[1,4],i=[1,5],n=[1,6],r=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],a=[1,22],l=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],m=[1,33],d=[1,34],E=[1,35],p=[1,36],R=[1,37],f=[1,38],_=[1,24],g=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],A=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],C=[27,29],v=[1,70],w=[1,71],x=[1,72],L=[1,73],D=[1,74],O=[1,75],$=[1,76],M=[1,83],F=[1,80],K=[1,84],P=[1,85],V=[1,86],U=[1,87],Y=[1,88],B=[1,89],Q=[1,90],H=[1,91],W=[1,92],j=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Z=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],ce=[1,115],oe={trace:(0,c.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:(0,c.K2)(function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}},"anonymous"),table:[{3:1,4:2,6:t,9:s,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(r,[2,6]),{3:12,4:2,6:t,9:s,11:i,13:n},{1:[2,2]},{4:17,5:a,7:13,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},e(r,[2,4]),e(r,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:43,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:44,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:45,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:46,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:47,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:48,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:49,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:a,7:50,8:l,9:s,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:d,43:E,44:p,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(A,[2,81]),e(A,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(C,[2,79]),e(C,[2,80]),{27:[1,67],29:[1,68]},e(C,[2,85]),e(C,[2,86]),{62:69,65:v,66:w,67:x,68:L,69:D,70:O,71:$},{62:77,65:v,66:w,67:x,68:L,69:D,70:O,71:$},{30:78,33:62,75:N,89:b,90:T},{73:79,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:Y,85:B,86:Q,87:H,88:W},e(j,[2,60]),e(j,[2,62]),{73:93,75:M,76:F,78:81,79:82,80:K,81:P,82:V,83:U,84:Y,85:B,86:Q,87:H,88:W},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:M,80:K,81:P,82:V,83:U,84:Y,85:B,86:Q,87:H,88:W}),e(J,[2,67]),e(J,[2,69]),e(J,[2,70]),e(J,[2,71]),e(J,[2,72]),e(J,[2,73]),e(J,[2,74]),e(J,[2,75]),e(J,[2,76]),e(J,[2,77]),e(J,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:Z,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:ce},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:M,78:121,79:82,80:K,81:P,82:V,83:U,84:Y,85:B,86:Q,87:H,88:W},e(j,[2,61]),e(j,[2,63]),e(J,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:ce},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:M,80:K,81:P,82:V,83:U,84:Y,85:B,86:Q,87:H,88:W}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:Z,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:ce},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:Z,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:Z,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:ce},{5:re,40:ae,56:164,57:le,59:ce},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:(0,c.K2)(function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)},"parseError"),parse:(0,c.K2)(function(e){var t=this,s=[0],i=[],n=[null],r=[],a=this.table,l="",o=0,h=0,u=0,y=r.slice.call(arguments,1),m=Object.create(this.lexer),d={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(d.yy[E]=this.yy[E]);m.setInput(e,d.yy),d.yy.lexer=m,d.yy.parser=this,void 0===m.yylloc&&(m.yylloc={});var p=m.yylloc;r.push(p);var R=m.options&&m.options.ranges;function f(){var e;return"number"!=typeof(e=i.pop()||m.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(e){s.length=s.length-2*e,n.length=n.length-e,r.length=r.length-e},"popStack"),(0,c.K2)(f,"lex");for(var _,g,S,I,b,T,k,N,q,A={};;){if(S=s[s.length-1],this.defaultActions[S]?I=this.defaultActions[S]:(null==_&&(_=f()),I=a[S]&&a[S][_]),void 0===I||!I.length||!I[0]){var C="";for(T in q=[],a[S])this.terminals_[T]&&T>2&&q.push("'"+this.terminals_[T]+"'");C=m.showPosition?"Parse error on line "+(o+1)+":\n"+m.showPosition()+"\nExpecting "+q.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:m.match,token:this.terminals_[_]||_,line:m.yylineno,loc:p,expected:q})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(I[0]){case 1:s.push(_),n.push(m.yytext),r.push(m.yylloc),s.push(I[1]),_=null,g?(_=g,g=null):(h=m.yyleng,l=m.yytext,o=m.yylineno,p=m.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[I[1]][1],A.$=n[n.length-k],A._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},R&&(A._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(A,[l,h,o,d.yy,I[1],n,r].concat(y))))return b;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),s.push(this.productions_[I[1]][0]),n.push(A.$),r.push(A._$),N=a[s[s.length-2]][s[s.length-1]],s.push(N);break;case 3:return!0}}return!0},"parse")},he=function(){return{EOF:1,parseError:(0,c.K2)(function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},"parseError"),setInput:(0,c.K2)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K2)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,c.K2)(function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K2)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K2)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K2)(function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;rt[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K2)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K2)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K2)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K2)(function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return oe.lexer=he,(0,c.K2)(ue,"Parser"),ue.prototype=oe,oe.Parser=ue,new ue}();o.parser=o;var h=o,u=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=l.SV,this.getAccTitle=l.iN,this.setAccDescription=l.EI,this.getAccDescription=l.m7,this.setDiagramTitle=l.ke,this.getDiagramTitle=l.ab,this.getConfig=(0,c.K2)(()=>(0,l.D7)().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{(0,c.K2)(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),c.Rm.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,(0,l.IU)()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(e)for(const s of t){e.classes.push(s);const t=this.classes.get(s)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach(function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){const e=(0,l.D7)(),t=[],s=[];for(const i of this.requirements.values()){const s=i;s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),s.shape="requirementBox",s.look=e.look,t.push(s)}for(const i of this.elements.values()){const s=i;s.shape="requirementBox",s.look=e.look,s.id=i.name,s.cssStyles=i.cssStyles,s.cssClasses=i.classes.join(" "),t.push(s)}for(const i of this.relations){let t=0;const n=i.type===this.Relationships.CONTAINS,r={id:`${i.src}-${i.dst}-${t}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",n?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:n?"normal":"dashed",arrowTypeStart:n?"requirement_contains":"",arrowTypeEnd:n?"":"requirement_arrow",look:e.look};s.push(r),t++}return{nodes:t,edges:s,other:{},config:e,direction:this.getDirection()}}},y=(0,c.K2)(e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n`,"getStyles"),m={};(0,c.VA)(m,{draw:()=>d});var d=(0,c.K2)(async function(e,t,s,o){c.Rm.info("REF0:"),c.Rm.info("Drawing requirement diagram (unified)",t);const{securityLevel:h,state:u,layout:y}=(0,l.D7)(),m=o.db.getData(),d=(0,i.A)(t,h);m.type=o.type,m.layoutAlgorithm=(0,r.q7)(y),m.nodeSpacing=u?.nodeSpacing??50,m.rankSpacing=u?.rankSpacing??50,m.markers=["requirement_contains","requirement_arrow"],m.diagramId=t,await(0,r.XX)(m,d);a._K.insertTitle(d,"requirementDiagramTitleText",u?.titleTopMargin??25,o.db.getDiagramTitle()),(0,n.P)(d,8,"requirementDiagram",u?.useMaxWidth??!0)},"draw"),E={parser:h,get db(){return new u},renderer:m,styles:y}}}]); \ No newline at end of file diff --git a/assets/js/9115.93100042.js b/assets/js/9115.93100042.js new file mode 100644 index 0000000..637fb3c --- /dev/null +++ b/assets/js/9115.93100042.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9115],{1496:(e,r,s)=>{s.d(r,{diagram:()=>c});var a=s(866),t=(s(7214),s(8854),s(7330),s(3830),s(163),s(1562),s(2125),s(5707),s(3276),s(4061),s(7127),s(2101),s(5691),s(8894)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/919abb94.354e4aca.js b/assets/js/919abb94.354e4aca.js new file mode 100644 index 0000000..0a6ec4c --- /dev/null +++ b/assets/js/919abb94.354e4aca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[20],{6616:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","source":"@site/docs/reference/scripts/upsert-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/upsert-record","permalink":"/reference/scripts/upsert-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Create Record","permalink":"/reference/scripts/create-record"},"next":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"}}');var s=t(199),i=t(2560);const c={},a="Procedure: Upsert a Record",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-upsert-a-record",children:"Procedure: Upsert a Record"})}),"\n",(0,s.jsx)(r.p,{children:"Create a new record, or update an existing one if the client provides its rkey."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = input.rkey or TID()\n local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey\n\n local r = Record.load(uri)\n if r then\n -- Update existing record\n r.status = input.status\n r.updatedAt = now()\n r:save()\n else\n -- Create new record\n r = Record(collection, {\n status = input.status,\n createdAt = now(),\n updatedAt = now(),\n })\n r:set_rkey(rkey)\n r:save()\n end\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Use the client-provided ",(0,s.jsx)(r.code,{children:"input.rkey"})," if present, otherwise generate a new ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})}),". This means omitting ",(0,s.jsx)(r.code,{children:"rkey"})," always creates, while providing one enables updates."]}),"\n",(0,s.jsxs)(r.li,{children:["Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with ",(0,s.jsx)(r.a,{href:"/reference/lua/record-api#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If the record exists, update its fields and save. Since ",(0,s.jsx)(r.code,{children:"_uri"})," is already set, ",(0,s.jsx)(r.code,{children:"r:save()"})," calls ",(0,s.jsx)(r.code,{children:"putRecord"}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If it doesn't exist, create a new record, set the rkey explicitly with ",(0,s.jsx)(r.code,{children:"r:set_rkey()"}),", and save. This calls ",(0,s.jsx)(r.code,{children:"createRecord"})," with the specified rkey."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'# Create: no rkey, so a new TID is generated\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n\n# Update: pass the rkey back to update the same record\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "rkey": "3abc123", "status": "updated" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits ",(0,s.jsx)(r.code,{children:"rkey"})," for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates."]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},2560:(e,r,t)=>{t.d(r,{R:()=>c,x:()=>a});var n=t(63);const s={},i=n.createContext(s);function c(e){const r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/919abb94.3ec12698.js b/assets/js/919abb94.3ec12698.js deleted file mode 100644 index 7b945b4..0000000 --- a/assets/js/919abb94.3ec12698.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[20],{521(e,r,t){t.r(r),t.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","source":"@site/docs/reference/scripts/upsert-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/upsert-record","permalink":"/reference/scripts/upsert-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Create Record","permalink":"/reference/scripts/create-record"},"next":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"}}');var s=t(4848),i=t(8453);const c={},a="Procedure: Upsert a Record",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-upsert-a-record",children:"Procedure: Upsert a Record"})}),"\n",(0,s.jsx)(r.p,{children:"Create a new record, or update an existing one if the client provides its rkey."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = input.rkey or TID()\n local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey\n\n local r = Record.load(uri)\n if r then\n -- Update existing record\n r.status = input.status\n r.updatedAt = now()\n r:save()\n else\n -- Create new record\n r = Record(collection, {\n status = input.status,\n createdAt = now(),\n updatedAt = now(),\n })\n r:set_rkey(rkey)\n r:save()\n end\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Use the client-provided ",(0,s.jsx)(r.code,{children:"input.rkey"})," if present, otherwise generate a new ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})}),". This means omitting ",(0,s.jsx)(r.code,{children:"rkey"})," always creates, while providing one enables updates."]}),"\n",(0,s.jsxs)(r.li,{children:["Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If the record exists, update its fields and save. Since ",(0,s.jsx)(r.code,{children:"_uri"})," is already set, ",(0,s.jsx)(r.code,{children:"r:save()"})," calls ",(0,s.jsx)(r.code,{children:"putRecord"}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If it doesn't exist, create a new record, set the rkey explicitly with ",(0,s.jsx)(r.code,{children:"r:set_rkey()"}),", and save. This calls ",(0,s.jsx)(r.code,{children:"createRecord"})," with the specified rkey."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'# Create: no rkey, so a new TID is generated\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n\n# Update: pass the rkey back to update the same record\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "rkey": "3abc123", "status": "updated" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits ",(0,s.jsx)(r.code,{children:"rkey"})," for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates."]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>a});var n=t(6540);const s={},i=n.createContext(s);function c(e){const r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/920ba7ef.8db30372.js b/assets/js/920ba7ef.8db30372.js new file mode 100644 index 0000000..32783c5 --- /dev/null +++ b/assets/js/920ba7ef.8db30372.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5953],{8839:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>l,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","source":"@site/docs/guides/scripting.md","sourceDirName":"guides","slug":"/guides/scripting","permalink":"/guides/scripting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Index Hooks","permalink":"/guides/index-hooks"},"next":{"title":"Get a Record","permalink":"/reference/scripts/get-record"}}');var i=s(199),d=s(2560);const l={},t="Lua Scripting",c={},a=[{value:"Script structure",id:"script-structure",level:2},{value:"Sandbox",id:"sandbox",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Procedure globals",id:"procedure-globals",level:3},{value:"Query globals",id:"query-globals",level:3},{value:"Utility globals",id:"utility-globals",level:2},{value:"toarray",id:"toarray",level:3},{value:"Record API",id:"record-api",level:2},{value:"Database API",id:"database-api",level:2},{value:"HTTP API",id:"http-api",level:2},{value:"atproto API",id:"atproto-api",level:2},{value:"JSON API",id:"json-api",level:2},{value:"Debugging",id:"debugging",level:2},{value:"Logging",id:"logging",level:3},{value:"Error messages",id:"error-messages",level:3},{value:"Common mistakes",id:"common-mistakes",level:3},{value:"Example scripts",id:"example-scripts",level:2},{value:"Next steps",id:"next-steps",level:2}];function o(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"lua-scripting",children:"Lua Scripting"})}),"\n",(0,i.jsx)(r.p,{children:"Without Lua scripts, HappyView's query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsx)(r.li,{children:"Add filtering logic"}),"\n",(0,i.jsx)(r.li,{children:"Transform responses"}),"\n",(0,i.jsx)(r.li,{children:"Validate input"}),"\n",(0,i.jsx)(r.li,{children:"Compose multi-record operations"}),"\n",(0,i.jsx)(r.li,{children:"Build entirely custom behavior"}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["Scripts are attached to query and procedure lexicons and run in a sandboxed Lua VM with access to the ",(0,i.jsx)(r.a,{href:"#record-api",children:"Record API"}),", a ",(0,i.jsx)(r.a,{href:"#database-api",children:"database API"}),", an ",(0,i.jsx)(r.a,{href:"#http-api",children:"HTTP client API"}),", a ",(0,i.jsx)(r.a,{href:"#json-api",children:"JSON API"}),", and a set of ",(0,i.jsx)(r.a,{href:"#context-globals",children:"context globals"}),"."]}),"\n",(0,i.jsxs)(r.p,{children:["For scripts that react to record changes from the network (rather than XRPC requests), see ",(0,i.jsx)(r.a,{href:"/guides/index-hooks",children:"Index Hooks"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,i.jsxs)(r.p,{children:["Every script must define a ",(0,i.jsx)(r.code,{children:"handle()"})," function. HappyView calls it when the XRPC endpoint is hit and returns its result as JSON to the client."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:'function handle()\n -- your logic here\n return { key = "value" }\nend\n'})}),"\n",(0,i.jsxs)(r.p,{children:["You can define helper functions and variables outside ",(0,i.jsx)(r.code,{children:"handle()"}),". They're evaluated once when the script loads, then ",(0,i.jsx)(r.code,{children:"handle()"})," is called per request."]}),"\n",(0,i.jsx)(r.h2,{id:"sandbox",children:"Sandbox"}),"\n",(0,i.jsxs)(r.p,{children:["Scripts run in a restricted environment. The following standard Lua modules are ",(0,i.jsx)(r.strong,{children:"removed"})," and unavailable:"]}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.code,{children:"io"}),", ",(0,i.jsx)(r.code,{children:"debug"}),", ",(0,i.jsx)(r.code,{children:"package"}),", ",(0,i.jsx)(r.code,{children:"require"}),", ",(0,i.jsx)(r.code,{children:"dofile"}),", ",(0,i.jsx)(r.code,{children:"loadfile"}),", ",(0,i.jsx)(r.code,{children:"load"}),", ",(0,i.jsx)(r.code,{children:"collectgarbage"})]}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"os"})," module is replaced with a safe subset exposing only ",(0,i.jsx)(r.code,{children:"os.time"}),", ",(0,i.jsx)(r.code,{children:"os.date"}),", ",(0,i.jsx)(r.code,{children:"os.difftime"}),", and ",(0,i.jsx)(r.code,{children:"os.clock"}),". Dangerous functions like ",(0,i.jsx)(r.code,{children:"os.execute"}),", ",(0,i.jsx)(r.code,{children:"os.remove"}),", ",(0,i.jsx)(r.code,{children:"os.rename"}),", and ",(0,i.jsx)(r.code,{children:"os.exit"})," are not available."]}),"\n",(0,i.jsx)(r.p,{children:"An instruction limit of 1,000,000 prevents infinite loops. Exceeding it terminates the script with an error."}),"\n",(0,i.jsxs)(r.p,{children:["See the ",(0,i.jsx)(r.a,{href:"/reference/lua/standard-libraries",children:"Standard Libraries"})," reference for the full list of available Lua modules and builtins."]}),"\n",(0,i.jsx)(r.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,i.jsxs)(r.p,{children:["These globals are set automatically before ",(0,i.jsx)(r.code,{children:"handle()"})," is called."]}),"\n",(0,i.jsx)(r.h3,{id:"procedure-globals",children:"Procedure globals"}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Global"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"method"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsxs)(r.td,{children:["The XRPC method name (e.g. ",(0,i.jsx)(r.code,{children:"xyz.statusphere.setStatus"}),")"]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"input"})}),(0,i.jsx)(r.td,{children:"table"}),(0,i.jsx)(r.td,{children:"Parsed JSON request body"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"caller_did"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"DID of the authenticated user"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"collection"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,i.jsx)(r.h3,{id:"query-globals",children:"Query globals"}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Global"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"method"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"The XRPC method name"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"params"})}),(0,i.jsx)(r.td,{children:"table"}),(0,i.jsx)(r.td,{children:"Query string parameters (all values are strings)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"collection"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,i.jsxs)(r.p,{children:["Queries are unauthenticated: there is no ",(0,i.jsx)(r.code,{children:"caller_did"})," or ",(0,i.jsx)(r.code,{children:"input"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"utility-globals",children:"Utility globals"}),"\n",(0,i.jsx)(r.p,{children:"Available in both queries and procedures:"}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Function"}),(0,i.jsx)(r.th,{children:"Returns"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"now()"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"Current UTC timestamp in ISO 8601 format"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"log(message)"})}),(0,i.jsx)(r.td,{children:"\u2014"}),(0,i.jsx)(r.td,{children:"Log a message (appears in server logs at debug level)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"TID()"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"Generate a fresh atproto TID (13-character sortable identifier)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"toarray(table)"})}),(0,i.jsx)(r.td,{children:"table"}),(0,i.jsxs)(r.td,{children:["Mark a table as a JSON array for serialization (see ",(0,i.jsx)(r.a,{href:"#toarray",children:"below"}),")"]})]})]})]}),"\n",(0,i.jsx)(r.h3,{id:"toarray",children:"toarray"}),"\n",(0,i.jsxs)(r.p,{children:["Lua tables don't distinguish between arrays and objects. When a table is serialized to JSON, an empty table ",(0,i.jsx)(r.code,{children:"{}"})," becomes a JSON object ",(0,i.jsx)(r.code,{children:"{}"})," instead of an array ",(0,i.jsx)(r.code,{children:"[]"}),". The ",(0,i.jsx)(r.code,{children:"toarray()"})," function marks a table so it always serializes as a JSON array \u2014 even when empty."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:'return { items = toarray(results) }\n-- With results: [{"name": "a"}, {"name": "b"}]\n-- Without results: {"items": []} (not {"items": {}})\n'})}),"\n",(0,i.jsxs)(r.p,{children:["You don't need ",(0,i.jsx)(r.code,{children:"toarray()"})," on results from ",(0,i.jsx)(r.code,{children:"db.query"}),", ",(0,i.jsx)(r.code,{children:"db.search"}),", ",(0,i.jsx)(r.code,{children:"db.backlinks"}),", or ",(0,i.jsx)(r.code,{children:"db.raw"})," \u2014 those already return properly marked arrays. Use it when you build a table yourself with ",(0,i.jsx)(r.code,{children:"table.insert()"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"record-api",children:"Record API"}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"Record"})," API is only available in ",(0,i.jsx)(r.strong,{children:"procedure"})," scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller's PDS and indexed locally."]}),"\n",(0,i.jsxs)(r.p,{children:["See the full ",(0,i.jsx)(r.a,{href:"/reference/lua/record-api",children:"Record API reference"})," for constructor, static methods, instance methods, fields, schema validation, and save behavior."]}),"\n",(0,i.jsx)(r.p,{children:"Quick example:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,i.jsx)(r.h2,{id:"database-api",children:"Database API"}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"db"})," table provides access to the database. Available in both queries and procedures."]}),"\n",(0,i.jsxs)(r.p,{children:["See the full ",(0,i.jsx)(r.a,{href:"/reference/lua/database-api",children:"Database API reference"})," for ",(0,i.jsx)(r.code,{children:"db.query"}),", ",(0,i.jsx)(r.code,{children:"db.get"}),", ",(0,i.jsx)(r.code,{children:"db.search"}),", ",(0,i.jsx)(r.code,{children:"db.backlinks"}),", ",(0,i.jsx)(r.code,{children:"db.count"}),", and ",(0,i.jsx)(r.code,{children:"db.raw"}),"."]}),"\n",(0,i.jsx)(r.p,{children:"Quick example:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:"function handle()\n local result = db.query({ collection = collection, limit = 20 })\n return { records = result.records, cursor = result.cursor }\nend\n"})}),"\n",(0,i.jsx)(r.h2,{id:"http-api",children:"HTTP API"}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"http"})," table provides async HTTP client functions. Available in both queries and procedures."]}),"\n",(0,i.jsxs)(r.p,{children:["See the full ",(0,i.jsx)(r.a,{href:"/reference/lua/http-api",children:"HTTP API reference"})," for all methods, options, and response format."]}),"\n",(0,i.jsx)(r.p,{children:"Quick example:"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:'local resp = http.get("https://api.example.com/data")\nlocal data = json.decode(resp.body)\n'})}),"\n",(0,i.jsx)(r.h2,{id:"atproto-api",children:"atproto API"}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"atproto"})," table provides atproto utility functions like DID resolution and label queries."]}),"\n",(0,i.jsxs)(r.p,{children:["See the full ",(0,i.jsx)(r.a,{href:"/reference/lua/atproto-api",children:"atproto API reference"})," for ",(0,i.jsx)(r.code,{children:"atproto.resolve_service_endpoint"}),", ",(0,i.jsx)(r.code,{children:"atproto.get_labels"}),", and ",(0,i.jsx)(r.code,{children:"atproto.get_labels_batch"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"json-api",children:"JSON API"}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"json"})," global provides JSON serialization and deserialization."]}),"\n",(0,i.jsxs)(r.p,{children:["See the full ",(0,i.jsx)(r.a,{href:"/reference/lua/json-api",children:"JSON API reference"})," for ",(0,i.jsx)(r.code,{children:"json.encode"})," and ",(0,i.jsx)(r.code,{children:"json.decode"}),"."]}),"\n",(0,i.jsx)(r.h2,{id:"debugging",children:"Debugging"}),"\n",(0,i.jsx)(r.h3,{id:"logging",children:"Logging"}),"\n",(0,i.jsxs)(r.p,{children:["Use ",(0,i.jsx)(r.code,{children:"log()"})," to trace script execution. Output appears in the server logs at ",(0,i.jsx)(r.strong,{children:"debug"})," level with the field ",(0,i.jsx)(r.code,{children:"lua_log"}),":"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-lua",children:'function handle()\n log("handle called with params: " .. tostring(params.limit))\n local result = db.query({ collection = collection, limit = params.limit })\n log("query returned " .. #result.records .. " records")\n return result\nend\n'})}),"\n",(0,i.jsxs)(r.p,{children:["To see log output, make sure your ",(0,i.jsx)(r.code,{children:"RUST_LOG"})," environment variable includes debug level for HappyView (the default ",(0,i.jsx)(r.code,{children:"happyview=debug"})," works). See ",(0,i.jsx)(r.a,{href:"/getting-started/configuration",children:"Configuration"}),"."]}),"\n",(0,i.jsx)(r.h3,{id:"error-messages",children:"Error messages"}),"\n",(0,i.jsxs)(r.p,{children:["When a script fails, the client receives a generic ",(0,i.jsx)(r.code,{children:"500"})," response:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": covers syntax errors, runtime errors, missing ",(0,i.jsx)(r.code,{children:"handle()"})," function, and errors raised with ",(0,i.jsx)(r.code,{children:"error()"})]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.strong,{children:"full error message"})," is logged server-side at error level. Check the server logs to see the actual Lua error, including line numbers and stack traces."]}),"\n",(0,i.jsx)(r.h3,{id:"common-mistakes",children:"Common mistakes"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsxs)(r.strong,{children:["Missing ",(0,i.jsx)(r.code,{children:"handle()"})," function"]}),": Every script must define a global ",(0,i.jsx)(r.code,{children:"handle()"}),' function. If it\'s missing or misspelled, the script fails silently with "script execution failed".']}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsxs)(r.strong,{children:["Calling ",(0,i.jsx)(r.code,{children:"error()"})," for expected conditions"]}),": Lua's ",(0,i.jsx)(r.code,{children:"error()"}),' triggers a 500 response. For expected conditions like "record not found", return a structured error response instead: ',(0,i.jsx)(r.code,{children:'return { error = "not found" }'}),"."]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Infinite loops"}),": The sandbox enforces a 1,000,000 instruction limit. If your script processes large data sets, paginate with ",(0,i.jsx)(r.code,{children:"db.query()"})," limits instead of loading everything at once."]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsxs)(r.strong,{children:["Forgetting ",(0,i.jsx)(r.code,{children:"params"})," values are strings"]}),": All query string parameters arrive as strings. Use ",(0,i.jsx)(r.code,{children:"tonumber(params.limit)"})," if you need a number."]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"example-scripts",children:"Example scripts"}),"\n",(0,i.jsx)(r.p,{children:"See the example script references for complete, ready-to-use scripts:"}),"\n",(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"Queries:"})}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/get-record",children:"Get a record"})," \u2014 fetch a single record by AT URI"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/paginated-list",children:"Paginated list"})," \u2014 list records with cursor-based pagination and DID filtering"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/list-or-fetch",children:"List or fetch"})," \u2014 combined single-record lookup and paginated listing"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/expanded-query",children:"Expanded query"})," \u2014 list statuses with user profiles in a single response"]}),"\n"]}),"\n",(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"Procedures:"})}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/create-record",children:"Create a record"})," \u2014 simple write that saves input as a record"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/upsert-record",children:"Upsert a record"})," \u2014 create or update using a deterministic rkey"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/update-or-delete",children:"Update or delete"})," \u2014 single endpoint handling create, update, and delete"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/batch-save",children:"Batch save"})," \u2014 create multiple records in parallel with ",(0,i.jsx)(r.code,{children:"Record.save_all()"})]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/sidecar-records",children:"Sidecar records"})," \u2014 create linked records across collections with a shared rkey"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/cascading-delete",children:"Cascading delete"})," \u2014 delete a record and all related records"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/complex-mutations",children:"Complex mutations"})," \u2014 load, transform, and save a record with multiple field changes"]}),"\n"]}),"\n",(0,i.jsx)(r.p,{children:(0,i.jsx)(r.strong,{children:"Index Hooks:"})}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/scripts/algolia-sync",children:"Algolia sync"})," \u2014 push records to an Algolia search index on create/update/delete"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": React to record changes from the network in real time"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": See how endpoints behave with and without Lua scripts"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/getting-started/dashboard#lua-editor",children:"Dashboard"}),": Use the web editor with context-aware completions"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(o,{...e})}):o(e)}},2560:(e,r,s)=>{s.d(r,{R:()=>l,x:()=>t});var n=s(63);const i={},d=n.createContext(i);function l(e){const r=n.useContext(d);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:l(e.components),n.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/920ba7ef.b802a833.js b/assets/js/920ba7ef.b802a833.js deleted file mode 100644 index a853e92..0000000 --- a/assets/js/920ba7ef.b802a833.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5953],{1189(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>t,default:()=>o,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","source":"@site/docs/guides/scripting.md","sourceDirName":"guides","slug":"/guides/scripting","permalink":"/guides/scripting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lexicons","permalink":"/guides/lexicons"},"next":{"title":"Index Hooks","permalink":"/guides/index-hooks"}}');var l=n(4848),d=n(8453);const i={},t="Lua Scripting",a={},c=[{value:"Script structure",id:"script-structure",level:2},{value:"Sandbox",id:"sandbox",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Procedure globals",id:"procedure-globals",level:3},{value:"Query globals",id:"query-globals",level:3},{value:"Utility globals",id:"utility-globals",level:2},{value:"toarray",id:"toarray",level:3},{value:"Record API",id:"record-api",level:2},{value:"Constructor",id:"constructor",level:3},{value:"Static methods",id:"static-methods",level:3},{value:"Instance methods",id:"instance-methods",level:3},{value:"Instance fields",id:"instance-fields",level:3},{value:"Schema validation",id:"schema-validation",level:3},{value:"Save behavior",id:"save-behavior",level:3},{value:"Database API",id:"database-api",level:2},{value:"db.query",id:"dbquery",level:3},{value:"db.get",id:"dbget",level:3},{value:"db.search",id:"dbsearch",level:3},{value:"db.backlinks",id:"dbbacklinks",level:3},{value:"db.count",id:"dbcount",level:3},{value:"db.raw",id:"dbraw",level:3},{value:"HTTP API",id:"http-api",level:2},{value:"Methods",id:"methods",level:3},{value:"Options",id:"options",level:3},{value:"Response",id:"response",level:3},{value:"Examples",id:"examples",level:3},{value:"JSON API",id:"json-api",level:2},{value:"json.encode",id:"jsonencode",level:3},{value:"json.decode",id:"jsondecode",level:3},{value:"Standard libraries",id:"standard-libraries",level:2},{value:"Debugging",id:"debugging",level:2},{value:"Logging",id:"logging",level:3},{value:"Error messages",id:"error-messages",level:3},{value:"Common mistakes",id:"common-mistakes",level:3},{value:"Example scripts",id:"example-scripts",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.header,{children:(0,l.jsx)(r.h1,{id:"lua-scripting",children:"Lua Scripting"})}),"\n",(0,l.jsx)(r.p,{children:"Without Lua scripts, HappyView's query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Add filtering logic"}),"\n",(0,l.jsx)(r.li,{children:"Transform responses"}),"\n",(0,l.jsx)(r.li,{children:"Validate input"}),"\n",(0,l.jsx)(r.li,{children:"Compose multi-record operations"}),"\n",(0,l.jsx)(r.li,{children:"Build entirely custom behavior"}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["Scripts are attached to query and procedure lexicons and run in a sandboxed Lua VM with access to the ",(0,l.jsx)(r.a,{href:"#record-api",children:"Record API"}),", a ",(0,l.jsx)(r.a,{href:"#database-api",children:"database API"}),", an ",(0,l.jsx)(r.a,{href:"#http-api",children:"HTTP client API"}),", a ",(0,l.jsx)(r.a,{href:"#json-api",children:"JSON API"}),", and a set of ",(0,l.jsx)(r.a,{href:"#context-globals",children:"context globals"}),"."]}),"\n",(0,l.jsxs)(r.p,{children:["For scripts that react to record changes from the network (rather than XRPC requests), see ",(0,l.jsx)(r.a,{href:"/guides/index-hooks",children:"Index Hooks"}),"."]}),"\n",(0,l.jsx)(r.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,l.jsxs)(r.p,{children:["Every script must define a ",(0,l.jsx)(r.code,{children:"handle()"})," function. HappyView calls it when the XRPC endpoint is hit and returns its result as JSON to the client."]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'function handle()\n -- your logic here\n return { key = "value" }\nend\n'})}),"\n",(0,l.jsxs)(r.p,{children:["You can define helper functions and variables outside ",(0,l.jsx)(r.code,{children:"handle()"}),". They're evaluated once when the script loads, then ",(0,l.jsx)(r.code,{children:"handle()"})," is called per request."]}),"\n",(0,l.jsx)(r.h2,{id:"sandbox",children:"Sandbox"}),"\n",(0,l.jsxs)(r.p,{children:["Scripts run in a restricted environment. The following standard Lua modules are ",(0,l.jsx)(r.strong,{children:"removed"})," and unavailable:"]}),"\n",(0,l.jsxs)(r.p,{children:[(0,l.jsx)(r.code,{children:"os"}),", ",(0,l.jsx)(r.code,{children:"io"}),", ",(0,l.jsx)(r.code,{children:"debug"}),", ",(0,l.jsx)(r.code,{children:"package"}),", ",(0,l.jsx)(r.code,{children:"require"}),", ",(0,l.jsx)(r.code,{children:"dofile"}),", ",(0,l.jsx)(r.code,{children:"loadfile"}),", ",(0,l.jsx)(r.code,{children:"load"}),", ",(0,l.jsx)(r.code,{children:"collectgarbage"})]}),"\n",(0,l.jsx)(r.p,{children:"An instruction limit of 1,000,000 prevents infinite loops. Exceeding it terminates the script with an error."}),"\n",(0,l.jsx)(r.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,l.jsxs)(r.p,{children:["These globals are set automatically before ",(0,l.jsx)(r.code,{children:"handle()"})," is called."]}),"\n",(0,l.jsx)(r.h3,{id:"procedure-globals",children:"Procedure globals"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Global"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"method"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsxs)(r.td,{children:["The XRPC method name (e.g. ",(0,l.jsx)(r.code,{children:"xyz.statusphere.setStatus"}),")"]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"input"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Parsed JSON request body"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"caller_did"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"DID of the authenticated user"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"query-globals",children:"Query globals"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Global"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"method"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"The XRPC method name"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"params"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Query string parameters (all values are strings)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,l.jsxs)(r.p,{children:["Queries are unauthenticated: there is no ",(0,l.jsx)(r.code,{children:"caller_did"})," or ",(0,l.jsx)(r.code,{children:"input"}),"."]}),"\n",(0,l.jsx)(r.h2,{id:"utility-globals",children:"Utility globals"}),"\n",(0,l.jsx)(r.p,{children:"Available in both queries and procedures:"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Function"}),(0,l.jsx)(r.th,{children:"Returns"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"now()"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Current UTC timestamp in ISO 8601 format"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"log(message)"})}),(0,l.jsx)(r.td,{children:"\u2014"}),(0,l.jsx)(r.td,{children:"Log a message (appears in server logs at debug level)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"TID()"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Generate a fresh AT Protocol TID (13-character sortable identifier)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"toarray(table)"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsxs)(r.td,{children:["Mark a table as a JSON array for serialization (see ",(0,l.jsx)(r.a,{href:"#toarray",children:"below"}),")"]})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"toarray",children:"toarray"}),"\n",(0,l.jsxs)(r.p,{children:["Lua tables don't distinguish between arrays and objects. When a table is serialized to JSON, an empty table ",(0,l.jsx)(r.code,{children:"{}"})," becomes a JSON object ",(0,l.jsx)(r.code,{children:"{}"})," instead of an array ",(0,l.jsx)(r.code,{children:"[]"}),". The ",(0,l.jsx)(r.code,{children:"toarray()"})," function marks a table so it always serializes as a JSON array \u2014 even when empty."]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'return { items = toarray(results) }\n-- With results: [{"name": "a"}, {"name": "b"}]\n-- Without results: {"items": []} (not {"items": {}})\n'})}),"\n",(0,l.jsxs)(r.p,{children:["You don't need ",(0,l.jsx)(r.code,{children:"toarray()"})," on results from ",(0,l.jsx)(r.code,{children:"db.query"}),", ",(0,l.jsx)(r.code,{children:"db.search"}),", ",(0,l.jsx)(r.code,{children:"db.backlinks"}),", or ",(0,l.jsx)(r.code,{children:"db.raw"})," \u2014 those already return properly marked arrays. Use it when you build a table yourself with ",(0,l.jsx)(r.code,{children:"table.insert()"}),"."]}),"\n",(0,l.jsx)(r.h2,{id:"record-api",children:"Record API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"Record"})," API is only available in ",(0,l.jsx)(r.strong,{children:"procedure"})," scripts. It handles creating, updating, loading, and deleting AT Protocol records. Writes are proxied to the caller's PDS and indexed locally."]}),"\n",(0,l.jsx)(r.h3,{id:"constructor",children:"Constructor"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local r = Record("xyz.statusphere.status", { status = "\\ud83d\\ude0a", createdAt = now() })\n'})}),"\n",(0,l.jsxs)(r.p,{children:["Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's ",(0,l.jsx)(r.code,{children:"_key_type"})," is automatically set from the lexicon's ",(0,l.jsx)(r.code,{children:"key"})," definition. Default values from the schema are populated for any missing fields."]}),"\n",(0,l.jsx)(r.h3,{id:"static-methods",children:"Static methods"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Save multiple records in parallel\nRecord.save_all({ record1, record2, record3 })\n\n-- Load a record from the local database by AT URI\nlocal r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns nil if not found\n\n-- Load multiple records in parallel\nlocal records = Record.load_all({ uri1, uri2 })\n-- Returns nil entries for URIs not found\n'})}),"\n",(0,l.jsx)(r.h3,{id:"instance-methods",children:"Instance methods"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Save (creates or updates depending on whether _uri is set)\nr:save()\n\n-- Delete from PDS and local database\nr:delete()\n\n-- Set the record key type (tid, any, nsid, or literal:*)\nr:set_key_type("tid")\n\n-- Set a specific record key\nr:set_rkey("my-key")\n\n-- Auto-generate a record key based on _key_type\nlocal key = r:generate_rkey()\n'})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsxs)(r.strong,{children:["Key type behavior for ",(0,l.jsx)(r.code,{children:"generate_rkey()"}),":"]})}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Key type"}),(0,l.jsx)(r.th,{children:"Generated rkey"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"tid"})}),(0,l.jsx)(r.td,{children:"Sortable timestamp-based ID"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"any"})}),(0,l.jsxs)(r.td,{children:["Same as ",(0,l.jsx)(r.code,{children:"tid"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"literal:value"})}),(0,l.jsx)(r.td,{children:"The literal value after the colon"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"nsid"})}),(0,l.jsxs)(r.td,{children:["Error \u2014 use ",(0,l.jsx)(r.code,{children:"set_rkey()"})," instead"]})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"instance-fields",children:"Instance fields"}),"\n",(0,l.jsx)(r.p,{children:"These fields are set automatically and are read-only (writes raise an error):"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Field"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_uri"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["AT URI \u2014 set after ",(0,l.jsx)(r.code,{children:"save()"}),", cleared after ",(0,l.jsx)(r.code,{children:"delete()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_cid"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["Content hash \u2014 set after ",(0,l.jsx)(r.code,{children:"save()"}),", cleared after ",(0,l.jsx)(r.code,{children:"delete()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_key_type"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsx)(r.td,{children:"Record key type from the lexicon definition"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_rkey"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["Record key \u2014 set via ",(0,l.jsx)(r.code,{children:"set_rkey()"})," or ",(0,l.jsx)(r.code,{children:"generate_rkey()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Collection NSID (always set)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_schema"})}),(0,l.jsx)(r.td,{children:"table?"}),(0,l.jsx)(r.td,{children:"Schema definition from the lexicon (used for validation)"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"schema-validation",children:"Schema validation"}),"\n",(0,l.jsx)(r.p,{children:"When a record has a schema (loaded from the lexicon):"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On save:"})," required fields are checked, and missing required fields raise an error"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On construction:"})," default values from schema properties are auto-populated"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On save:"})," only fields defined in the schema's ",(0,l.jsx)(r.code,{children:"properties"})," are sent to the PDS"]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"save-behavior",children:"Save behavior"}),"\n",(0,l.jsxs)(r.p,{children:[(0,l.jsx)(r.code,{children:"r:save()"})," auto-detects create vs update:"]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["If ",(0,l.jsx)(r.code,{children:"_uri"})," is nil \u2192 calls ",(0,l.jsx)(r.code,{children:"createRecord"})," on the PDS"]}),"\n",(0,l.jsxs)(r.li,{children:["If ",(0,l.jsx)(r.code,{children:"_uri"})," is set \u2192 calls ",(0,l.jsx)(r.code,{children:"putRecord"})," on the PDS"]}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["After a successful save, ",(0,l.jsx)(r.code,{children:"_uri"})," and ",(0,l.jsx)(r.code,{children:"_cid"})," are updated on the record instance."]}),"\n",(0,l.jsx)(r.h2,{id:"database-api",children:"Database API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"db"})," table provides access to the database. Available in both queries and procedures."]}),"\n",(0,l.jsx)(r.h3,{id:"dbquery",children:"db.query"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local result = db.query({\n collection = "xyz.statusphere.status", -- required\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n offset = 0, -- optional: for pagination\n sort = "name", -- optional: field to sort by, default "indexed_at"\n sortDirection = "asc", -- optional: "asc" or "desc", default "desc"\n})\n\n-- result.records \u2014 array of record tables (each includes a "uri" field)\n-- result.cursor \u2014 present when more records exist\n'})}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"sort"})," field can be a top-level column (",(0,l.jsx)(r.code,{children:"indexed_at"}),", ",(0,l.jsx)(r.code,{children:"did"}),", ",(0,l.jsx)(r.code,{children:"uri"}),") or any field inside the record's ",(0,l.jsx)(r.code,{children:"value"})," object (e.g. ",(0,l.jsx)(r.code,{children:"name"}),", ",(0,l.jsx)(r.code,{children:"createdAt"}),"). Field names must contain only alphanumeric characters and underscores."]}),"\n",(0,l.jsx)(r.h3,{id:"dbget",children:"db.get"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns the record table or nil\n-- The returned table includes a "uri" field\n'})}),"\n",(0,l.jsx)(r.h3,{id:"dbsearch",children:"db.search"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local result = db.search({\n collection = "xyz.statusphere.status", -- required\n field = "displayName", -- required: record field to search\n query = "alice", -- required: search term\n limit = 10, -- optional: max 100, default 10\n})\n\n-- result.records \u2014 array of matching records, ranked by relevance:\n-- exact match > prefix match > contains match, then alphabetical\n'})}),"\n",(0,l.jsx)(r.h3,{id:"dbbacklinks",children:"db.backlinks"}),"\n",(0,l.jsx)(r.p,{children:"Find records that reference a given AT URI anywhere in their data. Useful for finding likes on a post, replies to a thread, or any record that links to another."}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local result = db.backlinks({\n collection = "xyz.statusphere.status", -- required\n uri = "at://did:plc:abc/xyz.statusphere.status/foo", -- required: the URI to find references to\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n offset = 0, -- optional: for pagination\n})\n\n-- result.records \u2014 array of records whose data contains the given URI\n-- result.cursor \u2014 present when more records exist\n'})}),"\n",(0,l.jsxs)(r.p,{children:["The search checks the full record data, so it works regardless of which field holds the reference (",(0,l.jsx)(r.code,{children:"subject"}),", ",(0,l.jsx)(r.code,{children:"parent"}),", ",(0,l.jsx)(r.code,{children:"reply.root"}),", etc.)."]}),"\n",(0,l.jsx)(r.h3,{id:"dbcount",children:"db.count"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local n = db.count("xyz.statusphere.status")\nlocal n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID\n'})}),"\n",(0,l.jsx)(r.h3,{id:"dbraw",children:"db.raw"}),"\n",(0,l.jsxs)(r.p,{children:["Run a raw SQL query against the database. Supports ",(0,l.jsx)(r.code,{children:"SELECT"}),", ",(0,l.jsx)(r.code,{children:"INSERT"}),", ",(0,l.jsx)(r.code,{children:"UPDATE"}),", ",(0,l.jsx)(r.code,{children:"DELETE"}),", and ",(0,l.jsx)(r.code,{children:"CREATE TABLE"})," statements."]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Read query\nlocal rows = db.raw(\n "SELECT uri, did, record FROM records WHERE collection = $1 AND did = $2 LIMIT $3",\n { "xyz.statusphere.status", "did:plc:abc", 10 }\n)\n\nfor _, row in ipairs(rows) do\n -- row.uri, row.did, row.record (JSONB is returned as a Lua table)\nend\n\n-- Write query (returns affected rows, if any)\ndb.raw("CREATE TABLE IF NOT EXISTS my_table (id TEXT PRIMARY KEY, value TEXT NOT NULL)")\ndb.raw("INSERT INTO my_table (id, value) VALUES ($1, $2) ON CONFLICT (id) DO UPDATE SET value = $2",\n { "key1", "hello" })\n'})}),"\n",(0,l.jsxs)(r.p,{children:["Parameters are passed as an array and bound to ",(0,l.jsx)(r.code,{children:"$1"}),", ",(0,l.jsx)(r.code,{children:"$2"}),", etc. Supported parameter types: strings, integers, numbers, booleans, and nil."]}),"\n",(0,l.jsx)(r.p,{children:"Column types are mapped automatically:"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Postgres type"}),(0,l.jsx)(r.th,{children:"Lua type"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsxs)(r.td,{children:[(0,l.jsx)(r.code,{children:"TEXT"}),", ",(0,l.jsx)(r.code,{children:"VARCHAR"})]}),(0,l.jsx)(r.td,{children:"string"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsxs)(r.td,{children:[(0,l.jsx)(r.code,{children:"INT4"}),", ",(0,l.jsx)(r.code,{children:"INT8"})]}),(0,l.jsx)(r.td,{children:"integer"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsxs)(r.td,{children:[(0,l.jsx)(r.code,{children:"FLOAT4"}),", ",(0,l.jsx)(r.code,{children:"FLOAT8"})]}),(0,l.jsx)(r.td,{children:"number"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"BOOL"})}),(0,l.jsx)(r.td,{children:"boolean"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsxs)(r.td,{children:[(0,l.jsx)(r.code,{children:"JSON"}),", ",(0,l.jsx)(r.code,{children:"JSONB"})]}),(0,l.jsx)(r.td,{children:"table"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"TIMESTAMPTZ"})}),(0,l.jsx)(r.td,{children:"string (ISO 8601)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:"Other"}),(0,l.jsx)(r.td,{children:"string (fallback)"})]})]})]}),"\n",(0,l.jsx)(r.h2,{id:"http-api",children:"HTTP API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"http"})," table provides async HTTP client functions. Available in both queries and procedures."]}),"\n",(0,l.jsx)(r.h3,{id:"methods",children:"Methods"}),"\n",(0,l.jsxs)(r.p,{children:["All methods take a URL and an optional options table, and return a ",(0,l.jsx)(r.a,{href:"#response",children:"response table"}),"."]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:"http.get(url, opts?)\nhttp.post(url, opts?)\nhttp.put(url, opts?)\nhttp.patch(url, opts?)\nhttp.delete(url, opts?)\nhttp.head(url, opts?)\n"})}),"\n",(0,l.jsx)(r.h3,{id:"options",children:"Options"}),"\n",(0,l.jsx)(r.p,{children:"The optional second argument is a table with:"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Field"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"headers"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Request headers as key-value string pairs"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"body"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Request body (ignored for GET and HEAD)"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"response",children:"Response"}),"\n",(0,l.jsx)(r.p,{children:"Every method returns a table with:"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Field"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"status"})}),(0,l.jsx)(r.td,{children:"integer"}),(0,l.jsx)(r.td,{children:"HTTP status code"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"body"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Response body text (empty string for HEAD)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"headers"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Response headers as key-value pairs (lowercase keys)"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"examples",children:"Examples"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Simple GET\nlocal resp = http.get("https://api.example.com/data")\n-- resp.status = 200, resp.body = "...", resp.headers["content-type"] = "application/json"\n\n-- GET with custom headers\nlocal resp = http.get("https://api.example.com/data", {\n headers = { ["authorization"] = "Bearer token123" }\n})\n\n-- POST with JSON body\nlocal resp = http.post("https://api.example.com/hook", {\n body = \'{"key": "value"}\',\n headers = { ["content-type"] = "application/json" }\n})\n\n-- PUT, PATCH, DELETE, HEAD follow the same pattern\nlocal resp = http.put(url, { body = data, headers = { ... } })\nlocal resp = http.patch(url, { body = data, headers = { ... } })\nlocal resp = http.delete(url, { headers = { ... } })\nlocal resp = http.head(url)\n'})}),"\n",(0,l.jsx)(r.h2,{id:"json-api",children:"JSON API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"json"})," global provides JSON serialization and deserialization. Available in queries, procedures, and ",(0,l.jsx)(r.a,{href:"/guides/index-hooks",children:"index hooks"}),"."]}),"\n",(0,l.jsx)(r.h3,{id:"jsonencode",children:"json.encode"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local str = json.encode({ key = "value", items = { 1, 2, 3 } })\n-- \'{"key":"value","items":[1,2,3]}\'\n'})}),"\n",(0,l.jsx)(r.p,{children:"Converts a Lua table to a JSON string."}),"\n",(0,l.jsx)(r.h3,{id:"jsondecode",children:"json.decode"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local tbl = json.decode(\'{"key": "value"}\')\n-- tbl.key == "value"\n'})}),"\n",(0,l.jsx)(r.p,{children:"Parses a JSON string into a Lua table. Returns an error if the input is not valid JSON."}),"\n",(0,l.jsx)(r.h2,{id:"standard-libraries",children:"Standard libraries"}),"\n",(0,l.jsx)(r.p,{children:"The following Lua 5.4 standard library modules are available:"}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"string"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.byte",children:(0,l.jsx)(r.code,{children:"byte"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.char",children:(0,l.jsx)(r.code,{children:"char"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.find",children:(0,l.jsx)(r.code,{children:"find"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.format",children:(0,l.jsx)(r.code,{children:"format"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gmatch",children:(0,l.jsx)(r.code,{children:"gmatch"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gsub",children:(0,l.jsx)(r.code,{children:"gsub"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.len",children:(0,l.jsx)(r.code,{children:"len"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.lower",children:(0,l.jsx)(r.code,{children:"lower"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.match",children:(0,l.jsx)(r.code,{children:"match"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.rep",children:(0,l.jsx)(r.code,{children:"rep"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.reverse",children:(0,l.jsx)(r.code,{children:"reverse"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.sub",children:(0,l.jsx)(r.code,{children:"sub"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.upper",children:(0,l.jsx)(r.code,{children:"upper"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"table"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.concat",children:(0,l.jsx)(r.code,{children:"concat"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.insert",children:(0,l.jsx)(r.code,{children:"insert"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.remove",children:(0,l.jsx)(r.code,{children:"remove"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.sort",children:(0,l.jsx)(r.code,{children:"sort"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,l.jsx)(r.code,{children:"unpack"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"math"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.abs",children:(0,l.jsx)(r.code,{children:"abs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.ceil",children:(0,l.jsx)(r.code,{children:"ceil"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.floor",children:(0,l.jsx)(r.code,{children:"floor"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.max",children:(0,l.jsx)(r.code,{children:"max"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.min",children:(0,l.jsx)(r.code,{children:"min"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.random",children:(0,l.jsx)(r.code,{children:"random"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.sqrt",children:(0,l.jsx)(r.code,{children:"sqrt"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.huge",children:(0,l.jsx)(r.code,{children:"huge"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.pi",children:(0,l.jsx)(r.code,{children:"pi"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:"Standard builtins"})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-print",children:(0,l.jsx)(r.code,{children:"print"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tostring",children:(0,l.jsx)(r.code,{children:"tostring"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tonumber",children:(0,l.jsx)(r.code,{children:"tonumber"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-type",children:(0,l.jsx)(r.code,{children:"type"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pairs",children:(0,l.jsx)(r.code,{children:"pairs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-ipairs",children:(0,l.jsx)(r.code,{children:"ipairs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-next",children:(0,l.jsx)(r.code,{children:"next"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-select",children:(0,l.jsx)(r.code,{children:"select"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,l.jsx)(r.code,{children:"unpack"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-error",children:(0,l.jsx)(r.code,{children:"error"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pcall",children:(0,l.jsx)(r.code,{children:"pcall"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-xpcall",children:(0,l.jsx)(r.code,{children:"xpcall"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-assert",children:(0,l.jsx)(r.code,{children:"assert"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-setmetatable",children:(0,l.jsx)(r.code,{children:"setmetatable"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-getmetatable",children:(0,l.jsx)(r.code,{children:"getmetatable"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawget",children:(0,l.jsx)(r.code,{children:"rawget"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawset",children:(0,l.jsx)(r.code,{children:"rawset"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawequal",children:(0,l.jsx)(r.code,{children:"rawequal"})})}),"\n"]})]}),"\n",(0,l.jsx)(r.h2,{id:"debugging",children:"Debugging"}),"\n",(0,l.jsx)(r.h3,{id:"logging",children:"Logging"}),"\n",(0,l.jsxs)(r.p,{children:["Use ",(0,l.jsx)(r.code,{children:"log()"})," to trace script execution. Output appears in the server logs at ",(0,l.jsx)(r.strong,{children:"debug"})," level with the field ",(0,l.jsx)(r.code,{children:"lua_log"}),":"]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'function handle()\n log("handle called with params: " .. tostring(params.limit))\n local result = db.query({ collection = collection, limit = params.limit })\n log("query returned " .. #result.records .. " records")\n return result\nend\n'})}),"\n",(0,l.jsxs)(r.p,{children:["To see log output, make sure your ",(0,l.jsx)(r.code,{children:"RUST_LOG"})," environment variable includes debug level for HappyView (the default ",(0,l.jsx)(r.code,{children:"happyview=debug"})," works). See ",(0,l.jsx)(r.a,{href:"/getting-started/configuration",children:"Configuration"}),"."]}),"\n",(0,l.jsx)(r.h3,{id:"error-messages",children:"Error messages"}),"\n",(0,l.jsxs)(r.p,{children:["When a script fails, the client receives a generic ",(0,l.jsx)(r.code,{children:"500"})," response:"]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": covers syntax errors, runtime errors, missing ",(0,l.jsx)(r.code,{children:"handle()"})," function, and errors raised with ",(0,l.jsx)(r.code,{children:"error()"})]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.strong,{children:"full error message"})," is logged server-side at error level. Check the server logs to see the actual Lua error, including line numbers and stack traces."]}),"\n",(0,l.jsx)(r.h3,{id:"common-mistakes",children:"Common mistakes"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Missing ",(0,l.jsx)(r.code,{children:"handle()"})," function"]}),": Every script must define a global ",(0,l.jsx)(r.code,{children:"handle()"}),' function. If it\'s missing or misspelled, the script fails silently with "script execution failed".']}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Calling ",(0,l.jsx)(r.code,{children:"error()"})," for expected conditions"]}),": Lua's ",(0,l.jsx)(r.code,{children:"error()"}),' triggers a 500 response. For expected conditions like "record not found", return a structured error response instead: ',(0,l.jsx)(r.code,{children:'return { error = "not found" }'}),"."]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"Infinite loops"}),": The sandbox enforces a 1,000,000 instruction limit. If your script processes large data sets, paginate with ",(0,l.jsx)(r.code,{children:"db.query()"})," limits instead of loading everything at once."]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Forgetting ",(0,l.jsx)(r.code,{children:"params"})," values are strings"]}),": All query string parameters arrive as strings. Use ",(0,l.jsx)(r.code,{children:"tonumber(params.limit)"})," if you need a number."]}),"\n"]}),"\n",(0,l.jsx)(r.h2,{id:"example-scripts",children:"Example scripts"}),"\n",(0,l.jsx)(r.p,{children:"See the example script references for complete, ready-to-use scripts:"}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Queries:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/get-record",children:"Get a record"})," \u2014 fetch a single record by AT URI"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/paginated-list",children:"Paginated list"})," \u2014 list records with cursor-based pagination and DID filtering"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/list-or-fetch",children:"List or fetch"})," \u2014 combined single-record lookup and paginated listing"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/expanded-query",children:"Expanded query"})," \u2014 list statuses with user profiles in a single response"]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Procedures:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/create-record",children:"Create a record"})," \u2014 simple write that saves input as a record"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/upsert-record",children:"Upsert a record"})," \u2014 create or update using a deterministic rkey"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/update-or-delete",children:"Update or delete"})," \u2014 single endpoint handling create, update, and delete"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/batch-save",children:"Batch save"})," \u2014 create multiple records in parallel with ",(0,l.jsx)(r.code,{children:"Record.save_all()"})]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/sidecar-records",children:"Sidecar records"})," \u2014 create linked records across collections with a shared rkey"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/cascading-delete",children:"Cascading delete"})," \u2014 delete a record and all related records"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/complex-mutations",children:"Complex mutations"})," \u2014 load, transform, and save a record with multiple field changes"]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Index Hooks:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/algolia-sync",children:"Algolia sync"})," \u2014 push records to an Algolia search index on create/update/delete"]}),"\n"]}),"\n",(0,l.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": React to record changes from the network in real time"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": See how endpoints behave with and without Lua scripts"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/getting-started/dashboard#lua-editor",children:"Dashboard"}),": Use the web editor with context-aware completions"]}),"\n"]})]})}function o(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,l.jsx)(r,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>t});var s=n(6540);const l={},d=s.createContext(l);function i(e){const r=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:i(e.components),s.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9288.d0db207e.js b/assets/js/9288.d0db207e.js new file mode 100644 index 0000000..9a76d0b --- /dev/null +++ b/assets/js/9288.d0db207e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9288],{2528:(t,r,e)=>{function o(t,r){t.accDescr&&r.setAccDescription?.(t.accDescr),t.accTitle&&r.setAccTitle?.(t.accTitle),t.title&&r.setDiagramTitle?.(t.title)}e.d(r,{S:()=>o}),(0,e(8894).K2)(o,"populateCommonDb")},4937:(t,r,e)=>{e.d(r,{m:()=>n});var o=e(8894),n=class{constructor(t){this.init=t,this.records=this.init()}static{(0,o.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}},9288:(t,r,e)=>{e.d(r,{diagram:()=>vt});var o=e(2528),n=e(4937),a=e(2101),i=e(5691),s=e(8894),c=e(4419),d=e(1485),h={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},$=i.UI.gitGraph,m=(0,s.K2)(()=>(0,a.$t)({...$,...(0,i.zj)().gitGraph}),"getConfig"),l=new n.m(()=>{const t=m(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function g(){return(0,a.yT)({length:7})}function p(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}(0,s.K2)(g,"getID"),(0,s.K2)(p,"uniqBy");var y=(0,s.K2)(function(t){l.records.direction=t},"setDirection"),f=(0,s.K2)(function(t){s.Rm.debug("options str",t),t=t?.trim(),t=t||"{}";try{l.records.options=JSON.parse(t)}catch(r){s.Rm.error("error while parsing gitGraph options",r.message)}},"setOptions"),x=(0,s.K2)(function(){return l.records.options},"getOptions"),u=(0,s.K2)(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;s.Rm.info("commit",r,e,o,n),s.Rm.debug("Entering commit:",r,e,o,n);const a=m();e=i.Y2.sanitizeText(e,a),r=i.Y2.sanitizeText(r,a),n=n?.map(t=>i.Y2.sanitizeText(t,a));const c={id:e||l.records.seq+"-"+g(),message:r,seq:l.records.seq++,type:o??h.NORMAL,tags:n??[],parents:null==l.records.head?[]:[l.records.head.id],branch:l.records.currBranch};l.records.head=c,s.Rm.info("main branch",a.mainBranchName),l.records.commits.has(c.id)&&s.Rm.warn(`Commit ID ${c.id} already exists`),l.records.commits.set(c.id,c),l.records.branches.set(l.records.currBranch,c.id),s.Rm.debug("in pushCommit "+c.id)},"commit"),b=(0,s.K2)(function(t){let r=t.name;const e=t.order;if(r=i.Y2.sanitizeText(r,m()),l.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);l.records.branches.set(r,null!=l.records.head?l.records.head.id:null),l.records.branchConfig.set(r,{name:r,order:e}),B(r),s.Rm.debug("in createBranch")},"branch"),w=(0,s.K2)(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=m();r=i.Y2.sanitizeText(r,a),e&&(e=i.Y2.sanitizeText(e,a));const c=l.records.branches.get(l.records.currBranch),d=l.records.branches.get(r),$=c?l.records.commits.get(c):void 0,p=d?l.records.commits.get(d):void 0;if($&&p&&$.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(l.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===$||!$){const t=new Error(`Incorrect usage of "merge". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!l.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===p||!p){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if($===p){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&l.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const y=d||"",f={id:e||`${l.records.seq}-${g()}`,message:`merged branch ${r} into ${l.records.currBranch}`,seq:l.records.seq++,parents:null==l.records.head?[]:[l.records.head.id,y],branch:l.records.currBranch,type:h.MERGE,customType:o,customId:!!e,tags:n??[]};l.records.head=f,l.records.commits.set(f.id,f),l.records.branches.set(l.records.currBranch,f.id),s.Rm.debug(l.records.branches),s.Rm.debug("in mergeBranch")},"merge"),k=(0,s.K2)(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;s.Rm.debug("Entering cherryPick:",r,e,o);const a=m();if(r=i.Y2.sanitizeText(r,a),e=i.Y2.sanitizeText(e,a),o=o?.map(t=>i.Y2.sanitizeText(t,a)),n=i.Y2.sanitizeText(n,a),!r||!l.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c=l.records.commits.get(r);if(void 0===c||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(c.parents)||!c.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const d=c.branch;if(c.type===h.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!l.records.commits.has(e)){if(d===l.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=l.records.branches.get(l.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=l.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${l.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const i={id:l.records.seq+"-"+g(),message:`cherry-picked ${c?.message} into ${l.records.currBranch}`,seq:l.records.seq++,parents:null==l.records.head?[]:[l.records.head.id,c.id],branch:l.records.currBranch,type:h.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${c.id}${c.type===h.MERGE?`|parent:${n}`:""}`]};l.records.head=i,l.records.commits.set(i.id,i),l.records.branches.set(l.records.currBranch,i.id),s.Rm.debug(l.records.branches),s.Rm.debug("in cherryPick")}},"cherryPick"),B=(0,s.K2)(function(t){if(t=i.Y2.sanitizeText(t,m()),!l.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{l.records.currBranch=t;const r=l.records.branches.get(l.records.currBranch);l.records.head=void 0!==r&&r?l.records.commits.get(r)??null:null}},"checkout");function E(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function C(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const n in l.records.branches)l.records.branches.get(n)===r.id&&o.push(n);if(s.Rm.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=l.records.commits.get(r.parents[0]);E(t,r,e),r.parents[1]&&t.push(l.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=l.records.commits.get(r.parents[0]);E(t,r,e)}}C(t=p(t,t=>t.id))}(0,s.K2)(E,"upsert"),(0,s.K2)(C,"prettyPrintCommitHistory");var T=(0,s.K2)(function(){s.Rm.debug(l.records.commits);C([R()[0]])},"prettyPrint"),L=(0,s.K2)(function(){l.reset(),(0,i.IU)()},"clear"),K=(0,s.K2)(function(){return[...l.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),M=(0,s.K2)(function(){return l.records.branches},"getBranches"),v=(0,s.K2)(function(){return l.records.commits},"getCommits"),R=(0,s.K2)(function(){const t=[...l.records.commits.values()];return t.forEach(function(t){s.Rm.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),I={commitType:h,getConfig:m,setDirection:y,setOptions:f,getOptions:x,commit:u,branch:b,merge:w,cherryPick:k,checkout:B,prettyPrint:T,clear:L,getBranchesAsObjArray:K,getBranches:M,getCommits:v,getCommitsArray:R,getCurrentBranch:(0,s.K2)(function(){return l.records.currBranch},"getCurrentBranch"),getDirection:(0,s.K2)(function(){return l.records.direction},"getDirection"),getHead:(0,s.K2)(function(){return l.records.head},"getHead"),setAccTitle:i.SV,getAccTitle:i.iN,getAccDescription:i.m7,setAccDescription:i.EI,setDiagramTitle:i.ke,getDiagramTitle:i.ab},P=(0,s.K2)((t,r)=>{(0,o.S)(t,r),t.dir&&r.setDirection(t.dir);for(const e of t.statements)O(e,r)},"populate"),O=(0,s.K2)((t,r)=>{const e={Commit:(0,s.K2)(t=>r.commit(A(t)),"Commit"),Branch:(0,s.K2)(t=>r.branch(G(t)),"Branch"),Merge:(0,s.K2)(t=>r.merge(S(t)),"Merge"),Checkout:(0,s.K2)(t=>r.checkout(D(t)),"Checkout"),CherryPicking:(0,s.K2)(t=>r.cherryPick(H(t)),"CherryPicking")}[t.$type];e?e(t):s.Rm.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),A=(0,s.K2)(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?h[t.type]:h.NORMAL,tags:t.tags??void 0}),"parseCommit"),G=(0,s.K2)(t=>({name:t.name,order:t.order??0}),"parseBranch"),S=(0,s.K2)(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?h[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),D=(0,s.K2)(t=>t.branch,"parseCheckout"),H=(0,s.K2)(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),W={parse:(0,s.K2)(async t=>{const r=await(0,c.qg)("gitGraph",t);s.Rm.debug(r),P(r,I)},"parse")};var q=10,_=40,z=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Y=new Set(["redux-color","redux-dark-color"]),j=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),N=(0,s.K2)((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),F=new Map,V=new Map,U=new Map,J=[],Q=0,X="LR",Z=(0,s.K2)(()=>{F.clear(),V.clear(),U.clear(),Q=0,J=[],X="LR"},"clear"),tt=(0,s.K2)(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),rt=(0,s.K2)(t=>{let r,e,o;return"BT"===X?(e=(0,s.K2)((t,r)=>t<=r,"comparisonFunc"),o=1/0):(e=(0,s.K2)((t,r)=>t>=r,"comparisonFunc"),o=0),t.forEach(t=>{const n="TB"===X||"BT"==X?V.get(t)?.y:V.get(t)?.x;void 0!==n&&e(n,o)&&(r=t,o=n)}),r},"findClosestParent"),et=(0,s.K2)(t=>{let r="",e=1/0;return t.forEach(t=>{const o=V.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),ot=(0,s.K2)((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=at(e),n=Math.max(o,n)):a.push(e),it(e,o)}),o=n,a.forEach(t=>{st(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=et(e.parents);o=V.get(t).y-_,o<=n&&(n=o);const r=F.get(e.branch).pos,a=o-q;V.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),nt=(0,s.K2)(t=>{const r=rt(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=V.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),at=(0,s.K2)(t=>nt(t)+_,"calculateCommitPosition"),it=(0,s.K2)((t,r)=>{const e=F.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+q;return V.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),st=(0,s.K2)((t,r,e)=>{const o=F.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;V.set(t.id,{x:a,y:n})},"setRootPosition"),ct=(0,s.K2)((t,r,e,o,n,a)=>{const{theme:s}=(0,i.D7)(),c=z.has(s??""),d=Y.has(s??""),$=j.has(s??"");if(a===h.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(c?3:0)).attr("y",e.y-10+(c?3:0)).attr("width",c?14:20).attr("height",c?14:20).attr("class",`commit ${r.id} commit-highlight${N(n,8,d)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(c?2:0)).attr("y",e.y-6+(c?2:0)).attr("width",c?8:12).attr("height",c?8:12).attr("class",`commit ${r.id} commit${N(n,8,d)} ${o}-inner`);else if(a===h.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",c?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",c?2.5:2.75).attr("fill",$?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",c?2.5:2.75).attr("fill",$?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",$?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",$?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const i=t.append("circle");if(i.attr("cx",e.x),i.attr("cy",e.y),i.attr("r",c?7:10),i.attr("class",`commit ${r.id} commit${N(n,8,d)}`),a===h.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",c?5:6),a.attr("class",`commit ${o} ${r.id} commit${N(n,8,d)}`)}if(a===h.REVERSE){const a=c?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${N(n,8,d)}`)}}},"drawCommitBullet"),dt=(0,s.K2)((t,r,e,o,n)=>{if(r.type!==h.CHERRY_PICK&&(r.customId&&r.type===h.MERGE||r.type!==h.MERGE)&&n.showCommitLabel){const a=t.append("g"),i=a.insert("rect").attr("class","commit-label-bkg"),s=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=s.node()?.getBBox();if(c&&(i.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===X||"BT"===X?(i.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),s.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):s.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===X||"BT"===X)s.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),i.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),ht=(0,s.K2)((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,i=0;const s=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),i=Math.max(i,h.height),d.attr("x",e.posWithOffset-h.width/2),s.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:c,yOffset:d}of s){const n=i/2,s=e.y-19.2-d;if(c.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${s+2} \n ${o-a/2-2},${s-2}\n ${e.posWithOffset-a/2-4},${s-n-2}\n ${e.posWithOffset+a/2+4},${s-n-2}\n ${e.posWithOffset+a/2+4},${s+n+2}\n ${e.posWithOffset-a/2-4},${s+n+2}`),r.attr("cy",s).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===X||"BT"===X){const i=o+d;c.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${i+2}\n ${e.x},${i-2}\n ${e.x+q},${i-n-2}\n ${e.x+q+a+4},${i-n-2}\n ${e.x+q+a+4},${i+n+2}\n ${e.x+q},${i+n+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",i).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",i+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),$t=(0,s.K2)(t=>{switch(t.customType??t.type){case h.NORMAL:return"commit-normal";case h.REVERSE:return"commit-reverse";case h.HIGHLIGHT:return"commit-highlight";case h.MERGE:return"commit-merge";case h.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),mt=(0,s.K2)((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-_}return 0}{const e=rt(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+_;if("BT"===r){return(o.get(t.id)??n).y-_}return a.x+_}}return 0},"calculatePosition"),lt=(0,s.K2)((t,r,e)=>{const o="BT"===X&&e?r:r+q,n=F.get(t.branch)?.pos,a="TB"===X||"BT"===X?F.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=z.has((0,i.D7)().theme??"");return{x:a,y:"TB"===X||"BT"===X?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),gt=(0,s.K2)((t,r,e,o)=>{const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let i="TB"===X||"BT"===X?30:0;const c=[...r.keys()],d=o.parallelCommits??!1,h=(0,s.K2)((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let $=c.sort(h);"BT"===X&&(d&&ot($,r,i),$=$.reverse()),$.forEach(t=>{const s=r.get(t);if(!s)throw new Error(`Commit not found for key ${t}`);d&&(i=mt(s,X,i,V));const c=lt(s,i,d);if(e){const t=$t(s),r=s.customType??s.type,e=F.get(s.branch)?.index??0;ct(n,s,c,t,e,r),dt(a,s,c,i,o),ht(a,s,c,i)}"TB"===X||"BT"===X?V.set(s.id,{x:c.x,y:c.posWithOffset}):V.set(s.id,{x:c.posWithOffset,y:c.y}),i="BT"===X&&d?i+_:i+_+q,i>Q&&(Q=i)})},"drawCommits"),pt=(0,s.K2)((t,r,e,o,n)=>{const a=("TB"===X||"BT"===X?e.xt.branch===a,"isOnBranchToGetCurve"),c=(0,s.K2)(e=>e.seq>t.seq&&e.seqc(t)&&i(t))},"shouldRerouteArrow"),yt=(0,s.K2)((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(J.every(t=>Math.abs(t-o)>=10))return J.push(o),o;const n=Math.abs(t-r);return yt(t,r-n/5,e+1)},"findLane"),ft=(0,s.K2)((t,r,e,o)=>{const{theme:n}=(0,i.D7)(),a=Y.has(n??""),s=V.get(r.id),c=V.get(e.id);if(void 0===s||void 0===c)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const d=pt(r,e,s,c,o);let $,m="",l="",g=0,p=0,y=F.get(e.branch)?.index;if(e.type===h.MERGE&&r.id!==e.parents[0]&&(y=F.get(r.branch)?.index),d){m="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",g=10,p=10;const t=s.yc.x&&(m="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",g=20,p=20,$=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y-g} ${l} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+g} ${s.y} ${m} ${c.x} ${s.y+p} L ${c.x} ${c.y}`),s.x===c.x&&($=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):"BT"===X?(s.xc.x&&(m="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",g=20,p=20,$=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${c.y+g} ${m} ${s.x-p} ${c.y} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${c.x+g} ${s.y} ${l} ${c.x} ${s.y-p} L ${c.x} ${c.y}`),s.x===c.x&&($=`M ${s.x} ${s.y} L ${c.x} ${c.y}`)):(s.yc.y&&($=e.type===h.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${c.x-g} ${s.y} ${m} ${c.x} ${s.y-p} L ${c.x} ${c.y}`:`M ${s.x} ${s.y} L ${s.x} ${c.y+g} ${l} ${s.x+p} ${c.y} L ${c.x} ${c.y}`),s.y===c.y&&($=`M ${s.x} ${s.y} L ${c.x} ${c.y}`));if(void 0===$)throw new Error("Line definition not found");t.append("path").attr("d",$).attr("class","arrow arrow"+N(y,8,a))},"drawArrow"),xt=(0,s.K2)((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{ft(e,r.get(t),o,r)})})},"drawArrows"),ut=(0,s.K2)((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=(0,i.D7)(),{dropShadow:c,THEME_COLOR_LIMIT:d}=s,h=z.has(a??""),$=Y.has(a??""),m=t.append("g");r.forEach((t,r)=>{const a=N(r,h?d:8,$),i=F.get(t.name)?.pos;if(void 0===i)throw new Error(`Position not found for branch ${t.name}`);const s="TB"===X||"BT"===X?i:h?i+6+1:i-2,l=m.append("line");l.attr("x1",0),l.attr("y1",s),l.attr("x2",Q),l.attr("y2",s),l.attr("class","branch branch"+a),"TB"===X?(l.attr("y1",30),l.attr("x1",i),l.attr("y2",Q),l.attr("x2",i)):"BT"===X&&(l.attr("y1",Q),l.attr("x1",i),l.attr("y2",30),l.attr("x2",i)),J.push(s);const g=t.name,p=tt(g),y=m.insert("rect"),f=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=h?0:4,b=h?16:0,w=h?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${h?`url(#${o}-drop-shadow)`:c}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+(s-x.height/2-2)+")"),"TB"===X?(y.attr("x",i-x.width/2-10).attr("y",0),f.attr("transform","translate("+(i-x.width/2-5)+", 0)"),h&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(i-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===X?(y.attr("x",i-x.width/2-10).attr("y",Q),f.attr("transform","translate("+(i-x.width/2-5)+", "+Q+")"),h&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(i-x.width/2-5)+", "+(Q+2*w+4)+")"))):y.attr("transform","translate(-19, "+(s-12-w/2)+")")})},"drawBranches"),bt=(0,s.K2)(function(t,r,e,o,n){return F.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===X||"BT"===X?o.width/2:0)},"setBranchPosition"),wt={draw:(0,s.K2)(function(t,r,e,o){Z(),s.Rm.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void s.Rm.error("getConfig method is not available on db");const c=n.getConfig(),h=c.rotateCommitLabel??!1;U=n.getCommits();const $=n.getBranchesAsObjArray();X=n.getDirection();const m=(0,d.Ltv)(`[id="${r}"]`),{look:l,theme:g,themeVariables:p}=(0,i.D7)(),{useGradient:y,gradientStart:f,gradientStop:x,filterColor:u}=p;if(y){const t=m.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",f).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",x).attr("stop-opacity",1)}"neo"===l&&z.has(g??"")&&m.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",u);let b=0;$.forEach((t,r)=>{const e=tt(t.name),o=m.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();b=bt(t.name,b,r,i,h),a.remove(),n.remove(),o.remove()}),gt(m,U,!1,c),c.showBranches&&ut(m,$,c,r),xt(m,U),gt(m,U,!0,c),a._K.insertTitle(m,"gitTitleText",c.titleTopMargin??0,n.getDiagramTitle()),(0,i.mj)(void 0,m,c.diagramPadding,c.useMaxWidth)},"draw")};var kt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Bt=new Set(["redux-color","redux-dark-color"]),Et=new Set(["neo","neo-dark"]),Ct=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Tt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Lt=(0,s.K2)(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o{const r=(0,i.zj)(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=kt.has(e);if(Et.has(e)){let r="";for(let e=0;e`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),vt={parser:W,db:I,renderer:wt,styles:(0,s.K2)(t=>{const r=(0,i.zj)(),{theme:e}=r,o=Tt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Kt(t):Mt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${kt.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")}}}]); \ No newline at end of file diff --git a/assets/js/9314.bd050d62.js b/assets/js/9314.bd050d62.js new file mode 100644 index 0000000..c0b7b6d --- /dev/null +++ b/assets/js/9314.bd050d62.js @@ -0,0 +1,2 @@ +/*! For license information please see 9314.bd050d62.js.LICENSE.txt */ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9314],{9314:(e,t,n)=>{function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function s(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||h(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e){return function(e){if(Array.isArray(e))return r(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||h(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}n.d(t,{A:()=>Kh});var f="undefined"==typeof window?null:window,p=f?f.navigator:null;f&&f.document;var v,g,y,m,b,x,w,E,k,T,C,P,S,B,D,_,A,M,R,I,N,L,z,O,V,F,X,j,Y=d(""),q=d({}),W=d(function(){}),U="undefined"==typeof HTMLElement?"undefined":d(HTMLElement),H=function(e){return e&&e.instanceString&&G(e.instanceString)?e.instanceString():null},K=function(e){return null!=e&&d(e)==Y},G=function(e){return null!=e&&d(e)===W},Z=function(e){return!ee(e)&&(Array.isArray?Array.isArray(e):null!=e&&e instanceof Array)},$=function(e){return null!=e&&d(e)===q&&!Z(e)&&e.constructor===Object},Q=function(e){return null!=e&&d(e)===d(1)&&!isNaN(e)},J=function(e){return"undefined"===U?void 0:null!=e&&e instanceof HTMLElement},ee=function(e){return te(e)||ne(e)},te=function(e){return"collection"===H(e)&&e._private.single},ne=function(e){return"collection"===H(e)&&!e._private.single},re=function(e){return"core"===H(e)},ae=function(e){return"stylesheet"===H(e)},ie=function(e){return null==e||!(""!==e&&!e.match(/^\s+$/))},oe=function(e){return function(e){return null!=e&&d(e)===q}(e)&&G(e.then)},se=function(e,t){t||(t=function(){if(1===arguments.length)return arguments[0];if(0===arguments.length)return"undefined";for(var e=[],t=0;tt?1:0},be=null!=Object.assign?Object.assign.bind(Object):function(e){for(var t=arguments,n=1;n255)return;t.push(Math.floor(i))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(void 0!==l){if((l=parseFloat(l))<0||l>1)return;t.push(l)}}return t}(e)||function(e){var t,n,r,a,i,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var c=new RegExp("^"+ge+"$").exec(e);if(c){if((n=parseInt(c[1]))<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,(r=parseFloat(c[2]))<0||r>100)return;if(r/=100,(a=parseFloat(c[3]))<0||a>100)return;if(a/=100,void 0!==(i=c[4])&&((i=parseFloat(i))<0||i>1))return;if(0===r)o=s=l=Math.round(255*a);else{var d=a<.5?a*(1+r):a+r-a*r,h=2*a-d;o=Math.round(255*u(h,d,n+1/3)),s=Math.round(255*u(h,d,n)),l=Math.round(255*u(h,d,n-1/3))}t=[o,s,l,i]}return t}(e)},we={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Ee=function(e){for(var t=e.map,n=e.keys,r=n.length,a=0;a=o||t<0||g&&e-p>=c}function x(){var e=t();if(b(e))return w(e);h=setTimeout(x,function(e){var t=o-(e-f);return g?a(t,c-(e-p)):t}(e))}function w(e){return h=void 0,y&&l?m(e):(l=u=void 0,d)}function E(){var e=t(),n=b(e);if(l=arguments,u=this,f=e,n){if(void 0===h)return function(e){return p=e,h=setTimeout(x,o),v?m(e):d}(f);if(g)return clearTimeout(h),h=setTimeout(x,o),m(f)}return void 0===h&&(h=setTimeout(x,o)),d}return o=n(o)||0,e(s)&&(v=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,o):c,y="trailing"in s?!!s.trailing:y),E.cancel=function(){void 0!==h&&clearTimeout(h),p=0,l=f=u=h=void 0},E.flush=function(){return void 0===h?d:w(t())},E}}()),Re=f?f.performance:null,Ie=Re&&Re.now?function(){return Re.now()}:function(){return Date.now()},Ne=function(){if(f){if(f.requestAnimationFrame)return function(e){f.requestAnimationFrame(e)};if(f.mozRequestAnimationFrame)return function(e){f.mozRequestAnimationFrame(e)};if(f.webkitRequestAnimationFrame)return function(e){f.webkitRequestAnimationFrame(e)};if(f.msRequestAnimationFrame)return function(e){f.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(Ie())},1e3/60)}}(),Le=function(e){return Ne(e)},ze=Ie,Oe=9261,Ve=5381,Fe=function(e){for(var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe;!(t=e.next()).done;)n=65599*n+t.value|0;return n},Xe=function(e){return 65599*(arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe)+e|0},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ve;return(t<<5)+t+e|0},Ye=function(e){return 2097152*e[0]+e[1]},qe=function(e,t){return[Xe(e[0],t[0]),je(e[1],t[1])]},We=function(e,t){var n={value:0,done:!1},r=0,a=e.length;return Fe({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},ft=function(e){e.splice(0,e.length)},pt=function(e,t,n){return n&&(t=ce(n,t)),e[t]},vt=function(e,t,n,r){n&&(t=ce(n,t)),e[t]=r},gt="undefined"!=typeof Map?Map:function(){return i(function e(){a(this,e),this._obj={}},[{key:"set",value:function(e,t){return this._obj[e]=t,this}},{key:"delete",value:function(e){return this._obj[e]=void 0,this}},{key:"clear",value:function(){this._obj={}}},{key:"has",value:function(e){return void 0!==this._obj[e]}},{key:"get",value:function(e){return this._obj[e]}}])}(),yt=function(){return i(function e(t){if(a(this,e),this._obj=Object.create(null),this.size=0,null!=t){var n;n=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t;for(var r=0;r2&&void 0!==arguments[2])||arguments[2];if(void 0!==e&&void 0!==t&&re(e)){var r=t.group;if(null==r&&(r=t.data&&null!=t.data.source&&null!=t.data.target?"edges":"nodes"),"nodes"===r||"edges"===r){this.length=1,this[0]=this;var a=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:void 0===t.selectable||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:void 0===t.grabbable||!!t.grabbable,pannable:void 0===t.pannable?"edges"===r:!!t.pannable,active:!1,classes:new mt,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(null==a.position.x&&(a.position.x=0),null==a.position.y&&(a.position.y=0),t.renderedPosition){var i=t.renderedPosition,o=e.pan(),s=e.zoom();a.position={x:(i.x-o.x)/s,y:(i.y-o.y)/s}}var l=[];Z(t.classes)?l=t.classes:K(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,c=l.length;ut?1:0},u=function(e,t,a,i,o){var s;if(null==a&&(a=0),null==o&&(o=n),a<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);an;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;iv;0<=v?++h:--h)g.push(i(e,r));return g},p=function(e,t,r,a){var i,o,s;for(null==a&&(a=n),i=e[r];r>t&&a(i,o=e[s=r-1>>1])<0;)e[r]=o,r=s;return e[r]=i},v=function(e,t,r){var a,i,o,s,l;for(null==r&&(r=n),i=e.length,l=t,o=e[t],a=2*t+1;a0;){var w=y.pop(),E=v(w),k=w.id();if(d[k]=E,E!==1/0)for(var T=w.neighborhood().intersect(f),C=0;C0)for(n.unshift(t);c[a];){var i=c[a];n.unshift(i.edge),n.unshift(i.node),a=(r=i.node).id()}return o.spawn(n)}}}},Mt={kruskal:function(e){e=e||function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,a=n.length,i=new Array(a),o=n,s=function(e){for(var t=0;t0;){if(x(),E++,u===d){for(var k=[],T=a,C=d,P=m[C];k.unshift(T),null!=P&&k.unshift(P),null!=(T=y[C]);)P=m[C=T.id()];return{found:!0,distance:h[u],path:this.spawn(k),steps:E}}p[u]=!0;for(var S=l._private.edges,B=0;BP&&(f[C]=P,y[C]=T,m[C]=x),!a){var S=T*u+k;!a&&f[S]>P&&(f[S]=P,y[S]=k,m[S]=x)}}}for(var B=0;B1&&void 0!==arguments[1]?arguments[1]:i,r=[],a=m(e);;){if(null==a)return t.spawn();var o=y(a),l=o.edge,u=o.pred;if(r.unshift(a[0]),a.same(n)&&r.length>0)break;null!=l&&r.unshift(l),a=u}return s.spawn(r)},hasNegativeWeightCycle:p,negativeWeightCycles:v}}},Vt=Math.sqrt(2),Ft=function(e,t,n){0===n.length&&at("Karger-Stein must be run on a connected (sub)graph");for(var r=n[e],a=r[1],i=r[2],o=t[a],s=t[i],l=n,u=l.length-1;u>=0;u--){var c=l[u],d=c[1],h=c[2];(t[d]===o&&t[h]===s||t[d]===s&&t[h]===o)&&l.splice(u,1)}for(var f=0;fr;){var a=Math.floor(Math.random()*t.length);t=Ft(a,e,t),n--}return t},jt={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var a=n.length,i=r.length,o=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),s=Math.floor(a/Vt);if(!(a<2)){for(var l=[],u=0;u0?1:e<0?-1:0},Gt=function(e,t){return Math.sqrt(Zt(e,t))},Zt=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},$t=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(null!=e.w&&null!=e.h&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},nn=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},rn=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},an=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},on=function(e){var t,n,r,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0];if(1===i.length)t=n=r=a=i[0];else if(2===i.length)t=r=i[0],a=n=i[1];else if(4===i.length){var o=l(i,4);t=o[0],n=o[1],r=o[2],a=o[3]}return e.x1-=a,e.x2+=n,e.y1-=t,e.y2+=r,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},sn=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ln=function(e,t){return!(e.x1>t.x2)&&(!(t.x1>e.x2)&&(!(e.x2t.y2)&&!(t.y1>e.y2)))))))},un=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},cn=function(e,t){return un(e,t.x,t.y)},dn=function(e,t){return un(e,t.x1,t.y1)&&un(e,t.x2,t.y2)},hn=null!==(Bt=Math.hypot)&&void 0!==Bt?Bt:function(e,t){return Math.sqrt(e*e+t*t)};function fn(e,t,n,r,a,i){var o=function(e,t){if(e.length<3)throw new Error("Need at least 3 vertices");var n=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},r=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},a=function(e,t){return{x:e.x*t,y:e.y*t}},i=function(e,t){return e.x*t.y-e.y*t.x},o=function(e){var t=hn(e.x,e.y);return 0===t?{x:0,y:0}:{x:e.x/t,y:e.y/t}},s=function(e,t,o,s){var l=r(t,e),u=r(s,o),c=i(l,u);if(Math.abs(c)<1e-9)return n(e,a(l,.5));var d=i(r(o,e),u)/c;return n(e,a(l,d))},l=e.map(function(e){return{x:e.x,y:e.y}});(function(e){for(var t=0,n=0;n7&&void 0!==arguments[7]?arguments[7]:"auto",c="auto"===u?Rn(a,i):u,d=a/2,h=i/2,f=(c=Math.min(c,d,h))!==d,p=c!==h;if(f){var v=r-h-o;if((s=Pn(e,t,n,r,n-d+c-o,v,n+d-c+o,v,!1)).length>0)return s}if(p){var g=n+d+o;if((s=Pn(e,t,n,r,g,r-h+c-o,g,r+h-c+o,!1)).length>0)return s}if(f){var y=r+h+o;if((s=Pn(e,t,n,r,n-d+c-o,y,n+d-c+o,y,!1)).length>0)return s}if(p){var m=n-d-o;if((s=Pn(e,t,n,r,m,r-h+c-o,m,r+h-c+o,!1)).length>0)return s}var b=n-d+c,x=r-h+c;if((l=Tn(e,t,n,r,b,x,c+o)).length>0&&l[0]<=b&&l[1]<=x)return[l[0],l[1]];var w=n+d-c,E=r-h+c;if((l=Tn(e,t,n,r,w,E,c+o)).length>0&&l[0]>=w&&l[1]<=E)return[l[0],l[1]];var k=n+d-c,T=r+h-c;if((l=Tn(e,t,n,r,k,T,c+o)).length>0&&l[0]>=k&&l[1]>=T)return[l[0],l[1]];var C=n-d+c,P=r+h-c;return(l=Tn(e,t,n,r,C,P,c+o)).length>0&&l[0]<=C&&l[1]>=P?[l[0],l[1]]:[]},vn=function(e,t,n,r,a,i,o){var s=o,l=Math.min(n,a),u=Math.max(n,a),c=Math.min(r,i),d=Math.max(r,i);return l-s<=e&&e<=u+s&&c-s<=t&&t<=d+s},gn=function(e,t,n,r,a,i,o,s,l){var u=Math.min(n,o,a)-l,c=Math.max(n,o,a)+l,d=Math.min(r,s,i)-l,h=Math.max(r,s,i)+l;return!(ec||th)},yn=function(e,t,n,r,a,i,o,s){var l=[];!function(e,t,n,r,a){var i,o,s,l,u,c,d,h;0===e&&(e=1e-5),s=-27*(r/=e)+(t/=e)*(9*(n/=e)-t*t*2),i=(o=(3*n-t*t)/9)*o*o+(s/=54)*s,a[1]=0,d=t/3,i>0?(u=(u=s+Math.sqrt(i))<0?-Math.pow(-u,1/3):Math.pow(u,1/3),c=(c=s-Math.sqrt(i))<0?-Math.pow(-c,1/3):Math.pow(c,1/3),a[0]=-d+u+c,d+=(u+c)/2,a[4]=a[2]=-d,d=Math.sqrt(3)*(-c+u)/2,a[3]=d,a[5]=-d):(a[5]=a[3]=0,0===i?(h=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3),a[0]=2*h-d,a[4]=a[2]=-(h+d)):(l=(o=-o)*o*o,l=Math.acos(s/Math.sqrt(l)),h=2*Math.sqrt(o),a[0]=-d+h*Math.cos(l/3),a[2]=-d+h*Math.cos((l+2*Math.PI)/3),a[4]=-d+h*Math.cos((l+4*Math.PI)/3)))}(1*n*n-4*n*a+2*n*o+4*a*a-4*a*o+o*o+r*r-4*r*i+2*r*s+4*i*i-4*i*s+s*s,9*n*a-3*n*n-3*n*o-6*a*a+3*a*o+9*r*i-3*r*r-3*r*s-6*i*i+3*i*s,3*n*n-6*n*a+n*o-n*e+2*a*a+2*a*e-o*e+3*r*r-6*r*i+r*s-r*t+2*i*i+2*i*t-s*t,1*n*a-n*n+n*e-a*e+r*i-r*r+r*t-i*t,l);for(var u=[],c=0;c<6;c+=2)Math.abs(l[c+1])<1e-7&&l[c]>=0&&l[c]<=1&&u.push(l[c]);u.push(1),u.push(0);for(var d,h,f,p=-1,v=0;v=0?fl?(e-a)*(e-a)+(t-i)*(t-i):u-d},bn=function(e,t,n){for(var r,a,i,o,s=0,l=0;l=e&&e>=i||r<=e&&e<=i))continue;(e-r)/(i-r)*(o-a)+a>t&&s++}return s%2!=0},xn=function(e,t,n,r,a,i,o,s,l){var u,c=new Array(n.length);null!=s[0]?(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2):u=s;for(var d,h=Math.cos(-u),f=Math.sin(-u),p=0;p0){var v=En(c,-l);d=wn(v)}else d=c;return bn(e,t,d)},wn=function(e){for(var t,n,r,a,i,o,s,l,u=new Array(e.length/2),c=0;c=0&&p<=1&&g.push(p),v>=0&&v<=1&&g.push(v),0===g.length)return[];var y=g[0]*s[0]+e,m=g[0]*s[1]+t;return g.length>1?g[0]==g[1]?[y,m]:[y,m,g[1]*s[0]+e,g[1]*s[1]+t]:[y,m]},Cn=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Pn=function(e,t,n,r,a,i,o,s,l){var u=e-a,c=n-e,d=o-a,h=t-i,f=r-t,p=s-i,v=d*h-p*u,g=c*h-f*u,y=p*c-d*f;if(0!==y){var m=v/y,b=g/y,x=-.001;return x<=m&&m<=1.001&&x<=b&&b<=1.001||l?[e+m*c,t+m*f]:[]}return 0===v||0===g?Cn(e,n,o)===o?[o,s]:Cn(e,n,a)===a?[a,i]:Cn(a,o,n)===n?[n,r]:[]:[]},Sn=function(e,t,n,r,a){var i=[],o=r/2,s=a/2,l=t,u=n;i.push({x:l+o*e[0],y:u+s*e[1]});for(var c=1;c0){var m=En(v,-s);u=wn(m)}else u=v}else u=n;for(var b=0;bu&&(u=t)},d=function(e){return l[e]},h=0;h0?b.edgesTo(m)[0]:m.edgesTo(b)[0];var w=r(x);m=m.id(),u[m]>u[v]+w&&(u[m]=u[v]+w,h.nodes.indexOf(m)<0?h.push(m):h.updateItem(m),l[m]=0,n[m]=[]),u[m]==u[v]+w&&(l[m]=l[m]+l[v],n[m].push(v))}else for(var E=0;E0;){for(var P=t.pop(),S=0;S0&&o.push(n[s]);0!==o.length&&a.push(r.collection(o))}return a}(c,l,t,r);return b=function(e){for(var t=0;t5&&void 0!==arguments[5]?arguments[5]:tr,o=r,s=0;s=2?sr(e,t,n,0,ar,ir):sr(e,t,n,0,rr)},squaredEuclidean:function(e,t,n){return sr(e,t,n,0,ar)},manhattan:function(e,t,n){return sr(e,t,n,0,rr)},max:function(e,t,n){return sr(e,t,n,-1/0,or)}};function ur(e,t,n,r,a,i){var o;return o=G(e)?e:lr[e]||lr.euclidean,0===t&&G(e)?o(a,i):o(t,n,r,a,i)}lr["squared-euclidean"]=lr.squaredEuclidean,lr.squaredeuclidean=lr.squaredEuclidean;var cr=dt({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),dr=function(e){return cr(e)},hr=function(e,t,n,r,a){var i="kMedoids"!==a?function(e){return n[e]}:function(e){return r[e](n)},o=n,s=t;return ur(e,r.length,i,function(e){return r[e](t)},o,s)},fr=function(e,t,n){for(var r=n.length,a=new Array(r),i=new Array(r),o=new Array(t),s=null,l=0;ln)return!1}return!0},mr=function(e,t,n){for(var r=0;ra&&(a=t[l][u],i=u);o[i].push(e[l])}for(var c=0;c=a.threshold||"dendrogram"===a.mode&&1===e.length)return!1;var f,p=t[o],v=t[r[o]];f="dendrogram"===a.mode?{left:p,right:v,key:p.key}:{value:p.value.concat(v.value),key:p.key},e[p.index]=f,e.splice(v.index,1),t[p.key]=f;for(var g=0;gn[v.key][y.key]&&(i=n[v.key][y.key])):"max"===a.linkage?(i=n[p.key][y.key],n[p.key][y.key]1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?(n0&&e.splice(0,t)):e=e.slice(t,n);for(var i=0,o=e.length-1;o>=0;o--){var s=e[o];a?isFinite(s)||(e[o]=-1/0,i++):e.splice(o,1)}r&&e.sort(function(e,t){return e-t});var l=e.length,u=Math.floor(l/2);return l%2!=0?e[u+1+i]:(e[u-1+i]+e[u+i])/2}(e):"mean"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=0,a=0,i=t;i1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=1/0,a=t;a1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length,r=-1/0,a=t;ao&&(i=l,o=t[a*e+l])}i>0&&r.push(i)}for(var u=0;u=P?(S=P,P=D,B=_):D>S&&(S=D);for(var A=0;A0?1:0;k[E%u.minIterations*t+z]=O,L+=O}if(L>0&&(E>=u.minIterations-1||E==u.maxIterations-1)){for(var V=0,F=0;F0&&r.push(a);return r}(t,i,o),Y=function(e,t,n){for(var r=Lr(e,t,n),a=0;al&&(s=u,l=c)}n[a]=i[s]}return Lr(e,t,n)}(t,r,j),q={},W=0;W1)}});var l=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(l),components:a}},Xr=function(){var e=this,t={},n=0,r=[],a=[],i=e.spawn(e),o=function(s){if(a.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var l=e.spawn();;){var u=a.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var c=l.edgesWith(l),d=l.merge(c);r.push(d),i=i.difference(d)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:i,components:r}},jr={};[wt,At,Mt,It,Lt,Ot,jt,On,Fn,jn,qn,er,Tr,Mr,Or,{hierholzer:function(e){if(!$(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n,r,a,i=Vr(e),o=i.root,s=i.directed,l=this,u=!1;o&&(a=K(o)?this.filter(o)[0].id():o[0].id());var c={},d={};s?l.forEach(function(e){var t=e.id();if(e.isNode()){var a=e.indegree(!0),i=e.outdegree(!0),o=a-i,s=i-a;1==o?n?u=!0:n=t:1==s?r?u=!0:r=t:(s>1||o>1)&&(u=!0),c[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&c[t].push(e.id())})}else d[t]=[void 0,e.target().id()]}):l.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(n?r?u=!0:r=t:n=t),c[t]=[],e.connectedEdges().forEach(function(e){return c[t].push(e.id())})):d[t]=[e.source().id(),e.target().id()]});var h={found:!1,trail:void 0};if(u)return h;if(r&&n)if(s){if(a&&r!=a)return h;a=r}else{if(a&&r!=a&&n!=a)return h;a||(a=r)}else a||(a=l[0].id());var f=function(e){for(var t,n,r,a=e,i=[e];c[a].length;)t=c[a].shift(),n=d[t][0],a!=(r=d[t][1])?(c[r]=c[r].filter(function(e){return e!=t}),a=r):s||a==n||(c[n]=c[n].filter(function(e){return e!=t}),a=n),i.unshift(t),i.unshift(a);return i},p=[],v=[];for(v=f(a);1!=v.length;)0==c[v[0]].length?(p.unshift(l.getElementById(v.shift())),p.unshift(l.getElementById(v.shift()))):v=f(v.shift()).concat(v);for(var g in p.unshift(l.getElementById(v.shift())),c)if(c[g].length)return h;return h.found=!0,h.trail=this.spawn(p,!0),h}},{hopcroftTarjanBiconnected:Fr,htbc:Fr,htb:Fr,hopcroftTarjanBiconnectedComponents:Fr},{tarjanStronglyConnected:Xr,tsc:Xr,tscc:Xr,tarjanStronglyConnectedComponents:Xr}].forEach(function(e){be(jr,e)});var Yr=function(e){if(!(this instanceof Yr))return new Yr(e);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof e&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Yr.prototype={fulfill:function(e){return qr(this,1,"fulfillValue",e)},reject:function(e){return qr(this,2,"rejectReason",e)},then:function(e,t){var n=this,r=new Yr;return n.onFulfilled.push(Hr(e,r,"fulfill")),n.onRejected.push(Hr(t,r,"reject")),Wr(n),r.proxy}};var qr=function(e,t,n,r){return 0===e.state&&(e.state=t,e[n]=r,Wr(e)),e},Wr=function(e){1===e.state?Ur(e,"onFulfilled",e.fulfillValue):2===e.state&&Ur(e,"onRejected",e.rejectReason)},Ur=function(e,t,n){if(0!==e[t].length){var r=e[t];e[t]=[];var a=function(){for(var e=0;e0:void 0}},clearQueue:function(){return function(){var e=this,t=void 0!==e.length?e:[e];if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}}(),a=function(){if(Ya)return ja;Ya=1;var e=Oi();return ja=function(t,n){var r=this.__data__,a=e(r,t);return a<0?(++this.size,r.push([t,n])):r[a][1]=n,this},ja}();function i(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&t%1==0&&t0&&this.spawn(r).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return null!=t&&t._private.classes.has(e)},toggleClass:function(e,t){Z(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=void 0===t,a=[],i=0,o=n.length;i0&&this.spawn(a).updateStyle().emit("class"),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(null==t)t=250;else if(0===t)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};To.className=To.classNames=To.classes;var Co={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:"\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'",number:fe,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Co.variable="(?:[\\w-.]|(?:\\\\"+Co.metaChar+"))+",Co.className="(?:[\\w-]|(?:\\\\"+Co.metaChar+"))+",Co.value=Co.string+"|"+Co.number,Co.id=Co.variable,function(){var e,t,n;for(e=Co.comparatorOp.split("|"),n=0;n=0||"="!==t&&(Co.comparatorOp+="|\\!"+t)}();var Po=0,So=1,Bo=2,Do=3,_o=4,Ao=5,Mo=6,Ro=7,Io=8,No=9,Lo=10,zo=11,Oo=12,Vo=13,Fo=14,Xo=15,jo=16,Yo=17,qo=18,Wo=19,Uo=20,Ho=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return function(e,t){return-1*me(e,t)}(e.selector,t.selector)}),Ko=function(){for(var e,t={},n=0;n0&&u.edgeCount>0)return ot("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return ot("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;1===u.edgeCount&&ot("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(null!=this.toStringCache)return this.toStringCache;for(var e=function(e){return null==e?"":e},t=function(t){return K(t)?'"'+t+'"':e(t)},n=function(e){return" "+e+" "},r=function(r,i){var o=r.type,s=r.value;switch(o){case Po:var l=e(s);return l.substring(0,l.length-1);case Do:var u=r.field,c=r.operator;return"["+u+n(e(c))+t(s)+"]";case Ao:var d=r.operator,h=r.field;return"["+e(d)+h+"]";case _o:return"["+r.field+"]";case Mo:var f=r.operator;return"[["+r.field+n(e(f))+t(s)+"]]";case Ro:return s;case Io:return"#"+s;case No:return"."+s;case Yo:case Xo:return a(r.parent,i)+n(">")+a(r.child,i);case qo:case jo:return a(r.ancestor,i)+" "+a(r.descendant,i);case Wo:var p=a(r.left,i),v=a(r.subject,i),g=a(r.right,i);return p+(p.length>0?" ":"")+v+g;case Uo:return""}},a=function(e,t){return e.checks.reduce(function(n,a,i){return n+(t===e&&0===i?"$":"")+r(a,t)},"")},i="",o=0;o1&&o=0&&(t=t.replace("!",""),c=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(o||l||u)&&(a=o||s?""+e:"",i=""+n),u&&(e=a=a.toLowerCase(),n=i=i.toLowerCase()),t){case"*=":r=a.indexOf(i)>=0;break;case"$=":r=a.indexOf(i,a.length-i.length)>=0;break;case"^=":r=0===a.indexOf(i);break;case"=":r=e===n;break;case">":d=!0,r=e>n;break;case">=":d=!0,r=e>=n;break;case"<":d=!0,r=e0;){var u=a.shift();t(u),i.add(u.id()),o&&r(a,i,u)}return e}function ps(e,t,n){if(n.isParent())for(var r=n._private.children,a=0;a1&&void 0!==arguments[1])||arguments[1],ps)},hs.forEachUp=function(e){return fs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],vs)},hs.forEachUpAndDown=function(e){return fs(this,e,!(arguments.length>1&&void 0!==arguments[1])||arguments[1],gs)},hs.ancestors=hs.parents,(us=cs={data:Eo.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Eo.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Eo.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}}).attr=us.data,us.removeAttr=us.removeData;var ys,ms,bs=cs,xs={};function ws(e){return function(t){var n=this;if(void 0===t&&(t=!0),0!==n.length&&n.isNode()&&!n.removed()){for(var r=0,a=n[0],i=a._private.edges,o=0;ot}),minIndegree:Es("indegree",function(e,t){return et}),minOutdegree:Es("outdegree",function(e,t){return et})}),be(xs,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,c=u;u&&(l=l[0]);var d=c?l.position():{x:0,y:0};return a={x:s.x-d.x,y:s.y-d.y},void 0===e?a:a[e]}for(var h=0;h0,g=v;v&&(p=p[0]);var y=g?p.position():{x:0,y:0};void 0!==t?f.position(e,t+y[e]):void 0!==a&&f.position({x:a.x+y.x,y:a.y+y.y})}}else if(!i)return;return this}},ys.modelPosition=ys.point=ys.position,ys.modelPositions=ys.points=ys.positions,ys.renderedPoint=ys.renderedPosition,ys.relativePoint=ys.relativePosition;var Cs,Ps,Ss=ms;Cs=Ps={},Ps.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),a=n.pan(),i=t.x1*r+a.x,o=t.x2*r+a.x,s=t.y1*r+a.y,l=t.y2*r+a.y;return{x1:i,x2:o,y1:s,y2:l,w:o-i,h:l-s}},Ps.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();return t.styleEnabled()&&t.hasCompoundNodes()?(this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify("bounds")}}),this):this},Ps.updateCompoundBounds=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function n(e){if(e.isParent()){var t=e._private,n=e.children(),r="include"===e.pstyle("compound-sizing-wrt-labels").value,a={width:{val:e.pstyle("min-width").pfValue,left:e.pstyle("min-width-bias-left"),right:e.pstyle("min-width-bias-right")},height:{val:e.pstyle("min-height").pfValue,top:e.pstyle("min-height-bias-top"),bottom:e.pstyle("min-height-bias-bottom")}},i=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;0!==i.w&&0!==i.h||((i={w:e.pstyle("width").pfValue,h:e.pstyle("height").pfValue}).x1=o.x-i.w/2,i.x2=o.x+i.w/2,i.y1=o.y-i.h/2,i.y2=o.y+i.h/2);var s=a.width.left.value;"px"===a.width.left.units&&a.width.val>0&&(s=100*s/a.width.val);var l=a.width.right.value;"px"===a.width.right.units&&a.width.val>0&&(l=100*l/a.width.val);var u=a.height.top.value;"px"===a.height.top.units&&a.height.val>0&&(u=100*u/a.height.val);var c=a.height.bottom.value;"px"===a.height.bottom.units&&a.height.val>0&&(c=100*c/a.height.val);var d=y(a.width.val-i.w,s,l),h=d.biasDiff,f=d.biasComplementDiff,p=y(a.height.val-i.h,u,c),v=p.biasDiff,g=p.biasComplementDiff;t.autoPadding=function(e,t,n,r){if("%"!==n.units)return"px"===n.units?n.pfValue:0;switch(r){case"width":return e>0?n.pfValue*e:0;case"height":return t>0?n.pfValue*t:0;case"average":return e>0&&t>0?n.pfValue*(e+t)/2:0;case"min":return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case"max":return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}}(i.w,i.h,e.pstyle("padding"),e.pstyle("padding-relative-to").value),t.autoWidth=Math.max(i.w,a.width.val),o.x=(-h+i.x1+i.x2+f)/2,t.autoHeight=Math.max(i.h,a.height.val),o.y=(-v+i.y1+i.y2+g)/2}function y(e,t,n){var r=0,a=0,i=t+n;return e>0&&i>0&&(r=t/i*e,a=n/i*e),{biasDiff:r,biasComplementDiff:a}}}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?a:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},_s=function(e,t){return null==t?e:Ds(e,t.x1,t.y1,t.x2,t.y2)},As=function(e,t,n){return pt(e,t,n)},Ms=function(e,t,n){if(!t.cy().headless()){var r,a,i=t._private,o=i.rstyle,s=o.arrowWidth/2;if("none"!==t.pstyle(n+"-arrow-shape").value){"source"===n?(r=o.srcX,a=o.srcY):"target"===n?(r=o.tgtX,a=o.tgtY):(r=o.midX,a=o.midY);var l=i.arrowBounds=i.arrowBounds||{},u=l[n]=l[n]||{};u.x1=r-s,u.y1=a-s,u.x2=r+s,u.y2=a+s,u.w=u.x2-u.x1,u.h=u.y2-u.y1,an(u,1),Ds(e,u.x1,u.y1,u.x2,u.y2)}}},Rs=function(e,t,n){if(!t.cy().headless()){var r;r=n?n+"-":"";var a=t._private,i=a.rstyle;if(t.pstyle(r+"label").strValue){var o,s,l,u,c=t.pstyle("text-halign"),d=t.pstyle("text-valign"),h=As(i,"labelWidth",n),f=As(i,"labelHeight",n),p=As(i,"labelX",n),v=As(i,"labelY",n),g=t.pstyle(r+"text-margin-x").pfValue,y=t.pstyle(r+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle(r+"text-rotation"),x=t.pstyle("text-outline-width").pfValue,w=t.pstyle("text-border-width").pfValue/2,E=t.pstyle("text-background-padding").pfValue,k=f,T=h,C=T/2,P=k/2;if(m)o=p-C,s=p+C,l=v-P,u=v+P;else{switch(c.value){case"left":o=p-T,s=p;break;case"center":o=p-C,s=p+C;break;case"right":o=p,s=p+T}switch(d.value){case"top":l=v-k,u=v;break;case"center":l=v-P,u=v+P;break;case"bottom":l=v,u=v+k}}var S=g-Math.max(x,w)-E-2,B=g+Math.max(x,w)+E+2,D=y-Math.max(x,w)-E-2,_=y+Math.max(x,w)+E+2;o+=S,s+=B,l+=D,u+=_;var A=n||"main",M=a.labelBounds,R=M[A]=M[A]||{};R.x1=o,R.y1=l,R.x2=s,R.y2=u,R.w=s-o,R.h=u-l,R.leftPad=S,R.rightPad=B,R.topPad=D,R.botPad=_;var I=m&&"autorotate"===b.strValue,N=null!=b.pfValue&&0!==b.pfValue;if(I||N){var L=I?As(a.rstyle,"labelAngle",n):b.pfValue,z=Math.cos(L),O=Math.sin(L),V=(o+s)/2,F=(l+u)/2;if(!m){switch(c.value){case"left":V=s;break;case"right":V=o}switch(d.value){case"top":F=u;break;case"bottom":F=l}}var X=function(e,t){return{x:(e-=V)*z-(t-=F)*O+V,y:e*O+t*z+F}},j=X(o,l),Y=X(o,u),q=X(s,l),W=X(s,u);o=Math.min(j.x,Y.x,q.x,W.x),s=Math.max(j.x,Y.x,q.x,W.x),l=Math.min(j.y,Y.y,q.y,W.y),u=Math.max(j.y,Y.y,q.y,W.y)}var U=A+"Rot",H=M[U]=M[U]||{};H.x1=o,H.y1=l,H.x2=s,H.y2=u,H.w=s-o,H.h=u-l,Ds(e,o,l,s,u),Ds(a.labelBounds.all,o,l,s,u)}return e}},Is=function(e,t){if(!t.cy().headless()){var n=t.pstyle("outline-opacity").value,r=t.pstyle("outline-width").value+t.pstyle("outline-offset").value;Ns(e,t,n,r,"outside",r/2)}},Ns=function(e,t,n,r,a,i){if(!(0===n||r<=0||"inside"===a)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var l=t.position(),u=l.x,c=l.y,d=t.width(),h=t.height();if(s.hasMiterBounds){"center"===a&&(r/=2);var f=s.miterBounds(u,c,d,h,r);_s(e,f)}else null!=i&&i>0&&on(e,[i,i,i,i])}}},Ls=function(e,t){var n,r,a,i,o,s,l,u=e._private.cy,c=u.styleEnabled(),d=u.headless(),h=tn(),f=e._private,p=e.isNode(),v=e.isEdge(),g=f.rstyle,y=p&&c?e.pstyle("bounds-expansion").pfValue:[0],m=function(e){return"none"!==e.pstyle("display").value},b=!c||m(e)&&(!v||m(e.source())&&m(e.target()));if(b){var x=0;c&&t.includeOverlays&&0!==e.pstyle("overlay-opacity").value&&(x=e.pstyle("overlay-padding").value);var w=0;c&&t.includeUnderlays&&0!==e.pstyle("underlay-opacity").value&&(w=e.pstyle("underlay-padding").value);var E=Math.max(x,w),k=0;if(c&&(k=e.pstyle("width").pfValue/2),p&&t.includeNodes){var T=e.position();o=T.x,s=T.y;var C=e.outerWidth()/2,P=e.outerHeight()/2;Ds(h,n=o-C,a=s-P,r=o+C,i=s+P),c&&Is(h,e),c&&t.includeOutlines&&!d&&Is(h,e),c&&function(e,t){if(!t.cy().headless()){var n=t.pstyle("border-opacity").value,r=t.pstyle("border-width").pfValue,a=t.pstyle("border-position").value;Ns(e,t,n,r,a)}}(h,e)}else if(v&&t.includeEdges)if(c&&!d){var S=e.pstyle("curve-style").strValue;if(n=Math.min(g.srcX,g.midX,g.tgtX),r=Math.max(g.srcX,g.midX,g.tgtX),a=Math.min(g.srcY,g.midY,g.tgtY),i=Math.max(g.srcY,g.midY,g.tgtY),Ds(h,n-=k,a-=k,r+=k,i+=k),"haystack"===S){var B=g.haystackPts;if(B&&2===B.length){if(n=B[0].x,a=B[0].y,n>(r=B[1].x)){var D=n;n=r,r=D}if(a>(i=B[1].y)){var _=a;a=i,i=_}Ds(h,n-k,a-k,r+k,i+k)}}else if("bezier"===S||"unbundled-bezier"===S||he(S,"segments")||he(S,"taxi")){var A;switch(S){case"bezier":case"unbundled-bezier":A=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":A=g.linePts}if(null!=A)for(var M=0;M(r=N.x)){var L=n;n=r,r=L}if((a=I.y)>(i=N.y)){var z=a;a=i,i=z}Ds(h,n-=k,a-=k,r+=k,i+=k)}if(c&&t.includeEdges&&v&&(Ms(h,e,"mid-source"),Ms(h,e,"mid-target"),Ms(h,e,"source"),Ms(h,e,"target")),c)if("yes"===e.pstyle("ghost").value){var O=e.pstyle("ghost-offset-x").pfValue,V=e.pstyle("ghost-offset-y").pfValue;Ds(h,h.x1+O,h.y1+V,h.x2+O,h.y2+V)}var F=f.bodyBounds=f.bodyBounds||{};sn(F,h),on(F,y),an(F,1),c&&(n=h.x1,r=h.x2,a=h.y1,i=h.y2,Ds(h,n-E,a-E,r+E,i+E));var X=f.overlayBounds=f.overlayBounds||{};sn(X,h),on(X,y),an(X,1);var j=f.labelBounds=f.labelBounds||{};null!=j.all?((l=j.all).x1=1/0,l.y1=1/0,l.x2=-1/0,l.y2=-1/0,l.w=0,l.h=0):j.all=tn(),c&&t.includeLabels&&(t.includeMainLabels&&Rs(h,e,null),v&&(t.includeSourceLabels&&Rs(h,e,"source"),t.includeTargetLabels&&Rs(h,e,"target")))}return h.x1=Bs(h.x1),h.y1=Bs(h.y1),h.x2=Bs(h.x2),h.y2=Bs(h.y2),h.w=Bs(h.x2-h.x1),h.h=Bs(h.y2-h.y1),h.w>0&&h.h>0&&b&&(on(h,y),an(h,1)),h},zs=function(e){var t=0,n=function(e){return(e?1:0)<0&&void 0!==arguments[0]?arguments[0]:rl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},il.removeAllListeners=function(){return this.removeListener("*")},il.emit=il.trigger=function(e,t,n){var r=this.listeners,a=r.length;return this.emitting++,Z(t)||(t=[t]),ll(this,function(e,i){null!=n&&(r=[{event:i.event,type:i.type,namespace:i.namespace,callback:n}],a=r.length);for(var o=function(){var n=r[s];if(n.type===i.type&&(!n.namespace||n.namespace===i.namespace||".*"===n.namespace)&&e.eventMatches(e.context,n,i)){var a=[i];null!=t&&function(e,t){for(var n=0;n1&&!r){var a=this.length-1,i=this[a],o=i._private.data.id;this[a]=void 0,this[e]=i,n.set(o,{ele:i,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var a=r.index;return this.unmergeAt(a),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&K(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){e(this[t])&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,a=0;ar&&(r=s,n=o)}return{value:r,ele:n}},min:function(e,t){for(var n,r=1/0,a=this,i=0;i=0&&a1&&void 0!==arguments[1])||arguments[1],n=this[0],r=n.cy();if(r.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n));var a=n._private.style[e];return null!=a?a:t?r.style().getDefaultProperty(e):null}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return void 0!==n.pfValue?n.pfValue:n.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled())return t?t.pstyle(e).units:void 0},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];return n?t.style().getRenderedStyle(n,e):void 0},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,a=n.style();if($(e)){var i=e;a.applyBypass(this,i,r),this.emitAndNotify("style")}else if(K(e)){if(void 0===t){var o=this[0];return o?a.getStylePropertyValue(o,e):void 0}a.applyBypass(this,e,t,r),this.emitAndNotify("style")}else if(void 0===e){var s=this[0];return s?a.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),a=this;if(void 0===e)for(var i=0;i0&&t.push(c[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),Rl.neighbourhood=Rl.neighborhood,Rl.closedNeighbourhood=Rl.closedNeighborhood,Rl.openNeighbourhood=Rl.openNeighborhood,be(Rl,{source:ds(function(e){var t,n=this[0];return n&&(t=n._private.source||n.cy().collection()),t&&e?t.filter(e):t},"source"),target:ds(function(e){var t,n=this[0];return n&&(t=n._private.target||n.cy().collection()),t&&e?t.filter(e):t},"target"),sources:zl({attr:"source"}),targets:zl({attr:"target"})}),be(Rl,{edgesWith:ds(Ol(),"edgesWith"),edgesTo:ds(Ol({thisIsSrc:!0}),"edgesTo")}),be(Rl,{connectedEdges:ds(function(e){for(var t=[],n=0;n0);return i},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),Rl.componentsOf=Rl.components;var Fl=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(void 0!==e){var a=new gt,i=!1;if(t){if(t.length>0&&$(t[0])&&!te(t[0])){i=!0;for(var o=[],s=new mt,l=0,u=t.length;l0&&void 0!==arguments[0])||arguments[0],r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=this,i=a.cy(),o=i._private,s=[],l=[],u=0,c=a.length;u0){for(var I=e.length===a.length?a:new Fl(i,e),N=0;N0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this,r=[],a={},i=n._private.cy;function o(e){var n=a[e.id()];t&&e.removed()||n||(a[e.id()]=!0,e.isNode()?(r.push(e),function(e){for(var t=e._private.edges,n=0;n0&&(e?k.emitAndNotify("remove"):t&&k.emit("remove"));for(var T=0;T=.001?function(t,r){for(var a=0;a<4;++a){var i=h(r,e,n);if(0===i)return r;r-=(d(r,e,n)-t)/i}return r}(t,o):0===l?o:function(t,r,a){var i,o,s=0;do{(i=d(o=r+(a-r)/2,e,n)-t)>0?a=o:r=o}while(Math.abs(i)>1e-7&&++s<10);return o}(t,r,r+a)}var p=!1;function v(){p=!0,e===t&&n===r||function(){for(var t=0;t<11;++t)s[t]=d(t*a,e,n)}()}var g=function(a){return p||v(),e===t&&n===r?a:0===a?0:1===a?1:d(f(a),t,r)};g.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var y="generateBezier("+[e,t,n,r]+")";return g.toString=function(){return y},g}var ql=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var a={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:a.v,dv:e(a)}}function n(n,r){var a={dx:n.v,dv:e(n)},i=t(n,.5*r,a),o=t(n,.5*r,i),s=t(n,r,o),l=1/6*(a.dx+2*(i.dx+o.dx)+s.dx),u=1/6*(a.dv+2*(i.dv+o.dv)+s.dv);return n.x=n.x+l*r,n.v=n.v+u*r,n}return function e(t,r,a){var i,o,s,l={x:-1,v:0,tension:null,friction:null},u=[0],c=0,d=1e-4;for(t=parseFloat(t)||500,r=parseFloat(r)||20,a=a||null,l.tension=t,l.friction=r,o=(i=null!==a)?(c=e(t,r))/a*.016:.016;s=n(s||l,o),u.push(1+s.x),c+=16,Math.abs(s.x)>d&&Math.abs(s.v)>d;);return i?function(e){return u[e*(u.length-1)|0]}:c}}(),Wl=function(e,t,n,r){var a=Yl(e,t,n,r);return function(e,t,n){return e+(t-e)*a(n)}},Ul={linear:function(e,t,n){return e+(t-e)*n},ease:Wl(.25,.1,.25,1),"ease-in":Wl(.42,0,1,1),"ease-out":Wl(0,0,.58,1),"ease-in-out":Wl(.42,0,.58,1),"ease-in-sine":Wl(.47,0,.745,.715),"ease-out-sine":Wl(.39,.575,.565,1),"ease-in-out-sine":Wl(.445,.05,.55,.95),"ease-in-quad":Wl(.55,.085,.68,.53),"ease-out-quad":Wl(.25,.46,.45,.94),"ease-in-out-quad":Wl(.455,.03,.515,.955),"ease-in-cubic":Wl(.55,.055,.675,.19),"ease-out-cubic":Wl(.215,.61,.355,1),"ease-in-out-cubic":Wl(.645,.045,.355,1),"ease-in-quart":Wl(.895,.03,.685,.22),"ease-out-quart":Wl(.165,.84,.44,1),"ease-in-out-quart":Wl(.77,0,.175,1),"ease-in-quint":Wl(.755,.05,.855,.06),"ease-out-quint":Wl(.23,1,.32,1),"ease-in-out-quint":Wl(.86,0,.07,1),"ease-in-expo":Wl(.95,.05,.795,.035),"ease-out-expo":Wl(.19,1,.22,1),"ease-in-out-expo":Wl(1,0,0,1),"ease-in-circ":Wl(.6,.04,.98,.335),"ease-out-circ":Wl(.075,.82,.165,1),"ease-in-out-circ":Wl(.785,.135,.15,.86),spring:function(e,t,n){if(0===n)return Ul.linear;var r=ql(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":Wl};function Hl(e,t,n,r,a){if(1===r)return n;if(t===n)return n;var i=a(t,n,r);return null==e||((e.roundValue||e.color)&&(i=Math.round(i)),void 0!==e.min&&(i=Math.max(i,e.min)),void 0!==e.max&&(i=Math.min(i,e.max))),i}function Kl(e,t){return null!=e.pfValue||null!=e.value?null==e.pfValue||null!=t&&"%"===t.type.units?e.value:e.pfValue:e}function Gl(e,t,n,r,a){var i=null!=a?a.type:null;n<0?n=0:n>1&&(n=1);var o=Kl(e,a),s=Kl(t,a);if(Q(o)&&Q(s))return Hl(i,o,s,n,r);if(Z(o)&&Z(s)){for(var l=[],u=0;u0?("spring"===d&&h.push(o.duration),o.easingImpl=Ul[d].apply(null,h)):o.easingImpl=Ul[d]}var f,p=o.easingImpl;if(f=0===o.duration?1:(n-l)/o.duration,o.applying&&(f=o.progress),f<0?f=0:f>1&&(f=1),null==o.delay){var v=o.startPosition,g=o.position;if(g&&a&&!e.locked()){var y={};$l(v.x,g.x)&&(y.x=Gl(v.x,g.x,f,p)),$l(v.y,g.y)&&(y.y=Gl(v.y,g.y,f,p)),e.position(y)}var m=o.startPan,b=o.pan,x=i.pan,w=null!=b&&r;w&&($l(m.x,b.x)&&(x.x=Gl(m.x,b.x,f,p)),$l(m.y,b.y)&&(x.y=Gl(m.y,b.y,f,p)),e.emit("pan"));var E=o.startZoom,k=o.zoom,T=null!=k&&r;T&&($l(E,k)&&(i.zoom=en(i.minZoom,Gl(E,k,f,p),i.maxZoom)),e.emit("zoom")),(w||T)&&e.emit("viewport");var C=o.style;if(C&&C.length>0&&a){for(var P=0;P=0;t--){(0,e[t])()}e.splice(0,e.length)},c=i.length-1;c>=0;c--){var d=i[c],h=d._private;h.stopped?(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.frames)):(h.playing||h.applying)&&(h.playing&&h.applying&&(h.applying=!1),h.started||Ql(0,d,e),Zl(t,d,e,n),h.applying&&(h.applying=!1),u(h.frames),null!=h.step&&h.step(e),d.completed()&&(i.splice(c,1),h.hooked=!1,h.playing=!1,h.started=!1,u(h.completes)),s=!0)}return n||0!==i.length||0!==o.length||r.push(t),s}for(var i=!1,o=0;o0?t.notify("draw",n):t.notify("draw")),n.unmerge(r),t.emit("step")}var eu={animate:Eo.animate(),animation:Eo.animation(),animated:Eo.animated(),clearQueue:Eo.clearQueue(),delay:Eo.delay(),delayAnimation:Eo.delayAnimation(),stop:Eo.stop(),addToAnimationPool:function(e){this.styleEnabled()&&this._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,e.styleEnabled()){var t=e.renderer();t&&t.beforeRender?t.beforeRender(function(t,n){Jl(n,e)},t.beforeRenderPriorities.animations):function t(){e._private.animationsRunning&&Le(function(n){Jl(n,e),t()})}()}}},tu={qualifierCompare:function(e,t){return null==e||null==t?null==e&&null==t:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return null==r||e!==n.target&&te(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return null!=t.qualifier?n.target:e}},nu=function(e){return K(e)?new os(e):e},ru={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new al(tu,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,nu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,nu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,nu(t),n),this},once:function(e,t,n){return this.emitter().one(e,nu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Eo.eventAliasesOn(ru);var au={png:function(e){return e=e||{},this._private.renderer.png(e)},jpg:function(e){var t=this._private.renderer;return(e=e||{}).bg=e.bg||"#fff",t.jpg(e)}};au.jpeg=au.jpg;var iu={layout:function(e){var t=this;if(null!=e)if(null!=e.name){var n=e.name,r=t.extension("layout",n);if(null!=r){var a;a=K(e.eles)?t.$(e.eles):null!=e.eles?e.eles:t.$();var i=new r(be({},e,{cy:t,eles:a}));return i}at("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?")}else at("A `name` must be specified to make a layout");else at("Layout options must be specified to make a layout")}};iu.createLayout=iu.makeLayout=iu.layout;var ou={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();null!=t&&r.merge(t)}else if(n.notificationsEnabled){var a=this.renderer();!this.destroyed()&&a&&a.notify(e,t)}},notifications:function(e){var t=this._private;return void 0===e?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return null==e.batchCount&&(e.batchCount=0),0===e.batchCount&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(0===e.batchCount)return this;if(e.batchCount--,0===e.batchCount){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};lu.invalidateDimensions=lu.resize;var uu={collection:function(e,t){return K(e)?this.$(e):ee(e)?e.collection():Z(e)?(t||(t={}),new Fl(this,e,t.unique,t.removed)):new Fl(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};uu.elements=uu.filter=uu.$;var cu={},du="t";cu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(h||d&&f){var p=void 0;h&&f||h?p=u.properties:f&&(p=u.mappedProperties);for(var v=0;v1&&(g=1),s.color){var w=a.valueMin[0],E=a.valueMax[0],k=a.valueMin[1],T=a.valueMax[1],C=a.valueMin[2],P=a.valueMax[2],S=null==a.valueMin[3]?1:a.valueMin[3],B=null==a.valueMax[3]?1:a.valueMax[3],D=[Math.round(w+(E-w)*g),Math.round(k+(T-k)*g),Math.round(C+(P-C)*g),Math.round(S+(B-S)*g)];n={bypass:a.bypass,name:a.name,value:D,strValue:"rgb("+D[0]+", "+D[1]+", "+D[2]+")"}}else{if(!s.number)return!1;var _=a.valueMin+(a.valueMax-a.valueMin)*g;n=this.parse(a.name,_,a.bypass,h)}if(!n)return v(),!1;n.mapping=a,a=n;break;case o.data:for(var A=a.field.split("."),M=d.data,R=0;R0&&i>0){for(var s={},l=!1,u=0;u0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:i,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1})}else r.transitioning&&(this.removeBypasses(e,a),e.emitAndNotify("style"),r.transitioning=!1)},cu.checkTrigger=function(e,t,n,r,a,i){var o=this.properties[t],s=a(o);e.removed()||null!=s&&s(n,r,e)&&i(o)},cu.checkZOrderTrigger=function(e,t,n,r){var a=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){a._private.cy.notify("zorder",e)})},cu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},cu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},cu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},cu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var hu={applyBypass:function(e,t,n,r){var a=[];if("*"===t||"**"===t){if(void 0!==n)for(var i=0;it.length?i.substr(t.length):""}function s(){n=n.length>r.length?n.substr(r.length):""}for(i=i.replace(/[/][*](\s|.)+?[*][/]/g,"");;){if(i.match(/^\s*$/))break;var l=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){ot("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}t=l[0];var u=l[1];if("core"!==u)if(new os(u).invalid){ot("Skipping parsing of block: Invalid selector found in string stylesheet: "+u),o();continue}var c=l[2],d=!1;n=c;for(var h=[];;){if(n.match(/^\s*$/))break;var f=n.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!f){ot("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+c),d=!0;break}r=f[0];var p=f[1],v=f[2];if(this.properties[p])a.parse(p,v)?(h.push({name:p,val:v}),s()):(ot("Skipping property: Invalid property definition in: "+r),s());else ot("Skipping property: Invalid property name in: "+r),s()}if(d){o();break}a.selector(u);for(var g=0;g=7&&"d"===t[0]&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var h=s.data;return{name:e,value:u,strValue:""+t,mapped:h,field:u[1],bypass:n}}if(t.length>=10&&"m"===t[0]&&(c=new RegExp(s.mapData.regex).exec(t))){if(n)return!1;if(d.multiple)return!1;var f=s.mapData;if(!d.color&&!d.number)return!1;var p=this.parse(e,c[4]);if(!p||p.mapped)return!1;var v=this.parse(e,c[5]);if(!v||v.mapped)return!1;if(p.pfValue===v.pfValue||p.strValue===v.strValue)return ot("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+p.strValue+"`"),this.parse(e,p.strValue);if(d.color){var g=p.value,y=v.value;if(!(g[0]!==y[0]||g[1]!==y[1]||g[2]!==y[2]||g[3]!==y[3]&&(null!=g[3]&&1!==g[3]||null!=y[3]&&1!==y[3])))return!1}return{name:e,value:c,strValue:""+t,mapped:f,field:c[1],fieldMin:parseFloat(c[2]),fieldMax:parseFloat(c[3]),valueMin:p.value,valueMax:v.value,bypass:n}}}if(d.multiple&&"multiple"!==r){var m;if(m=l?t.split(/\s+/):Z(t)?t:[t],d.evenMultiple&&m.length%2!=0)return null;for(var b=[],x=[],w=[],E="",k=!1,T=0;T0?" ":"")+C.strValue}return d.validate&&!d.validate(b,x)?null:d.singleEnum&&k?1===b.length&&K(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:w,strValue:E,bypass:n,units:x}}var P,S,B=function(){for(var r=0;rd.max||d.strictMax&&t===d.max))return null;var R={name:e,value:t,strValue:""+t+(D||""),units:D,bypass:n};return d.unitless||"px"!==D&&"em"!==D?R.pfValue=t:R.pfValue="px"!==D&&D?this.getEmSizeInPixels()*t:t,"ms"!==D&&"s"!==D||(R.pfValue="ms"===D?t:1e3*t),"deg"!==D&&"rad"!==D||(R.pfValue="rad"===D?t:(P=t,Math.PI*P/180)),"%"===D&&(R.pfValue=t/100),R}if(d.propList){var I=[],N=""+t;if("none"===N);else{for(var L=N.split(/\s*,\s*|\s+/),z=0;z0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0)return{zoom:o=(o=(o=Math.min((s-2*t)/n.w,(l-2*t)/n.h))>this._private.maxZoom?this._private.maxZoom:o)=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return void 0===e?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return void 0===e?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t,n,r=this._private,a=r.pan,i=r.zoom,o=!1;if(r.zoomingEnabled||(o=!0),Q(e)?n=e:$(e)&&(n=e.level,null!=e.position?t=Yt(e.position,i,a):null!=e.renderedPosition&&(t=e.renderedPosition),null==t||r.panningEnabled||(o=!0)),n=(n=n>r.maxZoom?r.maxZoom:n)t.maxZoom||!t.zoomingEnabled?i=!0:(t.zoom=s,a.push("zoom"))}if(r&&(!i||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;Q(l.x)&&(t.pan.x=l.x,o=!1),Q(l.y)&&(t.pan.y=l.y,o=!1),o||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(K(e)){var n=e;e=this.mutableElements().filter(n)}else ee(e)||(e=this.mutableElements());if(0!==e.length){var r=e.boundingBox(),a=this.width(),i=this.height();return{x:(a-(t=void 0===t?this._private.zoom:t)*(r.x1+r.x2))/2,y:(i-t*(r.y1+r.y2))/2}}}},reset:function(){return this._private.panningEnabled&&this._private.zoomingEnabled?(this.viewport({pan:{x:0,y:0},zoom:1}),this):this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e,t,n=this._private,r=n.container,a=this;return n.sizeCache=n.sizeCache||(r?(e=a.window().getComputedStyle(r),t=function(t){return parseFloat(e.getPropertyValue(t))},{width:r.clientWidth-t("padding-left")-t("padding-right"),height:r.clientHeight-t("padding-top")-t("padding-bottom")}):{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){return e?(this._private.multiClickDebounceTime=e,this):this._private.multiClickDebounceTime}};Eu.centre=Eu.center,Eu.autolockNodes=Eu.autolock,Eu.autoungrabifyNodes=Eu.autoungrabify;var ku={data:Eo.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Eo.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Eo.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Eo.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};ku.attr=ku.data,ku.removeAttr=ku.removeData;var Tu=function(e){var t=this,n=(e=be({},e)).container;n&&!J(n)&&J(n[0])&&(n=n[0]);var r=n?n._cyreg:null;(r=r||{})&&r.cy&&(r.cy.destroy(),r={});var a=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var i=void 0!==f&&void 0!==n&&!e.headless,o=e;o.layout=be({name:i?"grid":"null"},o.layout),o.renderer=be({name:i?"canvas":"null"},o.renderer);var s=function(e,t,n){return void 0!==t?t:void 0!==n?n:e},l=this._private={container:n,ready:!1,options:o,elements:new Fl(this),listeners:[],aniEles:new Fl(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:void 0===o.styleEnabled?i:o.styleEnabled,zoom:Q(o.zoom)?o.zoom:1,pan:{x:$(o.pan)&&Q(o.pan.x)?o.pan.x:0,y:$(o.pan)&&Q(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});l.styleEnabled&&t.setStyle([]);var u=be({},o,o.renderer);t.initRenderer(u);!function(e,t){if(e.some(oe))return Gr.all(e).then(t);t(e)}([o.style,o.elements],function(e){var n=e[0],i=e[1];l.styleEnabled&&t.style().append(n),function(e,n,r){t.notifications(!1);var a=t.mutableElements();a.length>0&&a.remove(),null!=e&&($(e)||Z(e))&&t.add(e),t.one("layoutready",function(e){t.notifications(!0),t.emit(e),t.one("load",n),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",r),t.emit("done")});var i=be({},t._private.options.layout);i.eles=t.elements(),t.layout(i).run()}(i,function(){t.startAnimationLoop(),l.ready=!0,G(o.ready)&&t.on("ready",o.ready);for(var e=0;e0,l=!!t.boundingBox,u=tn(l?t.boundingBox:structuredClone(n.extent()));if(ee(t.roots))e=t.roots;else if(Z(t.roots)){for(var c=[],d=0;d0;){var D=B(),_=T(D,P);if(_)D.outgoers().filter(function(e){return e.isNode()&&r.has(e)}).forEach(S);else if(null===_){ot("Detected double maximal shift for node `"+D.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var A=0;if(t.avoidOverlap)for(var M=0;M0&&y[0].length<=3?i/2:0),s=2*Math.PI/y[r].length*a;return 0===r&&1===y[0].length&&(o=1),{x:W+o*Math.cos(s),y:U+o*Math.sin(s)}}var c=y[r].length,d=Math.max(1===c?0:l?(u.w-2*t.padding-H.w)/((t.grid?$:c)-1):(u.w-2*t.padding-H.w)/((t.grid?$:c)+1),A);return{x:W+(a+1-(c+1)/2)*d,y:U+(r+1-(V+1)/2)*G}}(e),u,Q[t.direction])}),this};var Au={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Mu(e){this.options=be({},Au,e)}Mu.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,i=r.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));for(var o,s=tn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l=s.x1+s.w/2,u=s.y1+s.h/2,c=(void 0===t.sweep?2*Math.PI-2*Math.PI/i.length:t.sweep)/Math.max(1,i.length-1),d=0,h=0;h1&&t.avoidOverlap){d*=1.75;var g=Math.cos(c)-Math.cos(0),y=Math.sin(c)-Math.sin(0),m=Math.sqrt(d*d/(g*g+y*y));o=Math.max(m,o)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(a?1:-1),i=o*Math.cos(r),s=o*Math.sin(r);return{x:l+i,y:u+s}}),this};var Ru,Iu={fit:!0,padding:30,startAngle:1.5*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Nu(e){this.options=be({},Iu,e)}Nu.prototype.run=function(){for(var e=this.options,t=e,n=void 0!==t.counterclockwise?!t.counterclockwise:t.clockwise,r=e.cy,a=t.eles,i=a.nodes().not(":parent"),o=tn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s=o.x1+o.w/2,l=o.y1+o.h/2,u=[],c=0,d=0;d0)Math.abs(m[0].value-x.value)>=g&&(m=[],y.push(m));m.push(x)}var w=c+t.minNodeSpacing;if(!t.avoidOverlap){var E=y.length>0&&y[0].length>1,k=(Math.min(o.w,o.h)/2-w)/(y.length+E?1:0);w=Math.min(w,k)}for(var T=0,C=0;C1&&t.avoidOverlap){var D=Math.cos(B)-Math.cos(0),_=Math.sin(B)-Math.sin(0),A=Math.sqrt(w*w/(D*D+_*_));T=Math.max(A,T)}P.r=T,T+=w}if(t.equidistant){for(var M=0,R=0,I=0;I=e.numIter)&&(qu(r,e),r.temperature=r.temperature*e.coolingFactor,!(r.temperature=e.animationThreshold&&i(),Le(c)):(nc(r,e),s())};c()}else{for(;u;)u=o(l),l++;nc(r,e),s()}return this},zu.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},zu.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Ou=function(e,t,n){for(var r=n.eles.edges(),a=n.eles.nodes(),i=tn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:i.w,clientHeight:i.h,boundingBox:i},s=n.eles.components(),l={},u=0;u0){o.graphSet.push(w);for(u=0;ur.count?0:r.graph},Fu=function(e,t,n,r){var a=r.graphSet[n];if(-10)var s=(u=r.nodeOverlap*o)*a/(v=Math.sqrt(a*a+i*i)),l=u*i/v;else{var u,c=Gu(e,a,i),d=Gu(t,-1*a,-1*i),h=d.x-c.x,f=d.y-c.y,p=h*h+f*f,v=Math.sqrt(p);s=(u=(e.nodeRepulsion+t.nodeRepulsion)/p)*h/v,l=u*f/v}e.isLocked||(e.offsetX-=s,e.offsetY-=l),t.isLocked||(t.offsetX+=s,t.offsetY+=l)}},Ku=function(e,t,n,r){if(n>0)var a=e.maxX-t.minX;else a=t.maxX-e.minX;if(r>0)var i=e.maxY-t.minY;else i=t.maxY-e.minY;return a>=0&&i>=0?Math.sqrt(a*a+i*i):0},Gu=function(e,t,n){var r=e.positionX,a=e.positionY,i=e.height||1,o=e.width||1,s=n/t,l=i/o,u={};return 0===t&&0n?(u.x=r,u.y=a+i/2,u):0t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=a-o*n/2/t,u):0=l)?(u.x=r+i*t/2/n,u.y=a+i/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-i*t/2/n,u.y=a-i/2,u):u},Zu=function(e,t){for(var n=0;n1){var p=t.gravity*d/f,v=t.gravity*h/f;c.offsetX+=p,c.offsetY+=v}}}}},Qu=function(e,t){var n=[],r=0,a=-1;for(n.push.apply(n,e.graphSet[0]),a+=e.graphSet[0].length;r<=a;){var i=n[r++],o=e.idToIndex[i],s=e.layoutNodes[o],l=s.children;if(0n)var a={x:n*e/r,y:n*t/r};else a={x:e,y:t};return a},tc=function(e,t){var n=e.parentId;if(null!=n){var r=t.layoutNodes[t.idToIndex[n]],a=!1;return(null==r.maxX||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,a=!0),(null==r.minX||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,a=!0),(null==r.minY||e.minY-r.padTopp&&(d+=f+t.componentSpacing,c=0,h=0,f=0)}}},rc={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function ac(e){this.options=be({},rc,e)}ac.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,a=r.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));var i=tn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(0===i.h||0===i.w)r.nodes().layoutPositions(this,t,function(e){return{x:i.x1,y:i.y1}});else{var o=a.size(),s=Math.sqrt(o*i.h/i.w),l=Math.round(s),u=Math.round(i.w/i.h*s),c=function(e){if(null==e)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},d=function(e){if(null==e)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},h=t.rows,f=null!=t.cols?t.cols:t.columns;if(null!=h&&null!=f)l=h,u=f;else if(null!=h&&null==f)l=h,u=Math.ceil(o/l);else if(null==h&&null!=f)u=f,l=Math.ceil(o/u);else if(u*l>o){var p=c(),v=d();(p-1)*v>=o?c(p-1):(v-1)*p>=o&&d(v-1)}else for(;u*l=o?d(y+1):c(g+1)}var m=i.w/u,b=i.h/l;if(t.condense&&(m=0,b=0),t.avoidOverlap)for(var x=0;x=u&&(A=0,_++)},R={},I=0;I(r=mn(e,t,x[w],x[w+1],x[w+2],x[w+3])))return g(n,r),!0}else if("bezier"===i.edgeType||"multibezier"===i.edgeType||"self"===i.edgeType||"compound"===i.edgeType)for(x=i.allpts,w=0;w+5(r=yn(e,t,x[w],x[w+1],x[w+2],x[w+3],x[w+4],x[w+5])))return g(n,r),!0;m=m||a.source,b=b||a.target;var E=o.getArrowWidth(l,c),k=[{name:"source",x:i.arrowStartX,y:i.arrowStartY,angle:i.srcArrowAngle},{name:"target",x:i.arrowEndX,y:i.arrowEndY,angle:i.tgtArrowAngle},{name:"mid-source",x:i.midX,y:i.midY,angle:i.midsrcArrowAngle},{name:"mid-target",x:i.midX,y:i.midY,angle:i.midtgtArrowAngle}];for(w=0;w0&&(y(m),y(b))}function b(e,t,n){return pt(e,t,n)}function x(n,r){var a,i=n._private,o=p;a=r?r+"-":"",n.boundingBox();var s=i.labelBounds[r||"main"],l=n.pstyle(a+"label").value;if("yes"===n.pstyle("text-events").strValue&&l){var u=b(i.rscratch,"labelX",r),c=b(i.rscratch,"labelY",r),d=b(i.rscratch,"labelAngle",r),h=n.pstyle(a+"text-margin-x").pfValue,f=n.pstyle(a+"text-margin-y").pfValue,v=s.x1-o-h,y=s.x2+o-h,m=s.y1-o-f,x=s.y2+o-f;if(d){var w=Math.cos(d),E=Math.sin(d),k=function(e,t){return{x:(e-=u)*w-(t-=c)*E+u,y:e*E+t*w+c}},T=k(v,m),C=k(v,x),P=k(y,m),S=k(y,x),B=[T.x+h,T.y+f,P.x+h,P.y+f,S.x+h,S.y+f,C.x+h,C.y+f];if(bn(e,t,B))return g(n),!0}else if(un(s,e,t))return g(n),!0}}n&&(l=l.interactive);for(var w=l.length-1;w>=0;w--){var E=l[w];E.isNode()?y(E)||x(E):m(E)||x(E)||x(E,"source")||x(E,"target")}return u},getAllInBox:function(e,t,n,r){var a=this.getCachedZSortedEles().interactive,i=2/this.cy.zoom(),o=[],s=Math.min(e,n),u=Math.max(e,n),c=Math.min(t,r),d=Math.max(t,r),h=tn({x1:e=s,y1:t=c,x2:n=u,y2:r=d}),f=[{x:h.x1,y:h.y1},{x:h.x2,y:h.y1},{x:h.x2,y:h.y2},{x:h.x1,y:h.y2}],p=[[f[0],f[1]],[f[1],f[2]],[f[2],f[3]],[f[3],f[0]]];function v(e,t,n){return pt(e,t,n)}function g(e,t){var n=e._private,r=i;e.boundingBox();var a=n.labelBounds.main;if(!a)return null;var o=v(n.rscratch,"labelX",t),s=v(n.rscratch,"labelY",t),l=v(n.rscratch,"labelAngle",t),u=e.pstyle("text-margin-x").pfValue,c=e.pstyle("text-margin-y").pfValue,d=a.x1-r-u,h=a.x2+r-u,f=a.y1-r-c,p=a.y2+r-c;if(l){var g=Math.cos(l),y=Math.sin(l),m=function(e,t){return{x:(e-=o)*g-(t-=s)*y+o,y:e*y+t*g+s}};return[m(d,f),m(h,f),m(h,p),m(d,p)]}return[{x:d,y:f},{x:h,y:f},{x:h,y:p},{x:d,y:p}]}function y(e,t,n,r){function a(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return a(e,n,r)!==a(t,n,r)&&a(e,t,n)!==a(e,t,r)}for(var m=0;m0?-(Math.PI-i.ang):Math.PI+i.ang),zc(t,n,Lc),xc=Nc.nx*Lc.ny-Nc.ny*Lc.nx,wc=Nc.nx*Lc.nx-Nc.ny*-Lc.ny,Tc=Math.asin(Math.max(-1,Math.min(1,xc))),Math.abs(Tc)<1e-6)return mc=t.x,bc=t.y,void(Pc=Bc=0);Ec=1,kc=!1,wc<0?Tc<0?Tc=Math.PI+Tc:(Tc=Math.PI-Tc,Ec=-1,kc=!0):Tc>0&&(Ec=-1,kc=!0),Bc=void 0!==t.radius?t.radius:r,Cc=Tc/2,Dc=Math.min(Nc.len/2,Lc.len/2),a?(Sc=Math.abs(Math.cos(Cc)*Bc/Math.sin(Cc)))>Dc?(Sc=Dc,Pc=Math.abs(Sc*Math.sin(Cc)/Math.cos(Cc))):Pc=Bc:(Sc=Math.min(Dc,Bc),Pc=Math.abs(Sc*Math.sin(Cc)/Math.cos(Cc))),Mc=t.x+Lc.nx*Sc,Rc=t.y+Lc.ny*Sc,mc=Mc-Lc.ny*Pc*Ec,bc=Rc+Lc.nx*Pc*Ec,_c=t.x+Nc.nx*Sc,Ac=t.y+Nc.ny*Sc,Ic=t};function Vc(e,t){0===t.radius?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function Fc(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return 0===r||0===t.radius?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Oc(e,t,n,r,a),{cx:mc,cy:bc,radius:Pc,startX:_c,startY:Ac,stopX:Mc,stopY:Rc,startAngle:Nc.ang+Math.PI/2*Ec,endAngle:Lc.ang-Math.PI/2*Ec,counterClockwise:kc})}var Xc=.01,jc=Math.sqrt(.02),Yc={};function qc(e){var t=[];if(null!=e){for(var n=0;n0?Math.max(e-t,0):Math.min(e+t,0)},S=P(T,E),B=P(C,k),D=!1;"auto"===g?v=Math.abs(S)>Math.abs(B)?a:r:g===l||g===s?(v=r,D=!0):g!==i&&g!==o||(v=a,D=!0);var _,A=v===r,M=A?B:S,R=A?C:T,I=Kt(R),N=!1;(D&&(m||x)||!(g===s&&R<0||g===l&&R>0||g===i&&R>0||g===o&&R<0)||(M=(I*=-1)*Math.abs(M),N=!0),m)?_=(b<0?1+b:b)*M:_=(b<0?M:0)+b*I;var L=function(e){return Math.abs(e)=Math.abs(M)},z=L(_),O=L(Math.abs(M)-Math.abs(_));if((z||O)&&!N)if(A){var V=Math.abs(R)<=d/2,F=Math.abs(T)<=h/2;if(V){var X=(u.x1+u.x2)/2,j=u.y1,Y=u.y2;n.segpts=[X,j,X,Y]}else if(F){var q=(u.y1+u.y2)/2,W=u.x1,U=u.x2;n.segpts=[W,q,U,q]}else n.segpts=[u.x1,u.y2]}else{var H=Math.abs(R)<=c/2,K=Math.abs(C)<=f/2;if(H){var G=(u.y1+u.y2)/2,Z=u.x1,$=u.x2;n.segpts=[Z,G,$,G]}else if(K){var Q=(u.x1+u.x2)/2,J=u.y1,ee=u.y2;n.segpts=[Q,J,Q,ee]}else n.segpts=[u.x2,u.y1]}else if(A){var te=u.y1+_+(p?d/2*I:0),ne=u.x1,re=u.x2;n.segpts=[ne,te,re,te]}else{var ae=u.x1+_+(p?c/2*I:0),ie=u.y1,oe=u.y2;n.segpts=[ae,ie,ae,oe]}if(n.isRound){var se=e.pstyle("taxi-radius").value,le="arc-radius"===e.pstyle("radius-type").value[0];n.radii=new Array(n.segpts.length/2).fill(se),n.isArcRadius=new Array(n.segpts.length/2).fill(le)}},Yc.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if("bezier"===n.edgeType){var r=t.srcPos,a=t.tgtPos,i=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,c=t.tgtShape,d=t.srcCornerRadius,h=t.tgtCornerRadius,f=t.srcRs,p=t.tgtRs,v=!Q(n.startX)||!Q(n.startY),g=!Q(n.arrowStartX)||!Q(n.arrowStartY),y=!Q(n.endX)||!Q(n.endY),m=!Q(n.arrowEndX)||!Q(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth),x=Gt({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),w=xv.poolIndex()){var g=p;p=v,v=g}var y=d.srcPos=p.position(),m=d.tgtPos=v.position(),b=d.srcW=p.outerWidth(),x=d.srcH=p.outerHeight(),E=d.tgtW=v.outerWidth(),k=d.tgtH=v.outerHeight(),T=d.srcShape=n.nodeShapes[t.getNodeShape(p)],C=d.tgtShape=n.nodeShapes[t.getNodeShape(v)],P=d.srcCornerRadius="auto"===p.pstyle("corner-radius").value?"auto":p.pstyle("corner-radius").pfValue,S=d.tgtCornerRadius="auto"===v.pstyle("corner-radius").value?"auto":v.pstyle("corner-radius").pfValue,B=d.tgtRs=v._private.rscratch,D=d.srcRs=p._private.rscratch;d.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var _=0;_=jc||(q=Math.sqrt(Math.max(Y*Y,Xc)+Math.max(j*j,Xc)));var W=d.vector={x:Y,y:j},U=d.vectorNorm={x:W.x/q,y:W.y/q},H={x:-U.y,y:U.x};d.nodesOverlap=!Q(q)||C.checkPoint(L[0],L[1],0,E,k,m.x,m.y,S,B)||T.checkPoint(O[0],O[1],0,b,x,y.x,y.y,P,D),d.vectorNormInverse=H,e={nodesOverlap:d.nodesOverlap,dirCounts:d.dirCounts,calculatedIntersection:!0,hasBezier:d.hasBezier,hasUnbundled:d.hasUnbundled,eles:d.eles,srcPos:m,srcRs:B,tgtPos:y,tgtRs:D,srcW:E,srcH:k,tgtW:b,tgtH:x,srcIntn:V,tgtIntn:z,srcShape:C,tgtShape:T,posPts:{x1:X.x2,y1:X.y2,x2:X.x1,y2:X.y1},intersectionPts:{x1:F.x2,y1:F.y2,x2:F.x1,y2:F.y1},vector:{x:-W.x,y:-W.y},vectorNorm:{x:-U.x,y:-U.y},vectorNormInverse:{x:-H.x,y:-H.y}}}var K=N?e:d;M.nodesOverlap=K.nodesOverlap,M.srcIntn=K.srcIntn,M.tgtIntn=K.tgtIntn,M.isRound=R.startsWith("round"),r&&(p.isParent()||p.isChild()||v.isParent()||v.isChild())&&(p.parents().anySame(v)||v.parents().anySame(p)||p.same(v)&&p.isParent())?t.findCompoundLoopPoints(A,K,_,I):p===v?t.findLoopPoints(A,K,_,I):R.endsWith("segments")?t.findSegmentsPoints(A,K):R.endsWith("taxi")?t.findTaxiPoints(A,K):"straight"===R||!I&&d.eles.length%2==1&&_===Math.floor(d.eles.length/2)?t.findStraightEdgePoints(A):t.findBezierPoints(A,K,_,I,N),t.findEndpoints(A),t.tryToCorrectInvalidPoints(A,K),t.checkForInvalidEdgeWarning(A),t.storeAllpts(A),t.storeEdgeProjections(A),t.calculateArrowAngles(A),t.recalculateEdgeLabelProjections(A),t.calculateLabelAngles(A)}},w=0;w0){var J=f,ee=Zt(J,Wt(i)),te=Zt(J,Wt($)),ne=ee;if(te2)Zt(J,{x:$[2],y:$[3]})0){var ge=p,ye=Zt(ge,Wt(i)),me=Zt(ge,Wt(ve)),be=ye;if(me2)Zt(ge,{x:ve[2],y:ve[3]})=u||m){c={cp:v,segment:y};break}}if(c)break}var b=c.cp,x=c.segment,w=(u-h)/x.length,E=x.t1-x.t0,k=s?x.t0+E*w:x.t1-E*w;k=en(0,k,1),t=Jt(b.p0,b.p1,b.p2,k),a=function(e,t,n,r){var a=en(0,r-.001,1),i=en(0,r+.001,1),o=Jt(e,t,n,a),s=Jt(e,t,n,i);return Zc(o,s)}(b.p0,b.p1,b.p2,k);break;case"straight":case"segments":case"haystack":for(var T,C,P,S,B=0,D=r.allpts.length,_=0;_+3=u));_+=2);var A=(u-C)/T;A=en(0,A,1),t=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,o=Gt(e,t),s=a/o,l=i/o;return n=null==n?0:n,r=null!=r?r:n*o,{x:e.x+s*r,y:e.y+l*r}}(P,S,A),a=Zc(P,S)}o("labelX",n,t.x),o("labelY",n,t.y),o("labelAutoAngle",n,a)}};u("source"),u("target"),this.applyLabelDimensions(e)}},Kc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))},Kc.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),a=Ue(r,e._private.labelDimsKey);if(pt(n.rscratch,"prefixedLabelDimsKey",t)!==a){vt(n.rscratch,"prefixedLabelDimsKey",t,a);var i=this.calculateLabelDimensions(e,r),o=e.pstyle("line-height").pfValue,s=e.pstyle("text-wrap").strValue,l=pt(n.rscratch,"labelWrapCachedLines",t)||[],u="wrap"!==s?1:Math.max(l.length,1),c=i.height/u,d=c*o,h=i.width,f=i.height+(u-1)*(o-1)*c;vt(n.rstyle,"labelWidth",t,h),vt(n.rscratch,"labelWidth",t,h),vt(n.rstyle,"labelHeight",t,f),vt(n.rscratch,"labelHeight",t,f),vt(n.rscratch,"labelLineHeight",t,d)}},Kc.getLabelText=function(e,t){var n=e._private,r=t?t+"-":"",a=e.pstyle(r+"label").strValue,i=e.pstyle("text-transform").value,s=function(e,r){return r?(vt(n.rscratch,e,t,r),r):pt(n.rscratch,e,t)};if(!a)return"";"none"==i||("uppercase"==i?a=a.toUpperCase():"lowercase"==i&&(a=a.toLowerCase()));var l=e.pstyle("text-wrap").value;if("wrap"===l){var u=s("labelKey");if(null!=u&&s("labelWrapKey")===u)return s("labelWrapCachedText");for(var c=a.split("\n"),d=e.pstyle("text-max-width").pfValue,h="anywhere"===e.pstyle("text-overflow-wrap").value,f=[],p=/[\s\u200b]+|$/g,v=0;vd){var b,x="",w=0,E=o(g.matchAll(p));try{for(E.s();!(b=E.n()).done;){var k=b.value,T=k[0],C=g.substring(w,k.index);w=k.index+T.length;var P=0===x.length?C:x+C+T;this.calculateLabelDimensions(e,P).width<=d?x+=C+T:(x&&f.push(x),x=C+T)}}catch(A){E.e(A)}finally{E.f()}x.match(/^[\s\u200b]+$/)||f.push(x)}else f.push(g)}s("labelWrapCachedLines",f),a=s("labelWrapCachedText",f.join("\n")),s("labelWrapKey",u)}else if("ellipsis"===l){var S=e.pstyle("text-max-width").pfValue,B="",D=!1;if(this.calculateLabelDimensions(e,a).widthS)break;B+=a[_],_===a.length-1&&(D=!0)}return D||(B+="\u2026"),B}return a},Kc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,n=e.pstyle("text-halign").strValue;if("auto"!==t)return t;if(!e.isNode())return"center";switch(n){case"left":return"right";case"right":return"left";default:return"center"}},Kc.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=e.pstyle("font-style").strValue,a=e.pstyle("font-size").pfValue,i=e.pstyle("font-family").strValue,o=e.pstyle("font-weight").strValue,s=this.labelCalcCanvas,l=this.labelCalcCanvasContext;if(!s){s=this.labelCalcCanvas=n.createElement("canvas"),l=this.labelCalcCanvasContext=s.getContext("2d");var u=s.style;u.position="absolute",u.left="-9999px",u.top="-9999px",u.zIndex="-1",u.visibility="hidden",u.pointerEvents="none"}l.font="".concat(r," ").concat(o," ").concat(a,"px ").concat(i);for(var c=0,d=0,h=t.split("\n"),f=0;f1&&void 0!==arguments[1])||arguments[1];if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var P=a(t);g&&(e.hoverData.tapholdCancelled=!0);n=!0,r(v,["mousemove","vmousemove","tapdrag"],t,{x:c[0],y:c[1]});var S=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}},B=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||o.emit(S("boxstart")),p[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()};if(3===e.hoverData.which){if(g){var D=S("cxtdrag");b?b.emit(D):o.emit(D),e.hoverData.cxtDragged=!0,e.hoverData.cxtOver&&v===e.hoverData.cxtOver||(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(S("cxtdragout")),e.hoverData.cxtOver=v,v&&v.emit(S("cxtdragover")))}}else if(e.hoverData.dragging){if(n=!0,o.panningEnabled()&&o.userPanningEnabled()){var _;if(e.hoverData.justStartedPan){var A=e.hoverData.mdownPos;_={x:(c[0]-A[0])*s,y:(c[1]-A[1])*s},e.hoverData.justStartedPan=!1}else _={x:x[0]*s,y:x[1]*s};o.panBy(_),o.emit(S("dragpan")),e.hoverData.dragged=!0}c=e.projectIntoViewport(t.clientX,t.clientY)}else if(1!=p[4]||null!=b&&!b.pannable()){if(b&&b.pannable()&&b.active()&&b.unactivate(),b&&b.grabbed()||v==y||(y&&r(y,["mouseout","tapdragout"],t,{x:c[0],y:c[1]}),v&&r(v,["mouseover","tapdragover"],t,{x:c[0],y:c[1]}),e.hoverData.last=v),b)if(g){if(o.boxSelectionEnabled()&&P)b&&b.grabbed()&&(d(w),b.emit(S("freeon")),w.emit(S("free")),e.dragData.didDrag&&(b.emit(S("dragfreeon")),w.emit(S("dragfree")))),B();else if(b&&b.grabbed()&&e.nodeIsDraggable(b)){var M=!e.dragData.didDrag;M&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||u(w,{inDragLayer:!0});var R={x:0,y:0};if(Q(x[0])&&Q(x[1])&&(R.x+=x[0],R.y+=x[1],M)){var I=e.hoverData.dragDelta;I&&Q(I[0])&&Q(I[1])&&(R.x+=I[0],R.y+=I[1])}e.hoverData.draggingEles=!0,w.silentShift(R).emit(S("position")).emit(S("drag")),e.redrawHint("drag",!0),e.redraw()}}else!function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];0===t.length?(t.push(x[0]),t.push(x[1])):(t[0]+=x[0],t[1]+=x[1])}();n=!0}else if(g){if(e.hoverData.dragging||!o.boxSelectionEnabled()||!P&&o.panningEnabled()&&o.userPanningEnabled()){if(!e.hoverData.selecting&&o.panningEnabled()&&o.userPanningEnabled()){i(b,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=Wt(h),e.redrawHint("select",!0),e.redraw())}}else B();b&&b.pannable()&&b.active()&&b.unactivate()}return p[2]=c[0],p[3]=c[1],n?(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1):void 0}},!1),e.registerBinding(t,"mouseup",function(t){if((1!==e.hoverData.which||1===t.which||!e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var i=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,c=e.hoverData.down,h=a(t);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,c&&c.unactivate();var f=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(3===e.hoverData.which){var p=f("cxttapend");if(c?c.emit(p):i.emit(p),!e.hoverData.cxtDragged){var v=f("cxttap");c?c.emit(v):i.emit(v)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(1===e.hoverData.which){if(r(l,["mouseup","tapend","vmouseup"],t,{x:o[0],y:o[1]}),e.dragData.didDrag||e.hoverData.dragged||e.hoverData.selecting||e.hoverData.isOverThresholdDrag||(r(c,["click","tap","vclick"],t,{x:o[0],y:o[1]}),x=!1,t.timeStamp-w<=i.multiClickDebounceTime()?(b&&clearTimeout(b),x=!0,w=null,r(c,["dblclick","dbltap","vdblclick"],t,{x:o[0],y:o[1]})):(b=setTimeout(function(){x||r(c,["oneclick","onetap","voneclick"],t,{x:o[0],y:o[1]})},i.multiClickDebounceTime()),w=t.timeStamp)),null!=c||e.dragData.didDrag||e.hoverData.selecting||e.hoverData.dragged||a(t)||(i.$(n).unselect(["tapunselect"]),u.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=u=i.collection()),l!=c||e.dragData.didDrag||e.hoverData.selecting||null!=l&&l._private.selectable&&(e.hoverData.dragging||("additive"===i.selectionType()||h?l.selected()?l.unselect(["tapunselect"]):l.select(["tapselect"]):h||(i.$(n).unmerge(l).unselect(["tapunselect"]),l.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var g=i.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint("select",!0),g.length>0&&e.redrawHint("eles",!0),i.emit(f("boxend"));var y=function(e){return e.selectable()&&!e.selected()};"additive"===i.selectionType()||h||i.$(n).unmerge(g).unselect(),g.emit(f("box")).stdFilter(y).select().emit(f("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!s[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var m=c&&c.grabbed();d(u),m&&(c.emit(f("freeon")),u.emit(f("free")),e.dragData.didDrag&&(c.emit(f("dragfreeon")),u.emit(f("dragfree"))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var k,T,C,P,S,B,D,_,A,M,R,I,N,L,z=[],O=1e5,V=function(t){var n=!1,r=t.deltaY;if(null==r&&(null!=t.wheelDeltaY?r=t.wheelDeltaY/4:null!=t.wheelDelta&&(r=t.wheelDelta/4)),0!==r){if(null==k)if(z.length>=4){var a=z;if(k=function(e,t){for(var n=0;n5}if(k)for(var o=0;o5&&(r=5*Kt(r)),h=r/-250,k&&(h/=O,h*=3),h*=e.wheelSensitivity,1===t.deltaMode&&(h*=33);var f=s.zoom()*Math.pow(10,h);"gesturechange"===t.type&&(f=e.gestureStartZoom*t.scale),s.zoom({level:f,renderedPosition:{x:d[0],y:d[1]}}),s.emit({type:"gesturechange"===t.type?"pinchzoom":"scrollzoom",originalEvent:t,position:{x:c[0],y:c[1]}})}}}};e.registerBinding(e.container,"wheel",V,!0),e.registerBinding(t,"scroll",function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,"gesturestart",function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,"gesturechange",function(t){e.hasTouchStarted||V(t)},!0),e.registerBinding(e.container,"mouseout",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseout",position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,"mouseover",function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:"mouseover",position:{x:n[0],y:n[1]}})},!1);var F,X,j,Y,q,W,U,H=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},K=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)};if(e.registerBinding(e.container,"touchstart",F=function(t){if(e.hasTouchStarted=!0,m(t)){f(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,a=e.touchData.now,i=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);a[0]=o[0],a[1]=o[1]}if(t.touches[1]){o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);a[2]=o[0],a[3]=o[1]}if(t.touches[2]){o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);a[4]=o[0],a[5]=o[1]}var l=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,d(e.dragData.touchDragEles);var h=e.findContainerClientCoords();M=h[0],R=h[1],I=h[2],N=h[3],T=t.touches[0].clientX-M,C=t.touches[0].clientY-R,P=t.touches[1].clientX-M,S=t.touches[1].clientY-R,L=0<=T&&T<=I&&0<=P&&P<=I&&0<=C&&C<=N&&0<=S&&S<=N;var p=n.pan(),v=n.zoom();B=H(T,C,P,S),D=K(T,C,P,S),A=[((_=[(T+P)/2,(C+S)/2])[0]-p.x)/v,(_[1]-p.y)/v];if(D<4e4&&!t.touches[2]){var g=e.findNearestElement(a[0],a[1],!0,!0),y=e.findNearestElement(a[2],a[3],!0,!0);return g&&g.isNode()?(g.activate().emit(l("cxttapstart")),e.touchData.start=g):y&&y.isNode()?(y.activate().emit(l("cxttapstart")),e.touchData.start=y):n.emit(l("cxttapstart")),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,void e.redraw()}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(t.touches[1]);else if(t.touches[0]){var b=e.findNearestElements(a[0],a[1],!0,!0),x=b[0];if(null!=x&&(x.activate(),e.touchData.start=x,e.touchData.starts=b,e.nodeIsGrabbable(x))){var w=e.dragData.touchDragEles=n.collection(),E=null;e.redrawHint("eles",!0),e.redrawHint("drag",!0),x.selected()?(E=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),u(E,{addToList:w})):c(x,{addToList:w}),s(x),x.emit(l("grabon")),E?E.forEach(function(e){e.emit(l("grab"))}):x.emit(l("grab"))}r(x,["touchstart","tapstart","vmousedown"],t,{x:a[0],y:a[1]}),null==x&&(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint("select",!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){!1!==e.touchData.singleTouchMoved||e.pinching||e.touchData.selecting||r(e.touchData.start,["taphold"],t,{x:a[0],y:a[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var k=e.touchData.startPosition=[null,null,null,null,null,null],z=0;z=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var E=t.touches[0].clientX-M,k=t.touches[0].clientY-R,_=t.touches[1].clientX-M,I=t.touches[1].clientY-R,N=K(E,k,_,I);if(N/D>=2.25||N>=22500){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var z=p("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(z),e.touchData.start=null):o.emit(z)}}if(n&&e.touchData.cxt){z=p("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(z):o.emit(z),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var O=e.findNearestElement(s[0],s[1],!0,!0);e.touchData.cxtOver&&O===e.touchData.cxtOver||(e.touchData.cxtOver&&e.touchData.cxtOver.emit(p("cxtdragout")),e.touchData.cxtOver=O,O&&O.emit(p("cxtdragover")))}else if(n&&t.touches[2]&&o.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||o.emit(p("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,a[4]=1,a&&0!==a.length&&void 0!==a[0]?(a[2]=(s[0]+s[2]+s[4])/3,a[3]=(s[1]+s[3]+s[5])/3):(a[0]=(s[0]+s[2]+s[4])/3,a[1]=(s[1]+s[3]+s[5])/3,a[2]=(s[0]+s[2]+s[4])/3+1,a[3]=(s[1]+s[3]+s[5])/3+1),e.redrawHint("select",!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&o.zoomingEnabled()&&o.panningEnabled()&&o.userZoomingEnabled()&&o.userPanningEnabled()){if(t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),te=e.dragData.touchDragEles){e.redrawHint("drag",!0);for(var V=0;V0&&!e.hoverData.draggingEles&&!e.swipePanning&&null!=e.data.bgActivePosistion&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},!1),e.registerBinding(t,"touchcancel",j=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()}),e.registerBinding(t,"touchend",Y=function(t){var a=e.touchData.start;if(e.touchData.capture){0===t.touches.length&&(e.touchData.capture=!1),t.preventDefault();var i=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),l=e.touchData.now,u=e.touchData.earlier;if(t.touches[0]){var c=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=c[0],l[1]=c[1]}if(t.touches[1]){c=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);l[2]=c[0],l[3]=c[1]}if(t.touches[2]){c=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);l[4]=c[0],l[5]=c[1]}var h,f=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}};if(a&&a.unactivate(),e.touchData.cxt){if(h=f("cxttapend"),a?a.emit(h):o.emit(h),!e.touchData.cxtDragged){var p=f("cxttap");a?a.emit(p):o.emit(p)}return e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,void e.redraw()}if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var v=o.collection(e.getAllInBox(i[0],i[1],i[2],i[3]));i[0]=void 0,i[1]=void 0,i[2]=void 0,i[3]=void 0,i[4]=0,e.redrawHint("select",!0),o.emit(f("boxend"));v.emit(f("box")).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f("boxselect")),v.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(null!=a&&a.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(t.touches[1]);else if(t.touches[0]);else if(!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var g=e.dragData.touchDragEles;if(null!=a){var y=a._private.grabbed;d(g),e.redrawHint("drag",!0),e.redrawHint("eles",!0),y&&(a.emit(f("freeon")),g.emit(f("free")),e.dragData.didDrag&&(a.emit(f("dragfreeon")),g.emit(f("dragfree")))),r(a,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]}),a.unactivate(),e.touchData.start=null}else{var m=e.findNearestElement(l[0],l[1],!0,!0);r(m,["touchend","tapend","vmouseup","tapdragout"],t,{x:l[0],y:l[1]})}var b=e.touchData.startPosition[0]-l[0],x=b*b,w=e.touchData.startPosition[1]-l[1],E=(x+w*w)*s*s;e.touchData.singleTouchMoved||(a||o.$(":selected").unselect(["tapunselect"]),r(a,["tap","vclick"],t,{x:l[0],y:l[1]}),q=!1,t.timeStamp-U<=o.multiClickDebounceTime()?(W&&clearTimeout(W),q=!0,U=null,r(a,["dbltap","vdblclick"],t,{x:l[0],y:l[1]})):(W=setTimeout(function(){q||r(a,["onetap","voneclick"],t,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),U=t.timeStamp)),null!=a&&!e.dragData.didDrag&&a._private.selectable&&E2){for(var f=[c[0],c[1]],p=Math.pow(f[0]-e,2)+Math.pow(f[1]-t,2),v=1;v0)return v[0]}return null},f=Object.keys(d),p=0;p0?u:pn(a,i,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,a,i,o,s){var l=2*(s="auto"===s?Rn(r,a):s);if(xn(e,t,this.points,i,o,r,a-l,[0,-1],n))return!0;if(xn(e,t,this.points,i,o,r-l,a,[0,-1],n))return!0;var u=r/2+2*n,c=a/2+2*n;return!!bn(e,t,[i-u,o-c,i-u,o,i+u,o,i+u,o-c])||(!!kn(e,t,l,l,i+r/2-s,o+a/2-s,n)||!!kn(e,t,l,l,i-r/2+s,o+a/2-s,n))}}},ad.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",_n(3,0)),this.generateRoundPolygon("round-triangle",_n(3,0)),this.generatePolygon("rectangle",_n(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",n),this.generateRoundPolygon("round-diamond",n),this.generatePolygon("pentagon",_n(5,0)),this.generateRoundPolygon("round-pentagon",_n(5,0)),this.generatePolygon("hexagon",_n(6,0)),this.generateRoundPolygon("round-hexagon",_n(6,0)),this.generatePolygon("heptagon",_n(7,0)),this.generateRoundPolygon("round-heptagon",_n(7,0)),this.generatePolygon("octagon",_n(8,0)),this.generateRoundPolygon("round-octagon",_n(8,0));var r=new Array(20),a=Mn(5,0),i=Mn(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*v)break}else if(a){if(f>=e.deqCost*l||f>=e.deqAvgCost*s)break}else if(p>=e.deqNoDrawCost*ud)break;var g=e.deq(t,d,c);if(!(g.length>0))break;for(var y=0;y0&&(e.onDeqd(t,u),!a&&e.shouldRedraw(t,u,d,c)&&r())},a(t))}}},dd=function(){return i(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:tt;a(this,e),this.idsByKey=new gt,this.keyForId=new gt,this.cachesByLvl=new gt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n},[{key:"getIdsFor",value:function(e){null==e&&at("Can not get id list for null key");var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new mt,t.set(e,n)),n}},{key:"addIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).add(t)}},{key:"deleteIdForKey",value:function(e,t){null!=e&&this.getIdsFor(e).delete(t)}},{key:"getNumberOfIdsForKey",value:function(e){return null==e?0:this.getIdsFor(e).size}},{key:"updateKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:"deleteKeyMappingFor",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:"keyHasChangedFor",value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:"isInvalid",value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:"getCachesAt",value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new gt,t.set(e,r),n.push(e)),r}},{key:"getCache",value:function(e,t){return this.getCachesAt(t).get(e)}},{key:"get",value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return null!=r&&this.updateKeyMappingFor(e),r}},{key:"getForCachedKey",value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:"hasCache",value:function(e,t){return this.getCachesAt(t).has(e)}},{key:"has",value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:"setCache",value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:"set",value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:"deleteCache",value:function(e,t){this.getCachesAt(t).delete(e)}},{key:"delete",value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:"invalidateKey",value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:"invalidate",value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||0===this.getNumberOfIdsForKey(n)}}])}(),hd=7.99,fd={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},pd=dt({getKey:null,doesEleInvalidateKey:tt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:et,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),vd=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=pd(t);be(n,r),n.lookup=new dd(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},gd=vd.prototype;gd.reasons=fd,gd.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},gd.getRetiredTextureQueue=function(e){var t=this.eleImgCaches.retired=this.eleImgCaches.retired||{};return t[e]=t[e]||[]},gd.getElementQueue=function(){return this.eleCacheQueue=this.eleCacheQueue||new Dt(function(e,t){return t.reqs-e.reqs})},gd.getElementKeyToQueue=function(){return this.eleKeyToCacheQueue=this.eleKeyToCacheQueue||{}},gd.getElement=function(e,t,n,r,a){var i=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||0===t.w||0===t.h||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed())return null;if(!i.allowEdgeTxrCaching&&e.isEdge()||!i.allowParentTxrCaching&&e.isParent())return null;if(null==r&&(r=Math.ceil(Ht(s*n))),r<-4)r=-4;else if(s>=7.99||r>3)return null;var u=Math.pow(2,r),c=t.h*u,d=t.w*u,h=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,h))return null;var f,p=l.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;if(f=c<=25?25:c<=50?50:50*Math.ceil(c/50),c>1024||d>1024)return null;var v=i.getTextureQueue(f),g=v[v.length-2],y=function(){return i.recycleTexture(f,d)||i.addTexture(f,d)};g||(g=v[v.length-1]),g||(g=y()),g.width-g.usedWidthr;S--)C=i.getElement(e,t,n,S,fd.downscale);P()}else{var B;if(!x&&!w&&!E)for(var D=r-1;D>=-4;D--){var _=l.get(e,D);if(_){B=_;break}}if(b(B))return i.queueElement(e,r),B;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,e,t,h,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:u,width:d,height:c,scaledLabelShown:h},g.usedWidth+=Math.ceil(d+8),g.eleCaches.push(p),l.set(e,r,p),i.checkTextureFullness(g),p},gd.invalidateElements=function(e){for(var t=0;t=.2*e.width&&this.retireTexture(e)},gd.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>.8&&e.fullnessChecks>=10?ht(t,e):e.fullnessChecks++},gd.retireTexture=function(e){var t=e.height,n=this.getTextureQueue(t),r=this.lookup;ht(n,e),e.retired=!0;for(var a=e.eleCaches,i=0;i=t)return i.retired=!1,i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,ft(i.eleCaches),i.context.setTransform(1,0,0,1,0,0),i.context.clearRect(0,0,i.width,i.height),ht(r,i),n.push(i),i}},gd.queueElement=function(e,t){var n=this.getElementQueue(),r=this.getElementKeyToQueue(),a=this.getKey(e),i=r[a];if(i)i.level=Math.max(i.level,t),i.eles.merge(e),i.reqs++,n.updateItem(i);else{var o={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(o),r[a]=o}},gd.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),a=[],i=t.lookup,o=0;o<1&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],c=i.hasCache(u,s.level);if(r[l]=null,!c){a.push(s);var d=t.getBoundingBox(u);t.getElement(u,d,e,s.level,fd.dequeue)}}return a},gd.removeFromQueue=function(e){var t=this.getElementQueue(),n=this.getElementKeyToQueue(),r=this.getKey(e),a=n[r];null!=a&&(1===a.eles.length?(a.reqs=Je,t.updateItem(a),t.pop(),n[r]=null):a.eles.unmerge(e))},gd.onDequeue=function(e){this.onDequeues.push(e)},gd.offDequeue=function(e){ht(this.onDequeues,e)},gd.setupDequeueing=cd({deqRedrawThreshold:100,deqCost:.15,deqAvgCost:.1,deqNoDrawCost:.9,deqFastCost:.9,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=3.99||n>2)return null;r.validateLayersElesOrdering(n,e);var o,s,l=r.layersByLevel,u=Math.pow(2,n),c=l[n]=l[n]||[];if(r.levelIsComplete(n,e))return c;!function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return s=l[t],!0},a=function(e){if(!s)for(var r=n+e;-4<=r&&r<=2&&!t(r);r+=e);};a(1),a(-1);for(var i=c.length-1;i>=0;i--){var o=c[i];o.invalid&&ht(c,o)}}();var d=function(t){var a=(t=t||{}).after;!function(){if(!o){o=tn();for(var t=0;t32767||s>32767)return null;if(i*s>16e6)return null;var l=r.makeLayer(o,n);if(null!=a){var d=c.indexOf(a)+1;c.splice(d,0,l)}else(void 0===t.insert||t.insert)&&c.unshift(l);return l};if(r.skipping&&!i)return null;for(var h=null,f=e.length/1,p=!i,v=0;v=f||!dn(h.bb,g.boundingBox()))&&!(h=d({insert:!0,after:h})))return null;s||p?r.queueLayer(h,g):r.drawEleInLayer(h,g,n,t),h.eles.push(g),m[n]=h}}return s||(p?null:c)},md.getEleLevelForLayerLevel=function(e,t){return e},md.drawEleInLayer=function(e,t,n,r){var a=this.renderer,i=e.context,o=t.boundingBox();0!==o.w&&0!==o.h&&t.visible()&&(n=this.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(i,!1),a.drawCachedElement(i,t,null,null,n,true),a.setImgSmoothing(i,!0))},md.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||0===n.length)return!1;for(var r=0,a=0;a0)return!1;if(i.invalid)return!1;r+=i.eles.length}return r===t.length},md.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){e=!0;break}}return e},md.invalidateElements=function(e){var t=this;0!==e.length&&(t.lastInvalidationTime=ze(),0!==e.length&&t.haveLayers()&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},md.invalidateLayer=function(e){if(this.lastInvalidationTime=ze(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];ht(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var a=0;a3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=this,s=t._private.rscratch;if((!i||t.visible())&&!s.badLine&&null!=s.allpts&&!isNaN(s.allpts[0])){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=i?t.pstyle("opacity").value:1,c=i?t.pstyle("line-opacity").value:1,d=t.pstyle("curve-style").value,h=t.pstyle("line-style").value,f=t.pstyle("width").pfValue,p=t.pstyle("line-cap").value,v=t.pstyle("line-outline-width").value,g=t.pstyle("line-outline-color").value,y=u*c,m=u*c,b=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;"straight-triangle"===d?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=f,e.lineCap=p,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")},x=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:m;o.drawArrowheads(e,t,n)};if(e.lineJoin="round","yes"===t.pstyle("ghost").value){var w=t.pstyle("ghost-offset-x").pfValue,E=t.pstyle("ghost-offset-y").pfValue,k=t.pstyle("ghost-opacity").value,T=y*k;e.translate(w,E),b(T),x(T),e.translate(-w,-E)}else!function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;e.lineWidth=f+v,e.lineCap=p,v>0?(o.colorStrokeStyle(e,g[0],g[1],g[2],n),"straight-triangle"===d?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,h),e.lineCap="butt")):e.lineCap="butt"}();a&&o.drawEdgeUnderlay(e,t),b(),x(),a&&o.drawEdgeOverlay(e,t),o.drawElementText(e,t,null,r),n&&e.translate(l.x1,l.y1)}}},Ld=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,n){if(n.visible()){var r=n.pstyle("".concat(e,"-opacity")).value;if(0!==r){var a=this,i=a.usePaths(),o=n._private.rscratch,s=2*n.pstyle("".concat(e,"-padding")).pfValue,l=n.pstyle("".concat(e,"-color")).value;t.lineWidth=s,"self"!==o.edgeType||i?t.lineCap="round":t.lineCap="butt",a.colorStrokeStyle(t,l[0],l[1],l[2],r),a.drawEdgePath(n,t,o.allpts,"solid")}}}};Nd.drawEdgeOverlay=Ld("overlay"),Nd.drawEdgeUnderlay=Ld("underlay"),Nd.drawEdgePath=function(e,t,n,r){var a,i=e._private.rscratch,s=t,l=!1,u=this.usePaths(),c=e.pstyle("line-dash-pattern").pfValue,d=e.pstyle("line-dash-offset").pfValue;if(u){var h=n.join("$");i.pathCacheKey&&i.pathCacheKey===h?(a=t=i.pathCache,l=!0):(a=t=new Path2D,i.pathCacheKey=h,i.pathCache=a)}if(s.setLineDash)switch(r){case"dotted":s.setLineDash([1,1]);break;case"dashed":s.setLineDash(c),s.lineDashOffset=d;break;case"solid":s.setLineDash([])}if(!l&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var f=2;f+35&&void 0!==arguments[5]?arguments[5]:5,o=Math.min(i,r/2,a/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+a-o),e.quadraticCurveTo(t+r,n+a,t+r-o,n+a),e.lineTo(t+o,n+a),e.quadraticCurveTo(t,n+a,t,n+a-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}Od.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio(),a=Math.ceil(Ht(n*r));t=Math.pow(2,a)}return!(e.pstyle("font-size").pfValue*t5&&void 0!==arguments[5])||arguments[5],o=this;if(null==r){if(i&&!o.eleTextBiggerThanMin(t))return}else if(!1===r)return;if(t.isNode()){var s=t.pstyle("label");if(!s||!s.value)return;var l=o.getLabelJustification(t);e.textAlign=l,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,c=t.pstyle("label"),d=t.pstyle("source-label"),h=t.pstyle("target-label");if(u||(!c||!c.value)&&(!d||!d.value)&&(!h||!h.value))return;e.textAlign="center",e.textBaseline="bottom"}var f,p=!n;n&&(f=n,e.translate(-f.x1,-f.y1)),null==a?(o.drawText(e,t,null,p,i),t.isEdge()&&(o.drawText(e,t,"source",p,i),o.drawText(e,t,"target",p,i))):o.drawText(e,t,a,p,i),n&&e.translate(f.x1,f.y1)},Od.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&void 0!==arguments[2])||arguments[2],r=t.pstyle("font-style").strValue,a=t.pstyle("font-size").pfValue+"px",i=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,s=n?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,l=t.pstyle("text-outline-opacity").value*s,u=t.pstyle("color").value,c=t.pstyle("text-outline-color").value;e.font=r+" "+o+" "+a+" "+i,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,c[0],c[1],c[2],l)},Od.getTextAngle=function(e,t){var n,r=e._private.rscratch,a=t?t+"-":"",i=e.pstyle(a+"text-rotation");if("autorotate"===i.strValue){var o=pt(r,"labelAngle",t);n=e.isEdge()?o:0}else n="none"===i.strValue?0:i.pfValue;return n},Od.drawText=function(e,t,n){var r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=t._private.rscratch,o=a?t.effectiveOpacity():1;if(!a||0!==o&&0!==t.pstyle("text-opacity").value){"main"===n&&(n=null);var s,l,u=pt(i,"labelX",n),c=pt(i,"labelY",n),d=this.getLabelText(t,n);if(null!=d&&""!==d&&!isNaN(u)&&!isNaN(c)){this.setupTextStyle(e,t,a);var h,f=n?n+"-":"",p=pt(i,"labelWidth",n),v=pt(i,"labelHeight",n),g=t.pstyle(f+"text-margin-x").pfValue,y=t.pstyle(f+"text-margin-y").pfValue,m=t.isEdge(),b=t.pstyle("text-halign").value,x=t.pstyle("text-valign").value;switch(m&&(b="center",x="center"),u+=g,c+=y,0!==(h=r?this.getTextAngle(t,n):0)&&(s=u,l=c,e.translate(s,l),e.rotate(h),u=0,c=0),x){case"top":break;case"center":c+=v/2;break;case"bottom":c+=v}var w=t.pstyle("text-background-opacity").value,E=t.pstyle("text-border-opacity").value,k=t.pstyle("text-border-width").pfValue,T=t.pstyle("text-background-padding").pfValue,C=t.pstyle("text-background-shape").strValue,P="round-rectangle"===C||"roundrectangle"===C,S="circle"===C;if(w>0||k>0&&E>0){var B=e.fillStyle,D=e.strokeStyle,_=e.lineWidth,A=t.pstyle("text-background-color").value,M=t.pstyle("text-border-color").value,R=t.pstyle("text-border-style").value,I=w>0,N=k>0&&E>0,L=u-T;switch(b){case"left":L-=p;break;case"center":L-=p/2}var z=c-v-T,O=p+2*T,V=v+2*T;if(I&&(e.fillStyle="rgba(".concat(A[0],",").concat(A[1],",").concat(A[2],",").concat(w*o,")")),N&&(e.strokeStyle="rgba(".concat(M[0],",").concat(M[1],",").concat(M[2],",").concat(E*o,")"),e.lineWidth=k,e.setLineDash))switch(R){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=k/4,e.setLineDash([]);break;default:e.setLineDash([])}if(P?(e.beginPath(),Vd(e,L,z,O,V,2)):S?(e.beginPath(),function(e,t,n,r,a){var i=Math.min(r,a)/2,o=t+r/2,s=n+a/2;e.beginPath(),e.arc(o,s,i,0,2*Math.PI),e.closePath()}(e,L,z,O,V)):(e.beginPath(),e.rect(L,z,O,V)),I&&e.fill(),N&&e.stroke(),N&&"double"===R){var F=k/2;e.beginPath(),P?Vd(e,L+F,z+F,O-2*F,V-2*F,2):e.rect(L+F,z+F,O-2*F,V-2*F),e.stroke()}e.fillStyle=B,e.strokeStyle=D,e.lineWidth=_,e.setLineDash&&e.setLineDash([])}var X=2*t.pstyle("text-outline-width").pfValue;if(X>0&&(e.lineWidth=X),"wrap"===t.pstyle("text-wrap").value){var j=pt(i,"labelWrapCachedLines",n),Y=pt(i,"labelLineHeight",n),q=p/2,W=this.getLabelJustification(t);switch("auto"===W||("left"===b?"left"===W?u+=-p:"center"===W&&(u+=-q):"center"===b?"left"===W?u+=-q:"right"===W&&(u+=q):"right"===b&&("center"===W?u+=q:"right"===W&&(u+=p))),x){case"top":case"center":case"bottom":c-=(j.length-1)*Y}for(var U=0;U0&&e.strokeText(j[U],u,c),e.fillText(j[U],u,c),c+=Y}else X>0&&e.strokeText(d,u,c),e.fillText(d,u,c);0!==h&&(e.rotate(-h),e.translate(-s,-l))}}};var Fd={drawNode:function(e,t,n){var r,a,i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=this,u=t._private,c=u.rscratch,d=t.position();if(Q(d.x)&&Q(d.y)&&(!s||t.visible())){var h,f,p=s?t.effectiveOpacity():1,v=l.usePaths(),g=!1,y=t.padding();r=t.width()+2*y,a=t.height()+2*y,n&&(f=n,e.translate(-f.x1,-f.y1));for(var m=t.pstyle("background-image").value,b=new Array(m.length),x=new Array(m.length),w=0,E=0;E0&&void 0!==arguments[0]?arguments[0]:S;l.eleFillStyle(e,t,n)},Y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:N;l.colorStrokeStyle(e,B[0],B[1],B[2],t)},q=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V;l.colorStrokeStyle(e,z[0],z[1],z[2],t)},W=function(e,t,n,r){var a,i=l.nodePathCache=l.nodePathCache||[],o=He("polygon"===n?n+","+r.join(","):n,""+t,""+e,""+X),s=i[o],u=!1;return null!=s?(a=s,u=!0,c.pathCache=a):(a=new Path2D,i[o]=c.pathCache=a),{path:a,cacheHit:u}},U=t.pstyle("shape").strValue,H=t.pstyle("shape-polygon-points").pfValue;if(v){e.translate(d.x,d.y);var K=W(r,a,U,H);h=K.path,g=K.cacheHit}var G=function(){if(!g){var n=d;v&&(n={x:0,y:0}),l.nodeShapes[l.getNodeShape(t)].draw(h||e,n.x,n.y,r,a,X,c)}v?e.fill(h):e.fill()},Z=function(){for(var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:p,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=u.backgrounding,i=0,o=0;o0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasPie(t)&&(l.drawPie(e,t,i),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},J=function(){var n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;l.hasStripe(t)&&(e.save(),v?e.clip(c.pathCache):(l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c),e.clip()),l.drawStripe(e,t,i),e.restore(),n&&(v||l.nodeShapes[l.getNodeShape(t)].draw(e,d.x,d.y,r,a,X,c)))},ee=function(){var t=(C>0?C:-C)*(arguments.length>0&&void 0!==arguments[0]?arguments[0]:p),n=C>0?0:255;0!==C&&(l.colorFillStyle(e,n,n,n,t),v?e.fill(h):e.fill())},te=function(){if(P>0){if(e.lineWidth=P,e.lineCap=A,e.lineJoin=_,e.setLineDash)switch(D){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(R),e.lineDashOffset=I;break;case"solid":case"double":e.setLineDash([])}if("center"!==M){if(e.save(),e.lineWidth*=2,"inside"===M)v?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-r/2-P,-a/2-P,r+2*P,a+2*P),t.addPath(h),e.clip(t,"evenodd")}v?e.stroke(h):e.stroke(),e.restore()}else v?e.stroke(h):e.stroke();if("double"===D){e.lineWidth=P/3;var n=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",v?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},ne=function(){if(L>0){if(e.lineWidth=L,e.lineCap="butt",e.setLineDash)switch(O){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([])}var n=d;v&&(n={x:0,y:0});var i=l.getNodeShape(t),o=P;"inside"===M&&(o=0),"outside"===M&&(o*=2);var s,u=(r+o+(L+F))/r,c=(a+o+(L+F))/a,h=r*u,f=a*c,p=l.nodeShapes[i].points;if(v)s=W(h,f,i,p).path;if("ellipse"===i)l.drawEllipsePath(s||e,n.x,n.y,h,f);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(i)){var g=0,y=0,m=0;"round-diamond"===i?g=1.4*(o+F+L):"round-heptagon"===i?(g=1.075*(o+F+L),m=-(o/2+F+L)/35):"round-hexagon"===i?g=1.12*(o+F+L):"round-pentagon"===i?(g=1.13*(o+F+L),m=-(o/2+F+L)/15):"round-tag"===i?(g=1.12*(o+F+L),y=.07*(o/2+L+F)):"round-triangle"===i&&(g=(o+F+L)*(Math.PI/2),m=-(o+F/2+L)/Math.PI),0!==g&&(h=r*(u=(r+g)/r),["round-hexagon","round-tag"].includes(i)||(f=a*(c=(a+g)/a)));for(var b=h/2,x=f/2,w=(X="auto"===X?In(h,f):X)+(o+L+F)/2,E=new Array(p.length/2),k=new Array(p.length/2),T=0;T0){if(r=r||n.position(),null==a||null==i){var d=n.padding();a=n.width()+2*d,i=n.height()+2*d}this.colorFillStyle(t,l[0],l[1],l[2],s),this.nodeShapes[u].draw(t,r.x,r.y,a+2*o,i+2*o,c),t.fill()}}}};Fd.drawNodeOverlay=Xd("overlay"),Fd.drawNodeUnderlay=Xd("underlay"),Fd.hasPie=function(e){return(e=e[0])._private.hasPie},Fd.hasStripe=function(e){return(e=e[0])._private.hasStripe},Fd.drawPie=function(e,t,n,r){t=t[0],r=r||t.position();var a,i=t.cy().style(),o=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,u=r.x,c=r.y,d=t.width(),h=t.height(),f=Math.min(d,h)/2,p=0;if(this.usePaths()&&(u=0,c=0),"%"===o.units?f*=o.pfValue:void 0!==o.pfValue&&(f=o.pfValue/2),"%"===s.units?a=f*s.pfValue:void 0!==s.pfValue&&(a=s.pfValue/2),!(a>=f))for(var v=1;v<=i.pieBackgroundN;v++){var g=t.pstyle("pie-"+v+"-background-size").value,y=t.pstyle("pie-"+v+"-background-color").value,m=t.pstyle("pie-"+v+"-background-opacity").value*n,b=g/100;b+p>1&&(b=1-p);var x=1.5*Math.PI+2*Math.PI*p,w=(x+=l)+2*Math.PI*b;0===g||p>=1||p+b>1||(0===a?(e.beginPath(),e.moveTo(u,c),e.arc(u,c,f,x,w),e.closePath()):(e.beginPath(),e.arc(u,c,f,x,w),e.arc(u,c,a,w,x,!0),e.closePath()),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),p+=b)}},Fd.drawStripe=function(e,t,n,r){t=t[0],r=r||t.position();var a=t.cy().style(),i=r.x,o=r.y,s=t.width(),l=t.height(),u=0,c=this.usePaths();e.save();var d=t.pstyle("stripe-direction").value,h=t.pstyle("stripe-size");switch(d){case"vertical":break;case"righward":e.rotate(-Math.PI/2)}var f=s,p=l;"%"===h.units?(f*=h.pfValue,p*=h.pfValue):void 0!==h.pfValue&&(f=h.pfValue,p=h.pfValue),c&&(i=0,o=0),o-=f/2,i-=p/2;for(var v=1;v<=a.stripeBackgroundN;v++){var g=t.pstyle("stripe-"+v+"-background-size").value,y=t.pstyle("stripe-"+v+"-background-color").value,m=t.pstyle("stripe-"+v+"-background-opacity").value*n,b=g/100;b+u>1&&(b=1-u),0===g||u>=1||u+b>1||(e.beginPath(),e.rect(i,o+p*u,f,p*b),e.closePath(),this.colorFillStyle(e,y[0],y[1],y[2],m),e.fill(),u+=b)}e.restore()};var jd,Yd={};function qd(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(r));return r}function Wd(e,t,n){void 0===n&&(n=t);var r=e.makeOffscreenCanvas(t,n),a=r.context=r.getContext("2d");return r.clear=function(){return a.clearRect(0,0,r.width,r.height)},r.clear(),r}function Ud(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function Hd(e,t){return!!t.picking||"solid"===e.pstyle("background-fill").value&&("none"===e.pstyle("background-image").strValue&&(0===e.pstyle("border-width").value||(0===e.pstyle("border-opacity").value||"solid"===e.pstyle("border-style").value)))}function Kd(e,t){if(e.length!==t.length)return!1;for(var n=0;n>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function $d(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function Qd(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function Jd(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function eh(e,t,n,r,a,i){switch(t){case e.FLOAT:return new Float32Array(n.buffer,i*r,a);case e.INT:return new Int32Array(n.buffer,i*r,a)}}function th(e,t,n,r){var a=l(Qd(e,n),3),i=a[0],o=a[1],s=a[2],u=Jd(e,o,t*i),c=i*s,d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,t*c,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,i,o,!1,c,0):o===e.INT&&e.vertexAttribIPointer(r,i,o,c,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var h=new Array(t),f=0;ft.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!d&&(c[t.NODE]=!0,c[t.SELECT_BOX]=!0);var m=n.style(),b=n.zoom(),x=void 0!==o?o:b,w=n.pan(),E={x:w.x,y:w.y},k={zoom:b,pan:{x:w.x,y:w.y}},T=t.prevViewport;void 0===T||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||v&&!p||(t.motionBlurPxRatio=1),s&&(E=s),x*=l,E.x*=l,E.y*=l;var C=t.getCachedZSortedEles();function P(e,n,r,a,i){var o=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,a,i),e.globalCompositeOperation=o}function S(e,n){var i,l,c,d;t.clearingMotionBlur||e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]?(i=E,l=x,c=t.canvasWidth,d=t.canvasHeight):(i={x:w.x*f,y:w.y*f},l=b*f,c=t.canvasWidth*f,d=t.canvasHeight*f),e.setTransform(1,0,0,1,0,0),"motionBlur"===n?P(e,0,0,c,d):r||void 0!==n&&!n||e.clearRect(0,0,c,d),a||(e.translate(i.x,i.y),e.scale(l,l)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(d||(t.textureDrawLastFrame=!1),d){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var B=t.data.bufferContexts[t.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult}),(k=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}}c[t.DRAG]=!1,c[t.NODE]=!1;var D=u.contexts[t.NODE],_=t.textureCache.texture;k=t.textureCache.viewport;D.setTransform(1,0,0,1,0,0),h?P(D,0,0,k.width,k.height):D.clearRect(0,0,k.width,k.height);var A=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;t.colorFillStyle(D,A[0],A[1],A[2],M),D.fillRect(0,0,k.width,k.height);b=n.zoom();S(D,!1),D.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l),D.drawImage(_,k.mpan.x,k.mpan.y,k.width/k.zoom/l,k.height/k.zoom/l)}else t.textureOnViewport&&!r&&(t.textureCache=null);var R=n.extent(),I=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),N=t.hideEdgesOnViewport&&I,L=[];if(L[t.NODE]=!c[t.NODE]&&h&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,L[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),L[t.DRAG]=!c[t.DRAG]&&h&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,L[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),c[t.NODE]||a||i||L[t.NODE]){var z=h&&!L[t.NODE]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.nondrag,l,R):t.drawLayeredElements(D,C.nondrag,l,R),t.debug&&t.drawDebugPoints(D,C.nondrag),a||h||(c[t.NODE]=!1)}if(!i&&(c[t.DRAG]||a||L[t.DRAG])){z=h&&!L[t.DRAG]&&1!==f;S(D=r||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]),h&&!z?"motionBlur":void 0),N?t.drawCachedNodes(D,C.drag,l,R):t.drawCachedElements(D,C.drag,l,R),t.debug&&t.drawDebugPoints(D,C.drag),a||h||(c[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,S),h&&1!==f){var O=u.contexts[t.NODE],V=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],F=u.contexts[t.DRAG],X=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],j=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!y?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):P(e,0,0,t.canvasWidth,t.canvasHeight);var a=f;e.drawImage(n,0,0,t.canvasWidth*a,t.canvasHeight*a,0,0,t.canvasWidth,t.canvasHeight)};(c[t.NODE]||L[t.NODE])&&(j(O,V,L[t.NODE]),c[t.NODE]=!1),(c[t.DRAG]||L[t.DRAG])&&(j(F,X,L[t.DRAG]),c[t.DRAG]=!1)}t.prevViewport=k,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),h&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!d,t.mbFrames=0,c[t.NODE]=!0,c[t.DRAG]=!0,t.redraw()},100)),r||n.emit("render")},Yd.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,a=n.data,i=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,l=a.canvasNeedsRedraw,u=e.forcedContext;if(n.showFps||!o&&l[n.SELECT_BOX]&&!s){var c=u||a.contexts[n.SELECT_BOX];if(t(c),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)){var d=n.cy.zoom(),h=i.core("selection-box-border-width").value/d;c.lineWidth=h,c.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",c.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),h>0&&(c.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",c.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(a.bgActivePosistion&&!n.hoverData.selecting){d=n.cy.zoom();var f=a.bgActivePosistion;c.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",c.beginPath(),c.arc(f.x,f.y,i.core("active-bg-size").pfValue/d,0,2*Math.PI),c.fill()}var p=n.lastRedrawTime;if(n.showFps&&p){p=Math.round(p);var v=Math.round(1e3/p),g="1 frame = "+p+" ms = "+v+" fps";if(c.setTransform(1,0,0,1,0,0),c.fillStyle="rgba(255, 0, 0, 0.75)",c.strokeStyle="rgba(255, 0, 0, 0.75)",c.font="30px Arial",!jd){var y=c.measureText(g);jd=y.actualBoundingBoxAscent}c.fillText(g,0,jd);c.strokeRect(0,jd+10,250,20),c.fillRect(0,jd+10,250*Math.min(v/60,1),20)}s||(l[n.SELECT_BOX]=!1)}};var nh="undefined"!=typeof Float32Array?Float32Array:Array;function rh(){var e=new nh(9);return nh!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function ah(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function ih(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=n[0],f=n[1];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e[6]=h*r+f*o+u,e[7]=h*a+f*s+c,e[8]=h*i+f*l+d,e}function oh(e,t,n){var r=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],h=Math.sin(n),f=Math.cos(n);return e[0]=f*r+h*o,e[1]=f*a+h*s,e[2]=f*i+h*l,e[3]=f*o-h*r,e[4]=f*s-h*a,e[5]=f*l-h*i,e[6]=u,e[7]=c,e[8]=d,e}function sh(e,t,n){var r=n[0],a=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=a*t[3],e[4]=a*t[4],e[5]=a*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});var lh=function(){return i(function e(t,n,r,i){a(this,e),this.debugID=Math.floor(1e4*Math.random()),this.r=t,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,n,n),this.scratch=i(t,n,this.texHeight,"scratch")},[{key:"lock",value:function(){this.locked=!0}},{key:"getKeys",value:function(){return new Set(this.keyToLocation.keys())}},{key:"getScale",value:function(e){var t=e.w,n=e.h,r=this.texHeight,a=this.texSize,i=r/n,o=t*i,s=n*i;return o>a&&(o=t*(i=a/t),s=n*i),{scale:i,texW:o,texH:s}}},{key:"draw",value:function(e,t,n){var r=this;if(this.locked)throw new Error("can't draw, atlas is locked");var a=this.texSize,i=this.texRows,o=this.texHeight,s=this.getScale(t),l=s.scale,u=s.texW,c=s.texH,d=function(e,r){if(n&&r){var a=r.context,i=e.x,s=e.row,u=i,c=o*s;a.save(),a.translate(u,c),a.scale(l,l),n(a,t),a.restore()}},h=[null,null],f=function(){d(r.freePointer,r.canvas),h[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:u,h:c},h[1]={x:r.freePointer.x+u,y:r.freePointer.row*o,w:0,h:c},r.freePointer.x+=u,r.freePointer.x==a&&(r.freePointer.x=0,r.freePointer.row++)},p=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=a)f();else{if(this.freePointer.row>=i-1)return!1;this.freePointer.x===a?(p(),f()):this.enableWrapping?function(){var e=r.scratch,t=r.canvas;e.clear(),d({x:0,row:0},e);var n=a-r.freePointer.x,i=u-n,s=o,l=r.freePointer.x,f=r.freePointer.row*o,p=n;t.context.drawImage(e,0,0,p,s,l,f,p,s),h[0]={x:l,y:f,w:p,h:c};var v=n,g=(r.freePointer.row+1)*o,y=i;t&&t.context.drawImage(e,v,0,y,s,0,g,y,s),h[1]={x:0,y:g,w:y,h:c},r.freePointer.x=i,r.freePointer.row++}():(p(),f())}return this.keyToLocation.set(e,h),this.needsBuffer=!0,h}},{key:"getOffsets",value:function(e){return this.keyToLocation.get(e)}},{key:"isEmpty",value:function(){return 0===this.freePointer.x&&0===this.freePointer.row}},{key:"canFit",value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return!(this.freePointer.x+r>t)||this.freePointer.row1&&void 0!==arguments[1]?arguments[1]:{},a=r.forceRedraw,i=void 0!==a&&a,s=r.filterEle,l=void 0===s?function(){return!0}:s,u=r.filterType,c=void 0===u?function(){return!0}:u,d=!1,h=!1,f=o(e);try{for(f.s();!(t=f.n()).done;){var p=t.value;if(l(p)){var v,g=o(this.renderTypes.values());try{var y=function(){var e=v.value,t=e.type;if(c(t)){var r=n.collections.get(e.collection),a=e.getKey(p),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),h=!0;else{var s=e.getID?e.getID(p):p.id(),l=n._key(t,s),u=n.typeAndIdToKey.get(l);void 0===u||Kd(o,u)||(d=!0,n.typeAndIdToKey.delete(l),u.forEach(function(e){return r.markKeyForGC(e)}))}}};for(g.s();!(v=g.n()).done;)y()}catch(m){g.e(m)}finally{g.f()}}}}catch(m){f.e(m)}finally{f.f()}return h&&(this.gc(),d=!1),d}},{key:"gc",value:function(){var e,t=o(this.collections.values());try{for(t.s();!(e=t.n()).done;){e.value.gc()}}catch(n){t.e(n)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(e,t,n,r){var a=this.renderTypes.get(t),i=this.collections.get(a.collection),o=!1,s=i.draw(r,n,function(t){a.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),a.drawElement(t,e,n,!0,!0),t.restore()):a.drawElement(t,e,n,!0,!0),o=!0});if(o){var l=a.getID?a.getID(e):e.id(),u=this._key(t,l);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:"getAtlasInfo",value:function(e,t){var n=this,r=this.renderTypes.get(t),a=r.getKey(e);return(Array.isArray(a)?a:[a]).map(function(a){var i=r.getBoundingBox(e,a),o=n.getOrCreateAtlas(e,t,i,a),s=l(o.getOffsets(a),2),u=s[0];return{atlas:o,tex:u,tex1:u,tex2:s[1],bb:i}})}},{key:"getDebugInfo",value:function(){var e,t=[],n=o(this.collections);try{for(n.s();!(e=n.n()).done;){var r=l(e.value,2),a=r[0],i=r[1].getCounts(),s=i.keyCount,u=i.atlasCount;t.push({type:a,keyCount:s,atlasCount:u})}}catch(c){n.e(c)}finally{n.f()}return t}}])}(),dh=function(){return i(function e(t){a(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]},[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:"getAtlasIndexForBatch",value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),hh={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},fh=1,ph=2,vh=function(){return i(function e(t,n,r){a(this,e),this.r=t,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=Wd,this.atlasManager=new ch(t,r),this.batchManager=new dh(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(hh.SCREEN),this.pickingProgram=this._createShaderProgram(hh.PICKING),this.vao=this._createVAO()},[{key:"addAtlasCollection",value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:"addTextureAtlasRenderType",value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:"addSimpleShapeRenderType",value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:"invalidate",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(e){var t=this.gl,n="#version 300 es\n precision highp float;\n\n uniform mat3 uPanZoomMatrix;\n uniform int uAtlasSize;\n \n // instanced\n in vec2 aPosition; // a vertex from the unit square\n \n in mat3 aTransform; // used to transform verticies, eg into a bounding box\n in int aVertType; // the type of thing we are rendering\n\n // the z-index that is output when using picking mode\n in vec4 aIndex;\n \n // For textures\n in int aAtlasId; // which shader unit/atlas to use\n in vec4 aTex; // x/y/w/h of texture in atlas\n\n // for edges\n in vec4 aPointAPointB;\n in vec4 aPointCPointD;\n in vec2 aLineWidth; // also used for node border width\n\n // simple shapes\n in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]\n in vec4 aColor; // also used for edges\n in vec4 aBorderColor; // aLineWidth is used for border width\n\n // output values passed to the fragment shader\n out vec2 vTexCoord;\n out vec4 vColor;\n out vec2 vPosition;\n // flat values are not interpolated\n flat out int vAtlasId; \n flat out int vVertType;\n flat out vec2 vTopRight;\n flat out vec2 vBotLeft;\n flat out vec4 vCornerRadius;\n flat out vec4 vBorderColor;\n flat out vec2 vBorderWidth;\n flat out vec4 vIndex;\n \n void main(void) {\n int vid = gl_VertexID;\n vec2 position = aPosition; // TODO make this a vec3, simplifies some code below\n\n if(aVertType == ".concat(0,") {\n float texX = aTex.x; // texture coordinates\n float texY = aTex.y;\n float texW = aTex.z;\n float texH = aTex.w;\n\n if(vid == 1 || vid == 2 || vid == 4) {\n texX += texW;\n }\n if(vid == 2 || vid == 4 || vid == 5) {\n texY += texH;\n }\n\n float d = float(uAtlasSize);\n vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(4," || aVertType == ").concat(7," \n || aVertType == ").concat(5," || aVertType == ").concat(6,") { // simple shapes\n\n // the bounding box is needed by the fragment shader\n vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat\n vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat\n vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated\n\n // calculations are done in the fragment shader, just pass these along\n vColor = aColor;\n vCornerRadius = aCornerRadius;\n vBorderColor = aBorderColor;\n vBorderWidth = aLineWidth;\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n }\n else if(aVertType == ").concat(1,") {\n vec2 source = aPointAPointB.xy;\n vec2 target = aPointAPointB.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n // stretch the unit square into a long skinny rectangle\n vec2 xBasis = target - source;\n vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));\n vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;\n\n gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);\n vColor = aColor;\n } \n else if(aVertType == ").concat(2,") {\n vec2 pointA = aPointAPointB.xy;\n vec2 pointB = aPointAPointB.zw;\n vec2 pointC = aPointCPointD.xy;\n vec2 pointD = aPointCPointD.zw;\n\n // adjust the geometry so that the line is centered on the edge\n position.y = position.y - 0.5;\n\n vec2 p0, p1, p2, pos;\n if(position.x == 0.0) { // The left side of the unit square\n p0 = pointA;\n p1 = pointB;\n p2 = pointC;\n pos = position;\n } else { // The right side of the unit square, use same approach but flip the geometry upside down\n p0 = pointD;\n p1 = pointC;\n p2 = pointB;\n pos = vec2(0.0, -position.y);\n }\n\n vec2 p01 = p1 - p0;\n vec2 p12 = p2 - p1;\n vec2 p21 = p1 - p2;\n\n // Find the normal vector.\n vec2 tangent = normalize(normalize(p12) + normalize(p01));\n vec2 normal = vec2(-tangent.y, tangent.x);\n\n // Find the vector perpendicular to p0 -> p1.\n vec2 p01Norm = normalize(vec2(-p01.y, p01.x));\n\n // Determine the bend direction.\n float sigma = sign(dot(p01 + p21, normal));\n float width = aLineWidth[0];\n\n if(sign(pos.y) == -sigma) {\n // This is an intersecting vertex. Adjust the position so that there's no overlap.\n vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n } else {\n // This is a non-intersecting vertex. Treat it like a mitre join.\n vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);\n gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);\n }\n\n vColor = aColor;\n } \n else if(aVertType == ").concat(3," && vid < 3) {\n // massage the first triangle into an edge arrow\n if(vid == 0)\n position = vec2(-0.15, -0.3);\n if(vid == 1)\n position = vec2( 0.0, 0.0);\n if(vid == 2)\n position = vec2( 0.15, -0.3);\n\n gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);\n vColor = aColor;\n }\n else {\n gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space\n }\n\n vAtlasId = aAtlasId;\n vVertType = aVertType;\n vIndex = aIndex;\n }\n "),r=this.batchManager.getIndexArray(),a="#version 300 es\n precision highp float;\n\n // declare texture unit for each texture atlas in the batch\n ".concat(r.map(function(e){return"uniform sampler2D uTexture".concat(e,";")}).join("\n\t"),"\n\n uniform vec4 uBGColor;\n uniform float uZoom;\n\n in vec2 vTexCoord;\n in vec4 vColor;\n in vec2 vPosition; // model coordinates\n\n flat in int vAtlasId;\n flat in vec4 vIndex;\n flat in int vVertType;\n flat in vec2 vTopRight;\n flat in vec2 vBotLeft;\n flat in vec4 vCornerRadius;\n flat in vec4 vBorderColor;\n flat in vec2 vBorderWidth;\n\n out vec4 outColor;\n\n ").concat("\n float circleSD(vec2 p, float r) {\n return distance(vec2(0), p) - r; // signed distance\n }\n","\n ").concat("\n float rectangleSD(vec2 p, vec2 b) {\n vec2 d = abs(p)-b;\n return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);\n }\n","\n ").concat("\n float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {\n cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;\n cr.x = (p.y > 0.0) ? cr.x : cr.y;\n vec2 q = abs(p) - b + cr.x;\n return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;\n }\n","\n ").concat("\n float ellipseSD(vec2 p, vec2 ab) {\n p = abs( p ); // symmetry\n\n // find root with Newton solver\n vec2 q = ab*(p-ab);\n float w = (q.x1.0) ? d : -d;\n }\n","\n\n vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha\n return vec4( \n top.rgb + (bot.rgb * (1.0 - top.a)),\n top.a + (bot.a * (1.0 - top.a)) \n );\n }\n\n vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance\n // scale to the zoom level so that borders don't look blurry when zoomed in\n // note 1.5 is an aribitrary value chosen because it looks good\n return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); \n }\n\n void main(void) {\n if(vVertType == ").concat(0,") {\n // look up the texel from the texture unit\n ").concat(r.map(function(e){return"if(vAtlasId == ".concat(e,") outColor = texture(uTexture").concat(e,", vTexCoord);")}).join("\n\telse "),"\n } \n else if(vVertType == ").concat(3,") {\n // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';\n outColor = blend(vColor, uBGColor);\n outColor.a = 1.0; // make opaque, masks out line under arrow\n }\n else if(vVertType == ").concat(4," && vBorderWidth == vec2(0.0)) { // simple rectangle with no border\n outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done\n }\n else if(vVertType == ").concat(4," || vVertType == ").concat(7," \n || vVertType == ").concat(5," || vVertType == ").concat(6,") { // use SDF\n\n float outerBorder = vBorderWidth[0];\n float innerBorder = vBorderWidth[1];\n float borderPadding = outerBorder * 2.0;\n float w = vTopRight.x - vBotLeft.x - borderPadding;\n float h = vTopRight.y - vBotLeft.y - borderPadding;\n vec2 b = vec2(w/2.0, h/2.0); // half width, half height\n vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center\n\n float d; // signed distance\n if(vVertType == ").concat(4,") {\n d = rectangleSD(p, b);\n } else if(vVertType == ").concat(7," && w == h) {\n d = circleSD(p, b.x); // faster than ellipse\n } else if(vVertType == ").concat(7,") {\n d = ellipseSD(p, b);\n } else {\n d = roundRectangleSD(p, b, vCornerRadius.wzyx);\n }\n\n // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling\n // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box\n if(d > 0.0) {\n if(d > outerBorder) {\n discard;\n } else {\n outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);\n }\n } else {\n if(d > innerBorder) {\n vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;\n vec4 innerBorderColor = blend(vBorderColor, vColor);\n outColor = distInterp(innerBorderColor, outerColor, d);\n } \n else {\n vec4 outerColor;\n if(innerBorder == 0.0 && outerBorder == 0.0) {\n outerColor = vec4(0);\n } else if(innerBorder == 0.0) {\n outerColor = vBorderColor;\n } else {\n outerColor = blend(vBorderColor, vColor);\n }\n outColor = distInterp(vColor, outerColor, d - innerBorder);\n }\n }\n }\n else {\n outColor = vColor;\n }\n\n ").concat(e.picking?"if(outColor.a == 0.0) discard;\n else outColor = vIndex;":"","\n }\n "),i=function(e,t,n){var r=qd(e,e.VERTEX_SHADER,t),a=qd(e,e.FRAGMENT_SHADER,n),i=e.createProgram();if(e.attachShader(i,r),e.attachShader(i,a),e.linkProgram(i),!e.getProgramParameter(i,e.LINK_STATUS))throw new Error("Could not initialize shaders");return i}(t,n,a);i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aTransform=t.getAttribLocation(i,"aTransform"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex=t.getAttribLocation(i,"aTex"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aColor=t.getAttribLocation(i,"aColor"),i.aCornerRadius=t.getAttribLocation(i,"aCornerRadius"),i.aBorderColor=t.getAttribLocation(i,"aBorderColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uZoom=t.getUniformLocation(i,"uZoom"),i.uTextures=[];for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:hh.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(e,t){return!!e.visible()&&(!t||!t.isVisible||t.isVisible(e))}},{key:"drawTexture",value:function(e,t,n){var r=this.atlasManager,a=this.batchManager,i=r.getRenderTypeOpts(n);if(this._isVisible(e,i)&&(!e.isEdge()||this._isValidEdge(e))){if(this.renderTarget.picking&&i.getTexPickingMode){var s=i.getTexPickingMode(e);if(s===fh)return;if(s==ph)return void this.drawPickingRectangle(e,t,n)}var u,c=o(r.getAtlasInfo(e,n));try{for(c.s();!(u=c.n()).done;){var d=u.value,h=d.atlas,f=d.tex1,p=d.tex2;a.canAddToCurrentBatch(h)||this.endBatch();for(var v=a.getAtlasIndexForBatch(h),g=0,y=[[f,!0],[p,!1]];g=this.maxInstances&&this.endBatch()}}}}catch(T){c.e(T)}finally{c.f()}}}},{key:"setTransformMatrix",value:function(e,t,n,r){var a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=0;if(n.shapeProps&&n.shapeProps.padding&&(i=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);a||(u=1-u);var c=this._getAdjustedBB(o,i,a,u);this._applyTransformMatrix(t,c,n,e)}else{var d=n.getBoundingBox(e),h=this._getAdjustedBB(d,i,!0,1);this._applyTransformMatrix(t,h,n,e)}}},{key:"_applyTransformMatrix",value:function(e,t,n,r){var a,i;ah(e);var o=n.getRotation?n.getRotation(r):0;if(0!==o){var s=n.getRotationPoint(r);ih(e,e,[s.x,s.y]),oh(e,e,o);var l=n.getRotationOffset(r);a=l.x+(t.xOffset||0),i=l.y+(t.yOffset||0)}else a=t.x1,i=t.y1;ih(e,e,[a,i]),sh(e,e,[t.w,t.h])}},{key:"_getAdjustedBB",value:function(e,t,n,r){var a=e.x1,i=e.y1,o=e.w,s=e.h;t&&(a-=t,i-=t,o+=2*t,s+=2*t);var l=0,u=o*r;return n&&r<1?o=u:!n&&r<1&&(a+=l=o-u,o=u),{x1:a,y1:i,w:o,h:s,xOffset:l,yOffset:e.yOffset}}},{key:"drawPickingRectangle",value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),a=this.instanceCount;this.vertTypeBuffer.getView(a)[0]=4,Zd(t,this.indexBuffer.getView(a)),Gd([0,0,0],1,this.colorBuffer.getView(a));var i=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(e,i,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var a=r.shapeProps,i=this._getVertTypeForShape(e,a.shape);if(void 0===i||r.isSimple&&!r.isSimple(e,this.renderTarget))this.drawTexture(e,t,n);else{var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=i,5===i||6===i){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,a.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,6===i&&(u[0]=0,u[2]=0)}Zd(t,this.indexBuffer.getView(o));var c=this.renderTarget.picking?1:e.pstyle(a.opacity).value;Gd(e.pstyle(a.color).value,c,this.colorBuffer.getView(o));var d=this.lineWidthBuffer.getView(o);if(d[0]=0,d[1]=0,a.border){var h=e.pstyle("border-width").value;if(h>0){Gd(e.pstyle("border-color").value,e.pstyle("border-opacity").value,this.borderColorBuffer.getView(o));var f=e.pstyle("border-position").value;if("inside"===f)d[0]=0,d[1]=-h;else if("outside"===f)d[0]=h,d[1]=0;else{var p=h/2;d[0]=p,d[1]=-p}}}var v=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,v,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"_getVertTypeForShape",value:function(e,t){switch(e.pstyle(t).value){case"rectangle":return 4;case"ellipse":return 7;case"roundrectangle":case"round-rectangle":return 5;case"bottom-round-rectangle":return 6;default:return}}},{key:"_getCornerRadius",value:function(e,t,n){var r=n.w,a=n.h;if("auto"===e.pstyle(t).value)return Rn(r,a);var i=e.pstyle(t).pfValue,o=r/2,s=a/2;return Math.min(i,s,o)}},{key:"drawEdgeArrow",value:function(e,t,n){if(e.visible()){var r,a,i,o=e._private.rscratch;if("source"===n?(r=o.arrowStartX,a=o.arrowStartY,i=o.srcArrowAngle):(r=o.arrowEndX,a=o.arrowEndY,i=o.tgtArrowAngle),!(isNaN(r)||null==r||isNaN(a)||null==a||isNaN(i)||null==i))if("none"!==e.pstyle(n+"-arrow-shape").value){var s=e.pstyle(n+"-arrow-color").value,l=e.pstyle("opacity").value*e.pstyle("line-opacity").value,u=e.pstyle("width").pfValue,c=e.pstyle("arrow-scale").value,d=this.r.getArrowWidth(u,c),h=this.instanceCount,f=this.transformBuffer.getMatrixView(h);ah(f),ih(f,f,[r,a]),sh(f,f,[d,d]),oh(f,f,i),this.vertTypeBuffer.getView(h)[0]=3,Zd(t,this.indexBuffer.getView(h)),Gd(s,l,this.colorBuffer.getView(h)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:"drawEdgeLine",value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle("opacity").value,a=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,o=e.pstyle("line-color").value,s=r*a;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==n.length){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=1,Zd(t,this.indexBuffer.getView(l)),Gd(o,s,this.colorBuffer.getView(l)),this.lineWidthBuffer.getView(l)[0]=i;var u=this.pointAPointBBuffer.getView(l);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var c=0;c=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(e){var t=e._private.rscratch;return!t.badLine&&null!=t.allpts&&!isNaN(t.allpts[0])}},{key:"_getEdgePoints",value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(4==n.length)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:"_getNumSegments",value:function(e){return Math.min(Math.max(15,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(e,t){if(4==e.length)return e;for(var n=Array(2*(t+1)),r=0;r<=t;r++)if(0==r)n[0]=e[0],n[1]=e[1];else if(r==t)n[2*r]=e[e.length-2],n[2*r+1]=e[e.length-1];else{var a=r/t;this._setCurvePoint(e,a,n,2*r)}return n}},{key:"_setCurvePoint",value:function(e,t,n,r){if(!(e.length<=2)){for(var a=Array(e.length-2),i=0;i0}},u=function(e){return"yes"===e.pstyle("text-events").strValue?ph:fh},c=function(e){var t=e.position(),n=t.x,r=t.y,a=e.outerWidth(),i=e.outerHeight();return{w:a,h:i,x1:n-a/2,y1:r-i/2}};n.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:c,isSimple:Hd,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),n.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:c,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),n.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:c,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),n.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:u,getKey:mh(t.getLabelKey,null),getBoundingBox:bh(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:a(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:i("label")}),n.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:u,getKey:mh(t.getSourceLabelKey,"source"),getBoundingBox:bh(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:a("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:i("source-label")}),n.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:u,getKey:mh(t.getTargetLabelKey,"target"),getBoundingBox:bh(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:a("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:i("target-label")});var d=Me(function(){console.log("garbage collect flag set"),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&d()}),function(e){var t=e.render;e.render=function(n){n=n||{};var r=e.cy;e.webgl&&(r.zoom()>hd?(!function(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}(e),t.call(e,n)):(!function(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}(e),Eh(e,n,hh.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,a){return function(e,t,n){var r,a,i,s=function(e,t,n){var r,a,i,o,s=Ud(e),u=s.pan,c=s.zoom,d=function(e,t,n,r,a){var i=r*n+t.x,o=a*n+t.y;return[i,o=Math.round(e.canvasHeight-o)]}(e,u,c,t,n),h=l(d,2),f=h[0],p=h[1],v=6;if(r=f-v/2,a=p-v/2,o=v,0===(i=v)||0===o)return[];var g=e.data.contexts[e.WEBGL];g.bindFramebuffer(g.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(g.viewport(0,0,g.canvas.width,g.canvas.height),Eh(e,null,hh.PICKING),e.pickingFrameBuffer.needsDraw=!1);var y=i*o,m=new Uint8Array(4*y);g.readPixels(r,a,i,o,g.RGBA,g.UNSIGNED_BYTE,m),g.bindFramebuffer(g.FRAMEBUFFER,null);for(var b=new Set,x=0;x=0&&b.add(w)}return b}(e,t,n),u=e.getCachedZSortedEles(),c=o(s);try{for(c.s();!(i=c.n()).done;){var d=u[i.value];if(!r&&d.isNode()&&(r=d),!a&&d.isEdge()&&(a=d),r&&a)break}}catch(h){c.e(h)}finally{c.f()}return[r,a].filter(Boolean)}(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var a=e.notify;e.notify=function(t,n){a.call(e,t,n),"viewport"===t||"bounds"===t?e.pickingFrameBuffer.needsDraw=!0:"background"===t&&e.drawing.invalidate(n,{type:"node-body"})}}(n)};var mh=function(e,t){return function(n){var r=e(n),a=yh(n,t);return a.length>1?a.map(function(e,t){return"".concat(r,"_").concat(t)}):r}},bh=function(e,t){return function(n,r){var a=e(n);if("string"==typeof r){var i=r.indexOf("_");if(i>0){var o=Number(r.substring(i+1)),s=yh(n,t),l=a.h/s.length,u=l*o,c=a.y1+u;return{x1:a.x1,w:a.w,y1:c,h:l,yOffset:u}}}return a}};function xh(e,t){var n=e.canvasWidth,r=e.canvasHeight,a=Ud(e),i=a.pan,o=a.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(i.x,i.y),t.scale(o,o)}function wh(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,"node-underlay"),r.drawNode(n,t,"node-body"),r.drawTexture(n,t,"label"),r.drawNode(n,t,"node-overlay")):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,"source"),r.drawEdgeArrow(n,t,"target"),r.drawTexture(n,t,"label"),r.drawTexture(n,t,"edge-source-label"),r.drawTexture(n,t,"edge-target-label"))}function Eh(e,t,n){var r;e.webglDebug&&(r=performance.now());var a=e.drawing,i=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&function(e,t){e.drawSelectionRectangle(t,function(t){return xh(e,t)})}(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var l=function(e){var t=e.canvasWidth,n=e.canvasHeight,r=Ud(e),a=r.pan,i=r.zoom,o=rh();ih(o,o,[a.x,a.y]),sh(o,o,[i,i]);var s=rh();!function(e,t,n){e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1}(s,t,n);var l,u,c,d,h,f,p,v,g,y,m,b,x,w,E,k,T,C,P,S,B,D=rh();return l=D,c=o,d=(u=s)[0],h=u[1],f=u[2],p=u[3],v=u[4],g=u[5],y=u[6],m=u[7],b=u[8],x=c[0],w=c[1],E=c[2],k=c[3],T=c[4],C=c[5],P=c[6],S=c[7],B=c[8],l[0]=x*d+w*p+E*y,l[1]=x*h+w*v+E*m,l[2]=x*f+w*g+E*b,l[3]=k*d+T*p+C*y,l[4]=k*h+T*v+C*m,l[5]=k*f+T*g+C*b,l[6]=P*d+S*p+B*y,l[7]=P*h+S*v+B*m,l[8]=P*f+S*g+B*b,D}(e),u=e.getCachedZSortedEles();if(i=u.length,a.startFrame(l,n),n.screen){for(var c=0;c0&&i>0){h.clearRect(0,0,a,i),h.globalCompositeOperation="source-over";var f=this.getCachedZSortedEles();if(e.full)h.translate(-n.x1*l,-n.y1*l),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(n.x1*l,n.y1*l);else{var p=t.pan(),v={x:p.x*l,y:p.y*l};l*=t.zoom(),h.translate(v.x,v.y),h.scale(l,l),this.drawElements(h,f),h.scale(1/l,1/l),h.translate(-v.x,-v.y)}e.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=e.bg,h.rect(0,0,a,i),h.fill())}return d},_h.png=function(e){return Mh(e,this.bufferCanvasImage(e),"image/png")},_h.jpg=function(e){return Mh(e,this.bufferCanvasImage(e),"image/jpeg")};var Rh={nodeShapeImpl:function(e,t,n,r,a,i,o,s){switch(e){case"ellipse":return this.drawEllipsePath(t,n,r,a,i);case"polygon":return this.drawPolygonPath(t,n,r,a,i,o);case"round-polygon":return this.drawRoundPolygonPath(t,n,r,a,i,o,s);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,n,r,a,i,s);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,n,r,a,i,o,s);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,n,r,a,i,s);case"barrel":return this.drawBarrelPath(t,n,r,a,i)}}},Ih=Lh,Nh=Lh.prototype;function Lh(e){var t=this,n=t.cy.window().document;e.webgl&&(Nh.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log("webgl rendering enabled")),t.data={canvases:new Array(Nh.CANVAS_LAYERS),contexts:new Array(Nh.CANVAS_LAYERS),canvasNeedsRedraw:new Array(Nh.CANVAS_LAYERS),bufferCanvases:new Array(Nh.BUFFER_COUNT),bufferContexts:new Array(Nh.CANVAS_LAYERS)};var r="-webkit-tap-highlight-color",a="rgba(0,0,0,0)";t.data.canvasContainer=n.createElement("div");var i=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=a,i.position="relative",i.zIndex="0",i.overflow="hidden";var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=a;var s={"-webkit-user-select":"none","-moz-user-select":"-moz-none","user-select":"none","-webkit-tap-highlight-color":"rgba(0,0,0,0)","outline-style":"none"};p&&p.userAgent.match(/msie|trident|edge/i)&&(s["-ms-touch-action"]="none",s["touch-action"]="none");for(var l=0;l{e.d(i,{diagram:()=>it});var s=e(6417),a=e(7127),n=e(2101),h=e(5691),o=e(8894),r=e(1485),l=function(){var t=(0,o.K2)(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,10,12,14,16,18,19,21,23],e=[2,6],s=[1,3],a=[1,5],n=[1,6],h=[1,7],r=[1,5,10,12,14,16,18,19,21,23,34,35,36],l=[1,25],c=[1,26],g=[1,28],u=[1,29],x=[1,30],d=[1,31],p=[1,32],f=[1,33],y=[1,34],m=[1,35],b=[1,36],A=[1,37],w=[1,43],C=[1,42],S=[1,47],k=[1,50],_=[1,10,12,14,16,18,19,21,23,34,35,36],T=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],R=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],D=[1,64],L={trace:(0,o.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:(0,o.K2)(function(t,i,e,s,a,n,h){var o=n.length-1;switch(a){case 5:s.setOrientation(n[o]);break;case 9:s.setDiagramTitle(n[o].text.trim());break;case 12:s.setLineData({text:"",type:"text"},n[o]);break;case 13:s.setLineData(n[o-1],n[o]);break;case 14:s.setBarData({text:"",type:"text"},n[o]);break;case 15:s.setBarData(n[o-1],n[o]);break;case 16:this.$=n[o].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=n[o].trim(),s.setAccDescription(this.$);break;case 19:case 27:this.$=n[o-1];break;case 20:this.$=[Number(n[o-2]),...n[o]];break;case 21:this.$=[Number(n[o])];break;case 22:s.setXAxisTitle(n[o]);break;case 23:s.setXAxisTitle(n[o-1]);break;case 24:s.setXAxisTitle({type:"text",text:""});break;case 25:s.setXAxisBand(n[o]);break;case 26:s.setXAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 28:this.$=[n[o-2],...n[o]];break;case 29:this.$=[n[o]];break;case 30:s.setYAxisTitle(n[o]);break;case 31:s.setYAxisTitle(n[o-1]);break;case 32:s.setYAxisTitle({type:"text",text:""});break;case 33:s.setYAxisRangeData(Number(n[o-2]),Number(n[o]));break;case 37:case 38:this.$={text:n[o],type:"text"};break;case 39:this.$={text:n[o],type:"markdown"};break;case 40:this.$=n[o];break;case 41:this.$=n[o-1]+""+n[o]}},"anonymous"),table:[t(i,e,{3:1,4:2,7:4,5:s,34:a,35:n,36:h}),{1:[3]},t(i,e,{4:2,7:4,3:8,5:s,34:a,35:n,36:h}),t(i,e,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:a,35:n,36:h}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},t(r,[2,34]),t(r,[2,35]),t(r,[2,36]),{1:[2,1]},t(i,e,{4:2,7:4,3:21,5:s,34:a,35:n,36:h}),{1:[2,3]},t(r,[2,5]),t(i,[2,7],{4:22,34:a,35:n,36:h}),{11:23,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:39,13:38,24:w,27:C,29:40,30:41,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:45,15:44,27:S,33:46,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:49,17:48,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{11:52,17:51,24:k,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},{20:[1,53]},{22:[1,54]},t(_,[2,18]),{1:[2,2]},t(_,[2,8]),t(_,[2,9]),t(T,[2,37],{40:55,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A}),t(T,[2,38]),t(T,[2,39]),t(R,[2,40]),t(R,[2,42]),t(R,[2,43]),t(R,[2,44]),t(R,[2,45]),t(R,[2,46]),t(R,[2,47]),t(R,[2,48]),t(R,[2,49]),t(R,[2,50]),t(R,[2,51]),t(_,[2,10]),t(_,[2,22],{30:41,29:56,24:w,27:C}),t(_,[2,24]),t(_,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,11]),t(_,[2,30],{33:60,27:S}),t(_,[2,32]),{31:[1,61]},t(_,[2,12]),{17:62,24:k},{25:63,27:D},t(_,[2,14]),{17:65,24:k},t(_,[2,16]),t(_,[2,17]),t(R,[2,41]),t(_,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(_,[2,31]),{27:[1,69]},t(_,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(_,[2,15]),t(_,[2,26]),t(_,[2,27]),{11:59,32:72,37:24,38:l,39:c,40:27,41:g,42:u,43:x,44:d,45:p,46:f,47:y,48:m,49:b,50:A},t(_,[2,33]),t(_,[2,19]),{25:73,27:D},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:(0,o.K2)(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:(0,o.K2)(function(t){var i=this,e=[0],s=[],a=[null],n=[],h=this.table,r="",l=0,c=0,g=0,u=n.slice.call(arguments,1),x=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);x.setInput(t,d.yy),d.yy.lexer=x,d.yy.parser=this,void 0===x.yylloc&&(x.yylloc={});var f=x.yylloc;n.push(f);var y=x.options&&x.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||x.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,o.K2)(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),(0,o.K2)(m,"lex");for(var b,A,w,C,S,k,_,T,R,D={};;){if(w=e[e.length-1],this.defaultActions[w]?C=this.defaultActions[w]:(null==b&&(b=m()),C=h[w]&&h[w][b]),void 0===C||!C.length||!C[0]){var L="";for(k in R=[],h[w])this.terminals_[k]&&k>2&&R.push("'"+this.terminals_[k]+"'");L=x.showPosition?"Parse error on line "+(l+1)+":\n"+x.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(L,{text:x.match,token:this.terminals_[b]||b,line:x.yylineno,loc:f,expected:R})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(C[0]){case 1:e.push(b),a.push(x.yytext),n.push(x.yylloc),e.push(C[1]),b=null,A?(b=A,A=null):(c=x.yyleng,r=x.yytext,l=x.yylineno,f=x.yylloc,g>0&&g--);break;case 2:if(_=this.productions_[C[1]][1],D.$=a[a.length-_],D._$={first_line:n[n.length-(_||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(_||1)].first_column,last_column:n[n.length-1].last_column},y&&(D._$.range=[n[n.length-(_||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(D,[r,c,l,d.yy,C[1],a,n].concat(u))))return S;_&&(e=e.slice(0,-1*_*2),a=a.slice(0,-1*_),n=n.slice(0,-1*_)),e.push(this.productions_[C[1]][0]),a.push(D.$),n.push(D._$),T=h[e[e.length-2]][e[e.length-1]],e.push(T);break;case 3:return!0}}return!0},"parse")},P=function(){return{EOF:1,parseError:(0,o.K2)(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:(0,o.K2)(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,o.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,o.K2)(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:(0,o.K2)(function(){return this._more=!0,this},"more"),reject:(0,o.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,o.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,o.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,o.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,o.K2)(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:(0,o.K2)(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:(0,o.K2)(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;ni[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,o.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,o.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,o.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,o.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,o.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,o.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,o.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,o.K2)(function(t,i,e,s){switch(e){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),34;case 4:return 34;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}}();function E(){this.yy={}}return L.lexer=P,(0,o.K2)(E,"Parser"),E.prototype=L,L.Parser=E,new E}();l.parser=l;var c=l;function g(t){return"bar"===t.type}function u(t){return"band"===t.type}function x(t){return"linear"===t.type}(0,o.K2)(g,"isBarPlot"),(0,o.K2)(u,"isBandAxisData"),(0,o.K2)(x,"isLinearAxisData");var d=class{constructor(t){this.parentGroup=t}static{(0,o.K2)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((t,i)=>Math.max(i.length,t),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const t=(0,a.W6)(s,1,n),h=t?t.width:n.length*i,o=t?t.height:i;e.width=Math.max(e.width,h),e.height=Math.max(e.height,o)}return s.remove(),e}},p=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{(0,o.K2)(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.width;this.outerPadding=Math.min(e.width/2,s);const a=e.height+2*this.axisConfig.labelPadding;this.labelTextHeight=e.height,a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=.2*t.height;this.outerPadding=Math.min(e.height/2,s);const a=e.width+2*this.axisConfig.labelPadding;a<=i&&(i-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const t=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),e=t.height+2*this.axisConfig.titlePadding;this.titleTextHeight=t.height,e<=i&&(i-=e,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${i},${this.getScaleValue(t)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(t)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i} L ${this.getScaleValue(t)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},f=class extends p{static{(0,o.K2)(this,"BandAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.categories=e,this.scale=(0,r.WH)().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=(0,r.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),o.Rm.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},y=class extends p{static{(0,o.K2)(this,"LinearAxis")}constructor(t,i,e,s,a){super(t,s,a,i),this.domain=e,this.scale=(0,r.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=(0,r.m4Y)().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function m(t,i,e,s){const a=new d(s);return u(t)?new f(i,e,t.categories,t.title,a):new y(i,e,[t.min,t.max],t.title,a)}(0,o.K2)(m,"getAxis");var b=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,o.K2)(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function A(t,i,e,s){const a=new d(s);return new b(a,t,i,e)}(0,o.K2)(A,"getChartTitleComponent");var w=class{constructor(t,i,e,s,a){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=a}static{(0,o.K2)(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);let i;return i="horizontal"===this.orientation?(0,r.n8j)().y(t=>t[0]).x(t=>t[1])(t):(0,r.n8j)().x(t=>t[0]).y(t=>t[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},C=class{constructor(t,i,e,s,a,n){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=a,this.plotIndex=n}static{(0,o.K2)(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),i=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),e=i/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-e,height:i,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(t=>({x:t[0]-e,y:t[1],width:i,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},S=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,o.K2)(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new w(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new C(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}}return t}};function k(t,i,e){return new S(t,i,e)}(0,o.K2)(k,"getPlotComponent");var _,T=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:A(t,i,e,s),plot:k(t,i,e),xAxis:m(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:m(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{(0,o.K2)(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),n=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:a,height:n});t-=h.width,i-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=h.height,i-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=h.height,this.componentStore.yAxis.setAxisPosition("left"),h=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=h.width,t-=h.width,t>0&&(a+=t,t=0),i>0&&(n+=i,i=0),this.componentStore.plot.calculateSpace({width:a,height:n}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+a]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+n}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(t=>g(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,a=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:n,height:h});t-=o.width,i-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=o.height,i-=o.height,this.componentStore.xAxis.setAxisPosition("left"),o=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=o.width,s=o.width,this.componentStore.yAxis.setAxisPosition("top"),o=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=o.height,a=e+o.height,t>0&&(n+=t,t=0),i>0&&(h+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:h}),this.componentStore.plot.setBoundingBoxXY({x:s,y:a}),this.componentStore.yAxis.setRange([s,s+n]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([a,a+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(t=>g(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},R=class{static{(0,o.K2)(this,"XYChartBuilder")}static build(t,i,e,s){return new T(t,i,e,s).getDrawableElement()}},D=0,L=M(),P=$(),E=B(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1;function $(){const t=(0,h.P$)(),i=(0,h.zj)();return(0,n.$t)(t.xyChart,i.themeVariables.xyChart)}function M(){const t=(0,h.zj)();return(0,n.$t)(h.UI.xyChart,t.xyChart)}function B(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function z(t){const i=(0,h.zj)();return(0,h.jZ)(t.trim(),i)}function W(t){_=t}function O(t){L.chartOrientation="horizontal"===t?"horizontal":"vertical"}function F(t){E.xAxis.title=z(t.text)}function X(t,i){E.xAxis={type:"linear",title:E.xAxis.title,min:t,max:i},K=!0}function N(t){E.xAxis={type:"band",title:E.xAxis.title,categories:t.map(t=>z(t.text))},K=!0}function V(t){E.yAxis.title=z(t.text)}function Y(t,i){E.yAxis={type:"linear",title:E.yAxis.title,min:t,max:i},I=!0}function H(t){const i=Math.min(...t),e=Math.max(...t),s=x(E.yAxis)?E.yAxis.min:1/0,a=x(E.yAxis)?E.yAxis.max:-1/0;E.yAxis={type:"linear",title:E.yAxis.title,min:Math.min(s,i),max:Math.max(a,e)}}function U(t){let i=[];if(0===t.length)return i;if(!K){const i=x(E.xAxis)?E.xAxis.min:1/0,e=x(E.xAxis)?E.xAxis.max:-1/0;X(Math.min(i,1),Math.max(e,t.length))}if(I||H(t),u(E.xAxis)&&(i=E.xAxis.categories.map((i,e)=>[i,t[e]])),x(E.xAxis)){const e=E.xAxis.min,s=E.xAxis.max,a=(s-e)/(t.length-1),n=[];for(let t=e;t<=s;t+=a)n.push(`${t}`);i=n.map((i,e)=>[i,t[e]])}return i}function j(t){return v[0===t?0:t%v.length]}function G(t,i){const e=U(i);E.plots.push({type:"line",strokeFill:j(D),strokeWidth:2,data:e}),D++}function Q(t,i){const e=U(i);E.plots.push({type:"bar",fill:j(D),data:e}),D++}function Z(){if(0===E.plots.length)throw Error("No Plot to render, please provide a plot with some data");return E.title=(0,h.ab)(),R.build(L,E,P,_)}function q(){return P}function J(){return L}function tt(){return E}(0,o.K2)($,"getChartDefaultThemeConfig"),(0,o.K2)(M,"getChartDefaultConfig"),(0,o.K2)(B,"getChartDefaultData"),(0,o.K2)(z,"textSanitizer"),(0,o.K2)(W,"setTmpSVGG"),(0,o.K2)(O,"setOrientation"),(0,o.K2)(F,"setXAxisTitle"),(0,o.K2)(X,"setXAxisRangeData"),(0,o.K2)(N,"setXAxisBand"),(0,o.K2)(V,"setYAxisTitle"),(0,o.K2)(Y,"setYAxisRangeData"),(0,o.K2)(H,"setYAxisRangeFromPlotData"),(0,o.K2)(U,"transformDataWithoutCategory"),(0,o.K2)(j,"getPlotColorFromPalette"),(0,o.K2)(G,"setLineData"),(0,o.K2)(Q,"setBarData"),(0,o.K2)(Z,"getDrawableElem"),(0,o.K2)(q,"getChartThemeConfig"),(0,o.K2)(J,"getChartConfig"),(0,o.K2)(tt,"getXYChartData");var it={parser:c,db:{getDrawableElem:Z,clear:(0,o.K2)(function(){(0,h.IU)(),D=0,L=M(),E={yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]},P=$(),v=P.plotColorPalette.split(",").map(t=>t.trim()),K=!1,I=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:O,setXAxisTitle:F,setXAxisRangeData:X,setXAxisBand:N,setYAxisTitle:V,setYAxisRangeData:Y,setLineData:G,setBarData:Q,setTmpSVGG:W,getChartThemeConfig:q,getChartConfig:J,getXYChartData:tt},renderer:{draw:(0,o.K2)((t,i,e,a)=>{const n=a.db,r=n.getChartThemeConfig(),l=n.getChartConfig(),c=n.getXYChartData().plots[0].data.map(t=>t[1]);function g(t){return"top"===t?"text-before-edge":"middle"}function u(t){return"left"===t?"start":"right"===t?"end":"middle"}function x(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}(0,o.K2)(g,"getDominantBaseLine"),(0,o.K2)(u,"getTextAnchor"),(0,o.K2)(x,"getTextTransformation"),o.Rm.debug("Rendering xychart chart\n"+t);const d=(0,s.D)(i),p=d.append("g").attr("class","main"),f=p.append("rect").attr("width",l.width).attr("height",l.height).attr("class","background");(0,h.a$)(d,l.height,l.width,!0),d.attr("viewBox",`0 0 ${l.width} ${l.height}`),f.attr("fill",r.backgroundColor),n.setTmpSVGG(d.append("g").attr("class","mermaid-tmp-group"));const y=n.getDrawableElem(),m={};function b(t){let i=p,e="";for(const[s]of t.entries()){let a=p;s>0&&m[e]&&(a=m[e]),e+=t[s],i=m[e],i||(i=m[e]=a.append("g").attr("class",t[s]))}return i}(0,o.K2)(b,"getGroup");for(const s of y){if(0===s.data.length)continue;const t=b(s.groupTexts);switch(s.type){case"rect":if(t.selectAll("rect").data(s.data).enter().append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),l.showDataLabel){const i=l.showDataLabelOutsideBar;if("horizontal"===l.chartOrientation){let e=function(t,i){const{data:e,label:s}=t;return i*s.length*a<=e.width-n};(0,o.K2)(e,"fitsHorizontally");const a=.7,n=10,h=s.data.map((t,i)=>({data:t,label:c[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),l=h.map(t=>{const{data:i}=t;let s=.7*i.height;for(;!e(t,s)&&s>0;)s-=1;return s}),g=Math.floor(Math.min(...l)),u=(0,o.K2)(t=>i?t.data.x+t.data.width+n:t.data.x+t.data.width-n,"determineLabelXPosition");t.selectAll("text").data(h).enter().append("text").attr("x",u).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor",i?"start":"end").attr("dominant-baseline","middle").attr("fill",r.dataLabelColor).attr("font-size",`${g}px`).text(t=>t.label)}else{let e=function(t,i,e){const{data:s,label:a}=t,n=i*a.length*.7,h=s.x+s.width/2,o=h+n/2,r=h-n/2>=s.x&&o<=s.x+s.width,l=s.y+e+i<=s.y+s.height;return r&&l};(0,o.K2)(e,"fitsInBar");const a=10,n=s.data.map((t,i)=>({data:t,label:c[i].toString()})).filter(t=>t.data.width>0&&t.data.height>0),h=n.map(t=>{const{data:i,label:s}=t;let n=i.width/(.7*s.length);for(;!e(t,n,a)&&n>0;)n-=1;return n}),l=Math.floor(Math.min(...h)),g=(0,o.K2)(t=>i?t.data.y-a:t.data.y+a,"determineLabelYPosition");t.selectAll("text").data(n).enter().append("text").attr("x",t=>t.data.x+t.data.width/2).attr("y",g).attr("text-anchor","middle").attr("dominant-baseline",i?"auto":"hanging").attr("fill",r.dataLabelColor).attr("font-size",`${l}px`).text(t=>t.label)}}break;case"text":t.selectAll("text").data(s.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>g(t.verticalPos)).attr("text-anchor",t=>u(t.horizontalPos)).attr("transform",t=>x(t)).text(t=>t.text);break;case"path":t.selectAll("path").data(s.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill?t.fill:"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/9412.2ce5e84d.js b/assets/js/9412.2ce5e84d.js deleted file mode 100644 index 32bf7cf..0000000 --- a/assets/js/9412.2ce5e84d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9412],{5871(e,t,a){function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}a.d(t,{S:()=>i}),(0,a(797).K2)(i,"populateCommonDb")},9412(e,t,a){a.d(t,{diagram:()=>C});var i=a(3590),l=a(5871),n=a(3226),r=a(7633),s=a(797),o=a(8731),c=a(451),p=r.UI.pie,d={sections:new Map,showData:!1,config:p},u=d.sections,g=d.showData,h=structuredClone(p),f=(0,s.K2)(()=>structuredClone(h),"getConfig"),m=(0,s.K2)(()=>{u=new Map,g=d.showData,(0,r.IU)()},"clear"),w=(0,s.K2)(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);u.has(e)||(u.set(e,t),s.Rm.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),S=(0,s.K2)(()=>u,"getSections"),x=(0,s.K2)(e=>{g=e},"setShowData"),D=(0,s.K2)(()=>g,"getShowData"),$={getConfig:f,clear:m,setDiagramTitle:r.ke,getDiagramTitle:r.ab,setAccTitle:r.SV,getAccTitle:r.iN,setAccDescription:r.EI,getAccDescription:r.m7,addSection:w,getSections:S,setShowData:x,getShowData:D},v=(0,s.K2)((e,t)=>{(0,l.S)(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),y={parse:(0,s.K2)(async e=>{const t=await(0,o.qg)("pie",e);s.Rm.debug(t),v(t,$)},"parse")},T=(0,s.K2)(e=>`\n .pieCircle{\n stroke: ${e.pieStrokeColor};\n stroke-width : ${e.pieStrokeWidth};\n opacity : ${e.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${e.pieOuterStrokeColor};\n stroke-width: ${e.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${e.pieTitleTextSize};\n fill: ${e.pieTitleTextColor};\n font-family: ${e.fontFamily};\n }\n .slice {\n font-family: ${e.fontFamily};\n fill: ${e.pieSectionTextColor};\n font-size:${e.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${e.pieLegendTextColor};\n font-family: ${e.fontFamily};\n font-size: ${e.pieLegendTextSize};\n }\n`,"getStyles"),b=(0,s.K2)(e=>{const t=[...e.values()].reduce((e,t)=>e+t,0),a=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1).sort((e,t)=>t.value-e.value);return(0,c.rLf)().value(e=>e.value)(a)},"createPieArcs"),C={parser:y,db:$,renderer:{draw:(0,s.K2)((e,t,a,l)=>{s.Rm.debug("rendering pie chart\n"+e);const o=l.db,p=(0,r.D7)(),d=(0,n.$t)(o.getConfig(),p.pie),u=18,g=450,h=g,f=(0,i.D)(t),m=f.append("g");m.attr("transform","translate(225,225)");const{themeVariables:w}=p;let[S]=(0,n.I5)(w.pieOuterStrokeWidth);S??=2;const x=d.textPosition,D=Math.min(h,g)/2-40,$=(0,c.JLW)().innerRadius(0).outerRadius(D),v=(0,c.JLW)().innerRadius(D*x).outerRadius(D*x);m.append("circle").attr("cx",0).attr("cy",0).attr("r",D+S/2).attr("class","pieOuterCircle");const y=o.getSections(),T=b(y),C=[w.pie1,w.pie2,w.pie3,w.pie4,w.pie5,w.pie6,w.pie7,w.pie8,w.pie9,w.pie10,w.pie11,w.pie12];let k=0;y.forEach(e=>{k+=e});const A=T.filter(e=>"0"!==(e.data.value/k*100).toFixed(0)),K=(0,c.UMr)(C);m.selectAll("mySlices").data(A).enter().append("path").attr("d",$).attr("fill",e=>K(e.data.label)).attr("class","pieCircle"),m.selectAll("mySlices").data(A).enter().append("text").text(e=>(e.data.value/k*100).toFixed(0)+"%").attr("transform",e=>"translate("+v.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),m.append("text").text(o.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const R=[...y.entries()].map(([e,t])=>({label:e,value:t})),z=m.selectAll(".legend").data(R).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*R.length/2)+")");z.append("rect").attr("width",u).attr("height",u).style("fill",e=>K(e.label)).style("stroke",e=>K(e.label)),z.append("text").attr("x",22).attr("y",14).text(e=>o.getShowData()?`${e.label} [${e.value}]`:e.label);const M=512+Math.max(...z.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0));f.attr("viewBox",`0 0 ${M} 450`),(0,r.a$)(f,g,M,d.useMaxWidth)},"draw")},styles:T}}}]); \ No newline at end of file diff --git a/assets/js/9510.2071eba3.js b/assets/js/9510.2071eba3.js deleted file mode 100644 index 0e07d92..0000000 --- a/assets/js/9510.2071eba3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9510],{9510(e,r,s){s.d(r,{diagram:()=>c});var a=s(1746),t=(s(2501),s(9625),s(1152),s(45),s(5164),s(8698),s(5894),s(3245),s(2387),s(92),s(3226),s(7633),s(797)),c={parser:a._$,get db(){return new a.NM},renderer:a.Lh,styles:a.tM,init:(0,t.K2)(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]); \ No newline at end of file diff --git a/assets/js/9620.117206fb.js b/assets/js/9620.117206fb.js deleted file mode 100644 index 32bb7fd..0000000 --- a/assets/js/9620.117206fb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9620],{9620(e,a,r){r.d(a,{diagram:()=>c});var s=r(5553),t=r(3590),n=r(7633),i=r(797),d=r(8731),o={parse:(0,i.K2)(async e=>{const a=await(0,d.qg)("info",e);i.Rm.debug(a)},"parse")},p={version:s.n.version+""},c={parser:o,db:{getVersion:(0,i.K2)(()=>p.version,"getVersion")},renderer:{draw:(0,i.K2)((e,a,r)=>{i.Rm.debug("rendering info diagram\n"+e);const s=(0,t.D)(a);(0,n.a$)(s,100,400,!0);s.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw")}}}}]); \ No newline at end of file diff --git a/assets/js/9717.bdeb521f.js b/assets/js/9717.bdeb521f.js deleted file mode 100644 index 81813e1..0000000 --- a/assets/js/9717.bdeb521f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9717],{9625(t,e,n){n.d(e,{A:()=>r});var i=n(797),s=n(451),r=(0,i.K2)((t,e)=>{let n;"sandbox"===e&&(n=(0,s.Ltv)("#i"+t));return("sandbox"===e?(0,s.Ltv)(n.nodes()[0].contentDocument.body):(0,s.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},1152(t,e,n){n.d(e,{P:()=>r});var i=n(7633),s=n(797),r=(0,s.K2)((t,e,n,r)=>{t.attr("class",n);const{width:c,height:h,x:l,y:d}=o(t,e);(0,i.a$)(t,h,c,r);const g=a(l,d,c,h,e);t.attr("viewBox",g),s.Rm.debug(`viewBox configured: ${g} with padding: ${e}`)},"setupViewPortForSVG"),o=(0,s.K2)((t,e)=>{const n=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*e,height:n.height+2*e,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),a=(0,s.K2)((t,e,n,i,s)=>`${t-s} ${e-s} ${n} ${i}`,"createViewBox")},9717(t,e,n){n.d(e,{diagram:()=>D});var i=n(9625),s=n(1152),r=n(45),o=(n(5164),n(8698),n(5894),n(3245),n(2387),n(92),n(3226),n(7633)),a=n(797);const c={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let h;const l=new Uint8Array(16);const d=[];for(let L=0;L<256;++L)d.push((L+256).toString(16).slice(1));function g(t,e=0){return(d[t[e+0]]+d[t[e+1]]+d[t[e+2]]+d[t[e+3]]+"-"+d[t[e+4]]+d[t[e+5]]+"-"+d[t[e+6]]+d[t[e+7]]+"-"+d[t[e+8]]+d[t[e+9]]+"-"+d[t[e+10]]+d[t[e+11]]+d[t[e+12]]+d[t[e+13]]+d[t[e+14]]+d[t[e+15]]).toLowerCase()}const u=function(t,e,n){if(c.randomUUID&&!e&&!t)return c.randomUUID();const i=(t=t||{}).random??t.rng?.()??function(){if(!h){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");h=crypto.getRandomValues.bind(crypto)}return h(l)}();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){if((n=n||0)<0||n+16>e.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let t=0;t<16;++t)e[n+t]=i[t];return e}return g(i)};var p=n(3219),y=n(8041),m=n(5263),f=function(){var t=(0,a.K2)(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[1,4],n=[1,13],i=[1,12],s=[1,15],r=[1,16],o=[1,20],c=[1,19],h=[6,7,8],l=[1,26],d=[1,24],g=[1,25],u=[6,7,11],p=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],b={trace:(0,a.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,a.K2)(function(t,e,n,i,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",r[a].id),i.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 16:i.getLogger().trace("Icon: ",r[a]),i.decorateNode({icon:r[a]});break;case 17:case 21:i.decorateNode({class:r[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",r[a].id),i.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 20:i.decorateNode({icon:r[a]});break;case 25:i.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:i.getType(r[a-2],r[a])};break;case 26:this.$={id:r[a],descr:r[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:i.getType(r[a-2],r[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:c},t(h,[2,3]),{1:[2,2]},t(h,[2,4]),t(h,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:c},{6:n,9:22,12:11,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:c},{6:l,7:d,10:23,11:g},t(u,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:c}),t(u,[2,18]),t(u,[2,19]),t(u,[2,20]),t(u,[2,21]),t(u,[2,23]),t(u,[2,24]),t(u,[2,26],{19:[1,30]}),{20:[1,31]},{6:l,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:r,17:17,18:18,19:o,22:c},t(p,[2,14],{7:y,11:m}),t(f,[2,8]),t(f,[2,9]),t(f,[2,10]),t(u,[2,15]),t(u,[2,16]),t(u,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:y,11:m}),t(f,[2,11]),t(f,[2,12]),{21:[1,37]},t(u,[2,25]),t(u,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,a.K2)(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:(0,a.K2)(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,c="",h=0,l=0,d=0,g=r.slice.call(arguments,1),u=Object.create(this.lexer),p={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p.yy[y]=this.yy[y]);u.setInput(t,p.yy),p.yy.lexer=u,p.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var m=u.yylloc;r.push(m);var f=u.options&&u.options.ranges;function b(){var t;return"number"!=typeof(t=i.pop()||u.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K2)(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,a.K2)(b,"lex");for(var _,E,S,N,k,D,L,x,v,I={};;){if(S=n[n.length-1],this.defaultActions[S]?N=this.defaultActions[S]:(null==_&&(_=b()),N=o[S]&&o[S][_]),void 0===N||!N.length||!N[0]){var T="";for(D in v=[],o[S])this.terminals_[D]&&D>2&&v.push("'"+this.terminals_[D]+"'");T=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(T,{text:u.match,token:this.terminals_[_]||_,line:u.yylineno,loc:m,expected:v})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+S+", token: "+_);switch(N[0]){case 1:n.push(_),s.push(u.yytext),r.push(u.yylloc),n.push(N[1]),_=null,E?(_=E,E=null):(l=u.yyleng,c=u.yytext,h=u.yylineno,m=u.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[N[1]][1],I.$=s[s.length-L],I._$={first_line:r[r.length-(L||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(L||1)].first_column,last_column:r[r.length-1].last_column},f&&(I._$.range=[r[r.length-(L||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(I,[c,l,h,p.yy,N[1],s,r].concat(g))))return k;L&&(n=n.slice(0,-1*L*2),s=s.slice(0,-1*L),r=r.slice(0,-1*L)),n.push(this.productions_[N[1]][0]),s.push(I.$),r.push(I._$),x=o[n[n.length-2]][n[n.length-1]],n.push(x);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:(0,a.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,a.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,a.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K2)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K2)(function(){return this._more=!0,this},"more"),reject:(0,a.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K2)(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:(0,a.K2)(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;re[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,a.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K2)(function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function E(){this.yy={}}return b.lexer=_,(0,a.K2)(E,"Parser"),E.prototype=b,b.Parser=E,new E}();f.parser=f;var b=f,_={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},E=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=_,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,a.K2)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level0?this.nodes[0]:null}addNode(t,e,n,i){a.Rm.info("addNode",t,e,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=t,t=0,s=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,s=!1);const r=(0,o.D7)();let c=r.mindmap?.padding??o.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}const h={id:this.count++,nodeId:(0,o.jZ)(e,r),level:t,descr:(0,o.jZ)(n,r),type:i,children:[],width:r.mindmap?.maxNodeWidth??o.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},l=this.getParent(t);if(l)l.children.push(h),this.nodes.push(h);else{if(!s)throw new Error(`There can be only one root. No parent could be found for ("${h.descr}")`);this.nodes.push(h)}}getType(t,e){switch(a.Rm.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=(0,o.D7)(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=(0,o.jZ)(t.icon,e)),t.class&&(n.class=(0,o.jZ)(t.class,e))}type2Str(t){switch(t){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[n,i]of t.children.entries()){const s=0===t.level?n:e;this.assignSections(i,s)}}flattenNodes(t,e){const n=["mindmap-node"];!0===t.isRoot?n.push("section-root","section--1"):void 0!==t.section&&n.push(`section-${t.section}`),t.class&&n.push(t.class);const i=n.join(" "),s=(0,a.K2)(t=>{switch(t){case _.CIRCLE:return"mindmapCircle";case _.RECT:return"rect";case _.ROUNDED_RECT:return"rounded";case _.CLOUD:return"cloud";case _.BANG:return"bang";case _.HEXAGON:return"hexagon";case _.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),r={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:s(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:i,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(r),t.children)for(const o of t.children)this.flattenNodes(o,e)}generateEdges(t,e){if(t.children)for(const n of t.children){let i="edge";void 0!==n.section&&(i+=` section-edge-${n.section}`);i+=` edge-depth-${t.level+1}`;const s={id:`edge_${t.id}_${n.id}`,start:t.id.toString(),end:n.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:i,depth:t.level,section:n.section};e.push(s),this.generateEdges(n,e)}}getData(){const t=this.getMindmap(),e=(0,o.D7)(),n=e;if(void 0!==(0,o.TM)().layout||(n.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:n};a.Rm.debug("getData: mindmapRoot",t,e),this.assignSections(t);const i=[],s=[];this.flattenNodes(t,i),this.generateEdges(t,s),a.Rm.debug(`getData: processed ${i.length} nodes and ${s.length} edges`);const r=new Map;for(const o of i)r.set(o.id,{shape:o.shape,width:o.width,height:o.height,padding:o.padding});return{nodes:i,edges:s,config:n,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(r),type:"mindmap",diagramId:"mindmap-"+u()}}getLogger(){return a.Rm}},S={draw:(0,a.K2)(async(t,e,n,c)=>{a.Rm.debug("Rendering mindmap diagram\n"+t);const h=c.db,l=h.getData(),d=(0,i.A)(e,l.config.securityLevel);l.type=c.type,l.layoutAlgorithm=(0,r.q7)(l.config.layout,{fallback:"cose-bilkent"}),l.diagramId=e;h.getMindmap()&&(l.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await(0,r.XX)(l,d),(0,s.P)(d,l.config.mindmap?.padding??o.UI.mindmap.padding,"mindmapDiagram",l.config.mindmap?.useMaxWidth??o.UI.mindmap.useMaxWidth))},"draw")},N=(0,a.K2)(t=>{let e="";for(let n=0;n`\n .edge {\n stroke-width: 3;\n }\n ${N(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${t.gitBranchLabel0};\n }\n .section-2 span {\n color: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),D={get db(){return new E},renderer:S,parser:b,styles:k}}}]); \ No newline at end of file diff --git a/assets/js/9808.710ea9f4.js b/assets/js/9808.710ea9f4.js new file mode 100644 index 0000000..dd4b5da --- /dev/null +++ b/assets/js/9808.710ea9f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9808],{9808:(e,n,r)=>{r.d(n,{Zp:()=>dr});var t=r(6327),o=r(5247),i=0;const u=function(e){var n=++i;return(0,o.A)(e)+n};var a=r(6569),c=r(15),d=r(5623),f=Math.ceil,s=Math.max;const v=function(e,n,r,t){for(var o=-1,i=s(f((n-e)/(r||1)),0),u=Array(i);i--;)u[t?i:++o]=e,e+=r;return u};var h=r(8045),g=/\s/;const l=function(e){for(var n=e.length;n--&&g.test(e.charAt(n)););return n};var p=/^\s+/;const A=function(e){return e?e.slice(0,l(e)+1).replace(p,""):e};var w=r(6138),b=r(941),m=/^[-+]0x[0-9a-f]+$/i,y=/^0b[01]+$/i,x=/^0o[0-7]+$/i,k=parseInt;const E=function(e){if("number"==typeof e)return e;if((0,b.A)(e))return NaN;if((0,w.A)(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=(0,w.A)(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=A(e);var r=y.test(e);return r||x.test(e)?k(e.slice(2),r?2:8):m.test(e)?NaN:+e};var O=1/0;const N=function(e){return e?(e=E(e))===O||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};const _=function(e){return function(n,r,t){return t&&"number"!=typeof t&&(0,h.A)(n,r,t)&&(r=t=void 0),n=N(n),void 0===r?(r=n,n=0):r=N(r),t=void 0===t?n0;--a)if(t=n[a].dequeue()){o=o.concat(L(e,n,r,t,!0));break}}return o}(r.graph,r.buckets,r.zeroIdx);return c.A(d.A(o,function(n){return e.outEdges(n.v,n.w)}))}function L(e,n,r,o,i){var u=i?[]:void 0;return t.A(e.inEdges(o.v),function(t){var o=e.edge(t),a=e.node(t.v);i&&u.push({v:t.v,w:t.w}),a.out-=o,C(n,r,a)}),t.A(e.outEdges(o.v),function(t){var o=e.edge(t),i=t.w,u=e.node(i);u.in-=o,C(n,r,u)}),e.removeNode(o.v),u}function C(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function S(e){var n="greedy"===e.graph().acyclicer?M(e,function(e){return function(n){return e.edge(n).weight}}(e)):function(e){var n=[],r={},o={};function i(u){Object.prototype.hasOwnProperty.call(o,u)||(o[u]=!0,r[u]=!0,t.A(e.outEdges(u),function(e){Object.prototype.hasOwnProperty.call(r,e.w)?n.push(e):i(e.w)}),delete r[u])}return t.A(e.nodes(),i),n}(e);t.A(n,function(n){var r=e.edge(n);e.removeEdge(n),r.forwardName=n.name,r.reversed=!0,e.setEdge(n.w,n.v,r,u("rev"))})}var F=r(3765),G=r(5429),V=r(7776),B=r(2392),q=r(1310),Y=r(9750);const z=function(e,n,r,t){if(!(0,w.A)(e))return e;for(var o=-1,i=(n=(0,B.A)(n,e)).length,u=i-1,a=e;null!=a&&++o2?n[2]:void 0;for(o&&(0,h.A)(n[0],n[1],o)&&(t=1);++rn};var oe=r(8539);const ie=function(e){return e&&e.length?(0,re.A)(e,oe.A,te):void 0};const ue=function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0};var ae=r(9763),ce=r(6668),de=r(8529);const fe=function(e,n){var r={};return n=(0,de.A)(n,3),(0,ce.A)(e,function(e,t,o){(0,ae.A)(r,t,n(e,t,o))}),r};var se=r(777),ve=r(6277),he=Object.prototype.hasOwnProperty;const ge=function(e,n){return null!=e&&he.call(e,n)};var le=r(3045);const pe=function(e,n){return null!=e&&(0,le.A)(e,n,ge)};var Ae=r(5380);const we=function(){return Ae.A.Date.now()};function be(e,n,r,t){var o;do{o=u(t)}while(e.hasNode(o));return r.dummy=n,e.setNode(o,r),o}function me(e){var n=new I.T({multigraph:e.isMultigraph()}).setGraph(e.graph());return t.A(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function ye(e,n){var r,t,o=e.x,i=e.y,u=n.x-o,a=n.y-i,c=e.width/2,d=e.height/2;if(!u&&!a)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*c>Math.abs(u)*d?(a<0&&(d=-d),r=d*u/a,t=d):(u<0&&(c=-c),r=c,t=c*a/u),{x:o+r,y:i+t}}function xe(e){var n=d.A(_(Ee(e)+1),function(){return[]});return t.A(e.nodes(),function(r){var t=e.node(r),o=t.rank;se.A(o)||(n[o][t.order]=r)}),n}function ke(e,n,r,t){var o={width:0,height:0};return arguments.length>=4&&(o.rank=r,o.order=t),be(e,"border",o,n)}function Ee(e){return ie(d.A(e.nodes(),function(n){var r=e.node(n).rank;if(!se.A(r))return r}))}function Oe(e,n){var r=we();try{return n()}finally{console.log(e+" time: "+(we()-r)+"ms")}}function Ne(e,n){return n()}function _e(e,n,r,t,o,i){var u={width:0,height:0,rank:i,borderType:n},a=o[n][i-1],c=be(e,"border",u,r);o[n][i]=c,e.setParent(c,t),a&&e.setEdge(a,c,{weight:1})}function Ie(e){var n=e.graph().rankdir.toLowerCase();"bt"!==n&&"rl"!==n||function(e){t.A(e.nodes(),function(n){je(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,je),Object.prototype.hasOwnProperty.call(r,"y")&&je(r)})}(e),"lr"!==n&&"rl"!==n||(!function(e){t.A(e.nodes(),function(n){Re(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);t.A(r.points,Re),Object.prototype.hasOwnProperty.call(r,"x")&&Re(r)})}(e),Pe(e))}function Pe(e){t.A(e.nodes(),function(n){Te(e.node(n))}),t.A(e.edges(),function(n){Te(e.edge(n))})}function Te(e){var n=e.width;e.width=e.height,e.height=n}function je(e){e.y=-e.y}function Re(e){var n=e.x;e.x=e.y,e.y=n}function Me(e){e.graph().dummyChains=[],t.A(e.edges(),function(n){!function(e,n){var r=n.v,t=e.node(r).rank,o=n.w,i=e.node(o).rank,u=n.name,a=e.edge(n),c=a.labelRank;if(i===t+1)return;e.removeEdge(n);var d,f,s=void 0;for(f=0,++t;t-1?o[i?n[u]:u]:void 0}};var $e=r(2956);const Je=function(e){var n=N(e),r=n%1;return n==n?r?n-r:n:0};var Ze=Math.max;const He=De(function(e,n,r){var t=null==e?0:e.length;if(!t)return-1;var o=null==r?0:Je(r);return o<0&&(o=Ze(t+o,0)),(0,$e.A)(e,(0,de.A)(n,3),o)});var Ke=r(8511);a.A(1);a.A(1);r(7700),r(6900),r(4227);var Qe=r(8384);r(9269);(0,r(7939).A)("length");RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Ue="\\ud800-\\udfff",We="["+Ue+"]",Xe="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",en="\\ud83c[\\udffb-\\udfff]",nn="[^"+Ue+"]",rn="(?:\\ud83c[\\udde6-\\uddff]){2}",tn="[\\ud800-\\udbff][\\udc00-\\udfff]",on="(?:"+Xe+"|"+en+")"+"?",un="[\\ufe0e\\ufe0f]?",an=un+on+("(?:\\u200d(?:"+[nn,rn,tn].join("|")+")"+un+on+")*"),cn="(?:"+[nn+Xe+"?",Xe,rn,tn,We].join("|")+")";RegExp(en+"(?="+en+")|"+cn+an,"g");function dn(){}function fn(e,n,r){Qe.A(n)||(n=[n]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],u={};return t.A(n,function(n){if(!e.hasNode(n))throw new Error("Graph does not have node: "+n);sn(e,n,"post"===r,u,o,i)}),i}function sn(e,n,r,o,i,u){Object.prototype.hasOwnProperty.call(o,n)||(o[n]=!0,r||u.push(n),t.A(i(n),function(n){sn(e,n,r,o,i,u)}),r&&u.push(n))}dn.prototype=new Error;r(1236);function vn(e){e=function(e){var n=(new I.T).setGraph(e.graph());return t.A(e.nodes(),function(r){n.setNode(r,e.node(r))}),t.A(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+o.weight,minlen:Math.max(t.minlen,o.minlen)})}),n}(e),Se(e);var n,r=Ge(e);for(ln(r),hn(r,e);n=An(r);)bn(r,e,n,wn(r,e,n))}function hn(e,n){var r=function(e,n){return fn(e,n,"post")}(e,e.nodes());r=r.slice(0,r.length-1),t.A(r,function(r){!function(e,n,r){var t=e.node(r),o=t.parent;e.edge(r,o).cutvalue=gn(e,n,r)}(e,n,r)})}function gn(e,n,r){var o=e.node(r).parent,i=!0,u=n.edge(r,o),a=0;return u||(i=!1,u=n.edge(o,r)),a=u.weight,t.A(n.nodeEdges(r),function(t){var u,c,d=t.v===r,f=d?t.w:t.v;if(f!==o){var s=d===i,v=n.edge(t).weight;if(a+=s?v:-v,u=r,c=f,e.hasEdge(u,c)){var h=e.edge(r,f).cutvalue;a+=s?-h:h}}}),a}function ln(e,n){arguments.length<2&&(n=e.nodes()[0]),pn(e,{},1,n)}function pn(e,n,r,o,i){var u=r,a=e.node(o);return n[o]=!0,t.A(e.neighbors(o),function(t){Object.prototype.hasOwnProperty.call(n,t)||(r=pn(e,n,r,t,o))}),a.low=u,a.lim=r++,i?a.parent=i:delete a.parent,r}function An(e){return He(e.edges(),function(n){return e.edge(n).cutvalue<0})}function wn(e,n,r){var t=r.v,o=r.w;n.hasEdge(t,o)||(t=r.w,o=r.v);var i=e.node(t),u=e.node(o),a=i,c=!1;i.lim>u.lim&&(a=u,c=!0);var d=Ke.A(n.edges(),function(n){return c===mn(e,e.node(n.v),a)&&c!==mn(e,e.node(n.w),a)});return Ce(d,function(e){return Fe(n,e)})}function bn(e,n,r,o){var i=r.v,u=r.w;e.removeEdge(i,u),e.setEdge(o.v,o.w,{}),ln(e),hn(e,n),function(e,n){var r=He(e.nodes(),function(e){return!n.node(e).parent}),o=function(e,n){return fn(e,n,"pre")}(e,r);o=o.slice(1),t.A(o,function(r){var t=e.node(r).parent,o=n.edge(r,t),i=!1;o||(o=n.edge(t,r),i=!0),n.node(r).rank=n.node(t).rank+(i?o.minlen:-o.minlen)})}(e,n)}function mn(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function yn(e){switch(e.graph().ranker){case"network-simplex":default:kn(e);break;case"tight-tree":!function(e){Se(e),Ge(e)}(e);break;case"longest-path":xn(e)}}vn.initLowLimValues=ln,vn.initCutValues=hn,vn.calcCutValue=gn,vn.leaveEdge=An,vn.enterEdge=wn,vn.exchangeEdges=bn;var xn=Se;function kn(e){vn(e)}var En=r(8642),On=r(7074);function Nn(e){var n=be(e,"root",{},"_root"),r=function(e){var n={};function r(o,i){var u=e.children(o);u&&u.length&&t.A(u,function(e){r(e,i+1)}),n[o]=i}return t.A(e.children(),function(e){r(e,1)}),n}(e),o=ie(En.A(r))-1,i=2*o+1;e.graph().nestingRoot=n,t.A(e.edges(),function(n){e.edge(n).minlen*=i});var u=function(e){return On.A(e.edges(),function(n,r){return n+e.edge(r).weight},0)}(e)+1;t.A(e.children(),function(t){_n(e,n,i,u,o,r,t)}),e.graph().nodeRankFactor=i}function _n(e,n,r,o,i,u,a){var c=e.children(a);if(c.length){var d=ke(e,"_bt"),f=ke(e,"_bb"),s=e.node(a);e.setParent(d,a),s.borderTop=d,e.setParent(f,a),s.borderBottom=f,t.A(c,function(t){_n(e,n,r,o,i,u,t);var c=e.node(t),s=c.borderTop?c.borderTop:t,v=c.borderBottom?c.borderBottom:t,h=c.borderTop?o:2*o,g=s!==v?1:i-u[a]+1;e.setEdge(d,s,{weight:h,minlen:g,nestingEdge:!0}),e.setEdge(v,f,{weight:h,minlen:g,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+u[a]})}else a!==n&&e.setEdge(n,a,{weight:0,minlen:r})}var In=r(5368);const Pn=function(e){return(0,In.A)(e,5)};function Tn(e,n,r){var o=function(e){var n;for(;e.hasNode(n=u("_root")););return n}(e),i=new I.T({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(n){return e.node(n)});return t.A(e.nodes(),function(u){var a=e.node(u),c=e.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||o),t.A(e[r](u),function(n){var r=n.v===u?n.w:n.v,t=i.edge(r,u),o=se.A(t)?0:t.weight;i.setEdge(r,u,{weight:e.edge(n).weight+o})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}const jn=function(e,n,r){for(var t=-1,o=e.length,i=n.length,u={};++tn||i&&u&&c&&!a&&!d||t&&u&&c||!r&&c||!o)return 1;if(!t&&!i&&!d&&e=a?c:c*("desc"==r[t]?-1:1)}return e.index-n.index};const Bn=function(e,n,r){n=n.length?(0,Ln.A)(n,function(e){return(0,Qe.A)(e)?function(n){return(0,G.A)(n,1===e.length?e[0]:e)}:e}):[oe.A];var t=-1;n=(0,Ln.A)(n,(0,Fn.A)(de.A));var o=(0,Cn.A)(e,function(e,r,o){return{criteria:(0,Ln.A)(n,function(n){return n(e)}),index:++t,value:e}});return Sn(o,function(e,n){return Vn(e,n,r)})};const qn=(0,Q.A)(function(e,n){if(null==e)return[];var r=n.length;return r>1&&(0,h.A)(e,n[0],n[1])?n=[]:r>2&&(0,h.A)(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,(0,Mn.A)(n,1),[])});function Yn(e,n){for(var r=0,t=1;t0;)n%2&&(r+=f[n+1]),f[n=n-1>>1]+=e.weight;s+=e.weight*r})),s}function Dn(e,n){var r={};return t.A(e,function(e,n){var t=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:n};se.A(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),t.A(n.edges(),function(e){var n=r[e.v],t=r[e.w];se.A(n)||se.A(t)||(t.indegree++,n.out.push(r[e.w]))}),function(e){var n=[];function r(e){return function(n){n.merged||(se.A(n.barycenter)||se.A(e.barycenter)||n.barycenter>=e.barycenter)&&function(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight);n.weight&&(r+=n.barycenter*n.weight,t+=n.weight);e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}(e,n)}}function o(n){return function(r){r.in.push(n),0===--r.indegree&&e.push(r)}}for(;e.length;){var i=e.pop();n.push(i),t.A(i.in.reverse(),r(i)),t.A(i.out,o(i))}return d.A(Ke.A(n,function(e){return!e.merged}),function(e){return K(e,["vs","i","barycenter","weight"])})}(Ke.A(r,function(e){return!e.indegree}))}function $n(e,n){var r,o=function(e,n){var r={lhs:[],rhs:[]};return t.A(e,function(e){n(e)?r.lhs.push(e):r.rhs.push(e)}),r}(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")}),i=o.lhs,u=qn(o.rhs,function(e){return-e.i}),a=[],d=0,f=0,s=0;i.sort((r=!!n,function(e,n){return e.barycentern.barycenter?1:r?n.i-e.i:e.i-n.i})),s=Jn(a,u,s),t.A(i,function(e){s+=e.vs.length,a.push(e.vs),d+=e.barycenter*e.weight,f+=e.weight,s=Jn(a,u,s)});var v={vs:c.A(a)};return f&&(v.barycenter=d/f,v.weight=f),v}function Jn(e,n,r){for(var t;n.length&&(t=ue(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Zn(e,n,r,o){var i=e.children(n),u=e.node(n),a=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,s={};a&&(i=Ke.A(i,function(e){return e!==a&&e!==f}));var v=function(e,n){return d.A(n,function(n){var r=e.inEdges(n);if(r.length){var t=On.A(r,function(n,r){var t=e.edge(r),o=e.node(r.v);return{sum:n.sum+t.weight*o.order,weight:n.weight+t.weight}},{sum:0,weight:0});return{v:n,barycenter:t.sum/t.weight,weight:t.weight}}return{v:n}})}(e,i);t.A(v,function(n){if(e.children(n.v).length){var t=Zn(e,n.v,r,o);s[n.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter")&&(i=n,u=t,se.A(i.barycenter)?(i.barycenter=u.barycenter,i.weight=u.weight):(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight))}var i,u});var h=Dn(v,r);!function(e,n){t.A(e,function(e){e.vs=c.A(e.vs.map(function(e){return n[e]?n[e].vs:e}))})}(h,s);var g=$n(h,o);if(a&&(g.vs=c.A([a,g.vs,f]),e.predecessors(a).length)){var l=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(f)[0]);Object.prototype.hasOwnProperty.call(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+l.order+p.order)/(g.weight+2),g.weight+=2}return g}function Hn(e){var n=Ee(e),r=Kn(e,_(1,n+1),"inEdges"),o=Kn(e,_(n-1,-1,-1),"outEdges"),i=function(e){var n={},r=Ke.A(e.nodes(),function(n){return!e.children(n).length}),o=ie(d.A(r,function(n){return e.node(n).rank})),i=d.A(_(o+1),function(){return[]}),u=qn(r,function(n){return e.node(n).rank});return t.A(u,function r(o){if(!pe(n,o)){n[o]=!0;var u=e.node(o);i[u.rank].push(o),t.A(e.successors(o),r)}}),i}(e);Un(e,i);for(var u,a=Number.POSITIVE_INFINITY,c=0,f=0;f<4;++c,++f){Qn(c%2?r:o,c%4>=2);var s=Yn(e,i=xe(e));sc||d>n[o].lim));i=o,o=t;for(;(o=e.parent(o))!==i;)a.push(o);return{path:u.concat(a.reverse()),lca:i}}(e,n,o.v,o.w),u=i.path,a=i.lca,c=0,d=u[c],f=!0;r!==o.w;){if(t=e.node(r),f){for(;(d=u[c])!==a&&e.node(d).maxRankr){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var o=e[n];Object.defineProperty(o,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function ir(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function ur(e,n,r,o,i){var u={},a=function(e,n,r,o){var i=new I.T,u=e.graph(),a=function(e,n,r){return function(t,o,i){var u,a=t.node(o),c=t.node(i),d=0;if(d+=a.width/2,Object.prototype.hasOwnProperty.call(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2}if(u&&(d+=r?u:-u),u=0,d+=(a.dummy?n:e)/2,d+=(c.dummy?n:e)/2,d+=c.width/2,Object.prototype.hasOwnProperty.call(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(d+=r?u:-u),u=0,d}}(u.nodesep,u.edgesep,o);return t.A(n,function(n){var o;t.A(n,function(n){var t=r[n];if(i.setNode(t),o){var u=r[o],c=i.edge(u,t);i.setEdge(u,t,Math.max(a(e,n,o),c||0))}o=n})}),i}(e,n,r,i),c=i?"borderLeft":"borderRight";function d(e,n){for(var r=a.nodes(),t=r.pop(),o={};t;)o[t]?e(t):(o[t]=!0,r.push(t),r=r.concat(n(t))),t=r.pop()}return d(function(e){u[e]=a.inEdges(e).reduce(function(e,n){return Math.max(e,u[n.v]+a.edge(n))},0)},a.predecessors.bind(a)),d(function(n){var r=a.outEdges(n).reduce(function(e,n){return Math.min(e,u[n.w]-a.edge(n))},Number.POSITIVE_INFINITY),t=e.node(n);r!==Number.POSITIVE_INFINITY&&t.borderType!==c&&(u[n]=Math.max(u[n],r))},a.successors.bind(a)),t.A(o,function(e){u[e]=u[r[e]]}),u}function ar(e){var n,r=xe(e),o=F.A(tr(e,r),function(e,n){var r={};function o(n,o,i,u,a){var c;t.A(_(o,i),function(o){c=n[o],e.node(c).dummy&&t.A(e.predecessors(c),function(n){var t=e.node(n);t.dummy&&(t.ordera)&&or(r,n,c)})})}return On.A(n,function(n,r){var i,u=-1,a=0;return t.A(r,function(t,c){if("border"===e.node(t).dummy){var d=e.predecessors(t);d.length&&(i=e.node(d[0]).order,o(r,a,c,u,i),a=c,u=i)}o(r,a,r.length,i,n.length)}),r}),r}(e,r)),i={};t.A(["u","d"],function(u){n="u"===u?r:En.A(r).reverse(),t.A(["l","r"],function(r){"r"===r&&(n=d.A(n,function(e){return En.A(e).reverse()}));var a=("u"===u?e.predecessors:e.successors).bind(e),c=function(e,n,r,o){var i={},u={},a={};return t.A(n,function(e){t.A(e,function(e,n){i[e]=e,u[e]=e,a[e]=n})}),t.A(n,function(e){var n=-1;t.A(e,function(e){var t=o(e);if(t.length){t=qn(t,function(e){return a[e]});for(var c=(t.length-1)/2,d=Math.floor(c),f=Math.ceil(c);d<=f;++d){var s=t[d];u[e]===e&&n{var n=r(" buildLayoutGraph",()=>function(e){var n=new I.T({multigraph:!0,compound:!0}),r=br(e.graph());return n.setGraph(F.A({},sr,wr(r,fr),K(r,vr))),t.A(e.nodes(),function(r){var t=br(e.node(r));n.setNode(r,ne(wr(t,hr),gr)),n.setParent(r,e.parent(r))}),t.A(e.edges(),function(r){var t=br(e.edge(r));n.setEdge(r,F.A({},pr,wr(t,lr),K(t,Ar)))}),n}(e));r(" runLayout",()=>function(e,n){n(" makeSpaceForEdgeLabels",()=>function(e){var n=e.graph();n.ranksep/=2,t.A(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}(e)),n(" removeSelfEdges",()=>function(e){t.A(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}(e)),n(" acyclic",()=>S(e)),n(" nestingGraph.run",()=>Nn(e)),n(" rank",()=>yn(me(e))),n(" injectEdgeLabelProxies",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),o={rank:(e.node(n.w).rank-t.rank)/2+t.rank,e:n};be(e,"edge-proxy",o,"_ep")}})}(e)),n(" removeEmptyRanks",()=>function(e){var n=ve.A(d.A(e.nodes(),function(n){return e.node(n).rank})),r=[];t.A(e.nodes(),function(t){var o=e.node(t).rank-n;r[o]||(r[o]=[]),r[o].push(t)});var o=0,i=e.graph().nodeRankFactor;t.A(r,function(n,r){se.A(n)&&r%i!==0?--o:o&&t.A(n,function(n){e.node(n).rank+=o})})}(e)),n(" nestingGraph.cleanup",()=>function(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,t.A(e.edges(),function(n){e.edge(n).nestingEdge&&e.removeEdge(n)})}(e)),n(" normalizeRanks",()=>function(e){var n=ve.A(d.A(e.nodes(),function(n){return e.node(n).rank}));t.A(e.nodes(),function(r){var t=e.node(r);pe(t,"rank")&&(t.rank-=n)})}(e)),n(" assignRankMinMax",()=>function(e){var n=0;t.A(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=ie(n,t.maxRank))}),e.graph().maxRank=n}(e)),n(" removeEdgeLabelProxies",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);"edge-proxy"===r.dummy&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}(e)),n(" normalize.run",()=>Me(e)),n(" parentDummyChains",()=>Wn(e)),n(" addBorderSegments",()=>function(e){t.A(e.children(),function n(r){var o=e.children(r),i=e.node(r);if(o.length&&t.A(o,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var u=i.minRank,a=i.maxRank+1;uHn(e)),n(" insertSelfEdges",()=>function(e){var n=xe(e);t.A(n,function(n){var r=0;t.A(n,function(n,o){var i=e.node(n);i.order=o+r,t.A(i.selfEdges,function(n){be(e,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:o+ ++r,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}(e)),n(" adjustCoordinateSystem",()=>function(e){var n=e.graph().rankdir.toLowerCase();"lr"!==n&&"rl"!==n||Pe(e)}(e)),n(" position",()=>cr(e)),n(" positionSelfEdges",()=>function(e){t.A(e.nodes(),function(n){var r=e.node(n);if("selfedge"===r.dummy){var t=e.node(r.e.v),o=t.x+t.width/2,i=t.y,u=r.x-o,a=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:o+2*u/3,y:i-a},{x:o+5*u/6,y:i-a},{x:o+u,y:i},{x:o+5*u/6,y:i+a},{x:o+2*u/3,y:i+a}],r.label.x=r.x,r.label.y=r.y}})}(e)),n(" removeBorderNodes",()=>function(e){t.A(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),o=e.node(r.borderBottom),i=e.node(ue(r.borderLeft)),u=e.node(ue(r.borderRight));r.width=Math.abs(u.x-i.x),r.height=Math.abs(o.y-t.y),r.x=i.x+r.width/2,r.y=t.y+r.height/2}}),t.A(e.nodes(),function(n){"border"===e.node(n).dummy&&e.removeNode(n)})}(e)),n(" normalize.undo",()=>function(e){t.A(e.graph().dummyChains,function(n){var r,t=e.node(n),o=t.edgeLabel;for(e.setEdge(t.edgeObj,o);t.dummy;)r=e.successors(n)[0],e.removeNode(n),o.points.push({x:t.x,y:t.y}),"edge-label"===t.dummy&&(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height),n=r,t=e.node(n)})}(e)),n(" fixupEdgeLabelCoords",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch("l"!==r.labelpos&&"r"!==r.labelpos||(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}(e)),n(" undoCoordinateSystem",()=>Ie(e)),n(" translateGraph",()=>function(e){var n=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,i=0,u=e.graph(),a=u.marginx||0,c=u.marginy||0;function d(e){var t=e.x,u=e.y,a=e.width,c=e.height;n=Math.min(n,t-a/2),r=Math.max(r,t+a/2),o=Math.min(o,u-c/2),i=Math.max(i,u+c/2)}t.A(e.nodes(),function(n){d(e.node(n))}),t.A(e.edges(),function(n){var r=e.edge(n);Object.prototype.hasOwnProperty.call(r,"x")&&d(r)}),n-=a,o-=c,t.A(e.nodes(),function(r){var t=e.node(r);t.x-=n,t.y-=o}),t.A(e.edges(),function(r){var i=e.edge(r);t.A(i.points,function(e){e.x-=n,e.y-=o}),Object.prototype.hasOwnProperty.call(i,"x")&&(i.x-=n),Object.prototype.hasOwnProperty.call(i,"y")&&(i.y-=o)}),u.width=r-n+a,u.height=i-o+c}(e)),n(" assignNodeIntersects",()=>function(e){t.A(e.edges(),function(n){var r,t,o=e.edge(n),i=e.node(n.v),u=e.node(n.w);o.points?(r=o.points[0],t=o.points[o.points.length-1]):(o.points=[],r=u,t=i),o.points.unshift(ye(i,r)),o.points.push(ye(u,t))})}(e)),n(" reversePoints",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}(e)),n(" acyclic.undo",()=>function(e){t.A(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}(e))}(n,r)),r(" updateInputGraph",()=>function(e,n){t.A(e.nodes(),function(r){var t=e.node(r),o=n.node(r);t&&(t.x=o.x,t.y=o.y,n.children(r).length&&(t.width=o.width,t.height=o.height))}),t.A(e.edges(),function(r){var t=e.edge(r),o=n.edge(r);t.points=o.points,Object.prototype.hasOwnProperty.call(o,"x")&&(t.x=o.x,t.y=o.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}(e,n))})}var fr=["nodesep","edgesep","ranksep","marginx","marginy"],sr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vr=["acyclicer","ranker","rankdir","align"],hr=["width","height"],gr={width:0,height:0},lr=["minlen","weight","width","height","labeloffset"],pr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ar=["labelpos"];function wr(e,n){return fe(K(e,n),Number)}function br(e){var n={};return t.A(e,function(e,r){n[r.toLowerCase()]=e}),n}},5357:(e,n,r)=>{r.d(n,{A:()=>o});var t=r(941);const o=function(e,n,r){for(var o=-1,i=e.length;++o{r.d(n,{A:()=>t});const t=function(e,n){return e{r.d(n,{A:()=>i});var t=r(3043),o=r(2839);const i=function(e,n){var r=-1,i=(0,o.A)(e)?Array(e.length):[];return(0,t.A)(e,function(e,t,o){i[++r]=n(e,t,o)}),i}},15:(e,n,r)=>{r.d(n,{A:()=>o});var t=r(2877);const o=function(e){return(null==e?0:e.length)?(0,t.A)(e,1):[]}},5623:(e,n,r)=>{r.d(n,{A:()=>a});var t=r(4017),o=r(8529),i=r(8367),u=r(8384);const a=function(e,n){return((0,u.A)(e)?t.A:i.A)(e,(0,o.A)(n,3))}},6277:(e,n,r)=>{r.d(n,{A:()=>u});var t=r(5357),o=r(5577),i=r(8539);const u=function(e){return e&&e.length?(0,t.A)(e,i.A,o.A):void 0}}}]); \ No newline at end of file diff --git a/assets/js/9911.44547840.js b/assets/js/9911.44547840.js new file mode 100644 index 0000000..8908540 --- /dev/null +++ b/assets/js/9911.44547840.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9911],{779:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(6063),n=s(9404);const r=(t,e)=>i.A.lang.round(n.A.parse(t)[e])},7330:(t,e,s)=>{s.d(e,{A:()=>r});var i=s(8894),n=s(1485),r=(0,i.K2)((t,e)=>{let s;"sandbox"===e&&(s=(0,n.Ltv)("#i"+t));return("sandbox"===e?(0,n.Ltv)(s.nodes()[0].contentDocument.body):(0,n.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")},3830:(t,e,s)=>{s.d(e,{P:()=>r});var i=s(5691),n=s(8894),r=(0,n.K2)((t,e,s,r)=>{t.attr("class",s);const{width:o,height:l,x:c,y:h}=a(t,e);(0,i.a$)(t,l,o,r);const d=u(c,h,o,l,e);t.attr("viewBox",d),n.Rm.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),a=(0,n.K2)((t,e)=>{const s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),u=(0,n.K2)((t,e,s,i,n)=>`${t-n} ${e-n} ${s} ${i}`,"createViewBox")},7214:(t,e,s)=>{s.d(e,{o:()=>i});var i=(0,s(8894).K2)(()=>"\n /* Font Awesome icon styling - consolidated */\n .label-icon {\n display: inline-block;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n }\n \n .node .label-icon path {\n fill: currentColor;\n stroke: revert;\n stroke-width: revert;\n }\n","getIconStyles")},8854:(t,e,s)=>{s.d(e,{CP:()=>h,Ck:()=>g,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>o,m:()=>l,tk:()=>u});var i=s(5691),n=s(8894),r=s(9627),a=s(1485),u=(0,n.K2)((t,e)=>{const s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(const i in e.attrs)s.attr(i,e.attrs[i]);return e.class&&s.attr("class",e.class),s},"drawRect"),o=(0,n.K2)((t,e)=>{const s={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"};u(t,s).lower()},"drawBackgroundRect"),l=(0,n.K2)((t,e)=>{const s=e.text.replace(i.H1," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),e.class&&n.attr("class",e.class);const r=n.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(s),n},"drawText"),c=(0,n.K2)((t,e,s,i)=>{const n=t.append("image");n.attr("x",e),n.attr("y",s);const a=(0,r.J)(i);n.attr("xlink:href",a)},"drawImage"),h=(0,n.K2)((t,e,s,i)=>{const n=t.append("use");n.attr("x",e),n.attr("y",s);const a=(0,r.J)(i);n.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),d=(0,n.K2)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,n.K2)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,n.K2)(()=>{let t=(0,a.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,a.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},9911:(t,e,s)=>{s.d(e,{diagram:()=>T});var i=s(7214),n=s(8712),r=s(8854),a=s(7330),u=s(3830),o=s(163),l=(s(1562),s(2125),s(5707)),c=(s(3276),s(4061),s(7127),s(2101)),h=s(5691),d=s(8894),p=s(1485),g=s(8685),y=s(779),A=s(9543),b=class{constructor(){this.vertexCounter=0,this.config=(0,h.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=h.SV,this.setAccDescription=h.EI,this.setDiagramTitle=h.ke,this.getAccTitle=h.iN,this.getAccDescription=h.m7,this.getDiagramTitle=h.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,d.K2)(this,"FlowDB")}sanitizeText(t){return h.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(const e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,r,a,u={},o){if(!t||0===t.trim().length)return;let c;if(void 0!==o){let t;t=o.includes("\n")?o+"\n":"{\n"+o+"\n}",c=(0,n.H)(t,{schema:n.r})}const p=this.edges.find(e=>e.id===t);if(p){const t=c;return void 0!==t?.animate&&(p.animate=t.animate),void 0!==t?.animation&&(p.animation=t.animation),void(void 0!==t?.curve&&(p.interpolate=t.curve))}let g,y=this.vertices.get(t);if(void 0===y&&(void 0===e&&void 0===s&&null!=i&&d.Rm.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),y={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,y)),this.vertexCounter++,void 0!==e?(this.config=(0,h.D7)(),g=this.sanitizeText(e.text.trim()),y.labelType=e.type,g.startsWith('"')&&g.endsWith('"')&&(g=g.substring(1,g.length-1)),y.text=g):void 0===y.text&&(y.text=t),void 0!==s&&(y.type=s),null!=i&&i.forEach(t=>{y.styles.push(t)}),null!=r&&r.forEach(t=>{y.classes.push(t)}),void 0!==a&&(y.dir=a),void 0===y.props?y.props=u:void 0!==u&&Object.assign(y.props,u),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw new Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!(0,l.aP)(c.shape))throw new Error(`No such shape: ${c.shape}.`);y.type=c?.shape}c?.label&&(y.text=c?.label,y.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(y.icon=c?.icon,c.label?.trim()||y.text!==t||(y.text="")),c?.form&&(y.form=c?.form),c?.pos&&(y.pos=c?.pos),c?.img&&(y.img=c?.img,c.label?.trim()||y.text!==t||(y.text="")),c?.constraint&&(y.constraint=c.constraint),c.w&&(y.assetWidth=Number(c.w)),c.h&&(y.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){const n={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};d.Rm.info("abc78 Got edge...",n);const r=s.text;if(void 0!==r&&(n.text=this.sanitizeText(r.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(r.type)),void 0!==s&&(n.type=s.type,n.stroke=s.stroke,n.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))n.id=i,n.isUserDefinedId=!0;else{const t=this.edges.filter(t=>t.start===n.start&&t.end===n.end);0===t.length?n.id=(0,c.rY)(n.start,n.end,{counter:0,prefix:"L"}):n.id=(0,c.rY)(n.start,n.end,{counter:t.length+1,prefix:"L"})}if(!(this.edges.length<(this.config.maxEdges??500)))throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.\n\nInitialize mermaid with maxEdges set to a higher number to allow more edges.\nYou cannot set this config via configuration inside the diagram as it is a secure config.\nYou have to call mermaid.initialize.`);d.Rm.info("Pushing edge..."),this.edges.push(n)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){const i=this.isLinkData(s)?s.id.replace("@",""):void 0;d.Rm.info("addLink",t,e,i);for(const n of t)for(const r of e){const a=n===t[t.length-1],u=r===e[0];a&&u?this.addSingleLink(n,r,s,i):this.addSingleLink(n,r,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){const s=e.join().replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/\xa7\xa7\xa7/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(const s of t.split(",")){const t=this.vertices.get(s);t&&t.classes.push(e);const i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);const n=this.subGraphLookup.get(s);n&&n.classes.push(e)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(const s of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}}setClickFun(t,e,s){if("loose"!==(0,h.D7)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{const s=this.lookUpDomId(t),n=document.querySelector(`[id="${s}"]`);null!==n&&n.addEventListener("click",()=>{c._K.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{const i=this.vertices.get(t);void 0!==i&&(i.link=c._K.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){const e=(0,r.Ck)();(0,p.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{const s=(0,p.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;const n=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.bottom+"px"),e.html(g.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0);(0,p.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,h.D7)(),(0,h.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s){let i=t.text.trim(),n=s.text;t===s&&/\s/.exec(s.text)&&(i=void 0);const r=(0,d.K2)(t=>{const e={boolean:{},number:{},string:{}},s=[];let i;return{nodeList:t.filter(function(t){const n=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(n in e?!e[n].hasOwnProperty(t)&&(e[n][t]=!0):!s.includes(t)&&s.push(t))}),dir:i}},"uniq")(e.flat()),a=r.nodeList;let u=r.dir;const o=(0,h.D7)().flowchart??{};if(u=u??(o.inheritDir?this.getDirection()??(0,h.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let c=0;c2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i=0){const s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:n+s.count};n+=s.count}i+=1}return{result:!1,count:n}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){const s=e.length;let i=0;for(let n=0;n":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let n="normal",r=s.length-1;s.startsWith("=")&&(n="thick"),s.startsWith("~")&&(n="invisible");const a=this.countChar(".",s);return a&&(n="dotted",r=a),{type:i,stroke:n,length:r}}destructLink(t,e){const s=this.destructEndLink(t);let i;if(e){if(i=this.destructStartLink(e),i.stroke!==s.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===i.type)i.type=s.type;else{if(i.type!==s.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return"double_arrow"===i.type&&(i.type="double_arrow_point"),i.length=s.length,i}return s}exists(t,e){for(const s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){const s=[];return t.nodes.forEach((i,n)=>{this.exists(e,i)||s.push(t.nodes[n])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),s=e}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,n,r){const a=s.get(t.id),u=i.get(t.id)??!1,o=this.findNode(e,t.id);if(o)o.cssStyles=t.styles,o.cssCompiledStyles=this.getCompiledStyles(t.classes),o.cssClasses=t.classes.join(" ");else{const s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:a,padding:n.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:r,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){const t=(0,h.D7)(),e=[],s=[],i=this.getSubGraphs(),n=new Map,r=new Map;for(let u=i.length-1;u>=0;u--){const t=i[u];t.nodes.length>0&&r.set(t.id,!0);for(const e of t.nodes)n.set(e,t.id)}for(let u=i.length-1;u>=0;u--){const s=i[u];e.push({id:s.id,label:s.title,labelStyle:"",labelType:s.labelType,parentId:n.get(s.id),padding:8,cssCompiledStyles:this.getCompiledStyles(s.classes),cssClasses:s.classes.join(" "),shape:"rect",dir:s.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(s=>{this.addNodeFromVertex(s,e,n,r,t,t.look||"classic")});const a=this.getEdges();return a.forEach((e,i)=>{const{arrowTypeStart:n,arrowTypeEnd:r}=this.destructEdgeType(e.type),u=[...a.defaultStyle??[]];e.style&&u.push(...e.style);const o={id:(0,c.rY)(e.start,e.end,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:e.start,end:e.end,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:"invisible"===e?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":n,arrowTypeEnd:"invisible"===e?.stroke||"arrow_open"===e?.type?"none":r,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:u,style:u,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(o)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return h.ME.flowchart}},k={getClasses:(0,d.K2)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,d.K2)(async function(t,e,s,i){d.Rm.info("REF0:"),d.Rm.info("Drawing state diagram (v2)",e);const{securityLevel:n,flowchart:r,layout:l}=(0,h.D7)();i.db.setDiagramId(e),d.Rm.debug("Before getData: ");const p=i.db.getData();d.Rm.debug("Data: ",p);const g=(0,a.A)(e,n),y=i.db.getDirection();p.type=i.type,p.layoutAlgorithm=(0,o.q7)(l),"dagre"===p.layoutAlgorithm&&"elk"===l&&d.Rm.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),p.direction=y,p.nodeSpacing=r?.nodeSpacing||50,p.rankSpacing=r?.rankSpacing||50,p.markers=["point","circle","cross"],p.diagramId=e,d.Rm.debug("REF1:",p),await(0,o.XX)(p,g);const A=p.config.flowchart?.diagramPadding??8;c._K.insertTitle(g,"flowchartTitleText",r?.titleTopMargin||0,i.db.getDiagramTitle()),(0,u.P)(g,A,"flowchart",r?.useMaxWidth||!1)},"draw")},f=function(){var t=(0,d.K2)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],i=[1,5],n=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],r=[2,2],a=[1,13],u=[1,14],o=[1,15],l=[1,16],c=[1,23],h=[1,25],p=[1,26],g=[1,27],y=[1,50],A=[1,49],b=[1,29],k=[1,30],f=[1,31],m=[1,32],x=[1,33],E=[1,45],D=[1,47],C=[1,43],T=[1,48],F=[1,44],S=[1,51],_=[1,46],v=[1,52],B=[1,53],w=[1,34],L=[1,35],$=[1,36],I=[1,37],R=[1,38],N=[1,58],K=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],P=[1,62],G=[1,61],O=[1,63],M=[8,9,11,75,77,78],V=[1,79],U=[1,92],W=[1,97],z=[1,96],j=[1,93],Y=[1,89],H=[1,95],X=[1,91],q=[1,98],Q=[1,94],J=[1,99],Z=[1,90],tt=[8,9,10,11,40,75,77,78],et=[8,9,10,11,40,46,75,77,78],st=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],it=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],nt=[44,60,89,102,105,106,109,111,114,115,116],rt=[1,122],at=[1,123],ut=[1,125],ot=[1,124],lt=[44,60,62,74,89,102,105,106,109,111,114,115,116],ct=[1,134],ht=[1,148],dt=[1,149],pt=[1,150],gt=[1,151],yt=[1,136],At=[1,138],bt=[1,142],kt=[1,143],ft=[1,144],mt=[1,145],xt=[1,146],Et=[1,147],Dt=[1,152],Ct=[1,153],Tt=[1,132],Ft=[1,133],St=[1,140],_t=[1,135],vt=[1,139],Bt=[1,137],wt=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Lt=[1,155],$t=[1,157],It=[8,9,11],Rt=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],Nt=[1,177],Kt=[1,173],Pt=[1,174],Gt=[1,178],Ot=[1,175],Mt=[1,176],Vt=[77,116,119],Ut=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Wt=[10,106],zt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],jt=[1,248],Yt=[1,246],Ht=[1,250],Xt=[1,244],qt=[1,245],Qt=[1,247],Jt=[1,249],Zt=[1,251],te=[1,269],ee=[8,9,11,106],se=[8,9,10,11,60,84,105,106,109,110,111,112],ie={trace:(0,d.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:(0,d.K2)(function(t,e,s,i,n,r,a){var u=r.length-1;switch(n){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(r[u])||r[u].length>0)&&r[u-1].push(r[u]),this.$=r[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=r[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(r[u-1]),this.$=r[u-1];break;case 27:this.$=r[u-1].nodes;break;case 33:this.$=i.addSubGraph(r[u-6],r[u-1],r[u-4]);break;case 34:this.$=i.addSubGraph(r[u-3],r[u-1],r[u-3]);break;case 35:this.$=i.addSubGraph(void 0,r[u-1],void 0);break;case 37:this.$=r[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=r[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=r[u-1]+r[u];break;case 45:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 46:i.addLink(r[u-2].stmt,r[u],r[u-1]),this.$={stmt:r[u],nodes:r[u].concat(r[u-2].nodes)};break;case 47:i.addLink(r[u-3].stmt,r[u-1],r[u-2]),this.$={stmt:r[u-1],nodes:r[u-1].concat(r[u-3].nodes)};break;case 48:this.$={stmt:r[u-1],nodes:r[u-1]};break;case 49:i.addVertex(r[u-1][r[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u]),this.$={stmt:r[u-1],nodes:r[u-1],shapeData:r[u]};break;case 50:this.$={stmt:r[u],nodes:r[u]};break;case 51:case 128:case 130:this.$=[r[u]];break;case 52:i.addVertex(r[u-5][r[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,r[u-4]),this.$=r[u-5].concat(r[u]);break;case 53:this.$=r[u-4].concat(r[u]);break;case 55:this.$=r[u-2],i.setClass(r[u-2],r[u]);break;case 56:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"square");break;case 57:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"doublecircle");break;case 58:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"circle");break;case 59:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"ellipse");break;case 60:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"stadium");break;case 61:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"subroutine");break;case 62:this.$=r[u-7],i.addVertex(r[u-7],r[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[r[u-5],r[u-3]]]));break;case 63:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"cylinder");break;case 64:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"round");break;case 65:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"diamond");break;case 66:this.$=r[u-5],i.addVertex(r[u-5],r[u-2],"hexagon");break;case 67:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"odd");break;case 68:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"trapezoid");break;case 69:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"inv_trapezoid");break;case 70:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_right");break;case 71:this.$=r[u-3],i.addVertex(r[u-3],r[u-1],"lean_left");break;case 72:this.$=r[u],i.addVertex(r[u]);break;case 73:r[u-1].text=r[u],this.$=r[u-1];break;case 74:case 75:r[u-2].text=r[u-1],this.$=r[u-2];break;case 77:var o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1]};break;case 78:o=i.destructLink(r[u],r[u-2]);this.$={type:o.type,stroke:o.stroke,length:o.length,text:r[u-1],id:r[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:r[u],type:"text"};break;case 80:case 87:case 102:this.$={text:r[u-1].text+""+r[u],type:r[u-1].type};break;case 81:case 88:this.$={text:r[u],type:"string"};break;case 82:case 89:case 104:this.$={text:r[u],type:"markdown"};break;case 83:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length};break;case 84:o=i.destructLink(r[u]);this.$={type:o.type,stroke:o.stroke,length:o.length,id:r[u-1]};break;case 85:this.$=r[u-1];break;case 105:this.$=r[u-4],i.addClass(r[u-2],r[u]);break;case 106:this.$=r[u-4],i.setClass(r[u-2],r[u]);break;case 107:case 115:this.$=r[u-1],i.setClickEvent(r[u-1],r[u]);break;case 108:case 116:this.$=r[u-3],i.setClickEvent(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 109:this.$=r[u-2],i.setClickEvent(r[u-2],r[u-1],r[u]);break;case 110:this.$=r[u-4],i.setClickEvent(r[u-4],r[u-3],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 111:this.$=r[u-2],i.setLink(r[u-2],r[u]);break;case 112:this.$=r[u-4],i.setLink(r[u-4],r[u-2]),i.setTooltip(r[u-4],r[u]);break;case 113:this.$=r[u-4],i.setLink(r[u-4],r[u-2],r[u]);break;case 114:this.$=r[u-6],i.setLink(r[u-6],r[u-4],r[u]),i.setTooltip(r[u-6],r[u-2]);break;case 117:this.$=r[u-1],i.setLink(r[u-1],r[u]);break;case 118:this.$=r[u-3],i.setLink(r[u-3],r[u-2]),i.setTooltip(r[u-3],r[u]);break;case 119:this.$=r[u-3],i.setLink(r[u-3],r[u-2],r[u]);break;case 120:this.$=r[u-5],i.setLink(r[u-5],r[u-4],r[u]),i.setTooltip(r[u-5],r[u-2]);break;case 121:this.$=r[u-4],i.addVertex(r[u-2],void 0,void 0,r[u]);break;case 122:this.$=r[u-4],i.updateLink([r[u-2]],r[u]);break;case 123:this.$=r[u-4],i.updateLink(r[u-2],r[u]);break;case 124:this.$=r[u-8],i.updateLinkInterpolate([r[u-6]],r[u-2]),i.updateLink([r[u-6]],r[u]);break;case 125:this.$=r[u-8],i.updateLinkInterpolate(r[u-6],r[u-2]),i.updateLink(r[u-6],r[u]);break;case 126:this.$=r[u-6],i.updateLinkInterpolate([r[u-4]],r[u]);break;case 127:this.$=r[u-6],i.updateLinkInterpolate(r[u-4],r[u]);break;case 129:case 131:r[u-2].push(r[u]),this.$=r[u-2];break;case 182:case 184:this.$=r[u-1]+""+r[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:i},{1:[3]},t(n,r,{5:6}),{4:7,9:e,10:s,12:i},{4:8,9:e,10:s,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,33:24,34:h,36:p,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:w,122:L,123:$,124:I,125:R},t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),{8:[1,55],9:[1,56],10:N,15:54,18:57},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:P,9:G,11:O,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:P,9:G,11:O,21:68},{8:P,9:G,11:O,21:69},{8:P,9:G,11:O,21:70},{8:P,9:G,11:O,21:71},{8:P,9:G,11:O,21:72},{8:P,9:G,10:[1,73],11:O,21:74},t(K,[2,36]),{35:[1,75]},{37:[1,76]},t(K,[2,39]),t(M,[2,50],{18:77,39:78,10:N,40:V}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:U,44:W,60:z,80:[1,87],89:j,95:[1,84],97:[1,85],101:86,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},t(K,[2,185]),t(K,[2,186]),t(K,[2,187]),t(K,[2,188]),t(K,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(et,[2,72],{113:113,29:[1,101],44:y,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:A,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:E,102:D,105:C,106:T,109:F,111:S,114:_,115:v,116:B}),t(st,[2,181]),t(st,[2,142]),t(st,[2,143]),t(st,[2,144]),t(st,[2,145]),t(st,[2,146]),t(st,[2,147]),t(st,[2,148]),t(st,[2,149]),t(st,[2,150]),t(st,[2,151]),t(st,[2,152]),t(n,[2,12]),t(n,[2,18]),t(n,[2,19]),{9:[1,114]},t(it,[2,26],{18:115,10:N}),t(K,[2,27]),{42:116,43:39,44:y,45:40,47:41,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(nt,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:rt,81:at,116:ut,119:ot},{75:[1,126],77:[1,127]},t(lt,[2,83]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:ct,12:ht,14:dt,27:pt,28:128,32:gt,44:yt,60:At,75:bt,80:[1,130],81:[1,131],83:141,84:kt,85:ft,86:mt,87:xt,88:Et,89:Dt,90:Ct,91:129,105:Tt,109:Ft,111:St,114:_t,115:vt,116:Bt},t(wt,r,{5:154}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:Lt}),t(M,[2,49],{18:156,10:N,40:$t}),t(tt,[2,44]),{44:y,47:158,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{102:[1,159],103:160,105:[1,161]},{44:y,47:162,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{44:y,47:163,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(It,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(It,[2,115],{120:168,10:[1,167],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,117],{10:[1,169]}),t(Rt,[2,183]),t(Rt,[2,170]),t(Rt,[2,171]),t(Rt,[2,172]),t(Rt,[2,173]),t(Rt,[2,174]),t(Rt,[2,175]),t(Rt,[2,176]),t(Rt,[2,177]),t(Rt,[2,178]),t(Rt,[2,179]),t(Rt,[2,180]),{44:y,47:170,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{30:171,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:179,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:181,50:[1,180],67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:182,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:183,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:184,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{109:[1,185]},{30:186,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:187,65:[1,188],67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:189,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:190,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{30:191,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(st,[2,182]),t(n,[2,20]),t(it,[2,25]),t(M,[2,46],{39:192,18:193,10:N,40:V}),t(nt,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{77:[1,197],79:198,116:ut,119:ot},t(Vt,[2,79]),t(Vt,[2,81]),t(Vt,[2,82]),t(Vt,[2,168]),t(Vt,[2,169]),{76:199,79:121,80:rt,81:at,116:ut,119:ot},t(lt,[2,84]),{8:P,9:G,10:ct,11:O,12:ht,14:dt,21:201,27:pt,29:[1,200],32:gt,44:yt,60:At,75:bt,83:141,84:kt,85:ft,86:mt,87:xt,88:Et,89:Dt,90:Ct,91:202,105:Tt,109:Ft,111:St,114:_t,115:vt,116:Bt},t(Ut,[2,101]),t(Ut,[2,103]),t(Ut,[2,104]),t(Ut,[2,157]),t(Ut,[2,158]),t(Ut,[2,159]),t(Ut,[2,160]),t(Ut,[2,161]),t(Ut,[2,162]),t(Ut,[2,163]),t(Ut,[2,164]),t(Ut,[2,165]),t(Ut,[2,166]),t(Ut,[2,167]),t(Ut,[2,90]),t(Ut,[2,91]),t(Ut,[2,92]),t(Ut,[2,93]),t(Ut,[2,94]),t(Ut,[2,95]),t(Ut,[2,96]),t(Ut,[2,97]),t(Ut,[2,98]),t(Ut,[2,99]),t(Ut,[2,100]),{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,203],33:24,34:h,36:p,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:w,122:L,123:$,124:I,125:R},{10:N,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:y,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},t(Wt,[2,128]),{10:[1,210],44:y,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{10:[1,211],44:y,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{80:[1,212]},t(It,[2,109],{10:[1,213]}),t(It,[2,111],{10:[1,214]}),{80:[1,215]},t(Rt,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:y,60:A,89:E,102:D,105:C,106:T,109:F,111:S,114:_,115:v,116:B}),{31:[1,218],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(zt,[2,86]),t(zt,[2,88]),t(zt,[2,89]),t(zt,[2,153]),t(zt,[2,154]),t(zt,[2,155]),t(zt,[2,156]),{49:[1,220],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{30:221,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{51:[1,222],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{53:[1,223],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{55:[1,224],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{57:[1,225],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{60:[1,226]},{64:[1,227],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{66:[1,228],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{30:229,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},{31:[1,230],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,231],71:[1,232],82:219,116:Gt,117:Ot,118:Mt},{67:Nt,69:[1,234],71:[1,233],82:219,116:Gt,117:Ot,118:Mt},t(M,[2,45],{18:156,10:N,40:$t}),t(M,[2,47],{44:Lt}),t(nt,[2,75]),t(nt,[2,74]),{62:[1,235],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(nt,[2,77]),t(Vt,[2,80]),{77:[1,236],79:198,116:ut,119:ot},{30:237,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(wt,r,{5:238}),t(Ut,[2,102]),t(K,[2,35]),{43:239,44:y,45:40,47:41,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{10:N,18:240},{10:jt,60:Yt,84:Ht,92:241,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:252,104:[1,253],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:254,104:[1,255],105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{105:[1,256]},{10:jt,60:Yt,84:Ht,92:257,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{44:y,47:258,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(It,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(It,[2,116]),t(It,[2,118],{10:[1,262]}),t(It,[2,119]),t(et,[2,56]),t(zt,[2,87]),t(et,[2,57]),{51:[1,263],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(et,[2,64]),t(et,[2,59]),t(et,[2,60]),t(et,[2,61]),{109:[1,264]},t(et,[2,63]),t(et,[2,65]),{66:[1,265],67:Nt,82:219,116:Gt,117:Ot,118:Mt},t(et,[2,67]),t(et,[2,68]),t(et,[2,70]),t(et,[2,69]),t(et,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(nt,[2,78]),{31:[1,266],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,267],33:24,34:h,36:p,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:w,122:L,123:$,124:I,125:R},t(tt,[2,53]),{43:268,44:y,45:40,47:41,60:A,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(It,[2,121],{106:te}),t(ee,[2,130],{108:270,10:jt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(se,[2,132]),t(se,[2,134]),t(se,[2,135]),t(se,[2,136]),t(se,[2,137]),t(se,[2,138]),t(se,[2,139]),t(se,[2,140]),t(se,[2,141]),t(It,[2,122],{106:te}),{10:[1,271]},t(It,[2,123],{106:te}),{10:[1,272]},t(Wt,[2,129]),t(It,[2,105],{106:te}),t(It,[2,106],{113:113,44:y,60:A,89:E,102:D,105:C,106:T,109:F,111:S,114:_,115:v,116:B}),t(It,[2,110]),t(It,[2,112],{10:[1,273]}),t(It,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:P,9:G,11:O,21:278},t(K,[2,34]),t(tt,[2,52]),{10:jt,60:Yt,84:Ht,105:Xt,107:279,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(se,[2,133]),{14:U,44:W,60:z,89:j,101:280,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{14:U,44:W,60:z,89:j,101:281,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{98:[1,282]},t(It,[2,120]),t(et,[2,58]),{30:283,67:Nt,80:Kt,81:Pt,82:172,116:Gt,117:Ot,118:Mt},t(et,[2,66]),t(wt,r,{5:284}),t(ee,[2,131],{108:270,10:jt,60:Yt,84:Ht,105:Xt,109:qt,110:Qt,111:Jt,112:Zt}),t(It,[2,126],{120:168,10:[1,285],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,127],{120:168,10:[1,286],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(It,[2,114]),{31:[1,287],67:Nt,82:219,116:Gt,117:Ot,118:Mt},{6:11,7:12,8:a,9:u,10:o,11:l,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,288],33:24,34:h,36:p,38:g,42:28,43:39,44:y,45:40,47:41,60:A,84:b,85:k,86:f,87:m,88:x,89:E,102:D,105:C,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:w,122:L,123:$,124:I,125:R},{10:jt,60:Yt,84:Ht,92:289,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},{10:jt,60:Yt,84:Ht,92:290,105:Xt,107:242,108:243,109:qt,110:Qt,111:Jt,112:Zt},t(et,[2,62]),t(K,[2,33]),t(It,[2,124],{106:te}),t(It,[2,125],{106:te})],defaultActions:{},parseError:(0,d.K2)(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:(0,d.K2)(function(t){var e=this,s=[0],i=[],n=[null],r=[],a=this.table,u="",o=0,l=0,c=0,h=r.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var A=p.yylloc;r.push(A);var b=p.options&&p.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||p.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,d.K2)(function(t){s.length=s.length-2*t,n.length=n.length-t,r.length=r.length-t},"popStack"),(0,d.K2)(k,"lex");for(var f,m,x,E,D,C,T,F,S,_={};;){if(x=s[s.length-1],this.defaultActions[x]?E=this.defaultActions[x]:(null==f&&(f=k()),E=a[x]&&a[x][f]),void 0===E||!E.length||!E[0]){var v="";for(C in S=[],a[x])this.terminals_[C]&&C>2&&S.push("'"+this.terminals_[C]+"'");v=p.showPosition?"Parse error on line "+(o+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(v,{text:p.match,token:this.terminals_[f]||f,line:p.yylineno,loc:A,expected:S})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+f);switch(E[0]){case 1:s.push(f),n.push(p.yytext),r.push(p.yylloc),s.push(E[1]),f=null,m?(f=m,m=null):(l=p.yyleng,u=p.yytext,o=p.yylineno,A=p.yylloc,c>0&&c--);break;case 2:if(T=this.productions_[E[1]][1],_.$=n[n.length-T],_._$={first_line:r[r.length-(T||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(T||1)].first_column,last_column:r[r.length-1].last_column},b&&(_._$.range=[r[r.length-(T||1)].range[0],r[r.length-1].range[1]]),void 0!==(D=this.performAction.apply(_,[u,l,o,g.yy,E[1],n,r].concat(h))))return D;T&&(s=s.slice(0,-1*T*2),n=n.slice(0,-1*T),r=r.slice(0,-1*T)),s.push(this.productions_[E[1]][0]),n.push(_.$),r.push(_._$),F=a[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")},ne=function(){return{EOF:1,parseError:(0,d.K2)(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:(0,d.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,d.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,d.K2)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,d.K2)(function(){return this._more=!0,this},"more"),reject:(0,d.K2)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,d.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,d.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,d.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,d.K2)(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,d.K2)(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:(0,d.K2)(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;re[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,d.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,d.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,d.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,d.K2)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,d.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,d.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,d.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,d.K2)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const s=/\n\s*/g;return e.yytext=e.yytext.replace(s,"
    "),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:return t.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:case 41:case 42:case 43:return 98;case 44:return this.popState(),13;case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 125;case 60:return 78;case 61:return 105;case 62:case 103:return 111;case 63:return 46;case 64:return 60;case 65:case 104:return 44;case 66:return 8;case 67:return 106;case 68:case 102:return 115;case 69:case 72:case 75:return this.popState(),77;case 70:return this.pushState("edgeText"),75;case 71:case 74:case 77:return 119;case 73:return this.pushState("thickEdgeText"),75;case 76:return this.pushState("dottedEdgeText"),75;case 78:return 77;case 79:return this.popState(),53;case 80:case 116:return"TEXT";case 81:return this.pushState("ellipseText"),52;case 82:return this.popState(),55;case 83:return this.pushState("text"),54;case 84:return this.popState(),57;case 85:return this.pushState("text"),56;case 86:return 58;case 87:return this.pushState("text"),67;case 88:return this.popState(),64;case 89:return this.pushState("text"),63;case 90:return this.popState(),49;case 91:return this.pushState("text"),48;case 92:return this.popState(),69;case 93:return this.popState(),71;case 94:return 117;case 95:return this.pushState("trapText"),68;case 96:return this.pushState("trapText"),70;case 97:return 118;case 98:return 67;case 99:return 90;case 100:return"SEP";case 101:return 89;case 105:return 109;case 106:return 114;case 107:return 116;case 108:return this.popState(),62;case 109:return this.pushState("text"),62;case 110:return this.popState(),51;case 111:return this.pushState("text"),50;case 112:return this.popState(),31;case 113:return this.pushState("text"),29;case 114:return this.popState(),66;case 115:return this.pushState("text"),65;case 117:return"QUOTE";case 118:return 9;case 119:return 10;case 120:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},shapeData:{rules:[8,11,12,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackargs:{rules:[17,18,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},callbackname:{rules:[14,15,16,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},href:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},click:{rules:[21,24,33,34,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dottedEdgeText:{rules:[21,24,75,77,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},thickEdgeText:{rules:[21,24,72,74,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},edgeText:{rules:[21,24,69,71,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},trapText:{rules:[21,24,78,81,83,85,89,91,92,93,94,95,96,109,111,113,115],inclusive:!1},ellipseText:{rules:[21,24,78,79,80,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},text:{rules:[21,24,78,81,82,83,84,85,88,89,90,91,95,96,108,109,110,111,112,113,114,115,116],inclusive:!1},vertex:{rules:[21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_descr:{rules:[3,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},acc_title:{rules:[1,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},md_string:{rules:[19,20,21,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},string:{rules:[21,22,23,24,78,81,83,85,89,91,95,96,109,111,113,115],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,73,75,76,78,81,83,85,86,87,89,91,95,96,97,98,99,100,101,102,103,104,105,106,107,109,111,113,115,117,118,119,120],inclusive:!0}}}}();function re(){this.yy={}}return ie.lexer=ne,(0,d.K2)(re,"Parser"),re.prototype=ie,ie.Parser=re,new re}();f.parser=f;var m=f,x=Object.assign({},m);x.parse=t=>{const e=t.replace(/}\s*\n/g,"}\n");return m.parse(e)};var E=x,D=(0,d.K2)((t,e)=>{const s=y.A,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return A.A(i,n,r,e)},"fade"),C=(0,d.K2)(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span {\n color: ${t.titleColor};\n }\n .cluster-label span p {\n background-color: transparent;\n }\n\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${t.strokeWidth??1}px;\n }\n .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .katex path {\n fill: #000;\n stroke: #000;\n stroke-width: 1px;\n }\n\n .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n\n .root .anchor path {\n fill: ${t.lineColor} !important;\n stroke-width: 0;\n stroke: ${t.lineColor};\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: ${t.strokeWidth??2}px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${D(t.edgeLabelBackground,.5)};\n // background-color:\n }\n\n .cluster rect {\n fill: ${t.clusterBkg};\n stroke: ${t.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n\n rect.text {\n fill: none;\n stroke-width: 0;\n }\n\n .icon-shape, .image-shape {\n background-color: ${t.edgeLabelBackground};\n p {\n background-color: ${t.edgeLabelBackground};\n padding: 2px;\n }\n .label rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n ${(0,i.o)()}\n`,"getStyles"),T={parser:E,get db(){return new b},renderer:k,styles:C,init:(0,d.K2)(t=>{t.flowchart||(t.flowchart={}),t.layout&&(0,h.XV)({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,h.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}}]); \ No newline at end of file diff --git a/assets/js/9985d6d5.2071e97d.js b/assets/js/9985d6d5.2071e97d.js deleted file mode 100644 index b3f40a7..0000000 --- a/assets/js/9985d6d5.2071e97d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[203],{2223(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"getting-started/deployment/railway","title":"Deploy on Railway","description":"The fastest way to get HappyView running is with Railway. This template deploys HappyView, AIP (OAuth provider), Tap (real-time data and backfill), and Postgres with a single click:","source":"@site/docs/getting-started/deployment/railway.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/railway","permalink":"/getting-started/deployment/railway","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Quickstart","permalink":"/getting-started/quickstart"},"next":{"title":"Docker","permalink":"/getting-started/deployment/docker"}}');var a=t(4848),s=t(8453);const r={},o="Deploy on Railway",l={},c=[{value:"Required configuration",id:"required-configuration",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"deploy-on-railway",children:"Deploy on Railway"})}),"\n",(0,a.jsxs)(n.p,{children:["The fastest way to get HappyView running is with Railway. This template deploys HappyView, ",(0,a.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," (OAuth provider), ",(0,a.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," (real-time data and backfill), and Postgres with a single click:"]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.a,{href:"https://railway.com/deploy/happyview?referralCode=0QOgj_",children:(0,a.jsx)(n.img,{src:"https://railway.com/button.svg",alt:"Deploy on Railway"})})}),"\n",(0,a.jsx)(n.h2,{id:"required-configuration",children:"Required configuration"}),"\n",(0,a.jsx)(n.p,{children:"After deploying the template, you'll need to configure a few things before the stack works properly:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Set your admin DID."})," In the AIP service variables, set ",(0,a.jsx)(n.code,{children:"ADMIN_DIDS"})," to your AT Protocol DID (e.g. ",(0,a.jsx)(n.code,{children:"did:plc:abc123..."}),"). You can find your DID by looking up your handle on ",(0,a.jsx)(n.a,{href:"https://internect.info/",children:"Internect"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Generate AIP signing keys."})," The ",(0,a.jsx)(n.code,{children:"OAUTH_SIGNING_KEYS"})," and ",(0,a.jsx)(n.code,{children:"ATPROTO_OAUTH_SIGNING_KEYS"})," variables require multibase-encoded P-256 private keys. See the ",(0,a.jsx)(n.a,{href:"https://github.com/graze-social/aip/blob/main/CONFIGURATION.md#signing-keys",children:"AIP Signing Keys documentation"})," for generation instructions."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Assign public domains."})," In the Railway dashboard, add a public domain to both the HappyView and AIP services. The services need publicly accessible URLs to handle OAuth callbacks and XRPC requests."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"Your instances can use custom domains or Railway's generated URLs with no additional configuration. The domains are injected automatically to the containers."})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Access your HappyView dashboard at the instance's public URL."}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>r,x:()=>o});var i=t(6540);const a={},s=i.createContext(a);function r(e){const n=i.useContext(s);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9985d6d5.3dd91ebe.js b/assets/js/9985d6d5.3dd91ebe.js new file mode 100644 index 0000000..762c870 --- /dev/null +++ b/assets/js/9985d6d5.3dd91ebe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[203],{6663:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"getting-started/deployment/railway","title":"Deploy on Railway","description":"The fastest way to get HappyView running is with Railway. This template deploys HappyView and Postgres with a single click:","source":"@site/docs/getting-started/deployment/railway.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/railway","permalink":"/getting-started/deployment/railway","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Quickstart","permalink":"/getting-started/quickstart"},"next":{"title":"Docker","permalink":"/getting-started/deployment/docker"}}');var s=t(199),a=t(2560);const r={},o="Deploy on Railway",l={},c=[{value:"Required configuration",id:"required-configuration",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"deploy-on-railway",children:"Deploy on Railway"})}),"\n",(0,s.jsx)(n.p,{children:"The fastest way to get HappyView running is with Railway. This template deploys HappyView and Postgres with a single click:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"https://railway.com/deploy/happyview?referralCode=0QOgj_",children:(0,s.jsx)(n.img,{src:"https://railway.com/button.svg",alt:"Deploy on Railway"})})}),"\n",(0,s.jsx)(n.h2,{id:"required-configuration",children:"Required configuration"}),"\n",(0,s.jsx)(n.p,{children:"After deploying the template, you'll need to configure a few things before the stack works properly:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Set your session secret."})," In the HappyView service variables, set ",(0,s.jsx)(n.code,{children:"SESSION_SECRET"})," to a random string of at least 64 characters. This is used to sign session cookies."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"openssl rand -base64 48\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Assign a public domain."})," In the Railway dashboard, add a public domain to the HappyView service. The service needs a publicly accessible URL for OAuth callbacks. Set ",(0,s.jsx)(n.code,{children:"PUBLIC_URL"})," to this domain (e.g. ",(0,s.jsx)(n.code,{children:"https://happyview-production.up.railway.app"}),")."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"Your instance can use a custom domain or Railway's generated URL with no additional configuration."})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Access your HappyView dashboard at the instance's public URL. The first user to log in is automatically bootstrapped as the super user."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," \u2014 full list of environment variables"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/getting-started/dashboard",children:"Dashboard"})," \u2014 manage lexicons, users, and plugins via the web UI"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/reference/production-deployment",children:"Production deployment"})," \u2014 hardening checklist for production instances"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var i=t(63);const s={},a=i.createContext(s);function r(e){const n=i.useContext(a);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a4086a70.2bc0519d.js b/assets/js/a4086a70.2bc0519d.js new file mode 100644 index 0000000..9eb3c62 --- /dev/null +++ b/assets/js/a4086a70.2bc0519d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7194],{9760:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","source":"@site/docs/reference/scripts/batch-save.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/batch-save","permalink":"/reference/scripts/batch-save","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"},"next":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"}}');var t=n(199),c=n(2560);const a={},i="Procedure: Batch Save",o={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"procedure-batch-save",children:"Procedure: Batch Save"})}),"\n",(0,t.jsxs)(r.p,{children:["Use ",(0,t.jsx)(r.code,{children:"Record.save_all()"})," to create multiple records in parallel."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:"function handle()\n local records = {}\n for _, item in ipairs(input.items) do\n local r = Record(collection, item)\n records[#records + 1] = r\n end\n Record.save_all(records)\n\n local uris = {}\n for _, r in ipairs(records) do\n uris[#uris + 1] = r._uri\n end\n return { uris = uris }\nend\n"})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["Iterate over ",(0,t.jsx)(r.code,{children:"input.items"})," and create a ",(0,t.jsx)(r.a,{href:"/reference/lua/record-api",children:(0,t.jsx)(r.code,{children:"Record"})})," instance for each item."]}),"\n",(0,t.jsxs)(r.li,{children:["Call ",(0,t.jsx)(r.a,{href:"/reference/lua/record-api#static-methods",children:(0,t.jsx)(r.code,{children:"Record.save_all()"})})," to save all records in parallel, rather than one at a time."]}),"\n",(0,t.jsx)(r.li,{children:"Collect the resulting AT URIs and return them."}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "items": [\n { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },\n { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }\n ]\n }\'\n'})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsxs)(r.p,{children:["Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). ",(0,t.jsx)(r.code,{children:"save_all"})," is significantly faster than calling ",(0,t.jsx)(r.code,{children:"r:save()"})," in a loop because the PDS writes happen concurrently."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>a,x:()=>i});var s=n(63);const t={},c=s.createContext(t);function a(e){const r=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a4086a70.58f7d6fe.js b/assets/js/a4086a70.58f7d6fe.js deleted file mode 100644 index 7398c9d..0000000 --- a/assets/js/a4086a70.58f7d6fe.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7194],{9297(e,r,n){n.r(r),n.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","source":"@site/docs/reference/scripts/batch-save.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/batch-save","permalink":"/reference/scripts/batch-save","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"},"next":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"}}');var t=n(4848),c=n(8453);const a={},i="Procedure: Batch Save",o={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"procedure-batch-save",children:"Procedure: Batch Save"})}),"\n",(0,t.jsxs)(r.p,{children:["Use ",(0,t.jsx)(r.code,{children:"Record.save_all()"})," to create multiple records in parallel."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:"function handle()\n local records = {}\n for _, item in ipairs(input.items) do\n local r = Record(collection, item)\n records[#records + 1] = r\n end\n Record.save_all(records)\n\n local uris = {}\n for _, r in ipairs(records) do\n uris[#uris + 1] = r._uri\n end\n return { uris = uris }\nend\n"})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["Iterate over ",(0,t.jsx)(r.code,{children:"input.items"})," and create a ",(0,t.jsx)(r.a,{href:"/guides/scripting#record-api",children:(0,t.jsx)(r.code,{children:"Record"})})," instance for each item."]}),"\n",(0,t.jsxs)(r.li,{children:["Call ",(0,t.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,t.jsx)(r.code,{children:"Record.save_all()"})})," to save all records in parallel, rather than one at a time."]}),"\n",(0,t.jsx)(r.li,{children:"Collect the resulting AT URIs and return them."}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "items": [\n { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },\n { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }\n ]\n }\'\n'})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsxs)(r.p,{children:["Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). ",(0,t.jsx)(r.code,{children:"save_all"})," is significantly faster than calling ",(0,t.jsx)(r.code,{children:"r:save()"})," in a loop because the PDS writes happen concurrently."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453(e,r,n){n.d(r,{R:()=>a,x:()=>i});var s=n(6540);const t={},c=s.createContext(t);function a(e){const r=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a42f7e02.ac92b70f.js b/assets/js/a42f7e02.ac92b70f.js new file mode 100644 index 0000000..9598caf --- /dev/null +++ b/assets/js/a42f7e02.ac92b70f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5594],{5415:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>o,frontMatter:()=>c,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"reference/admin/api-clients","title":"Admin API: API Clients","description":"API clients identify third-party applications that call HappyView\'s XRPC endpoints. Every request \u2014 authenticated or not \u2014 needs an X-Client-Key header (or client_key query param). Requests without one get 401 Unauthorized. The client key is HappyView\'s rate-limit bucket.","source":"@site/docs/reference/admin/api-clients.md","sourceDirName":"reference/admin","slug":"/reference/admin/api-clients","permalink":"/reference/admin/api-clients","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Script Variables","permalink":"/reference/admin/script-variables"},"next":{"title":"Plugins","permalink":"/reference/admin/plugins"}}');var s=i(199),r=i(2560);const c={},d="Admin API: API Clients",l={},a=[{value:"List API clients",id:"list-api-clients",level:2},{value:"Create an API client",id:"create-an-api-client",level:2},{value:"Get an API client",id:"get-an-api-client",level:2},{value:"Update an API client",id:"update-an-api-client",level:2},{value:"Delete an API client",id:"delete-an-api-client",level:2}];function h(e){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"admin-api-api-clients",children:"Admin API: API Clients"})}),"\n",(0,s.jsxs)(n.p,{children:["API clients identify third-party applications that call HappyView's XRPC endpoints. Every request \u2014 authenticated or not \u2014 needs an ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," header (or ",(0,s.jsx)(n.code,{children:"client_key"})," query param). Requests without one get ",(0,s.jsx)(n.code,{children:"401 Unauthorized"}),". The client key is HappyView's rate-limit bucket."]}),"\n",(0,s.jsxs)(n.p,{children:["A single API client represents your application, not individual users. Create one client for your app and use the same client key across all instances. Users authenticate separately via OAuth \u2014 the client key identifies ",(0,s.jsx)(n.em,{children:"your app"}),", not ",(0,s.jsx)(n.em,{children:"who is using it"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Each client has an ",(0,s.jsx)(n.code,{children:"hvc_"}),"-prefixed client key and an ",(0,s.jsx)(n.code,{children:"hvs_"}),"-prefixed client secret. The secret is only returned at creation and is sha256-hashed in the database. Server-to-server callers pass the secret as ",(0,s.jsx)(n.code,{children:"X-Client-Secret"}),". Browser callers use the ",(0,s.jsx)(n.code,{children:"Origin"})," header, which is matched against the client's ",(0,s.jsx)(n.code,{children:"client_uri"}),". Mismatches currently log warnings rather than rejecting the request, but rate limiting applies either way. See ",(0,s.jsx)(n.a,{href:"/getting-started/authentication#xrpc-api-client-identification",children:"Authentication \u2014 XRPC"})," for the client-side view, and the ",(0,s.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys guide"})," for how admin API keys differ from API clients."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"list-api-clients",children:"List API clients"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"GET /admin/api-clients\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"api-clients:view"}),". Returns clients ordered by ",(0,s.jsx)(n.code,{children:"created_at"})," descending. Secrets are never returned."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/api-clients -H "$AUTH"\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "01J9...",\n "client_key": "hvc_a1b2c3...",\n "name": "My Game Client",\n "client_id_url": "https://example.com/client-metadata.json",\n "client_uri": "https://example.com",\n "redirect_uris": ["https://example.com/callback"],\n "scopes": "atproto",\n "rate_limit_capacity": 200,\n "rate_limit_refill_rate": 5.0,\n "is_active": true,\n "created_by": "did:plc:...",\n "created_at": "2026-04-13T12:00:00Z",\n "updated_at": "2026-04-13T12:00:00Z"\n }\n]\n'})}),"\n",(0,s.jsx)(n.h2,{id:"create-an-api-client",children:"Create an API client"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"POST /admin/api-clients\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"api-clients:create"}),". Generates a ",(0,s.jsx)(n.code,{children:"client_key"})," and ",(0,s.jsx)(n.code,{children:"client_secret"}),". Store the secret \u2014 it won't be shown again."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/api-clients \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "name": "My Game Client",\n "client_id_url": "https://example.com/client-metadata.json",\n "client_uri": "https://example.com",\n "redirect_uris": ["https://example.com/callback"],\n "scopes": "atproto",\n "rate_limit_capacity": 200,\n "rate_limit_refill_rate": 5.0\n }\'\n'})}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Required"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"name"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"yes"}),(0,s.jsx)(n.td,{children:"Human-readable display name"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"client_id_url"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"yes"}),(0,s.jsx)(n.td,{children:"URL to the client's published OAuth client metadata document"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"client_uri"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"yes"}),(0,s.jsx)(n.td,{children:"The client's home/landing URL"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"redirect_uris"})}),(0,s.jsx)(n.td,{children:"string[]"}),(0,s.jsx)(n.td,{children:"yes"}),(0,s.jsx)(n.td,{children:"Allowed OAuth redirect URIs"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"scopes"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"no"}),(0,s.jsxs)(n.td,{children:["Space-separated OAuth scopes (default ",(0,s.jsx)(n.code,{children:'"atproto"'}),")"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rate_limit_capacity"})}),(0,s.jsx)(n.td,{children:"integer"}),(0,s.jsx)(n.td,{children:"no"}),(0,s.jsxs)(n.td,{children:["Per-client token bucket capacity. Falls back to ",(0,s.jsx)(n.code,{children:"DEFAULT_RATE_LIMIT_CAPACITY"})," if unset"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rate_limit_refill_rate"})}),(0,s.jsx)(n.td,{children:"number"}),(0,s.jsx)(n.td,{children:"no"}),(0,s.jsxs)(n.td,{children:["Tokens added per second. Falls back to ",(0,s.jsx)(n.code,{children:"DEFAULT_RATE_LIMIT_REFILL_RATE"})," if unset"]})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "id": "01J9...",\n "client_key": "hvc_a1b2c3...",\n "client_secret": "hvs_d4e5f6...",\n "name": "My Game Client",\n "client_id_url": "https://example.com/client-metadata.json"\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"The new client is immediately registered with the OAuth registry and rate limiter, so it can authenticate without restarting HappyView."}),"\n",(0,s.jsx)(n.h2,{id:"get-an-api-client",children:"Get an API client"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"GET /admin/api-clients/{id}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"api-clients:view"}),". Returns the same shape as the list endpoint, or ",(0,s.jsx)(n.code,{children:"404 Not Found"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"update-an-api-client",children:"Update an API client"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"PUT /admin/api-clients/{id}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"api-clients:edit"}),". All fields are optional \u2014 only provided fields are changed. Updating either rate-limit field re-registers the client with the rate limiter using the new values."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"name"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"New display name"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"client_uri"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"New home URL"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"redirect_uris"})}),(0,s.jsx)(n.td,{children:"string[]"}),(0,s.jsx)(n.td,{children:"Replace the allowed redirect URIs"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"scopes"})}),(0,s.jsx)(n.td,{children:"string"}),(0,s.jsx)(n.td,{children:"Replace the OAuth scopes"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rate_limit_capacity"})}),(0,s.jsx)(n.td,{children:"integer"}),(0,s.jsxs)(n.td,{children:["New bucket capacity. Pass ",(0,s.jsx)(n.code,{children:"null"})," to clear the override"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"rate_limit_refill_rate"})}),(0,s.jsx)(n.td,{children:"number"}),(0,s.jsxs)(n.td,{children:["New refill rate. Pass ",(0,s.jsx)(n.code,{children:"null"})," to clear the override"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"is_active"})}),(0,s.jsx)(n.td,{children:"boolean"}),(0,s.jsxs)(n.td,{children:["Disable (",(0,s.jsx)(n.code,{children:"false"}),") or re-enable (",(0,s.jsx)(n.code,{children:"true"}),") the client without deleting it"]})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,s.jsxs)(n.p,{children:["The OAuth registry is updated in place. The ",(0,s.jsx)(n.code,{children:"client_id_url"})," is immutable \u2014 to change it, delete and recreate the client."]}),"\n",(0,s.jsx)(n.h2,{id:"delete-an-api-client",children:"Delete an API client"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"DELETE /admin/api-clients/{id}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Requires ",(0,s.jsx)(n.code,{children:"api-clients:delete"}),". Removes the client from the OAuth registry, the rate limiter, and the client identity store."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Response"}),": ",(0,s.jsx)(n.code,{children:"204 No Content"})]})]})}function o(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},2560:(e,n,i)=>{i.d(n,{R:()=>c,x:()=>d});var t=i(63);const s={},r=t.createContext(s);function c(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a51dfc20.32412972.js b/assets/js/a51dfc20.32412972.js new file mode 100644 index 0000000..2a65fd7 --- /dev/null +++ b/assets/js/a51dfc20.32412972.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8897],{5027:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the atproto. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","source":"@site/docs/reference/xrpc-api.md","sourceDirName":"reference","slug":"/reference/xrpc-api","permalink":"/reference/xrpc-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Browser Client","permalink":"/sdk/oauth-client-browser"},"next":{"title":"Overview","permalink":"/reference/admin-api"}}');var i=n(199),d=n(2560);const t={},c="XRPC API",o={},l=[{value:"Auth",id:"auth",level:2},{value:"Fixed endpoints",id:"fixed-endpoints",level:2},{value:"Health check",id:"health-check",level:3},{value:"Get profile",id:"get-profile",level:3},{value:"Upload blob",id:"upload-blob",level:3},{value:"Dynamic query endpoints",id:"dynamic-query-endpoints",level:2},{value:"Single record",id:"single-record",level:3},{value:"List records",id:"list-records",level:3},{value:"Dynamic procedure endpoints",id:"dynamic-procedure-endpoints",level:2},{value:"Create a record",id:"create-a-record",level:3},{value:"Update a record",id:"update-a-record",level:3},{value:"Errors",id:"errors",level:2},{value:"Lua script errors",id:"lua-script-errors",level:3},{value:"PDS errors",id:"pds-errors",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"xrpc-api",children:"XRPC API"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://atproto.com/specs/xrpc",children:"XRPC"})," is the HTTP-based RPC protocol used by the atproto. HappyView dynamically registers XRPC endpoints based on your uploaded ",(0,i.jsx)(r.a,{href:"/guides/lexicons",children:"lexicons"}),": query lexicons become ",(0,i.jsx)(r.code,{children:"GET /xrpc/{nsid}"})," routes, procedure lexicons become ",(0,i.jsx)(r.code,{children:"POST /xrpc/{nsid}"})," routes."]}),"\n",(0,i.jsxs)(r.p,{children:["If a query or procedure lexicon has a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"})," attached, the script handles the request. Otherwise, HappyView uses built-in default behavior (described below)."]}),"\n",(0,i.jsx)(r.h2,{id:"auth",children:"Auth"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Queries"})," (",(0,i.jsx)(r.code,{children:"GET /xrpc/{method}"}),"): unauthenticated"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Procedures"})," (",(0,i.jsx)(r.code,{children:"POST /xrpc/{method}"}),"): require DPoP authentication (",(0,i.jsx)(r.code,{children:"Authorization: DPoP"})," + ",(0,i.jsx)(r.code,{children:"DPoP"})," proof header + ",(0,i.jsx)(r.code,{children:"X-Client-Key"}),")"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"getProfile"}),": requires auth"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"uploadBlob"}),": requires auth"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"fixed-endpoints",children:"Fixed endpoints"}),"\n",(0,i.jsx)(r.p,{children:"These endpoints are always available regardless of which lexicons are loaded."}),"\n",(0,i.jsx)(r.h3,{id:"health-check",children:"Health check"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /health\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:"curl http://localhost:3000/health\n"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})," with body ",(0,i.jsx)(r.code,{children:"ok"})]}),"\n",(0,i.jsx)(r.h3,{id:"get-profile",children:"Get profile"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/app.bsky.actor.getProfile\n"})}),"\n",(0,i.jsx)(r.p,{children:"Returns the authenticated user's profile, resolved from their PDS via PLC directory lookup."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "did": "did:plc:abc123",\n "handle": "user.bsky.social",\n "displayName": "User Name",\n "description": "Bio text",\n "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"\n}\n'})}),"\n",(0,i.jsx)(r.h3,{id:"upload-blob",children:"Upload blob"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/com.atproto.repo.uploadBlob\n"})}),"\n",(0,i.jsx)(r.p,{children:"Proxies a blob upload to the authenticated user's PDS. Maximum size: 50MB."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: image/png" \\\n --data-binary @image.png\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-query-endpoints",children:"Dynamic query endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Query endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "query"'}),". Without a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", they support two built-in modes depending on whether a ",(0,i.jsx)(r.code,{children:"uri"})," parameter is provided."]}),"\n",(0,i.jsx)(r.h3,{id:"single-record",children:"Single record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?uri={at-uri}\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123" \\\n -H "X-Client-Key: $CLIENT_KEY"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "record": {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "$type": "xyz.statusphere.status",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["Media blobs are automatically enriched with a ",(0,i.jsx)(r.code,{children:"url"})," field pointing to the user's PDS."]}),"\n",(0,i.jsx)(r.h3,{id:"list-records",children:"List records"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?limit=20&cursor=&did=optional\n"})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Param"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Default"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"limit"})}),(0,i.jsx)(r.td,{children:"integer"}),(0,i.jsx)(r.td,{children:"20"}),(0,i.jsx)(r.td,{children:"Max records to return (max 100)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"cursor"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"---"}),(0,i.jsx)(r.td,{children:"Opaque pagination cursor from a previous response"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"did"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"---"}),(0,i.jsx)(r.td,{children:"Filter records by DID"})]})]})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc" \\\n -H "X-Client-Key: $CLIENT_KEY"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n ],\n "cursor": "MjAyNS0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"cursor"})," field is an opaque string present only when more records exist. Pass it back as-is to fetch the next page."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-procedure-endpoints",children:"Dynamic procedure endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Procedure endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "procedure"'}),". Without a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", HappyView auto-detects create vs update based on whether the request body contains a ",(0,i.jsx)(r.code,{children:"uri"})," field."]}),"\n",(0,i.jsx)(r.h3,{id:"create-a-record",children:"Create a record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/{method}\n"})}),"\n",(0,i.jsxs)(r.p,{children:["When the body does ",(0,i.jsx)(r.strong,{children:"not"})," contain a ",(0,i.jsx)(r.code,{children:"uri"})," field, a new record is created."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude0a", "createdAt": "2025-01-01T12:00:00Z" }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.createRecord"}),", then indexes the created record locally."]}),"\n",(0,i.jsx)(r.h3,{id:"update-a-record",children:"Update a record"}),"\n",(0,i.jsxs)(r.p,{children:["When the body ",(0,i.jsx)(r.strong,{children:"contains"})," a ",(0,i.jsx)(r.code,{children:"uri"})," field, the existing record is updated."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T13:00:00Z"\n }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.putRecord"}),", then upserts the record locally."]}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"})," for both: proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"errors",children:"Errors"}),"\n",(0,i.jsxs)(r.p,{children:["All error responses return JSON with an ",(0,i.jsx)(r.code,{children:"error"})," field:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Status"}),(0,i.jsx)(r.th,{children:"Meaning"}),(0,i.jsx)(r.th,{children:"Common causes"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"400 Bad Request"})}),(0,i.jsx)(r.td,{children:"Invalid input"}),(0,i.jsx)(r.td,{children:"Missing required fields, malformed JSON, invalid AT URI"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"401 Unauthorized"})}),(0,i.jsx)(r.td,{children:"Authentication failed"}),(0,i.jsx)(r.td,{children:"Missing or invalid client identification or DPoP authentication"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"404 Not Found"})}),(0,i.jsx)(r.td,{children:"Method or record not found"}),(0,i.jsx)(r.td,{children:"XRPC method has no matching lexicon, or the requested record doesn't exist"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"500 Internal Server Error"})}),(0,i.jsx)(r.td,{children:"Server-side failure"}),(0,i.jsx)(r.td,{children:"Lua script error, database error, or upstream PDS failure"})]})]})]}),"\n",(0,i.jsx)(r.h3,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(r.p,{children:["When a Lua script fails, the response is ",(0,i.jsx)(r.code,{children:"500"})," with one of:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": syntax error, runtime error, or missing ",(0,i.jsx)(r.code,{children:"handle()"})," function"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["The full error details are logged server-side but not exposed to the client. See ",(0,i.jsx)(r.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for how to diagnose script issues."]}),"\n",(0,i.jsx)(r.h3,{id:"pds-errors",children:"PDS errors"}),"\n",(0,i.jsx)(r.p,{children:"When a procedure proxies a write to the user's PDS and the PDS returns an error, HappyView forwards the PDS response status code and body directly to the client."}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Override the default query and procedure behavior with custom logic"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how lexicons generate these endpoints"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/admin-api",children:"Admin API"}),": Manage lexicons and monitor your instance"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>t,x:()=>c});var s=n(63);const i={},d=s.createContext(i);function t(e){const r=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a51dfc20.c793654e.js b/assets/js/a51dfc20.c793654e.js deleted file mode 100644 index 343ac07..0000000 --- a/assets/js/a51dfc20.c793654e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8897],{4783(e,r,s){s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","source":"@site/docs/reference/xrpc-api.md","sourceDirName":"reference","slug":"/reference/xrpc-api","permalink":"/reference/xrpc-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Event Logs","permalink":"/guides/event-logs"},"next":{"title":"Admin API","permalink":"/reference/admin-api"}}');var d=s(4848),i=s(8453);const t={},c="XRPC API",o={},l=[{value:"Auth",id:"auth",level:2},{value:"Fixed endpoints",id:"fixed-endpoints",level:2},{value:"Health check",id:"health-check",level:3},{value:"Get profile",id:"get-profile",level:3},{value:"Upload blob",id:"upload-blob",level:3},{value:"Dynamic query endpoints",id:"dynamic-query-endpoints",level:2},{value:"Single record",id:"single-record",level:3},{value:"List records",id:"list-records",level:3},{value:"Dynamic procedure endpoints",id:"dynamic-procedure-endpoints",level:2},{value:"Create a record",id:"create-a-record",level:3},{value:"Update a record",id:"update-a-record",level:3},{value:"Errors",id:"errors",level:2},{value:"Lua script errors",id:"lua-script-errors",level:3},{value:"PDS errors",id:"pds-errors",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r.header,{children:(0,d.jsx)(r.h1,{id:"xrpc-api",children:"XRPC API"})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.a,{href:"https://atproto.com/specs/xrpc",children:"XRPC"})," is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded ",(0,d.jsx)(r.a,{href:"/guides/lexicons",children:"lexicons"}),": query lexicons become ",(0,d.jsx)(r.code,{children:"GET /xrpc/{nsid}"})," routes, procedure lexicons become ",(0,d.jsx)(r.code,{children:"POST /xrpc/{nsid}"})," routes."]}),"\n",(0,d.jsxs)(r.p,{children:["If a query or procedure lexicon has a ",(0,d.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"})," attached, the script handles the request. Otherwise, HappyView uses built-in default behavior (described below)."]}),"\n",(0,d.jsx)(r.h2,{id:"auth",children:"Auth"}),"\n",(0,d.jsxs)(r.ul,{children:["\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.strong,{children:"Queries"})," (",(0,d.jsx)(r.code,{children:"GET /xrpc/{method}"}),"): unauthenticated"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.strong,{children:"Procedures"})," (",(0,d.jsx)(r.code,{children:"POST /xrpc/{method}"}),"): require an AIP-issued ",(0,d.jsx)(r.code,{children:"Authorization: Bearer "})," header"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.strong,{children:"getProfile"}),": requires auth"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.strong,{children:"uploadBlob"}),": requires auth"]}),"\n"]}),"\n",(0,d.jsx)(r.h2,{id:"fixed-endpoints",children:"Fixed endpoints"}),"\n",(0,d.jsx)(r.p,{children:"These endpoints are always available regardless of which lexicons are loaded."}),"\n",(0,d.jsx)(r.h3,{id:"health-check",children:"Health check"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"GET /health\n"})}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:"curl http://localhost:3000/health\n"})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"}),": ",(0,d.jsx)(r.code,{children:"200 OK"})," with body ",(0,d.jsx)(r.code,{children:"ok"})]}),"\n",(0,d.jsx)(r.h3,{id:"get-profile",children:"Get profile"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"GET /xrpc/app.bsky.actor.getProfile\n"})}),"\n",(0,d.jsx)(r.p,{children:"Returns the authenticated user's profile, resolved from their PDS via PLC directory lookup."}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"}),": ",(0,d.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-json",children:'{\n "did": "did:plc:abc123",\n "handle": "user.bsky.social",\n "displayName": "User Name",\n "description": "Bio text",\n "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"\n}\n'})}),"\n",(0,d.jsx)(r.h3,{id:"upload-blob",children:"Upload blob"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"POST /xrpc/com.atproto.repo.uploadBlob\n"})}),"\n",(0,d.jsx)(r.p,{children:"Proxies a blob upload to the authenticated user's PDS. Maximum size: 50MB."}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: image/png" \\\n --data-binary @image.png\n'})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"}),": proxied from the user's PDS."]}),"\n",(0,d.jsx)(r.h2,{id:"dynamic-query-endpoints",children:"Dynamic query endpoints"}),"\n",(0,d.jsxs)(r.p,{children:["Query endpoints are generated from lexicons with ",(0,d.jsx)(r.code,{children:'type: "query"'}),". Without a ",(0,d.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", they support two built-in modes depending on whether a ",(0,d.jsx)(r.code,{children:"uri"})," parameter is provided."]}),"\n",(0,d.jsx)(r.h3,{id:"single-record",children:"Single record"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"GET /xrpc/{method}?uri={at-uri}\n"})}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123"\n'})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"}),": ",(0,d.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-json",children:'{\n "record": {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "$type": "xyz.statusphere.status",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n}\n'})}),"\n",(0,d.jsxs)(r.p,{children:["Media blobs are automatically enriched with a ",(0,d.jsx)(r.code,{children:"url"})," field pointing to the user's PDS."]}),"\n",(0,d.jsx)(r.h3,{id:"list-records",children:"List records"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"GET /xrpc/{method}?limit=20&cursor=0&did=optional\n"})}),"\n",(0,d.jsxs)(r.table,{children:[(0,d.jsx)(r.thead,{children:(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.th,{children:"Param"}),(0,d.jsx)(r.th,{children:"Type"}),(0,d.jsx)(r.th,{children:"Default"}),(0,d.jsx)(r.th,{children:"Description"})]})}),(0,d.jsxs)(r.tbody,{children:[(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"limit"})}),(0,d.jsx)(r.td,{children:"integer"}),(0,d.jsx)(r.td,{children:"20"}),(0,d.jsx)(r.td,{children:"Max records to return (max 100)"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"cursor"})}),(0,d.jsx)(r.td,{children:"string"}),(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"0"})}),(0,d.jsx)(r.td,{children:"Pagination cursor (opaque, pass from previous response)"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"did"})}),(0,d.jsx)(r.td,{children:"string"}),(0,d.jsx)(r.td,{children:"---"}),(0,d.jsx)(r.td,{children:"Filter records by DID"})]})]})]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc"\n'})}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"}),": ",(0,d.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,d.jsxs)(r.p,{children:["The ",(0,d.jsx)(r.code,{children:"cursor"})," field is present only when more records exist."]}),"\n",(0,d.jsx)(r.h2,{id:"dynamic-procedure-endpoints",children:"Dynamic procedure endpoints"}),"\n",(0,d.jsxs)(r.p,{children:["Procedure endpoints are generated from lexicons with ",(0,d.jsx)(r.code,{children:'type: "procedure"'}),". Without a ",(0,d.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", HappyView auto-detects create vs update based on whether the request body contains a ",(0,d.jsx)(r.code,{children:"uri"})," field."]}),"\n",(0,d.jsx)(r.h3,{id:"create-a-record",children:"Create a record"}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{children:"POST /xrpc/{method}\n"})}),"\n",(0,d.jsxs)(r.p,{children:["When the body does ",(0,d.jsx)(r.strong,{children:"not"})," contain a ",(0,d.jsx)(r.code,{children:"uri"})," field, a new record is created."]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude0a", "createdAt": "2025-01-01T12:00:00Z" }\'\n'})}),"\n",(0,d.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,d.jsx)(r.code,{children:"com.atproto.repo.createRecord"}),", then indexes the created record locally."]}),"\n",(0,d.jsx)(r.h3,{id:"update-a-record",children:"Update a record"}),"\n",(0,d.jsxs)(r.p,{children:["When the body ",(0,d.jsx)(r.strong,{children:"contains"})," a ",(0,d.jsx)(r.code,{children:"uri"})," field, the existing record is updated."]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T13:00:00Z"\n }\'\n'})}),"\n",(0,d.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,d.jsx)(r.code,{children:"com.atproto.repo.putRecord"}),", then upserts the record locally."]}),"\n",(0,d.jsxs)(r.p,{children:[(0,d.jsx)(r.strong,{children:"Response"})," for both: proxied from the user's PDS."]}),"\n",(0,d.jsx)(r.h2,{id:"errors",children:"Errors"}),"\n",(0,d.jsxs)(r.p,{children:["All error responses return JSON with an ",(0,d.jsx)(r.code,{children:"error"})," field:"]}),"\n",(0,d.jsx)(r.pre,{children:(0,d.jsx)(r.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,d.jsxs)(r.table,{children:[(0,d.jsx)(r.thead,{children:(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.th,{children:"Status"}),(0,d.jsx)(r.th,{children:"Meaning"}),(0,d.jsx)(r.th,{children:"Common causes"})]})}),(0,d.jsxs)(r.tbody,{children:[(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"400 Bad Request"})}),(0,d.jsx)(r.td,{children:"Invalid input"}),(0,d.jsx)(r.td,{children:"Missing required fields, malformed JSON, invalid AT URI"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"401 Unauthorized"})}),(0,d.jsx)(r.td,{children:"Authentication failed"}),(0,d.jsxs)(r.td,{children:["Missing or invalid Bearer token. See ",(0,d.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"404 Not Found"})}),(0,d.jsx)(r.td,{children:"Method or record not found"}),(0,d.jsx)(r.td,{children:"XRPC method has no matching lexicon, or the requested record doesn't exist"})]}),(0,d.jsxs)(r.tr,{children:[(0,d.jsx)(r.td,{children:(0,d.jsx)(r.code,{children:"500 Internal Server Error"})}),(0,d.jsx)(r.td,{children:"Server-side failure"}),(0,d.jsx)(r.td,{children:"Lua script error, database error, or upstream PDS failure"})]})]})]}),"\n",(0,d.jsx)(r.h3,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,d.jsxs)(r.p,{children:["When a Lua script fails, the response is ",(0,d.jsx)(r.code,{children:"500"})," with one of:"]}),"\n",(0,d.jsxs)(r.ul,{children:["\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": syntax error, runtime error, or missing ",(0,d.jsx)(r.code,{children:"handle()"})," function"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,d.jsxs)(r.p,{children:["The full error details are logged server-side but not exposed to the client. See ",(0,d.jsx)(r.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for how to diagnose script issues."]}),"\n",(0,d.jsx)(r.h3,{id:"pds-errors",children:"PDS errors"}),"\n",(0,d.jsx)(r.p,{children:"When a procedure proxies a write to the user's PDS and the PDS returns an error, HappyView forwards the PDS response status code and body directly to the client."}),"\n",(0,d.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,d.jsxs)(r.ul,{children:["\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Override the default query and procedure behavior with custom logic"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how lexicons generate these endpoints"]}),"\n",(0,d.jsxs)(r.li,{children:[(0,d.jsx)(r.a,{href:"/reference/admin-api",children:"Admin API"}),": Manage lexicons and monitor your instance"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,d.jsx)(r,{...e,children:(0,d.jsx)(a,{...e})}):a(e)}},8453(e,r,s){s.d(r,{R:()=>t,x:()=>c});var n=s(6540);const d={},i=n.createContext(d);function t(e){const r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a77ba7fa.be66bc37.js b/assets/js/a77ba7fa.be66bc37.js deleted file mode 100644 index ef5a7f7..0000000 --- a/assets/js/a77ba7fa.be66bc37.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6087],{6494(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"getting-started/authentication","title":"Authentication","description":"HappyView uses AT Protocol OAuth for authentication, handled by an external AIP instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP.","source":"@site/docs/getting-started/authentication.md","sourceDirName":"getting-started","slug":"/getting-started/authentication","permalink":"/getting-started/authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Other","permalink":"/getting-started/deployment/other"},"next":{"title":"Configuration","permalink":"/getting-started/configuration"}}');var s=n(4848),r=n(8453);const o={},a="Authentication",d={},h=[{value:"Which endpoints require auth?",id:"which-endpoints-require-auth",level:2},{value:"Getting a token from the dashboard",id:"getting-a-token-from-the-dashboard",level:2},{value:"Programmatic access",id:"programmatic-access",level:2},{value:"How token validation works",id:"how-token-validation-works",level:2},{value:"Admin access",id:"admin-access",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"authentication",children:"Authentication"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView uses ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"AT Protocol OAuth"})," for authentication, handled by an external ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP."]}),"\n",(0,s.jsx)(t.h2,{id:"which-endpoints-require-auth",children:"Which endpoints require auth?"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Endpoint type"}),(0,s.jsx)(t.th,{children:"Auth required?"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Queries (",(0,s.jsx)(t.code,{children:"GET /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Procedures (",(0,s.jsx)(t.code,{children:"POST /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"Yes"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Admin API (",(0,s.jsx)(t.code,{children:"/admin/*"}),")"]}),(0,s.jsx)(t.td,{children:"Yes (must be an admin)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Health check (",(0,s.jsx)(t.code,{children:"GET /health"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["Authenticated requests must include an ",(0,s.jsx)(t.code,{children:"Authorization"})," header with a token issued by AIP:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Authorization: Bearer \n"})}),"\n",(0,s.jsx)(t.h2,{id:"getting-a-token-from-the-dashboard",children:"Getting a token from the dashboard"}),"\n",(0,s.jsxs)(t.p,{children:["The easiest way to get a token for CLI or curl usage is through the ",(0,s.jsx)(t.a,{href:"/getting-started/dashboard",children:"web dashboard"}),":"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Open the dashboard and log in with your AT Protocol identity"}),"\n",(0,s.jsx)(t.li,{children:"Open your browser's developer tools (F12 or Cmd+Shift+I)"}),"\n",(0,s.jsxs)(t.li,{children:["Go to ",(0,s.jsx)(t.strong,{children:"Application"})," (Chrome) or ",(0,s.jsx)(t.strong,{children:"Storage"})," (Firefox) > ",(0,s.jsx)(t.strong,{children:"Session Storage"})]}),"\n",(0,s.jsx)(t.li,{children:"Find the entry for your dashboard's URL"}),"\n",(0,s.jsxs)(t.li,{children:["Copy the value of the ",(0,s.jsx)(t.code,{children:"session"})," key: this contains your access token"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"You can then use it in curl:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'export TOKEN="your-token-here"\ncurl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(t.p,{children:"Tokens expire based on AIP's configuration. When a token expires, log in again through the dashboard to get a new one."}),"\n",(0,s.jsx)(t.h2,{id:"programmatic-access",children:"Programmatic access"}),"\n",(0,s.jsx)(t.p,{children:"For scripts or applications that need to authenticate programmatically, you'll need to implement the AT Protocol OAuth flow against your AIP instance. This involves:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Registering an OAuth client with AIP"}),"\n",(0,s.jsx)(t.li,{children:"Redirecting the user to AIP's authorization endpoint"}),"\n",(0,s.jsx)(t.li,{children:"Exchanging the authorization code for an access token"}),"\n",(0,s.jsx)(t.li,{children:"Using that token with HappyView"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for endpoint details and the ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"ATProto OAuth spec"})," for the full protocol."]}),"\n",(0,s.jsx)(t.h2,{id:"how-token-validation-works",children:"How token validation works"}),"\n",(0,s.jsxs)(t.p,{children:["When HappyView receives an authenticated request, it forwards the token to AIP's ",(0,s.jsx)(t.code,{children:"/oauth/userinfo"})," endpoint. AIP responds with the user's DID, which HappyView uses to:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Identify who is making the request"}),"\n",(0,s.jsx)(t.li,{children:"Proxy writes to the correct PDS"}),"\n",(0,s.jsx)(t.li,{children:"Check admin permissions (for admin endpoints)"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Token validation happens on every request; there is no local token caching."}),"\n",(0,s.jsx)(t.h2,{id:"admin-access",children:"Admin access"}),"\n",(0,s.jsxs)(t.p,{children:["Admin endpoints require the authenticated user's DID to exist in the ",(0,s.jsx)(t.code,{children:"admins"})," table. If the table is empty (fresh deployment), the first authenticated request to any admin endpoint auto-bootstraps that user as the initial admin."]}),"\n",(0,s.jsxs)(t.p,{children:["To add more admins, use ",(0,s.jsx)(t.code,{children:"POST /admin/admins"})," or the ",(0,s.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),". See ",(0,s.jsx)(t.a,{href:"/reference/admin-api#admin-management",children:"Admin API"})," for details."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>a});var i=n(6540);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a77ba7fa.f9bd1afe.js b/assets/js/a77ba7fa.f9bd1afe.js new file mode 100644 index 0000000..bb46d46 --- /dev/null +++ b/assets/js/a77ba7fa.f9bd1afe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6087],{5331:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"getting-started/authentication","title":"Authentication","description":"HappyView has two distinct authentication surfaces:","source":"@site/docs/getting-started/authentication.md","sourceDirName":"getting-started","slug":"/getting-started/authentication","permalink":"/getting-started/authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/getting-started/configuration"},"next":{"title":"Dashboard","permalink":"/getting-started/dashboard"}}');var s=i(199),r=i(2560);const o={},a="Authentication",c={},d=[{value:"Which endpoints require what?",id:"which-endpoints-require-what",level:2},{value:"XRPC: API client identification",id:"xrpc-api-client-identification",level:2},{value:"Calling a query",id:"calling-a-query",level:3},{value:"Authenticating users for procedures",id:"authenticating-users-for-procedures",level:3},{value:"Admin API: user authentication",id:"admin-api-user-authentication",level:2},{value:"Admin API key",id:"admin-api-key",level:3},{value:"Service auth JWT",id:"service-auth-jwt",level:3},{value:"Admin access and the first user",id:"admin-access-and-the-first-user",level:3},{value:"Proxying procedures to the user's PDS",id:"proxying-procedures-to-the-users-pds",level:2},{value:"DPoP key provisioning for third-party apps",id:"dpop-key-provisioning-for-third-party-apps",level:2},{value:"Flow overview",id:"flow-overview",level:3},{value:"API clients: confidential vs public",id:"api-clients-confidential-vs-public",level:3},{value:"The full flow",id:"the-full-flow",level:3},{value:"1. Provision a DPoP key",id:"1-provision-a-dpop-key",level:4},{value:"2. Run OAuth with the user's PDS",id:"2-run-oauth-with-the-users-pds",level:4},{value:"3. Register the session",id:"3-register-the-session",level:4},{value:"4. Make XRPC requests",id:"4-make-xrpc-requests",level:4},{value:"5. Logout",id:"5-logout",level:4},{value:"Security notes",id:"security-notes",level:3},{value:"Next steps",id:"next-steps",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",mermaid:"mermaid",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"authentication",children:"Authentication"})}),"\n",(0,s.jsx)(n.p,{children:"HappyView has two distinct authentication surfaces:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"XRPC"})," (",(0,s.jsx)(n.code,{children:"/xrpc/*"}),") \u2014 client-level identification via an ",(0,s.jsx)(n.strong,{children:"API client key"})," on every request, plus optional user-level atproto OAuth for endpoints that need a specific user's identity (e.g. procedures that write to a PDS)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Admin API"})," (",(0,s.jsx)(n.code,{children:"/admin/*"}),") \u2014 user-level authentication via admin API keys or service auth JWTs, gated by ",(0,s.jsx)(n.a,{href:"/guides/permissions",children:"permissions"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"which-endpoints-require-what",children:"Which endpoints require what?"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Endpoint type"}),(0,s.jsx)(n.th,{children:"Client identification"}),(0,s.jsx)(n.th,{children:"User authentication"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:["Queries (",(0,s.jsx)(n.code,{children:"GET /xrpc/{method}"}),")"]}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"X-Client-Key"})," required"]}),(0,s.jsx)(n.td,{children:"Optional \u2014 DPoP auth if the query needs to know who the user is"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:["Procedures (",(0,s.jsx)(n.code,{children:"POST /xrpc/{method}"}),")"]}),(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"X-Client-Key"})," required"]}),(0,s.jsx)(n.td,{children:"Required \u2014 DPoP auth so HappyView can proxy writes to the user's PDS"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:["Admin API (",(0,s.jsx)(n.code,{children:"/admin/*"}),")"]}),(0,s.jsx)(n.td,{children:"\u2014"}),(0,s.jsxs)(n.td,{children:["Required \u2014 admin API key or service auth JWT with the right ",(0,s.jsx)(n.a,{href:"/guides/permissions",children:"permissions"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:["Health check (",(0,s.jsx)(n.code,{children:"GET /health"}),")"]}),(0,s.jsx)(n.td,{children:"\u2014"}),(0,s.jsx)(n.td,{children:"\u2014"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"xrpc-api-client-identification",children:"XRPC: API client identification"}),"\n",(0,s.jsxs)(n.p,{children:["Every XRPC request \u2014 including unauthenticated ",(0,s.jsx)(n.code,{children:"GET"})," queries \u2014 must identify itself with a registered API client. The client key is HappyView's rate-limit bucket key and its way of knowing who is calling. A request without one returns ",(0,s.jsx)(n.code,{children:"401 Unauthorized"})," with ",(0,s.jsx)(n.code,{children:"Missing client identification"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Register a client in the dashboard (",(0,s.jsx)(n.strong,{children:"Settings > API Clients > New client"}),") or via ",(0,s.jsx)(n.code,{children:"POST /admin/api-clients"}),". You'll get back an ",(0,s.jsx)(n.code,{children:"hvc_\u2026"})," client key and an ",(0,s.jsx)(n.code,{children:"hvs_\u2026"})," client secret \u2014 ",(0,s.jsx)(n.strong,{children:"the secret is only shown once"}),", so capture it immediately."]}),"\n",(0,s.jsx)(n.p,{children:"HappyView resolves the client key from the first of:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," request header."]}),"\n",(0,s.jsxs)(n.li,{children:["A ",(0,s.jsx)(n.code,{children:"client_key"})," query-string parameter."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"On top of the client key, HappyView does best-effort validation that the caller actually controls the client:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["If an ",(0,s.jsx)(n.code,{children:"Origin"})," header is present (typical for browser apps), it must match the client's registered ",(0,s.jsx)(n.code,{children:"client_uri"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Otherwise, an ",(0,s.jsx)(n.code,{children:"X-Client-Secret"})," header may be supplied and must match the stored secret (typical for server-to-server callers)."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Both checks currently log warnings on mismatch rather than rejecting the request, but the intent is clear: don't share client keys, and treat the secret like a password."}),"\n",(0,s.jsx)(n.h3,{id:"calling-a-query",children:"Calling a query"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"curl 'https://happyview.example.com/xrpc/com.example.feed.getHot' \\\n -H 'X-Client-Key: hvc_a1b2c3...'\n"})}),"\n",(0,s.jsx)(n.p,{children:"For a server-to-server integration, add the secret:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"curl 'https://happyview.example.com/xrpc/com.example.feed.getHot' \\\n -H 'X-Client-Key: hvc_a1b2c3...' \\\n -H 'X-Client-Secret: hvs_d4e5f6...'\n"})}),"\n",(0,s.jsx)(n.h3,{id:"authenticating-users-for-procedures",children:"Authenticating users for procedures"}),"\n",(0,s.jsx)(n.p,{children:"Queries that don't care who is calling need nothing more than the client key. Procedures \u2014 and queries whose Lua scripts read the caller's DID \u2014 need a real atproto OAuth session."}),"\n",(0,s.jsxs)(n.p,{children:["XRPC routes only accept ",(0,s.jsx)(n.strong,{children:"DPoP auth"})," (",(0,s.jsx)(n.code,{children:"Authorization: DPoP "})," + ",(0,s.jsx)(n.code,{children:"DPoP"})," proof header + ",(0,s.jsx)(n.code,{children:"X-Client-Key"}),"). Bearer tokens and service auth JWTs are not accepted on XRPC endpoints."]}),"\n",(0,s.jsxs)(n.p,{children:["Third-party apps authenticate users through the ",(0,s.jsx)(n.a,{href:"#dpop-key-provisioning-for-third-party-apps",children:"DPoP key provisioning"})," flow: your app gets a DPoP keypair from HappyView, runs a standard OAuth flow with the user's PDS using that keypair, then registers the resulting tokens back with HappyView."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/sdk/overview",children:"JavaScript SDK"})," handles this entire flow for you:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-typescript",children:'import { Client } from "@atproto/lex";\nimport { HappyViewBrowserClient } from "@happyview/oauth-client-browser";\nimport { createAgent } from "@happyview/lex-agent";\n\nconst oauthClient = new HappyViewBrowserClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n});\n\n// Login \u2014 redirects to the user\'s PDS for authorization\nawait oauthClient.login("alice.bsky.social");\n\n// On /oauth/callback \u2014 complete the token exchange\nconst session = await oauthClient.callback();\n\n// Create a type-safe Lex client\nconst agent = createAgent(session);\nconst lex = new Client(agent);\n\n// Make authenticated XRPC calls\nawait lex.xrpc(myLexicons.com.example.createPost, {\n input: { text: "Hello from HappyView!" },\n});\n'})}),"\n",(0,s.jsxs)(n.p,{children:["For procedures, HappyView proxies the write to the user's PDS using the stored OAuth session (see ",(0,s.jsx)(n.a,{href:"#proxying-procedures-to-the-users-pds",children:"Proxying procedures"})," below)."]}),"\n",(0,s.jsx)(n.h2,{id:"admin-api-user-authentication",children:"Admin API: user authentication"}),"\n",(0,s.jsx)(n.p,{children:"Admin endpoints don't use API clients. They require a real HappyView user, identified by one of two methods:"}),"\n",(0,s.jsx)(n.h3,{id:"admin-api-key",children:"Admin API key"}),"\n",(0,s.jsxs)(n.p,{children:["For automation \u2014 CI/CD, monitoring, cron jobs \u2014 create an ",(0,s.jsx)(n.a,{href:"/guides/api-keys",children:"admin API key"})," at ",(0,s.jsx)(n.strong,{children:"Settings > API Keys"})," or via ",(0,s.jsx)(n.code,{children:"POST /admin/api-keys"})," and pass it as a bearer token:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'export TOKEN="hv_your-api-key-here"\ncurl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(n.p,{children:"A key only carries the permissions selected at creation time and can never exceed the permissions of the user who created it. Admin API keys are not valid for XRPC endpoints \u2014 they exist solely for admin API access."}),"\n",(0,s.jsx)(n.h3,{id:"service-auth-jwt",children:"Service auth JWT"}),"\n",(0,s.jsxs)(n.p,{children:["HappyView also accepts standard atproto inter-service auth JWTs in the ",(0,s.jsx)(n.code,{children:"Authorization"})," header. Another AppView, relay, or PDS can sign a short-lived ES256 or ES256K JWT with its DID's signing key; HappyView resolves the issuer's DID document, verifies the signature against the ",(0,s.jsx)(n.code,{children:"#atproto"})," verification method, and treats the issuer DID as the caller identity."]}),"\n",(0,s.jsx)(n.p,{children:"For a service auth JWT to validate:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"alg"})," must be ",(0,s.jsx)(n.code,{children:"ES256"})," or ",(0,s.jsx)(n.code,{children:"ES256K"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"typ"})," must not be ",(0,s.jsx)(n.code,{children:"at+jwt"}),", ",(0,s.jsx)(n.code,{children:"refresh+jwt"}),", or ",(0,s.jsx)(n.code,{children:"dpop+jwt"})," (those are other token types, not inter-service JWTs)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"exp"})," must be in the future."]}),"\n",(0,s.jsx)(n.li,{children:"The signature must verify against the issuer DID's atproto signing key."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["As with the other methods, the resolved DID still has to exist in the HappyView ",(0,s.jsx)(n.code,{children:"users"})," table with the right permissions to hit admin endpoints \u2014 service auth gets you identified, not privileged."]}),"\n",(0,s.jsx)(n.h3,{id:"admin-access-and-the-first-user",children:"Admin access and the first user"}),"\n",(0,s.jsxs)(n.p,{children:["On a fresh deployment, the ",(0,s.jsx)(n.code,{children:"users"})," table is empty. The first authenticated request to any admin endpoint auto-bootstraps that user as the ",(0,s.jsx)(n.strong,{children:"super user"})," with all permissions granted. This includes logging in to the dashboard \u2014 the dashboard makes admin API calls on your behalf, so the first person to log in becomes the super user."]}),"\n",(0,s.jsxs)(n.p,{children:["To add more users after that, use ",(0,s.jsx)(n.code,{children:"POST /admin/users"})," or the ",(0,s.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"}),". You can assign permissions individually or use a template (",(0,s.jsx)(n.code,{children:"viewer"}),", ",(0,s.jsx)(n.code,{children:"operator"}),", ",(0,s.jsx)(n.code,{children:"manager"}),", ",(0,s.jsx)(n.code,{children:"full_access"}),"). See ",(0,s.jsx)(n.a,{href:"/reference/admin/users",children:"Admin API \u2014 Users"})," for details."]}),"\n",(0,s.jsx)(n.h2,{id:"proxying-procedures-to-the-users-pds",children:"Proxying procedures to the user's PDS"}),"\n",(0,s.jsxs)(n.p,{children:["When a client calls an XRPC procedure that writes a record, HappyView proxies the write to the user's PDS. This requires a DPoP-authenticated session \u2014 the app must have gone through the ",(0,s.jsx)(n.a,{href:"#dpop-key-provisioning-for-third-party-apps",children:"DPoP key provisioning"})," flow and registered tokens for the user. HappyView uses the app's provisioned DPoP key to generate fresh proofs and attach the stored access token to the outbound PDS request."]}),"\n",(0,s.jsxs)(n.p,{children:["A request that only carries an ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," header (no DPoP token) can hit queries but can't proxy writes \u2014 there's no user to write as."]}),"\n",(0,s.jsx)(n.h2,{id:"dpop-key-provisioning-for-third-party-apps",children:"DPoP key provisioning for third-party apps"}),"\n",(0,s.jsxs)(n.p,{children:["Third-party apps that want HappyView to make PDS writes on behalf of their users use the ",(0,s.jsx)(n.strong,{children:"DPoP key provisioning"})," flow. This avoids browser-based redirects through HappyView's domain, which can be blocked by Firefox's Bounce Tracker Protection."]}),"\n",(0,s.jsxs)(n.p,{children:["The idea: the app gets a DPoP keypair from HappyView, uses that keypair during its own OAuth flow with the user's PDS, then registers the resulting tokens back with HappyView. From that point on, XRPC requests authenticated with ",(0,s.jsx)(n.code,{children:"Authorization: DPoP "})," plus a ",(0,s.jsx)(n.code,{children:"DPoP"})," proof header and ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," will have HappyView proxy writes using the stored session."]}),"\n",(0,s.jsx)(n.p,{children:"The client app and HappyView share the same DPoP keypair, so both can generate valid proofs that the PDS will accept. The PDS binds tokens to a key's thumbprint but it doesn't care who signs the proof, only that it was signed by the right key."}),"\n",(0,s.jsx)(n.h3,{id:"flow-overview",children:"Flow overview"}),"\n",(0,s.jsx)(n.mermaid,{value:"sequenceDiagram\n participant Client as Client App\n participant HV as HappyView\n participant PDS as User's PDS\n\n note over Client,PDS: Phase 1 \u2014 DPoP Key Provisioning\n Client->>HV: POST /oauth/dpop-keys
    X-Client-Key + secret or PKCE\n HV->>HV: Authenticate client
    Generate ES256 keypair
    Encrypt & store private key\n HV--\x3e>Client: provision_id + DPoP private JWK\n\n note over Client,PDS: Phase 2 \u2014 OAuth with the User's PDS\n Client->>PDS: Redirect user to authorize
    client_id embeds DPoP public key\n PDS--\x3e>Client: Auth code (redirect back)\n Client->>PDS: Exchange code for tokens
    DPoP proof signed with provisioned key\n PDS--\x3e>Client: Access + refresh tokens
    (bound to DPoP key thumbprint)\n\n note over Client,PDS: Phase 3 \u2014 Session Registration\n Client->>HV: POST /oauth/sessions
    provision_id + tokens + PKCE verifier\n HV->>HV: Verify PKCE, validate scopes
    Encrypt & store tokens\n HV--\x3e>Client: session_id + DID\n\n note over Client,PDS: Phase 4 \u2014 Authenticated XRPC Request\n Client->>HV: POST /xrpc/{method}
    Authorization: DPoP + proof + X-Client-Key\n HV->>HV: Validate proof (sig, method,
    URL, token hash, thumbprint)\n HV->>HV: Generate fresh DPoP proof
    with same shared keypair\n HV->>PDS: POST /xrpc/com.atproto.repo.*
    Authorization: DPoP + proof\n PDS--\x3e>HV: Success\n HV--\x3e>Client: Response"}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/sdk/overview",children:"JavaScript SDK"})," handles this entire flow for you. The raw HTTP flow below is useful for understanding the protocol or building a non-JavaScript client."]})}),"\n",(0,s.jsx)(n.h3,{id:"api-clients-confidential-vs-public",children:"API clients: confidential vs public"}),"\n",(0,s.jsxs)(n.p,{children:["API clients have a ",(0,s.jsx)(n.code,{children:"client_type"})," field \u2014 either ",(0,s.jsx)(n.code,{children:"confidential"})," (default) or ",(0,s.jsx)(n.code,{children:"public"}),"."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Confidential clients"})," authenticate with ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," + ",(0,s.jsx)(n.code,{children:"X-Client-Secret"})," headers on every ",(0,s.jsx)(n.code,{children:"/oauth/*"})," request."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Public clients"})," (browser apps that can't keep a secret) authenticate with ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," header + PKCE. The app sends a ",(0,s.jsx)(n.code,{children:"pkce_challenge"})," (S256) in the body when provisioning a key, then proves possession with ",(0,s.jsx)(n.code,{children:"pkce_verifier"})," when registering a session. Public clients also have ",(0,s.jsx)(n.code,{children:"allowed_origins"})," \u2014 the ",(0,s.jsx)(n.code,{children:"Origin"})," header must match."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"the-full-flow",children:"The full flow"}),"\n",(0,s.jsx)(n.h4,{id:"1-provision-a-dpop-key",children:"1. Provision a DPoP key"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"POST /oauth/dpop-keys\nX-Client-Key: hvc_...\nX-Client-Secret: hvs_...\nContent-Type: application/json\n\n{}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["For public clients, omit ",(0,s.jsx)(n.code,{children:"X-Client-Secret"})," and include the PKCE challenge in the body:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'POST /oauth/dpop-keys\nX-Client-Key: hvc_...\nOrigin: http://localhost:3000\nContent-Type: application/json\n\n{ "pkce_challenge": "base64url..." }\n'})}),"\n",(0,s.jsx)(n.p,{children:"Response:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "provision_id": "hvp_...",\n "dpop_key": {\n "kty": "EC",\n "crv": "P-256",\n "x": "...",\n "y": "...",\n "d": "..."\n }\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"dpop_key"})," is the private JWK. Use it to generate DPoP proofs during your OAuth flow with the user's PDS."]}),"\n",(0,s.jsx)(n.h4,{id:"2-run-oauth-with-the-users-pds",children:"2. Run OAuth with the user's PDS"}),"\n",(0,s.jsx)(n.p,{children:"Use the provisioned DPoP key as your DPoP keypair in a standard atproto OAuth flow with the user's PDS. HappyView is not involved in this step \u2014 the app talks directly to the PDS authorization server."}),"\n",(0,s.jsx)(n.h4,{id:"3-register-the-session",children:"3. Register the session"}),"\n",(0,s.jsx)(n.p,{children:"After the OAuth callback, register the token set with HappyView:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:'POST /oauth/sessions\nX-Client-Key: hvc_...\nX-Client-Secret: hvs_...\nContent-Type: application/json\n\n{\n "provision_id": "hvp_...",\n "did": "did:plc:user123",\n "access_token": "...",\n "refresh_token": "...",\n "expires_at": "2026-04-17T00:00:00Z",\n "scopes": "atproto transition:generic",\n "pds_url": "https://bsky.social",\n "issuer": "https://bsky.social"\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["For public clients, omit ",(0,s.jsx)(n.code,{children:"X-Client-Secret"})," and include the PKCE verifier in the body:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "provision_id": "hvp_...",\n "pkce_verifier": "...",\n "did": "did:plc:user123",\n "access_token": "...",\n "refresh_token": "...",\n "expires_at": "2026-04-17T00:00:00Z",\n "scopes": "atproto transition:generic",\n "pds_url": "https://bsky.social",\n "issuer": "https://bsky.social"\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"Response:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "session_id": "uuid",\n "did": "did:plc:user123"\n}\n'})}),"\n",(0,s.jsx)(n.h4,{id:"4-make-xrpc-requests",children:"4. Make XRPC requests"}),"\n",(0,s.jsx)(n.p,{children:"With a registered session, send XRPC requests using DPoP auth:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"curl -X POST 'https://happyview.example.com/xrpc/com.example.feed.createPost' \\\n -H 'X-Client-Key: hvc_...' \\\n -H 'Authorization: DPoP ' \\\n -H 'DPoP: ' \\\n -H 'Content-Type: application/json' \\\n -d '{\"text\": \"Hello world\"}'\n"})}),"\n",(0,s.jsx)(n.p,{children:"HappyView validates the DPoP proof, looks up the stored session, and proxies the write to the user's PDS using the provisioned DPoP key to generate a fresh proof."}),"\n",(0,s.jsx)(n.h4,{id:"5-logout",children:"5. Logout"}),"\n",(0,s.jsxs)(n.p,{children:["Confidential clients authenticate with ",(0,s.jsx)(n.code,{children:"X-Client-Key"})," + ",(0,s.jsx)(n.code,{children:"X-Client-Secret"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"DELETE /oauth/sessions/did:plc:user123\nX-Client-Key: hvc_...\nX-Client-Secret: hvs_...\n"})}),"\n",(0,s.jsx)(n.p,{children:"Public clients must provide a valid DPoP proof to prove they hold the key:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"DELETE /oauth/sessions/did:plc:user123\nX-Client-Key: hvc_...\nAuthorization: DPoP \nDPoP: \n"})}),"\n",(0,s.jsx)(n.p,{children:"This deletes the stored session and the associated DPoP key."}),"\n",(0,s.jsx)(n.h3,{id:"security-notes",children:"Security notes"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Private keys and tokens are encrypted at rest with AES-256-GCM using ",(0,s.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"DPoP proofs are validated for method, URL, timestamp (5-minute window), access token binding, and JWK thumbprint."}),"\n",(0,s.jsxs)(n.li,{children:["Scopes requested must include ",(0,s.jsx)(n.code,{children:"atproto"})," and must be a subset of the API client's registered scopes."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/sdk/overview",children:"JavaScript SDK"})," \u2014 authenticate and make XRPC calls from JavaScript"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 full list of permissions and what each one grants"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys"})," \u2014 create scoped admin API keys for automation"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/reference/admin/api-clients",children:"Admin API \u2014 API Clients"})," \u2014 register API clients and configure rate limits"]}),"\n"]})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},2560:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>a});var t=i(63);const s={},r=t.createContext(s);function o(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.1619d051.js b/assets/js/a7bd4aaa.1619d051.js deleted file mode 100644 index 4bc8658..0000000 --- a/assets/js/a7bd4aaa.1619d051.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7098],{1723(n,e,s){s.r(e),s.d(e,{default:()=>l});s(6540);var r=s(5500);function o(n,e){return"docs-"+n+"-"+e}var i=s(3025),t=s(2831),a=s(1463),c=s(4848);function u(n){var e=n.version;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(a.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,c.jsx)(r.be,{children:e.noIndex&&(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function d(n){var e=n.version,s=n.route;return(0,c.jsx)(r.e3,{className:e.className,children:(0,c.jsx)(i.n,{version:e,children:(0,t.v)(s.routes)})})}function l(n){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,Object.assign({},n)),(0,c.jsx)(d,Object.assign({},n))]})}}}]); \ No newline at end of file diff --git a/assets/js/a7bd4aaa.b8087602.js b/assets/js/a7bd4aaa.b8087602.js new file mode 100644 index 0000000..4985146 --- /dev/null +++ b/assets/js/a7bd4aaa.b8087602.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7098],{1924:(n,e,s)=>{s.r(e),s.d(e,{default:()=>l});s(63);var r=s(4315);function o(n,e){return"docs-"+n+"-"+e}var i=s(7738),t=s(5034),a=s(2463),c=s(199);function u(n){var e=n.version;return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(a.A,{version:e.version,tag:o(e.pluginId,e.version)}),(0,c.jsx)(r.be,{children:e.noIndex&&(0,c.jsx)("meta",{name:"robots",content:"noindex, nofollow"})})]})}function d(n){var e=n.version,s=n.route;return(0,c.jsx)(r.e3,{className:e.className,children:(0,c.jsx)(i.n,{version:e,children:(0,t.v)(s.routes)})})}function l(n){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(u,Object.assign({},n)),(0,c.jsx)(d,Object.assign({},n))]})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.221a3d47.js b/assets/js/a94703ab.221a3d47.js new file mode 100644 index 0000000..78ec094 --- /dev/null +++ b/assets/js/a94703ab.221a3d47.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9048],{9065:(e,t,n)=>{n.r(t),n.d(t,{default:()=>we});var a=n(63),i=n(8573),o=n(4315),s=n(568),r=n(3996),l=n(3978),c=n(5819),d=n(5527),u=n(9825);const b={backToTopButton:"backToTopButton_J6bC",backToTopButtonShow:"backToTopButtonShow_d6hM"};var m=n(199);function h(){var e=function(e){var t=e.threshold,n=(0,a.useState)(!1),i=n[0],o=n[1],s=(0,a.useRef)(!1),r=(0,d.gk)(),l=r.startScroll,c=r.cancelScroll;return(0,d.Mq)(function(e,n){var a=e.scrollY,i=null==n?void 0:n.scrollY;i&&(s.current?s.current=!1:a>=i?(c(),o(!1)):a{n.d(t,{A:()=>r});n(63);var a=n(8573),i=n(5819),o=n(7172),s=n(199);function r(e){var t=e.className;return(0,s.jsx)("main",{className:(0,a.A)("container margin-vert--xl",t),children:(0,s.jsx)("div",{className:"row",children:(0,s.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,s.jsx)(o.A,{as:"h1",className:"hero__title",children:(0,s.jsx)(i.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,s.jsx)("p",{children:(0,s.jsx)(i.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,s.jsx)("p",{children:(0,s.jsx)(i.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/a94703ab.df97c324.js b/assets/js/a94703ab.df97c324.js deleted file mode 100644 index 9bf88c8..0000000 --- a/assets/js/a94703ab.df97c324.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9048],{8115(e,t,a){a.r(t),a.d(t,{default:()=>Be});var n=a(6540),i=a(4164),s=a(5500),r=a(7559),o=a(4718),l=a(609),c=a(1312),d=a(3104),u=a(5062);const m="backToTopButton_sjWU",b="backToTopButtonShow_xfvO";var h=a(4848);function p(){var e=function(e){var t=e.threshold,a=(0,n.useState)(!1),i=a[0],s=a[1],r=(0,n.useRef)(!1),o=(0,d.gk)(),l=o.startScroll,c=o.cancelScroll;return(0,d.Mq)(function(e,a){var n=e.scrollY,i=null==a?void 0:a.scrollY;i&&(r.current?r.current=!1:n>=i?(c(),s(!1)):no});a(6540);var n=a(4164),i=a(1312),s=a(1107),r=a(4848);function o(e){var t=e.className;return(0,r.jsx)("main",{className:(0,n.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(i.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(i.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(i.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.de0df825.js b/assets/js/aba21aa0.de0df825.js new file mode 100644 index 0000000..1fd7cc4 --- /dev/null +++ b/assets/js/aba21aa0.de0df825.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5742],{7093:e=>{e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/aba21aa0.dfe711f3.js b/assets/js/aba21aa0.dfe711f3.js deleted file mode 100644 index f29f3ef..0000000 --- a/assets/js/aba21aa0.dfe711f3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5742],{7093(e){e.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]); \ No newline at end of file diff --git a/assets/js/b27c7406.938e6855.js b/assets/js/b27c7406.938e6855.js new file mode 100644 index 0000000..6eed057 --- /dev/null +++ b/assets/js/b27c7406.938e6855.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2618],{4212:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run. If you\'d rather use Docker Compose, see Local Development with Docker.","source":"@site/docs/getting-started/deployment/other.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/other","permalink":"/getting-started/deployment/other","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Docker","permalink":"/getting-started/deployment/docker"},"next":{"title":"Production","permalink":"/reference/production-deployment"}}');var s=n(199),a=n(2560);const i={},o="Local Development from Source",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Create the database (Postgres only)",id:"2-create-the-database-postgres-only",level:2},{value:"3. Start HappyView",id:"3-start-happyview",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"local-development-from-source",children:"Local Development from Source"})}),"\n",(0,s.jsxs)(t.p,{children:["This guide runs HappyView directly with ",(0,s.jsx)(t.code,{children:"cargo run"}),". If you'd rather use Docker Compose, see ",(0,s.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Local Development with Docker"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Rust (stable)"}),"\n",(0,s.jsx)(t.li,{children:"(Optional) PostgreSQL 17+ if you prefer Postgres over the default SQLite"}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Edit ",(0,s.jsx)(t.code,{children:".env"})," to point at your running services:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"# SQLite (default \u2014 no setup needed, file created automatically)\nDATABASE_URL=sqlite://data/happyview.db?mode=rwc\nPUBLIC_URL=http://localhost:3000\nSESSION_SECRET=change-me-in-production\n"})}),"\n",(0,s.jsx)(t.p,{children:"Or if you prefer Postgres:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\n"})}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/getting-started/configuration",children:"Configuration"})," for all available variables and the ",(0,s.jsx)(t.a,{href:"/guides/database-setup",children:"database setup guide"})," for details on both backends."]}),"\n",(0,s.jsx)(t.h2,{id:"2-create-the-database-postgres-only",children:"2. Create the database (Postgres only)"}),"\n",(0,s.jsx)(t.p,{children:"If using SQLite, skip this step \u2014 HappyView creates the database file automatically."}),"\n",(0,s.jsx)(t.p,{children:"If using Postgres:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,s.jsx)(t.p,{children:"Or if using a Postgres user with a password:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'psql -c "CREATE DATABASE happyview;" -U postgres\n'})}),"\n",(0,s.jsx)(t.p,{children:"HappyView runs migrations automatically on startup, so no manual migration step is needed."}),"\n",(0,s.jsx)(t.h2,{id:"3-start-happyview",children:"3. Start HappyView"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo run\n"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView starts on port 3000 (configurable via the ",(0,s.jsx)(t.code,{children:"PORT"})," environment variable)."]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(t.p,{children:["Your HappyView instance is running. Follow the ",(0,s.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2560:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var r=n(63);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b27c7406.d8754146.js b/assets/js/b27c7406.d8754146.js deleted file mode 100644 index 00b32e8..0000000 --- a/assets/js/b27c7406.d8754146.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2618],{537(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run, with you managing Postgres, AIP, and Tap separately. If you\'d rather use Docker Compose to run everything together, see Local Development with Docker.","source":"@site/docs/getting-started/deployment/other.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/other","permalink":"/getting-started/deployment/other","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Docker","permalink":"/getting-started/deployment/docker"},"next":{"title":"Authentication","permalink":"/getting-started/authentication"}}');var s=n(4848),a=n(8453);const i={},o="Local Development from Source",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Create the database",id:"2-create-the-database",level:2},{value:"3. Start HappyView",id:"3-start-happyview",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"local-development-from-source",children:"Local Development from Source"})}),"\n",(0,s.jsxs)(t.p,{children:["This guide runs HappyView directly with ",(0,s.jsx)(t.code,{children:"cargo run"}),", with you managing Postgres, AIP, and Tap separately. If you'd rather use Docker Compose to run everything together, see ",(0,s.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Local Development with Docker"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Rust (stable)"}),"\n",(0,s.jsx)(t.li,{children:"PostgreSQL 17+"}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth). See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance (delivers real-time records and handles backfill). See the ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for setup."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Edit ",(0,s.jsx)(t.code,{children:".env"})," to point at your running services:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\nTAP_URL=http://localhost:2480\nTAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/getting-started/configuration",children:"Configuration"})," for all available variables."]}),"\n",(0,s.jsx)(t.h2,{id:"2-create-the-database",children:"2. Create the database"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,s.jsx)(t.p,{children:"Or if using a Postgres user with a password:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'psql -c "CREATE DATABASE happyview;" -U postgres\n'})}),"\n",(0,s.jsx)(t.p,{children:"HappyView runs migrations automatically on startup, so no manual migration step is needed."}),"\n",(0,s.jsx)(t.h2,{id:"3-start-happyview",children:"3. Start HappyView"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo run\n"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView starts on port 3000 (configurable via the ",(0,s.jsx)(t.code,{children:"PORT"})," environment variable)."]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(t.p,{children:["Your HappyView instance is running. Follow the ",(0,s.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>i,x:()=>o});var r=n(6540);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bb350c59.6c9f0db2.js b/assets/js/bb350c59.6c9f0db2.js new file mode 100644 index 0000000..322c4c7 --- /dev/null +++ b/assets/js/bb350c59.6c9f0db2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7658],{8411:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"guides/plugins","title":"Plugins","description":"HappyView uses WASM plugins to extend its functionality. Plugins can integrate with external platforms, sync data to users\' atproto identities, and more. Auth plugins \u2014 the first supported plugin type \u2014 enable users to link accounts from platforms like Steam, Xbox, itch.io, and others, then sync data like game libraries.","source":"@site/docs/guides/plugins.md","sourceDirName":"guides","slug":"/guides/plugins","permalink":"/guides/plugins","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Labelers","permalink":"/guides/labelers"},"next":{"title":"Developing Plugins","permalink":"/guides/developing-plugins"}}');var t=s(199),r=s(2560);const l={},a="Plugins",o={},c=[{value:"Installing Plugins",id:"installing-plugins",level:2},{value:"Via Dashboard",id:"via-dashboard",level:3},{value:"Via Environment Variables",id:"via-environment-variables",level:3},{value:"Via File System",id:"via-file-system",level:3},{value:"Plugin Configuration",id:"plugin-configuration",level:2},{value:"Dashboard Configuration",id:"dashboard-configuration",level:3},{value:"Environment Variables",id:"environment-variables",level:3},{value:"Security",id:"security",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"plugins",children:"Plugins"})}),"\n",(0,t.jsx)(n.p,{children:"HappyView uses WASM plugins to extend its functionality. Plugins can integrate with external platforms, sync data to users' atproto identities, and more. Auth plugins \u2014 the first supported plugin type \u2014 enable users to link accounts from platforms like Steam, Xbox, itch.io, and others, then sync data like game libraries."}),"\n",(0,t.jsxs)(n.p,{children:["Official plugins for Steam, Xbox, itch.io, and other platforms are available in the ",(0,t.jsx)(n.a,{href:"https://github.com/gamesgamesgamesgamesgames/happyview-plugins",children:"happyview-plugins"})," repository."]}),"\n",(0,t.jsx)(n.h2,{id:"installing-plugins",children:"Installing Plugins"}),"\n",(0,t.jsx)(n.h3,{id:"via-dashboard",children:"Via Dashboard"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings > Plugins"})]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Add Plugin"})]}),"\n",(0,t.jsxs)(n.li,{children:["Enter the URL to a plugin's ",(0,t.jsx)(n.code,{children:"manifest.json"})," or ",(0,t.jsx)(n.code,{children:".wasm"})," file"]}),"\n",(0,t.jsxs)(n.li,{children:["Review the plugin details and click ",(0,t.jsx)(n.strong,{children:"Install Plugin"})]}),"\n",(0,t.jsx)(n.li,{children:"Configure any required secrets using the settings button"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"via-environment-variables",children:"Via Environment Variables"}),"\n",(0,t.jsxs)(n.p,{children:["Set ",(0,t.jsx)(n.code,{children:"PLUGIN_URLS"})," to load plugins at startup:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"PLUGIN_URLS=steam|https://example.com/plugins/steam/manifest.json\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Format: ",(0,t.jsx)(n.code,{children:"id|url"})," or ",(0,t.jsx)(n.code,{children:"id|url|sha256:hash"})," (comma-separated for multiple)."]}),"\n",(0,t.jsx)(n.h3,{id:"via-file-system",children:"Via File System"}),"\n",(0,t.jsxs)(n.p,{children:["Place plugins in the ",(0,t.jsx)(n.code,{children:"./plugins/"})," directory:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"plugins/\n steam/\n manifest.json\n plugin.wasm\n"})}),"\n",(0,t.jsx)(n.h2,{id:"plugin-configuration",children:"Plugin Configuration"}),"\n",(0,t.jsx)(n.p,{children:"Plugins may require secrets (API keys, client credentials, etc.) to function. There are two ways to configure these:"}),"\n",(0,t.jsx)(n.h3,{id:"dashboard-configuration",children:"Dashboard Configuration"}),"\n",(0,t.jsx)(n.p,{children:"Click the settings icon next to a plugin to enter secrets. These are encrypted using AES-256-GCM and stored in the database."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Requires:"})," ",(0,t.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"})," environment variable (base64-encoded 32-byte key)."]}),"\n",(0,t.jsx)(n.p,{children:"Generate one with:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"openssl rand -base64 32\n"})}),"\n",(0,t.jsx)(n.h3,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,t.jsxs)(n.p,{children:["Set secrets as environment variables with the ",(0,t.jsx)(n.code,{children:"PLUGIN__"})," prefix:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"PLUGIN_STEAM_API_KEY=your-api-key\nPLUGIN_XBOX_CLIENT_ID=your-client-id\nPLUGIN_XBOX_CLIENT_SECRET=your-client-secret\n"})}),"\n",(0,t.jsx)(n.p,{children:"These are only necessary if you can't configure variables via the dashboard. Dashboard-configured secrets take precedence over environment variables."}),"\n",(0,t.jsx)(n.h2,{id:"security",children:"Security"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Sandboxed execution"}),": Plugins run in isolated WASM environments"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Limited host access"}),": Plugins can only call approved host functions (HTTP requests, KV storage, secrets, logging)"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Encrypted storage"}),": OAuth tokens and secrets are encrypted at rest using AES-256-GCM"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Scoped storage"}),": Plugin KV storage is isolated per-plugin and per-user"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"No filesystem access"}),": Plugins cannot access the host filesystem"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/guides/developing-plugins",children:"Developing Plugins"})," \u2014 create your own plugins with the WASM plugin API"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/gamesgamesgamesgamesgames/happyview-plugins",children:"Official plugins repository"})," \u2014 ready-to-use plugins for Steam, Xbox, itch.io, and more"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys"})," \u2014 authenticate programmatic access to admin endpoints"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 configure user access to plugin management"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>a});var i=s(63);const t={},r=i.createContext(t);function l(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bccc5e9b.73f8e292.js b/assets/js/bccc5e9b.73f8e292.js new file mode 100644 index 0000000..6b4cfe8 --- /dev/null +++ b/assets/js/bccc5e9b.73f8e292.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2431],{4969:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>c,contentTitle:()=>t,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Jetstream. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and fetches records directly from each user\'s PDS.","source":"@site/docs/guides/backfill.md","sourceDirName":"guides","slug":"/guides/backfill","permalink":"/guides/backfill","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lexicons","permalink":"/guides/lexicons"},"next":{"title":"Index Hooks","permalink":"/guides/index-hooks"}}');var i=s(199),l=s(2560);const o={},t="Backfill",c={},a=[{value:"When backfill runs",id:"when-backfill-runs",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Job lifecycle",id:"job-lifecycle",level:2},{value:"Re-running backfills",id:"re-running-backfills",level:2},{value:"Restoring deleted records",id:"restoring-deleted-records",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"backfill",children:"Backfill"})}),"\n",(0,i.jsxs)(r.p,{children:["When you add a new record-type lexicon, HappyView starts indexing new records from that moment via ",(0,i.jsx)(r.a,{href:"https://github.com/bluesky-social/jetstream",children:"Jetstream"}),". But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and fetches records directly from each user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"when-backfill-runs",children:"When backfill runs"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Automatically"})," when a record-type lexicon is uploaded with ",(0,i.jsx)(r.code,{children:"backfill: true"})," (the default). See ",(0,i.jsx)(r.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons - Backfill flag"}),"."]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Manually"})," via ",(0,i.jsx)(r.code,{children:"POST /admin/backfill"})," or the ",(0,i.jsx)(r.a,{href:"/getting-started/dashboard",children:"dashboard"}),". You can scope a manual backfill to a specific collection, a specific DID, or both."]}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["See the ",(0,i.jsx)(r.a,{href:"/reference/admin/backfill",children:"admin API"})," for endpoint details."]}),"\n",(0,i.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(r.ol,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Determine target collections"}),": uses the specified collection, or all record lexicons with ",(0,i.jsx)(r.code,{children:"backfill: true"})]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Discover DIDs"}),": HappyView calls the relay's ",(0,i.jsx)(r.code,{children:"com.atproto.sync.listReposByCollection"})," to find repos that contain records for each target collection (paginated)"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Resolve each PDS"}),": for each discovered DID, HappyView resolves the DID document via PLC to find the user's PDS endpoint"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Fetch records"}),": HappyView calls ",(0,i.jsx)(r.code,{children:"com.atproto.repo.listRecords"})," on each PDS for the target collection (paginated) and upserts each record into the local database"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Track progress"}),": counters for ",(0,i.jsx)(r.code,{children:"processed_repos"})," and ",(0,i.jsx)(r.code,{children:"total_records"})," are updated as the job runs"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"job-lifecycle",children:"Job lifecycle"}),"\n",(0,i.jsxs)(r.p,{children:["A backfill job moves through ",(0,i.jsx)(r.code,{children:"pending \u2192 running \u2192 completed"})," (or ",(0,i.jsx)(r.code,{children:"failed"}),"). Unlike earlier versions of HappyView that relied on Tap, the job is only marked ",(0,i.jsx)(r.code,{children:"completed"})," once every discovered repo has been processed end-to-end \u2014 there is no separate downstream queue. Progress is visible in real time on the dashboard's Backfill page."]}),"\n",(0,i.jsxs)(r.p,{children:["If a job fails midway, the ",(0,i.jsx)(r.code,{children:"error"})," field contains the failure reason. Re-running the backfill resumes from scratch but is idempotent (records are upserted by URI)."]}),"\n",(0,i.jsx)(r.h2,{id:"re-running-backfills",children:"Re-running backfills"}),"\n",(0,i.jsx)(r.p,{children:"Re-running a backfill for a collection that's already been backfilled is safe. Each record is upserted by its AT URI, so existing records are refreshed in place and any new records discovered since the last run are added. This also picks up new repos that have joined the network since the previous backfill."}),"\n",(0,i.jsx)(r.h2,{id:"restoring-deleted-records",children:"Restoring deleted records"}),"\n",(0,i.jsx)(r.p,{children:"Deleting records from HappyView (via the dashboard or API) only removes them from the local database \u2014 the records still exist on the atproto network. To restore deleted records, create a backfill job for the affected collection. The backfill will re-discover the repos and re-fetch all records from each PDS, restoring any that were previously deleted."}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons"}),": Control whether lexicons trigger backfill on upload"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/admin/backfill",children:"Admin API \u2014 Backfill"}),": Full reference for backfill endpoints"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2560:(e,r,s)=>{s.d(r,{R:()=>o,x:()=>t});var n=s(63);const i={},l=n.createContext(i);function o(e){const r=n.useContext(l);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(l.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bccc5e9b.c3f06d4f.js b/assets/js/bccc5e9b.c3f06d4f.js deleted file mode 100644 index a1bdf21..0000000 --- a/assets/js/bccc5e9b.c3f06d4f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2431],{9641(e,s,r){r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Tap. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap.","source":"@site/docs/guides/backfill.md","sourceDirName":"guides","slug":"/guides/backfill","permalink":"/guides/backfill","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Index Hooks","permalink":"/guides/index-hooks"},"next":{"title":"Event Logs","permalink":"/guides/event-logs"}}');var i=r(4848),l=r(8453);const t={},a="Backfill",o={},c=[{value:"When backfill runs",id:"when-backfill-runs",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Job lifecycle",id:"job-lifecycle",level:2},{value:"Re-running backfills",id:"re-running-backfills",level:2},{value:"Restoring deleted records",id:"restoring-deleted-records",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"backfill",children:"Backfill"})}),"\n",(0,i.jsxs)(s.p,{children:["When you add a new record-type lexicon, HappyView starts indexing new records from that moment via ",(0,i.jsx)(s.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap."]}),"\n",(0,i.jsx)(s.h2,{id:"when-backfill-runs",children:"When backfill runs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Automatically"})," when a record-type lexicon is uploaded with ",(0,i.jsx)(s.code,{children:"backfill: true"})," (the default). See ",(0,i.jsx)(s.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons - Backfill flag"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Manually"})," via ",(0,i.jsx)(s.code,{children:"POST /admin/backfill"})," or the ",(0,i.jsx)(s.a,{href:"/getting-started/dashboard",children:"dashboard"}),". You can scope a manual backfill to a specific collection, a specific DID, or both."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["See the ",(0,i.jsx)(s.a,{href:"/reference/admin-api#backfill",children:"admin API"})," for endpoint details."]}),"\n",(0,i.jsx)(s.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Determine target collections"}),": uses the specified collection, or all record lexicons with ",(0,i.jsx)(s.code,{children:"backfill: true"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Discover DIDs"}),": HappyView calls the relay's ",(0,i.jsx)(s.code,{children:"com.atproto.sync.listReposByCollection"})," to find repos that contain records for each target collection (paginated, 1000 per page)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Delegate to Tap"}),": HappyView sends discovered DIDs to Tap in batches of 1000 via its ",(0,i.jsx)(s.code,{children:"/repos/add"})," endpoint"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Tap fetches records"}),": Tap handles the actual record fetching from each user's PDS and delivers them to HappyView via the WebSocket channel"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"job-lifecycle",children:"Job lifecycle"}),"\n",(0,i.jsxs)(s.p,{children:['HappyView marks a backfill job as "completed" once it finishes discovering repos and handing DIDs off to Tap (steps 1-3). This does ',(0,i.jsx)(s.strong,{children:"not"})," mean Tap has finished processing all the records. Tap works through them asynchronously after the handoff."]}),"\n",(0,i.jsxs)(s.p,{children:["To see whether Tap is still working through the backlog, check the Tap stats on the dashboard's Backfill page or via ",(0,i.jsx)(s.code,{children:"GET /admin/tap/stats"}),". The ",(0,i.jsx)(s.strong,{children:"outbox buffer"})," indicates how many events are still queued for delivery; a high number means Tap is actively processing."]}),"\n",(0,i.jsx)(s.h2,{id:"re-running-backfills",children:"Re-running backfills"}),"\n",(0,i.jsx)(s.p,{children:"Re-running a backfill for a collection that's already been backfilled is safe. HappyView removes the discovered repos from Tap before re-adding them, which clears Tap's cached state and forces a full re-fetch of all records from each repo's PDS. This means re-running a backfill will restore any records that were previously deleted from HappyView, as well as pick up repos that were added to the network since the last run."}),"\n",(0,i.jsx)(s.h2,{id:"restoring-deleted-records",children:"Restoring deleted records"}),"\n",(0,i.jsx)(s.p,{children:"Deleting records from HappyView (via the dashboard or API) only removes them from the local database \u2014 the records still exist on the AT Protocol network. To restore deleted records, create a backfill job for the affected collection. The backfill will clear Tap's cache for the discovered repos and re-fetch all records from the network, restoring any that were previously deleted."}),"\n",(0,i.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons"}),": Control whether lexicons trigger backfill on upload"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/reference/admin-api#backfill",children:"Admin API"}),": Full reference for backfill endpoints"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/reference/admin-api#tap-stats",children:"Admin API - Tap Stats"}),": Monitor Tap's processing progress"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,l.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453(e,s,r){r.d(s,{R:()=>t,x:()=>a});var n=r(6540);const i={},l=n.createContext(i);function t(e){const s=n.useContext(l);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),n.createElement(l.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bde15bec.006959b8.js b/assets/js/bde15bec.006959b8.js new file mode 100644 index 0000000..795ce41 --- /dev/null +++ b/assets/js/bde15bec.006959b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[6438],{7938:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","source":"@site/docs/reference/scripts/complex-mutations.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/complex-mutations","permalink":"/reference/scripts/complex-mutations","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"},"next":{"title":"Algolia Sync","permalink":"/reference/scripts/algolia-sync"}}');var s=t(199),i=t(2560);const o={},a="Procedure: Complex Mutations",l={},c=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-complex-mutations",children:"Procedure: Complex Mutations"})}),"\n",(0,s.jsx)(n.p,{children:"Load an existing record, apply multiple transformations, and save it back."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n local r = Record.load(input.uri)\n if not r then\n return { error = "not found" }\n end\n\n -- Increment a counter\n r.likeCount = (r.likeCount or 0) + 1\n\n -- Merge tags, deduplicating and capping at 10\n r.tags = r.tags or {}\n if input.tags then\n for _, tag in ipairs(input.tags) do\n local found = false\n for _, t in ipairs(r.tags) do\n if t == tag then\n found = true\n break\n end\n end\n if not found then\n r.tags[#r.tags + 1] = tag\n end\n end\n -- Keep only the last 10\n while #r.tags > 10 do\n table.remove(r.tags, 1)\n end\n end\n\n -- Normalize a string field\n if input.title then\n r.title = string.gsub(input.title, "^%s+", "")\n r.title = string.gsub(r.title, "%s+$", "")\n end\n\n -- Set a computed field\n r.updatedAt = now()\n\n r:save()\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Load the existing record with ",(0,s.jsx)(n.a,{href:"/reference/lua/record-api#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),". This gives you a mutable ",(0,s.jsx)(n.code,{children:"Record"})," instance with all the current field values."]}),"\n",(0,s.jsxs)(n.li,{children:["Apply transformations directly on the record's fields:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Increment a counter"}),": use ",(0,s.jsx)(n.code,{children:"or 0"})," to handle the field being ",(0,s.jsx)(n.code,{children:"nil"})," on first access."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Merge tags"}),": iterate over ",(0,s.jsx)(n.code,{children:"input.tags"}),", skip duplicates already in ",(0,s.jsx)(n.code,{children:"r.tags"}),", append new ones, then trim the list to 10."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Normalize a string"}),": use ",(0,s.jsx)(n.code,{children:"string.gsub"})," to trim whitespace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Set a timestamp"}),": use ",(0,s.jsx)(n.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(n.code,{children:"now()"})})," for UTC ISO 8601."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Call ",(0,s.jsx)(n.code,{children:"r:save()"}),". Since ",(0,s.jsx)(n.code,{children:"_uri"})," is set (from the load), this calls ",(0,s.jsx)(n.code,{children:"putRecord"})," to update the record on the user's PDS."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",\n "tags": ["tutorial", "atproto"],\n "title": " My Post Title "\n }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern is useful when updates involve more than simple field replacement: counters, bounded lists, string normalization, or computed fields. All mutations happen in memory before the single ",(0,s.jsx)(n.code,{children:"r:save()"})," call, so there's no partial save: either all changes are written or none are."]}),"\n",(0,s.jsxs)(n.p,{children:["If the record has a schema, HappyView only sends fields defined in the schema's ",(0,s.jsx)(n.code,{children:"properties"})," to the PDS on save. Extra fields you set on the record instance are ignored."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var r=t(63);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bde15bec.3fe537d8.js b/assets/js/bde15bec.3fe537d8.js deleted file mode 100644 index ce48278..0000000 --- a/assets/js/bde15bec.3fe537d8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6438],{8796(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","source":"@site/docs/reference/scripts/complex-mutations.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/complex-mutations","permalink":"/reference/scripts/complex-mutations","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"},"next":{"title":"Algolia Sync","permalink":"/reference/scripts/algolia-sync"}}');var s=t(4848),i=t(8453);const o={},a="Procedure: Complex Mutations",l={},c=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-complex-mutations",children:"Procedure: Complex Mutations"})}),"\n",(0,s.jsx)(n.p,{children:"Load an existing record, apply multiple transformations, and save it back."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n local r = Record.load(input.uri)\n if not r then\n return { error = "not found" }\n end\n\n -- Increment a counter\n r.likeCount = (r.likeCount or 0) + 1\n\n -- Merge tags, deduplicating and capping at 10\n r.tags = r.tags or {}\n if input.tags then\n for _, tag in ipairs(input.tags) do\n local found = false\n for _, t in ipairs(r.tags) do\n if t == tag then\n found = true\n break\n end\n end\n if not found then\n r.tags[#r.tags + 1] = tag\n end\n end\n -- Keep only the last 10\n while #r.tags > 10 do\n table.remove(r.tags, 1)\n end\n end\n\n -- Normalize a string field\n if input.title then\n r.title = string.gsub(input.title, "^%s+", "")\n r.title = string.gsub(r.title, "%s+$", "")\n end\n\n -- Set a computed field\n r.updatedAt = now()\n\n r:save()\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Load the existing record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),". This gives you a mutable ",(0,s.jsx)(n.code,{children:"Record"})," instance with all the current field values."]}),"\n",(0,s.jsxs)(n.li,{children:["Apply transformations directly on the record's fields:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Increment a counter"}),": use ",(0,s.jsx)(n.code,{children:"or 0"})," to handle the field being ",(0,s.jsx)(n.code,{children:"nil"})," on first access."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Merge tags"}),": iterate over ",(0,s.jsx)(n.code,{children:"input.tags"}),", skip duplicates already in ",(0,s.jsx)(n.code,{children:"r.tags"}),", append new ones, then trim the list to 10."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Normalize a string"}),": use ",(0,s.jsx)(n.code,{children:"string.gsub"})," to trim whitespace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Set a timestamp"}),": use ",(0,s.jsx)(n.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(n.code,{children:"now()"})})," for UTC ISO 8601."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Call ",(0,s.jsx)(n.code,{children:"r:save()"}),". Since ",(0,s.jsx)(n.code,{children:"_uri"})," is set (from the load), this calls ",(0,s.jsx)(n.code,{children:"putRecord"})," to update the record on the user's PDS."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",\n "tags": ["tutorial", "atproto"],\n "title": " My Post Title "\n }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern is useful when updates involve more than simple field replacement: counters, bounded lists, string normalization, or computed fields. All mutations happen in memory before the single ",(0,s.jsx)(n.code,{children:"r:save()"})," call, so there's no partial save: either all changes are written or none are."]}),"\n",(0,s.jsxs)(n.p,{children:["If the record has a schema, HappyView only sends fields defined in the schema's ",(0,s.jsx)(n.code,{children:"properties"})," to the PDS on save. Extra fields you set on the record instance are ignored."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>o,x:()=>a});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c1dc14fc.80693b03.js b/assets/js/c1dc14fc.80693b03.js new file mode 100644 index 0000000..3f7f38e --- /dev/null +++ b/assets/js/c1dc14fc.80693b03.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8030],{6322:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"sdk/oauth-client-browser","title":"Browser Client","description":"The browser client handles the full OAuth redirect flow for browser apps authenticating with a HappyView instance. It wraps the OAuth Client with Web Crypto, localStorage, and atproto handle/DID resolution.","source":"@site/docs/sdk/oauth-client-browser.md","sourceDirName":"sdk","slug":"/sdk/oauth-client-browser","permalink":"/sdk/oauth-client-browser","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"OAuth Client","permalink":"/sdk/oauth-client"},"next":{"title":"XRPC API","permalink":"/reference/xrpc-api"}}');var i=t(199),r=t(2560);const o={},a="Browser Client",l={},c=[{value:"Installation",id:"installation",level:2},{value:"Setup",id:"setup",level:2},{value:"Login",id:"login",level:2},{value:"What happens during login",id:"what-happens-during-login",level:3},{value:"OAuth callback",id:"oauth-callback",level:2},{value:"Restore session",id:"restore-session",level:2},{value:"Authenticated requests",id:"authenticated-requests",level:2},{value:"Logout",id:"logout",level:2},{value:"Resolution utilities",id:"resolution-utilities",level:2},{value:"Re-exports",id:"re-exports",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"browser-client",children:"Browser Client"})}),"\n",(0,i.jsxs)(n.p,{children:["The browser client handles the full OAuth redirect flow for browser apps authenticating with a HappyView instance. It wraps the ",(0,i.jsx)(n.a,{href:"/sdk/oauth-client",children:"OAuth Client"})," with Web Crypto, localStorage, and atproto handle/DID resolution."]}),"\n",(0,i.jsxs)(n.p,{children:["If you're starting a new app, consider using ",(0,i.jsx)(n.a,{href:"/sdk/lex-agent",children:(0,i.jsx)(n.code,{children:"@happyview/lex-agent"})})," with ",(0,i.jsx)(n.code,{children:"@atproto/lex"})," instead \u2014 it provides type-safe XRPC calls and is the recommended way to interact with HappyView. This package is primarily useful if your app already uses ",(0,i.jsx)(n.code,{children:"@atproto/oauth-client-browser"})," and you want to add HappyView authentication alongside it."]}),"\n",(0,i.jsx)(n.h2,{id:"installation",children:"Installation"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"npm install @happyview/oauth-client-browser\n"})}),"\n",(0,i.jsx)(n.h2,{id:"setup",children:"Setup"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import { HappyViewBrowserClient } from "@happyview/oauth-client-browser";\n\nconst client = new HappyViewBrowserClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n});\n'})}),"\n",(0,i.jsx)(n.p,{children:"The client uses Web Crypto and localStorage by default. You can override either:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'const client = new HappyViewBrowserClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n crypto: myCustomCryptoAdapter,\n storage: myCustomStorageAdapter,\n});\n'})}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["The API client must be registered as a ",(0,i.jsx)(n.strong,{children:"public"})," client (no secret) with your app's origin in ",(0,i.jsx)(n.code,{children:"allowed_origins"}),". See ",(0,i.jsx)(n.a,{href:"/getting-started/authentication#api-clients-confidential-vs-public",children:"Authentication \u2014 API clients"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"login",children:"Login"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"login()"})," resolves the user's handle, discovers their PDS, provisions a DPoP key, and redirects the browser to the PDS authorization server:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'await client.login("alice.bsky.social");\n// Browser redirects \u2014 code stops here\n'})}),"\n",(0,i.jsxs)(n.p,{children:["If you need the authorization URL without redirecting (e.g., for a popup or custom UI), use ",(0,i.jsx)(n.code,{children:"prepareLogin()"}),":"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'const { authorizationUrl, did, state } =\n await client.prepareLogin("alice.bsky.social");\n\n// Open in a popup, new tab, etc.\nwindow.open(authorizationUrl);\n'})}),"\n",(0,i.jsx)(n.h3,{id:"what-happens-during-login",children:"What happens during login"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["The handle is resolved to a DID via ",(0,i.jsx)(n.code,{children:"resolveHandleToDid"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"The DID document is fetched to find the PDS URL."}),"\n",(0,i.jsx)(n.li,{children:"The PDS's OAuth authorization server metadata is fetched."}),"\n",(0,i.jsx)(n.li,{children:"A DPoP key is provisioned from HappyView."}),"\n",(0,i.jsx)(n.li,{children:"PKCE challenge/verifier pairs are generated (one for HappyView's DPoP provisioning, one for the PDS authorization server)."}),"\n",(0,i.jsx)(n.li,{children:"The pending auth state is stored in localStorage."}),"\n",(0,i.jsx)(n.li,{children:"The browser is redirected to the PDS authorization endpoint."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"oauth-callback",children:"OAuth callback"}),"\n",(0,i.jsxs)(n.p,{children:["Your app needs an ",(0,i.jsx)(n.code,{children:"/oauth/callback"})," route. On that page, call ",(0,i.jsx)(n.code,{children:"callback()"})," to complete the token exchange:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"// On /oauth/callback\nconst session = await client.callback();\n// Session is now stored in localStorage and ready to use\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"callback()"})," reads the ",(0,i.jsx)(n.code,{children:"code"})," and ",(0,i.jsx)(n.code,{children:"state"})," from the URL query string, exchanges the code for tokens at the PDS token endpoint, and registers the session with HappyView. The pending auth state is cleaned up automatically."]}),"\n",(0,i.jsx)(n.h2,{id:"restore-session",children:"Restore session"}),"\n",(0,i.jsx)(n.p,{children:"On subsequent page loads, restore the session from localStorage instead of re-authenticating:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"const session = await client.restore();\nif (session) {\n // User is still logged in\n}\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Returns ",(0,i.jsx)(n.code,{children:"null"})," if no stored session is found."]}),"\n",(0,i.jsx)(n.h2,{id:"authenticated-requests",children:"Authenticated requests"}),"\n",(0,i.jsxs)(n.p,{children:["The session's ",(0,i.jsx)(n.code,{children:"fetchHandler"})," attaches DPoP proof headers automatically:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'const response = await session.fetchHandler(\n "/xrpc/com.example.getStuff?limit=10",\n { method: "GET" },\n);\n\nconst data = await response.json();\n'})}),"\n",(0,i.jsx)(n.p,{children:"Pass a relative path (prepends the HappyView instance URL) or a full URL (used as-is)."}),"\n",(0,i.jsx)(n.h2,{id:"logout",children:"Logout"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:"await client.logout(session.did);\n"})}),"\n",(0,i.jsx)(n.h2,{id:"resolution-utilities",children:"Resolution utilities"}),"\n",(0,i.jsx)(n.p,{children:"The browser client exports the resolution functions it uses internally. These are useful if you need to resolve handles or discover PDS URLs outside of the login flow:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import {\n resolveHandleToDid,\n resolveDidDocument,\n resolvePdsUrl,\n resolveAuthServerMetadata,\n} from "@happyview/oauth-client-browser";\n\nconst did = await resolveHandleToDid("alice.bsky.social");\nconst doc = await resolveDidDocument(did);\nconst pdsUrl = resolvePdsUrl(doc);\nconst authMeta = await resolveAuthServerMetadata(pdsUrl);\n'})}),"\n",(0,i.jsx)(n.h2,{id:"re-exports",children:"Re-exports"}),"\n",(0,i.jsxs)(n.p,{children:["This package re-exports everything from ",(0,i.jsx)(n.code,{children:"@happyview/oauth-client"}),", so you don't need to install the core package separately. All types, error classes, and utilities are available:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-typescript",children:'import {\n HappyViewBrowserClient,\n HappyViewSession,\n ApiError,\n type CryptoAdapter,\n type StorageAdapter,\n} from "@happyview/oauth-client-browser";\n'})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2560:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(63);const i={},r=s.createContext(i);function o(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c6f1ff95.1c536871.js b/assets/js/c6f1ff95.1c536871.js new file mode 100644 index 0000000..b83bbda --- /dev/null +++ b/assets/js/c6f1ff95.1c536871.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8649],{7667:(l,e,n)=>{n.r(e),n.d(e,{assets:()=>i,contentTitle:()=>h,default:()=>o,frontMatter:()=>d,metadata:()=>a,toc:()=>t});const a=JSON.parse('{"id":"reference/lua/standard-libraries","title":"Standard Libraries","description":"The following Lua 5.4 standard library modules and builtins are available in the HappyView sandbox.","source":"@site/docs/reference/lua/standard-libraries.md","sourceDirName":"reference/lua","slug":"/reference/lua/standard-libraries","permalink":"/reference/lua/standard-libraries","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Utility Globals","permalink":"/reference/lua/utility-globals"},"next":{"title":"Glossary","permalink":"/reference/glossary"}}');var r=n(199),s=n(2560);const d={},h="Standard Libraries",i={},t=[{value:"string",id:"string",level:2},{value:"table",id:"table",level:2},{value:"math",id:"math",level:2},{value:"os (safe subset)",id:"os-safe-subset",level:2},{value:"Builtins",id:"builtins",level:2},{value:"Removed modules",id:"removed-modules",level:2}];function c(l){const e={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...l.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(e.header,{children:(0,r.jsx)(e.h1,{id:"standard-libraries",children:"Standard Libraries"})}),"\n",(0,r.jsx)(e.p,{children:"The following Lua 5.4 standard library modules and builtins are available in the HappyView sandbox."}),"\n",(0,r.jsx)(e.h2,{id:"string",children:"string"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.byte",children:(0,r.jsx)(e.code,{children:"byte"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.char",children:(0,r.jsx)(e.code,{children:"char"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.find",children:(0,r.jsx)(e.code,{children:"find"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.format",children:(0,r.jsx)(e.code,{children:"format"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gmatch",children:(0,r.jsx)(e.code,{children:"gmatch"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gsub",children:(0,r.jsx)(e.code,{children:"gsub"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.len",children:(0,r.jsx)(e.code,{children:"len"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.lower",children:(0,r.jsx)(e.code,{children:"lower"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.match",children:(0,r.jsx)(e.code,{children:"match"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.rep",children:(0,r.jsx)(e.code,{children:"rep"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.reverse",children:(0,r.jsx)(e.code,{children:"reverse"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.sub",children:(0,r.jsx)(e.code,{children:"sub"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.upper",children:(0,r.jsx)(e.code,{children:"upper"})})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"table",children:"table"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.concat",children:(0,r.jsx)(e.code,{children:"concat"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.insert",children:(0,r.jsx)(e.code,{children:"insert"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.remove",children:(0,r.jsx)(e.code,{children:"remove"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.sort",children:(0,r.jsx)(e.code,{children:"sort"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,r.jsx)(e.code,{children:"unpack"})})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"math",children:"math"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.abs",children:(0,r.jsx)(e.code,{children:"abs"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.ceil",children:(0,r.jsx)(e.code,{children:"ceil"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.floor",children:(0,r.jsx)(e.code,{children:"floor"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.max",children:(0,r.jsx)(e.code,{children:"max"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.min",children:(0,r.jsx)(e.code,{children:"min"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.random",children:(0,r.jsx)(e.code,{children:"random"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.sqrt",children:(0,r.jsx)(e.code,{children:"sqrt"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.huge",children:(0,r.jsx)(e.code,{children:"huge"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.pi",children:(0,r.jsx)(e.code,{children:"pi"})})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"os-safe-subset",children:"os (safe subset)"}),"\n",(0,r.jsxs)(e.p,{children:["Only the following safe functions are available from the ",(0,r.jsx)(e.code,{children:"os"})," module:"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-os.time",children:(0,r.jsx)(e.code,{children:"time"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-os.date",children:(0,r.jsx)(e.code,{children:"date"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-os.difftime",children:(0,r.jsx)(e.code,{children:"difftime"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-os.clock",children:(0,r.jsx)(e.code,{children:"clock"})})}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:["Dangerous functions like ",(0,r.jsx)(e.code,{children:"os.execute"}),", ",(0,r.jsx)(e.code,{children:"os.remove"}),", ",(0,r.jsx)(e.code,{children:"os.rename"}),", and ",(0,r.jsx)(e.code,{children:"os.exit"})," are not available."]}),"\n",(0,r.jsx)(e.h2,{id:"builtins",children:"Builtins"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-print",children:(0,r.jsx)(e.code,{children:"print"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tostring",children:(0,r.jsx)(e.code,{children:"tostring"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tonumber",children:(0,r.jsx)(e.code,{children:"tonumber"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-type",children:(0,r.jsx)(e.code,{children:"type"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pairs",children:(0,r.jsx)(e.code,{children:"pairs"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-ipairs",children:(0,r.jsx)(e.code,{children:"ipairs"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-next",children:(0,r.jsx)(e.code,{children:"next"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-select",children:(0,r.jsx)(e.code,{children:"select"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,r.jsx)(e.code,{children:"unpack"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-error",children:(0,r.jsx)(e.code,{children:"error"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pcall",children:(0,r.jsx)(e.code,{children:"pcall"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-xpcall",children:(0,r.jsx)(e.code,{children:"xpcall"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-assert",children:(0,r.jsx)(e.code,{children:"assert"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-setmetatable",children:(0,r.jsx)(e.code,{children:"setmetatable"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-getmetatable",children:(0,r.jsx)(e.code,{children:"getmetatable"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawget",children:(0,r.jsx)(e.code,{children:"rawget"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawset",children:(0,r.jsx)(e.code,{children:"rawset"})})}),"\n",(0,r.jsx)(e.li,{children:(0,r.jsx)(e.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawequal",children:(0,r.jsx)(e.code,{children:"rawequal"})})}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"removed-modules",children:"Removed modules"}),"\n",(0,r.jsxs)(e.p,{children:["The following standard Lua modules are ",(0,r.jsx)(e.strong,{children:"removed"})," and unavailable in the sandbox:"]}),"\n",(0,r.jsxs)(e.p,{children:[(0,r.jsx)(e.code,{children:"io"}),", ",(0,r.jsx)(e.code,{children:"debug"}),", ",(0,r.jsx)(e.code,{children:"package"}),", ",(0,r.jsx)(e.code,{children:"require"}),", ",(0,r.jsx)(e.code,{children:"dofile"}),", ",(0,r.jsx)(e.code,{children:"loadfile"}),", ",(0,r.jsx)(e.code,{children:"load"}),", ",(0,r.jsx)(e.code,{children:"collectgarbage"})]})]})}function o(l={}){const{wrapper:e}={...(0,s.R)(),...l.components};return e?(0,r.jsx)(e,{...l,children:(0,r.jsx)(c,{...l})}):c(l)}},2560:(l,e,n)=>{n.d(e,{R:()=>d,x:()=>h});var a=n(63);const r={},s=a.createContext(r);function d(l){const e=a.useContext(s);return a.useMemo(function(){return"function"==typeof l?l(e):{...e,...l}},[e,l])}function h(l){let e;return e=l.disableParentContext?"function"==typeof l.components?l.components(r):l.components||r:d(l.components),a.createElement(s.Provider,{value:e},l.children)}}}]); \ No newline at end of file diff --git a/assets/js/c985d368.52ae0993.js b/assets/js/c985d368.52ae0993.js new file mode 100644 index 0000000..ab89073 --- /dev/null +++ b/assets/js/c985d368.52ae0993.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[2007],{4799:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","source":"@site/docs/reference/scripts/cascading-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/cascading-delete","permalink":"/reference/scripts/cascading-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"},"next":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"}}');var s=n(199),c=n(2560);const o={},d="Procedure: Cascading Delete",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function i(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-cascading-delete",children:"Procedure: Cascading Delete"})}),"\n",(0,s.jsx)(r.p,{children:"Delete a record and all related records across collections."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n -- Load the primary record\n local primary = Record.load(input.uri)\n if not primary then\n return { error = "not found" }\n end\n\n -- Find related records that reference this URI\n local comments = db.query({\n collection = "xyz.statusphere.comment",\n did = caller_did,\n limit = 100,\n })\n\n -- Collect records to delete\n local to_delete = { primary }\n for _, comment in ipairs(comments.records) do\n if comment.postUri == input.uri then\n local r = Record.load(comment.uri)\n if r then\n to_delete[#to_delete + 1] = r\n end\n end\n end\n\n -- Delete all matched records\n for _, r in ipairs(to_delete) do\n r:delete()\n end\n\n return {\n deleted = #to_delete,\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:"Load the primary record by URI. Return early if it doesn't exist."}),"\n",(0,s.jsx)(r.li,{children:"Query for related records, in this example comments by the same user that reference the primary record's URI."}),"\n",(0,s.jsxs)(r.li,{children:["Load each related record with ",(0,s.jsx)(r.a,{href:"/reference/lua/record-api#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})})," to get a deletable ",(0,s.jsx)(r.code,{children:"Record"})," instance."]}),"\n",(0,s.jsxs)(r.li,{children:["Delete everything. Each ",(0,s.jsx)(r.code,{children:"r:delete()"})," removes the record from the user's PDS and the local index."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \\\n -H "X-Client-Key: $CLIENT_KEY" \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }\'\n'})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "deleted": 4\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Cascading deletes are useful when your data model has parent-child relationships across collections. For example, deleting a post should also clean up its comments, reactions, or metadata records. This keeps the user's repo and the local index consistent."}),"\n",(0,s.jsxs)(r.p,{children:["Note that this only deletes records owned by ",(0,s.jsx)(r.code,{children:"caller_did"}),". atproto records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>d});var t=n(63);const s={},c=t.createContext(s);function o(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c985d368.9be5144d.js b/assets/js/c985d368.9be5144d.js deleted file mode 100644 index beb12f1..0000000 --- a/assets/js/c985d368.9be5144d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2007],{4436(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","source":"@site/docs/reference/scripts/cascading-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/cascading-delete","permalink":"/reference/scripts/cascading-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"},"next":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"}}');var s=n(4848),c=n(8453);const o={},d="Procedure: Cascading Delete",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function i(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-cascading-delete",children:"Procedure: Cascading Delete"})}),"\n",(0,s.jsx)(r.p,{children:"Delete a record and all related records across collections."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n -- Load the primary record\n local primary = Record.load(input.uri)\n if not primary then\n return { error = "not found" }\n end\n\n -- Find related records that reference this URI\n local comments = db.query({\n collection = "xyz.statusphere.comment",\n did = caller_did,\n limit = 100,\n })\n\n -- Collect records to delete\n local to_delete = { primary }\n for _, comment in ipairs(comments.records) do\n if comment.postUri == input.uri then\n local r = Record.load(comment.uri)\n if r then\n to_delete[#to_delete + 1] = r\n end\n end\n end\n\n -- Delete all matched records\n for _, r in ipairs(to_delete) do\n r:delete()\n end\n\n return {\n deleted = #to_delete,\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:"Load the primary record by URI. Return early if it doesn't exist."}),"\n",(0,s.jsx)(r.li,{children:"Query for related records, in this example comments by the same user that reference the primary record's URI."}),"\n",(0,s.jsxs)(r.li,{children:["Load each related record with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})})," to get a deletable ",(0,s.jsx)(r.code,{children:"Record"})," instance."]}),"\n",(0,s.jsxs)(r.li,{children:["Delete everything. Each ",(0,s.jsx)(r.code,{children:"r:delete()"})," removes the record from the user's PDS and the local index."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }\'\n'})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "deleted": 4\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Cascading deletes are useful when your data model has parent-child relationships across collections. For example, deleting a post should also clean up its comments, reactions, or metadata records. This keeps the user's repo and the local index consistent."}),"\n",(0,s.jsxs)(r.p,{children:["Note that this only deletes records owned by ",(0,s.jsx)(r.code,{children:"caller_did"}),". AT Protocol records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},8453(e,r,n){n.d(r,{R:()=>o,x:()=>d});var t=n(6540);const s={},c=t.createContext(s);function o(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cdc0cfc2.8866f544.js b/assets/js/cdc0cfc2.8866f544.js new file mode 100644 index 0000000..bf85547 --- /dev/null +++ b/assets/js/cdc0cfc2.8866f544.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5003],{9638:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>t,default:()=>h,frontMatter:()=>a,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"reference/admin/domains","title":"Admin API: Domains","description":"Manage the domains a HappyView instance serves. Each domain gets its own atproto OAuth client identity. The primary domain is set from PUBLIC_URL on first boot. All endpoints require the settings:manage permission.","source":"@site/docs/reference/admin/domains.md","sourceDirName":"reference/admin","slug":"/reference/admin/domains","permalink":"/reference/admin/domains","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Instance Settings","permalink":"/reference/admin/settings"},"next":{"title":"Script Variables","permalink":"/reference/admin/script-variables"}}');var d=s(199),r=s(2560);const a={},t="Admin API: Domains",o={},c=[{value:"List domains",id:"list-domains",level:2},{value:"Add a domain",id:"add-a-domain",level:2},{value:"Remove a domain",id:"remove-a-domain",level:2},{value:"Set primary domain",id:"set-primary-domain",level:2}];function l(e){const n={code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"admin-api-domains",children:"Admin API: Domains"})}),"\n",(0,d.jsxs)(n.p,{children:["Manage the domains a HappyView instance serves. Each domain gets its own atproto OAuth client identity. The primary domain is set from ",(0,d.jsx)(n.code,{children:"PUBLIC_URL"})," on first boot. All endpoints require the ",(0,d.jsx)(n.code,{children:"settings:manage"})," permission."]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(n.h2,{id:"list-domains",children:"List domains"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/domains\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/domains -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "url": "https://gamesgamesgamesgames.games",\n "is_primary": true,\n "created_at": "2026-04-16T00:00:00Z",\n "updated_at": "2026-04-16T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h2,{id:"add-a-domain",children:"Add a domain"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/domains\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/domains \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "url": "https://api.cartridge.dev" }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsx)(n.tbody,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"url"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsxs)(n.td,{children:["Valid origin (scheme + host, no path or trailing slash). Must be ",(0,d.jsx)(n.code,{children:"https"})," unless ",(0,d.jsx)(n.code,{children:"PUBLIC_URL"})," is a loopback address."]})]})})]}),"\n",(0,d.jsxs)(n.p,{children:["Returns ",(0,d.jsx)(n.code,{children:"400 Bad Request"})," if the URL is invalid or already registered."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440001",\n "url": "https://api.cartridge.dev",\n "is_primary": false,\n "created_at": "2026-04-16T00:00:00Z",\n "updated_at": "2026-04-16T00:00:00Z"\n}\n'})}),"\n",(0,d.jsx)(n.p,{children:"Also builds an OAuth client for the domain and updates the in-memory cache."}),"\n",(0,d.jsx)(n.h2,{id:"remove-a-domain",children:"Remove a domain"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/domains/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/domains/550e8400-e29b-41d4-a716-446655440001 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Returns ",(0,d.jsx)(n.code,{children:"400 Bad Request"})," if the domain is primary \u2014 set a different domain as primary first. Returns ",(0,d.jsx)(n.code,{children:"404 Not Found"})," if the domain doesn't exist."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.p,{children:"Also removes the domain's OAuth client and cache entry."}),"\n",(0,d.jsx)(n.h2,{id:"set-primary-domain",children:"Set primary domain"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/domains/{id}/primary\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/domains/550e8400-e29b-41d4-a716-446655440001/primary \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Sets the target domain as the primary. Unsets the current primary in a single operation. Returns ",(0,d.jsx)(n.code,{children:"404 Not Found"})," if the domain doesn't exist."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.p,{children:"Also updates the in-memory cache and primary client reference."})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(l,{...e})}):l(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>t});var i=s(63);const d={},r=i.createContext(d);function a(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d1a0112a.021f365a.js b/assets/js/d1a0112a.021f365a.js new file mode 100644 index 0000000..4dc9061 --- /dev/null +++ b/assets/js/d1a0112a.021f365a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5080],{7538:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});const i=JSON.parse('{"id":"guides/postgres-to-sqlite-migration","title":"Migrating from Postgres to SQLite","description":"This guide covers migrating an existing HappyView deployment from Postgres to SQLite. If you are staying on Postgres, no action is required.","source":"@site/docs/guides/postgres-to-sqlite-migration.md","sourceDirName":"guides","slug":"/guides/postgres-to-sqlite-migration","permalink":"/guides/postgres-to-sqlite-migration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Database Setup","permalink":"/guides/database-setup"},"next":{"title":"SQLite \u2192 Postgres Migration","permalink":"/guides/sqlite-to-postgres-migration"}}');var n=s(199),r=s(2560);const o={},a="Migrating from Postgres to SQLite",l={},d=[{value:"Overview",id:"overview",level:2},{value:"Step 1: Export your data",id:"step-1-export-your-data",level:2},{value:"Step 2: Update environment variables",id:"step-2-update-environment-variables",level:2},{value:"Step 3: Migrate Lua scripts",id:"step-3-migrate-lua-scripts",level:2},{value:"Run the codemod tool",id:"run-the-codemod-tool",level:3},{value:"What the codemod converts automatically",id:"what-the-codemod-converts-automatically",level:3},{value:"What it flags for manual review",id:"what-it-flags-for-manual-review",level:3},{value:"Step 4: Import data into SQLite",id:"step-4-import-data-into-sqlite",level:2},{value:"Step 5: Update Docker Compose (if applicable)",id:"step-5-update-docker-compose-if-applicable",level:2},{value:"Rollback",id:"rollback",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"migrating-from-postgres-to-sqlite",children:"Migrating from Postgres to SQLite"})}),"\n",(0,n.jsx)(t.p,{children:"This guide covers migrating an existing HappyView deployment from Postgres to SQLite. If you are staying on Postgres, no action is required."}),"\n",(0,n.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,n.jsxs)(t.p,{children:["HappyView now defaults to SQLite and writes all internal SQL in SQLite syntax. When running against Postgres, HappyView translates queries automatically. However, if you have ",(0,n.jsx)(t.strong,{children:"Lua scripts"})," that contain raw Postgres SQL, those scripts need to be updated to use SQLite syntax instead."]}),"\n",(0,n.jsx)(t.h2,{id:"step-1-export-your-data",children:"Step 1: Export your data"}),"\n",(0,n.jsx)(t.p,{children:"Back up your Postgres database before making any changes:"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"pg_dump -U happyview happyview > happyview_backup.sql\n"})}),"\n",(0,n.jsx)(t.h2,{id:"step-2-update-environment-variables",children:"Step 2: Update environment variables"}),"\n",(0,n.jsxs)(t.p,{children:["Change your ",(0,n.jsx)(t.code,{children:".env"})," to use SQLite:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"# Before\nDATABASE_URL=postgres://happyview:happyview@localhost/happyview\n\n# After\nDATABASE_URL=sqlite://data/happyview.db?mode=rwc\n"})}),"\n",(0,n.jsxs)(t.p,{children:["If you had ",(0,n.jsx)(t.code,{children:"DATABASE_BACKEND"})," set, update it as well:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"DATABASE_BACKEND=sqlite\n"})}),"\n",(0,n.jsx)(t.h2,{id:"step-3-migrate-lua-scripts",children:"Step 3: Migrate Lua scripts"}),"\n",(0,n.jsx)(t.p,{children:"If you have Lua scripts with raw SQL queries, they need to be converted from Postgres syntax to SQLite syntax. A codemod tool is provided to automate this."}),"\n",(0,n.jsx)(t.h3,{id:"run-the-codemod-tool",children:"Run the codemod tool"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-sh",children:"cargo run --bin migrate-lua-sql -- /path/to/lua/scripts\n"})}),"\n",(0,n.jsxs)(t.p,{children:["The tool scans all ",(0,n.jsx)(t.code,{children:".lua"})," files in the given directory and rewrites Postgres SQL patterns to SQLite equivalents."]}),"\n",(0,n.jsx)(t.h3,{id:"what-the-codemod-converts-automatically",children:"What the codemod converts automatically"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"$1"}),", ",(0,n.jsx)(t.code,{children:"$2"}),", etc. parameter placeholders to ",(0,n.jsx)(t.code,{children:"?"})]}),"\n",(0,n.jsxs)(t.li,{children:["JSON operators (",(0,n.jsx)(t.code,{children:"->"}),", ",(0,n.jsx)(t.code,{children:"->>"}),") and ",(0,n.jsx)(t.code,{children:"::jsonb"})," casts to ",(0,n.jsx)(t.code,{children:"json_extract()"})," calls"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ILIKE"})," to ",(0,n.jsx)(t.code,{children:"LIKE"})," (SQLite ",(0,n.jsx)(t.code,{children:"LIKE"})," is case-insensitive for ASCII by default)"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NOW()"})," to ",(0,n.jsx)(t.code,{children:"datetime('now')"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"NOW() + INTERVAL '...'"})," / ",(0,n.jsx)(t.code,{children:"NOW() - INTERVAL '...'"})," to ",(0,n.jsx)(t.code,{children:"datetime('now', '...')"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"TRUE"}),"/",(0,n.jsx)(t.code,{children:"FALSE"})," literals to ",(0,n.jsx)(t.code,{children:"1"}),"/",(0,n.jsx)(t.code,{children:"0"})]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"what-it-flags-for-manual-review",children:"What it flags for manual review"}),"\n",(0,n.jsx)(t.p,{children:"The tool prints warnings for patterns it cannot convert automatically:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["JSONB ",(0,n.jsx)(t.code,{children:"?"})," (contains-key) operator \u2014 consider using ",(0,n.jsx)(t.code,{children:"json_each()"})," with an ",(0,n.jsx)(t.code,{children:"EXISTS"})," subquery"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"make_interval()"})," \u2014 Postgres-specific, needs manual conversion"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"SIMILAR TO"})," \u2014 use ",(0,n.jsx)(t.code,{children:"LIKE"})," or ",(0,n.jsx)(t.code,{children:"GLOB"})," instead"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"ANY()"})," / ",(0,n.jsx)(t.code,{children:"ALL()"})," array operators \u2014 no direct SQLite equivalent"]}),"\n",(0,n.jsxs)(t.li,{children:["Type casts other than ",(0,n.jsx)(t.code,{children:"::jsonb"})," (e.g., ",(0,n.jsx)(t.code,{children:"::text"}),", ",(0,n.jsx)(t.code,{children:"::integer"}),") \u2014 may need manual conversion to ",(0,n.jsx)(t.code,{children:"CAST(... AS ...)"})]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"Review the flagged lines and update them manually."}),"\n",(0,n.jsx)(t.h2,{id:"step-4-import-data-into-sqlite",children:"Step 4: Import data into SQLite"}),"\n",(0,n.jsxs)(t.p,{children:["Start HappyView with the new ",(0,n.jsx)(t.code,{children:"DATABASE_URL"}),". It will create the SQLite database and run migrations automatically. If you need to import existing records, use the backfill feature to re-index from the network:"]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Start HappyView with the new SQLite ",(0,n.jsx)(t.code,{children:"DATABASE_URL"})]}),"\n",(0,n.jsx)(t.li,{children:"Upload your lexicons via the dashboard or admin API"}),"\n",(0,n.jsxs)(t.li,{children:["Run a backfill for each collection (dashboard or ",(0,n.jsx)(t.code,{children:"POST /admin/backfill"}),")"]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"For small datasets, this is the simplest approach since backfill fetches all records fresh from the network."}),"\n",(0,n.jsx)(t.h2,{id:"step-5-update-docker-compose-if-applicable",children:"Step 5: Update Docker Compose (if applicable)"}),"\n",(0,n.jsxs)(t.p,{children:["If you were running Postgres via Docker Compose, you can now comment out the ",(0,n.jsx)(t.code,{children:"postgres"})," service since it is no longer needed. See the ",(0,n.jsx)(t.a,{href:"/guides/database-setup#docker-compose",children:"database setup guide"})," for details."]}),"\n",(0,n.jsx)(t.h2,{id:"rollback",children:"Rollback"}),"\n",(0,n.jsxs)(t.p,{children:["To switch back to Postgres, revert your ",(0,n.jsx)(t.code,{children:"DATABASE_URL"})," to the Postgres connection string. Your Postgres database remains unchanged \u2014 HappyView does not modify it during the migration to SQLite."]}),"\n",(0,n.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/sqlite-to-postgres-migration",children:"SQLite \u2192 Postgres migration"})," \u2014 migrate in the opposite direction"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/database-setup",children:"Database setup"})," \u2014 choose between SQLite and Postgres for new instances"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/backfill",children:"Backfill"})," \u2014 re-index records from the network after switching backends"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/scripting",children:"Lua scripting"})," \u2014 write SQL that works against either backend"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},2560:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>a});var i=s(63);const n={},r=i.createContext(n);function o(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d26b9010.6c09a47c.js b/assets/js/d26b9010.6c09a47c.js deleted file mode 100644 index c4683c2..0000000 --- a/assets/js/d26b9010.6c09a47c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9301],{1952(e,n,s){s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"guides/api-keys","title":"API Keys","description":"API keys let you authenticate with the admin API without going through the OAuth flow. They\'re useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically.","source":"@site/docs/guides/api-keys.md","sourceDirName":"guides","slug":"/guides/api-keys","permalink":"/guides/api-keys","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{}}');var t=s(4848),r=s(8453);const a={},o="API Keys",c={},h=[{value:"How API keys work",id:"how-api-keys-work",level:2},{value:"Creating a key",id:"creating-a-key",level:2},{value:"Using a key",id:"using-a-key",level:2},{value:"Revoking a key",id:"revoking-a-key",level:2},{value:"Tracking usage",id:"tracking-usage",level:2},{value:"Security considerations",id:"security-considerations",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"api-keys",children:"API Keys"})}),"\n",(0,t.jsx)(n.p,{children:"API keys let you authenticate with the admin API without going through the OAuth flow. They're useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically."}),"\n",(0,t.jsx)(n.h2,{id:"how-api-keys-work",children:"How API keys work"}),"\n",(0,t.jsxs)(n.p,{children:["Each API key is a 35-character token with the format ",(0,t.jsx)(n.code,{children:"hv_"})," followed by 32 random hex characters:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\n"})}),"\n",(0,t.jsxs)(n.p,{children:["When you create a key, HappyView shows the full token ",(0,t.jsx)(n.strong,{children:"once"}),". After that, only the prefix (",(0,t.jsx)(n.code,{children:"hv_a1b2c3d4"}),") is stored for display \u2014 the key itself is SHA-256 hashed before being saved to the database. This means nobody (including you) can retrieve the full key after creation."]}),"\n",(0,t.jsx)(n.p,{children:"API keys inherit the permissions of the admin who created them. A revoked key immediately stops working."}),"\n",(0,t.jsx)(n.h2,{id:"creating-a-key",children:"Creating a key"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings"})," in the dashboard"]}),"\n",(0,t.jsxs)(n.li,{children:["Select the ",(0,t.jsx)(n.strong,{children:"API Keys"})," tab"]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Create API Key"})]}),"\n",(0,t.jsx)(n.li,{children:'Enter a descriptive name (e.g., "CI Deploy", "Monitoring Script")'}),"\n",(0,t.jsx)(n.li,{children:"Copy the full key from the confirmation dialog \u2014 you won't see it again"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"using-a-key",children:"Using a key"}),"\n",(0,t.jsxs)(n.p,{children:["Pass the key as a Bearer token in the ",(0,t.jsx)(n.code,{children:"Authorization"})," header:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"\n'})}),"\n",(0,t.jsxs)(n.p,{children:["This works for all ",(0,t.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," endpoints \u2014 anything you can do with an OAuth token, you can do with an API key."]}),"\n",(0,t.jsx)(n.h2,{id:"revoking-a-key",children:"Revoking a key"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Go to ",(0,t.jsx)(n.strong,{children:"Settings > API Keys"})]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Revoke"})," next to the key"]}),"\n",(0,t.jsx)(n.li,{children:"Confirm in the dialog"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Revoked keys are soft-deleted: they remain visible in the table (with a strikethrough) for audit purposes but can no longer authenticate. Any service using the key will immediately receive ",(0,t.jsx)(n.code,{children:"401 Unauthorized"})," responses."]}),"\n",(0,t.jsx)(n.h2,{id:"tracking-usage",children:"Tracking usage"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Last Used"}),' column in the API Keys table shows when each key was last used to authenticate a request. Keys that have never been used show "Never". This helps you identify unused keys that can be safely revoked.']}),"\n",(0,t.jsx)(n.h2,{id:"security-considerations",children:"Security considerations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Treat API keys like passwords."})," Anyone with the key has full admin access to your HappyView instance."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Use descriptive names"})," so you can identify which service uses which key."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Revoke keys you no longer need."})," If a key is compromised, revoke it immediately."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Don't commit keys to version control."})," Use environment variables or secret managers instead."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/reference/admin-api",children:"Admin API reference"})," \u2014 full endpoint documentation"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/guides/scripting",children:"Scripting"})," \u2014 automate record processing with Lua scripts"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/guides/index-hooks",children:"Index hooks"})," \u2014 push records to external services on write"]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453(e,n,s){s.d(n,{R:()=>a,x:()=>o});var i=s(6540);const t={},r=i.createContext(t);function a(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d26b9010.e422b779.js b/assets/js/d26b9010.e422b779.js new file mode 100644 index 0000000..f97e62f --- /dev/null +++ b/assets/js/d26b9010.e422b779.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9301],{927:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"guides/api-keys","title":"API Keys","description":"API keys let you authenticate with the admin API without going through the OAuth flow. They\'re useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically.","source":"@site/docs/guides/api-keys.md","sourceDirName":"guides","slug":"/guides/api-keys","permalink":"/guides/api-keys","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Developing Plugins","permalink":"/guides/developing-plugins"},"next":{"title":"Permissions","permalink":"/guides/permissions"}}');var t=n(199),r=n(2560);const o={},a="API Keys",c={},l=[{value:"How API keys work",id:"how-api-keys-work",level:2},{value:"Creating a key",id:"creating-a-key",level:2},{value:"Using a key",id:"using-a-key",level:2},{value:"Revoking a key",id:"revoking-a-key",level:2},{value:"Tracking usage",id:"tracking-usage",level:2},{value:"Security considerations",id:"security-considerations",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"api-keys",children:"API Keys"})}),"\n",(0,t.jsx)(s.p,{children:"API keys let you authenticate with the admin API without going through the OAuth flow. They're useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically."}),"\n",(0,t.jsx)(s.h2,{id:"how-api-keys-work",children:"How API keys work"}),"\n",(0,t.jsxs)(s.p,{children:["Each API key is a 35-character token with the format ",(0,t.jsx)(s.code,{children:"hv_"})," followed by 32 random hex characters:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{children:"hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4\n"})}),"\n",(0,t.jsxs)(s.p,{children:["When you create a key, HappyView shows the full token ",(0,t.jsx)(s.strong,{children:"once"}),". After that, only the prefix (",(0,t.jsx)(s.code,{children:"hv_a1b2c3d4"}),") is stored for display \u2014 the key itself is SHA-256 hashed before being saved to the database. This means nobody (including you) can retrieve the full key after creation."]}),"\n",(0,t.jsxs)(s.p,{children:["Each API key has its own set of ",(0,t.jsx)(s.strong,{children:"scoped permissions"}),". When you create a key, you specify which permissions it should have. The key's effective permissions are the ",(0,t.jsx)(s.strong,{children:"intersection"})," of the permissions assigned to the key and the permissions of the user who created it \u2014 a key can never have more access than its creator. A revoked key immediately stops working."]}),"\n",(0,t.jsx)(s.h2,{id:"creating-a-key",children:"Creating a key"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["Go to ",(0,t.jsx)(s.strong,{children:"Settings > API Keys"})," in the dashboard sidebar"]}),"\n",(0,t.jsxs)(s.li,{children:["Click ",(0,t.jsx)(s.strong,{children:"Create API Key"})]}),"\n",(0,t.jsx)(s.li,{children:'Enter a descriptive name (e.g., "CI Deploy", "Monitoring Script")'}),"\n",(0,t.jsx)(s.li,{children:"Select the permissions the key should have"}),"\n",(0,t.jsx)(s.li,{children:"Copy the full key from the confirmation dialog \u2014 you won't see it again"}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"using-a-key",children:"Using a key"}),"\n",(0,t.jsxs)(s.p,{children:["Pass the key as a Bearer token in the ",(0,t.jsx)(s.code,{children:"Authorization"})," header:"]}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"\n'})}),"\n",(0,t.jsxs)(s.p,{children:["This works for all ",(0,t.jsx)(s.a,{href:"/reference/admin-api",children:"admin API"})," endpoints that the key has permissions for. Unlike OAuth tokens which carry the user's full permissions, API keys are limited to the specific permissions assigned at creation time."]}),"\n",(0,t.jsx)(s.h2,{id:"revoking-a-key",children:"Revoking a key"}),"\n",(0,t.jsxs)(s.ol,{children:["\n",(0,t.jsxs)(s.li,{children:["Go to ",(0,t.jsx)(s.strong,{children:"Settings > API Keys"})]}),"\n",(0,t.jsxs)(s.li,{children:["Click ",(0,t.jsx)(s.strong,{children:"Revoke"})," next to the key"]}),"\n",(0,t.jsx)(s.li,{children:"Confirm in the dialog"}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Revoked keys are soft-deleted: they remain visible in the table (with a strikethrough) for audit purposes but can no longer authenticate. Any service using the key will immediately receive ",(0,t.jsx)(s.code,{children:"401 Unauthorized"})," responses."]}),"\n",(0,t.jsx)(s.h2,{id:"tracking-usage",children:"Tracking usage"}),"\n",(0,t.jsxs)(s.p,{children:["The ",(0,t.jsx)(s.strong,{children:"Last Used"}),' column in the API Keys table shows when each key was last used to authenticate a request. Keys that have never been used show "Never". This helps you identify unused keys that can be safely revoked.']}),"\n",(0,t.jsx)(s.h2,{id:"security-considerations",children:"Security considerations"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Treat API keys like passwords."})," Anyone with the key can access your HappyView instance with the key's permissions."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Use the principle of least privilege."})," Only grant the permissions a key actually needs. A CI deploy key probably only needs ",(0,t.jsx)(s.code,{children:"lexicons:create"})," and ",(0,t.jsx)(s.code,{children:"backfill:create"}),", not full access."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Use descriptive names"})," so you can identify which service uses which key."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Revoke keys you no longer need."})," If a key is compromised, revoke it immediately."]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.strong,{children:"Don't commit keys to version control."})," Use environment variables or secret managers instead."]}),"\n"]}),"\n",(0,t.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"/reference/admin-api",children:"Admin API reference"})," \u2014 full endpoint documentation"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"/guides/scripting",children:"Scripting"})," \u2014 automate record processing with Lua scripts"]}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"/guides/index-hooks",children:"Index hooks"})," \u2014 push records to external services on write"]}),"\n"]})]})}function d(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},2560:(e,s,n)=>{n.d(s,{R:()=>o,x:()=>a});var i=n(63);const t={},r=i.createContext(t);function o(e){const s=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d2e94323.dec694d1.js b/assets/js/d2e94323.dec694d1.js deleted file mode 100644 index 4d4c880..0000000 --- a/assets/js/d2e94323.dec694d1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3993],{7791(e,t,i){i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re AT Protocol schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","source":"@site/docs/guides/lexicons.md","sourceDirName":"guides","slug":"/guides/lexicons","permalink":"/guides/lexicons","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Statusphere","permalink":"/tutorials/statusphere"},"next":{"title":"Lua Scripting","permalink":"/guides/scripting"}}');var r=i(4848),s=i(8453);const o={},c="Lexicons",l={},d=[{value:"Supported lexicon types",id:"supported-lexicon-types",level:2},{value:"Target collection",id:"target-collection",level:2},{value:"Backfill flag",id:"backfill-flag",level:2},{value:"Tap collection filters",id:"tap-collection-filters",level:2},{value:"Network lexicons",id:"network-lexicons",level:2},{value:"NSID authority resolution",id:"nsid-authority-resolution",level:3},{value:"Fetching",id:"fetching",level:3},{value:"Live updates via Tap",id:"live-updates-via-tap",level:3},{value:"Startup re-fetch",id:"startup-re-fetch",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"lexicons",children:"Lexicons"})}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are the core building block of HappyView. They're ",(0,r.jsx)(t.a,{href:"https://atproto.com/specs/lexicon",children:"AT Protocol schema definitions"})," that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve."]}),"\n",(0,r.jsxs)(t.p,{children:["You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the ",(0,r.jsx)(t.a,{href:"/reference/admin-api#lexicons",children:"admin API"})," or ",(0,r.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),", or fetching them directly from the AT Protocol network via ",(0,r.jsx)(t.a,{href:"#network-lexicons",children:"DNS authority resolution"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"supported-lexicon-types",children:"Supported lexicon types"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Effect"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"record"})}),(0,r.jsxs)(t.td,{children:["Syncs the collection filter to Tap and indexes records into Postgres. Supports ",(0,r.jsx)(t.a,{href:"/guides/index-hooks",children:"index hooks"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"query"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"GET /xrpc/{nsid}"})," endpoint that queries indexed records"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"procedure"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"POST /xrpc/{nsid}"})," endpoint that proxies writes to the user's PDS"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"definitions"})}),(0,r.jsx)(t.td,{children:"Stored but does not generate routes or subscriptions"})]})]})]}),"\n",(0,r.jsxs)(t.p,{children:["A typical setup has three lexicons working together: a ",(0,r.jsx)(t.strong,{children:"record"})," lexicon that defines the data and triggers indexing, a ",(0,r.jsx)(t.strong,{children:"query"})," lexicon that exposes a read endpoint, and a ",(0,r.jsx)(t.strong,{children:"procedure"})," lexicon that exposes a write endpoint. The ",(0,r.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," walks through this pattern end-to-end."]}),"\n",(0,r.jsx)(t.h2,{id:"target-collection",children:"Target collection"}),"\n",(0,r.jsxs)(t.p,{children:["Query and procedure lexicons don't store data themselves. They operate on records stored by a record-type lexicon. The ",(0,r.jsx)(t.code,{children:"target_collection"})," field tells HappyView which record collection to read from or write to. Without it, default queries and procedures won't know which DB records to operate on."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, a query lexicon ",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"})," would set ",(0,r.jsx)(t.code,{children:"target_collection"})," to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," to read from that record collection."]}),"\n",(0,r.jsxs)(t.p,{children:["See the ",(0,r.jsx)(t.a,{href:"/reference/admin-api#upload--upsert-a-lexicon",children:"admin API"})," for how to set ",(0,r.jsx)(t.code,{children:"target_collection"})," when uploading."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"target_collection"})," is available in Lua scripts as the ",(0,r.jsx)(t.code,{children:"collection"})," global, but it is not required if your endpoint uses a Lua script."]})}),"\n",(0,r.jsx)(t.h2,{id:"backfill-flag",children:"Backfill flag"}),"\n",(0,r.jsxs)(t.p,{children:["When uploading a record-type lexicon, HappyView automatically creates a backfill job to discover existing records. If you only want to index new records going forward, you can set ",(0,r.jsx)(t.code,{children:"backfill"})," to ",(0,r.jsx)(t.code,{children:"false"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"tap-collection-filters",children:"Tap collection filters"}),"\n",(0,r.jsxs)(t.p,{children:["When record-type lexicons change (uploaded or deleted), HappyView automatically syncs the updated collection filter to Tap. HappyView always includes ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," in the filter to track network lexicon updates."]}),"\n",(0,r.jsxs)(t.p,{children:["Deleting a lexicon updates Tap's collection filters (stopping live indexing for that collection) but does ",(0,r.jsx)(t.strong,{children:"not"})," remove previously indexed repos or their cached state from Tap. To fully reset a collection's state, delete the lexicon, re-add it, and run a ",(0,r.jsx)(t.a,{href:"/guides/backfill",children:"backfill"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"network-lexicons",children:"Network lexicons"}),"\n",(0,r.jsx)(t.p,{children:"If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via Tap. If the publisher updates their schema, your instance will pick up the change."}),"\n",(0,r.jsx)(t.h3,{id:"nsid-authority-resolution",children:"NSID authority resolution"}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are stored as records themselves with the ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," NSID and the rkey set to the lexicon's NSID. To find which repo holds a lexicon, HappyView resolves the NSID's authority:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Extract the authority from the NSID (all segments except the last). For example, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," has authority ",(0,r.jsx)(t.code,{children:"xyz.statusphere"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Reverse the authority segments to form a domain: ",(0,r.jsx)(t.code,{children:"statusphere.xyz"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Look up the DNS TXT record at ",(0,r.jsx)(t.code,{children:"_lexicon.{domain}"})," (e.g. ",(0,r.jsx)(t.code,{children:"_lexicon.statusphere.xyz"}),")."]}),"\n",(0,r.jsxs)(t.li,{children:["Parse the TXT record for a ",(0,r.jsx)(t.code,{children:"did="})," value."]}),"\n",(0,r.jsx)(t.li,{children:"Resolve the DID to a PDS endpoint via the PLC directory."}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The spec states that resolution must be ",(0,r.jsx)(t.strong,{children:"non-hierarchical"}),". Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," and ",(0,r.jsx)(t.code,{children:"xyz.statusphere.actor.profile"}),"), each level must have an explicit TXT record."]})}),"\n",(0,r.jsx)(t.h3,{id:"fetching",children:"Fetching"}),"\n",(0,r.jsxs)(t.p,{children:["Once the authority DID and PDS endpoint are known, HappyView calls ",(0,r.jsx)(t.code,{children:"com.atproto.repo.getRecord"})," with:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"repo"})," = the authority DID"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"collection"})," = ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"rkey"})," = the NSID"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"value"})," field of the response is the raw lexicon JSON."]}),"\n",(0,r.jsx)(t.h3,{id:"live-updates-via-tap",children:"Live updates via Tap"}),"\n",(0,r.jsxs)(t.p,{children:["Tap always subscribes to ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," alongside the dynamic record collections. When a record event arrives:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"create/update"}),": If the event's DID and rkey match a tracked network lexicon (",(0,r.jsx)(t.code,{children:"authority_did"})," and ",(0,r.jsx)(t.code,{children:"nsid"}),"), the lexicon is parsed, upserted into the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and in-memory registry, and collection filters are updated if it's a record type."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"delete"}),": The lexicon is removed from the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and registry."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"startup-re-fetch",children:"Startup re-fetch"}),"\n",(0,r.jsx)(t.p,{children:"On every startup, HappyView re-fetches all network lexicons from their respective PDSes. This ensures consistency even if events were missed while offline. Failures are logged as warnings but don't block startup."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Add custom query and procedure logic to your endpoints"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": Run Lua scripts when records are indexed from the network"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/backfill",children:"Backfill"}),": Learn how historical records are indexed"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/admin-api",children:"Admin API"}),": Full reference for lexicon management endpoints"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453(e,t,i){i.d(t,{R:()=>o,x:()=>c});var n=i(6540);const r={},s=n.createContext(r);function o(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d2e94323.f6aaf207.js b/assets/js/d2e94323.f6aaf207.js new file mode 100644 index 0000000..03c4376 --- /dev/null +++ b/assets/js/d2e94323.f6aaf207.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[3993],{4015:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re atproto schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","source":"@site/docs/guides/lexicons.md","sourceDirName":"guides","slug":"/guides/lexicons","permalink":"/guides/lexicons","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Statusphere","permalink":"/tutorials/statusphere"},"next":{"title":"Backfill","permalink":"/guides/backfill"}}');var n=r(199),i=r(2560);const s={},l="Lexicons",c={},d=[{value:"Supported lexicon types",id:"supported-lexicon-types",level:2},{value:"Target collection",id:"target-collection",level:2},{value:"Backfill flag",id:"backfill-flag",level:2},{value:"Jetstream collection filters",id:"jetstream-collection-filters",level:2},{value:"Network lexicons",id:"network-lexicons",level:2},{value:"NSID authority resolution",id:"nsid-authority-resolution",level:3},{value:"Fetching",id:"fetching",level:3},{value:"Live updates via Jetstream",id:"live-updates-via-jetstream",level:3},{value:"Startup re-fetch",id:"startup-re-fetch",level:3},{value:"XRPC routing for unknown methods",id:"xrpc-routing-for-unknown-methods",level:2},{value:"Next steps",id:"next-steps",level:2}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"lexicons",children:"Lexicons"})}),"\n",(0,n.jsxs)(t.p,{children:["Lexicons are the core building block of HappyView. They're ",(0,n.jsx)(t.a,{href:"https://atproto.com/specs/lexicon",children:"atproto schema definitions"})," that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve."]}),"\n",(0,n.jsxs)(t.p,{children:["You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the ",(0,n.jsx)(t.a,{href:"/reference/admin/lexicons",children:"admin API"})," or ",(0,n.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),", or fetching them directly from the atproto network via ",(0,n.jsx)(t.a,{href:"#network-lexicons",children:"DNS authority resolution"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"supported-lexicon-types",children:"Supported lexicon types"}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Effect"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"record"})}),(0,n.jsxs)(t.td,{children:["Adds the collection to the Jetstream subscription filter and indexes records into the database. Supports ",(0,n.jsx)(t.a,{href:"/guides/index-hooks",children:"index hooks"})]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"query"})}),(0,n.jsxs)(t.td,{children:["Registers a ",(0,n.jsx)(t.code,{children:"GET /xrpc/{nsid}"})," endpoint that queries indexed records"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"procedure"})}),(0,n.jsxs)(t.td,{children:["Registers a ",(0,n.jsx)(t.code,{children:"POST /xrpc/{nsid}"})," endpoint that proxies writes to the user's PDS"]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"definitions"})}),(0,n.jsx)(t.td,{children:"Stored but does not generate routes or subscriptions"})]})]})]}),"\n",(0,n.jsxs)(t.p,{children:["A typical setup has three lexicons working together: a ",(0,n.jsx)(t.strong,{children:"record"})," lexicon that defines the data and triggers indexing, a ",(0,n.jsx)(t.strong,{children:"query"})," lexicon that exposes a read endpoint, and a ",(0,n.jsx)(t.strong,{children:"procedure"})," lexicon that exposes a write endpoint. The ",(0,n.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," walks through this pattern end-to-end."]}),"\n",(0,n.jsx)(t.h2,{id:"target-collection",children:"Target collection"}),"\n",(0,n.jsxs)(t.p,{children:["Query and procedure lexicons don't store data themselves. They operate on records stored by a record-type lexicon. The ",(0,n.jsx)(t.code,{children:"target_collection"})," field tells HappyView which record collection to read from or write to. Without it, default queries and procedures won't know which DB records to operate on."]}),"\n",(0,n.jsxs)(t.p,{children:["For example, a query lexicon ",(0,n.jsx)(t.code,{children:"xyz.statusphere.listStatuses"})," would set ",(0,n.jsx)(t.code,{children:"target_collection"})," to ",(0,n.jsx)(t.code,{children:"xyz.statusphere.status"})," to read from that record collection."]}),"\n",(0,n.jsxs)(t.p,{children:["See the ",(0,n.jsx)(t.a,{href:"/reference/admin/lexicons#upload--upsert-a-lexicon",children:"admin API"})," for how to set ",(0,n.jsx)(t.code,{children:"target_collection"})," when uploading."]}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"target_collection"})," is available in Lua scripts as the ",(0,n.jsx)(t.code,{children:"collection"})," global, but it is not required if your endpoint uses a Lua script."]})}),"\n",(0,n.jsx)(t.h2,{id:"backfill-flag",children:"Backfill flag"}),"\n",(0,n.jsxs)(t.p,{children:["When uploading a record-type lexicon, HappyView automatically creates a backfill job to discover existing records. If you only want to index new records going forward, you can set ",(0,n.jsx)(t.code,{children:"backfill"})," to ",(0,n.jsx)(t.code,{children:"false"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"jetstream-collection-filters",children:"Jetstream collection filters"}),"\n",(0,n.jsxs)(t.p,{children:["When record-type lexicons change (uploaded or deleted), HappyView reconnects to Jetstream with an updated collection filter. HappyView always includes ",(0,n.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," in the filter to track network lexicon updates."]}),"\n",(0,n.jsxs)(t.p,{children:["Deleting a lexicon stops live indexing for that collection but does ",(0,n.jsx)(t.strong,{children:"not"})," remove previously indexed records from the database. If you want to start fresh, you'll need to delete the records separately (e.g. via the admin API or directly in the database) before re-adding the lexicon and running a ",(0,n.jsx)(t.a,{href:"/guides/backfill",children:"backfill"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"network-lexicons",children:"Network lexicons"}),"\n",(0,n.jsx)(t.p,{children:"If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via the Jetstream subscription. If the publisher updates their schema, your instance will pick up the change."}),"\n",(0,n.jsx)(t.h3,{id:"nsid-authority-resolution",children:"NSID authority resolution"}),"\n",(0,n.jsxs)(t.p,{children:["Lexicons are stored as records themselves with the ",(0,n.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," NSID and the rkey set to the lexicon's NSID. To find which repo holds a lexicon, HappyView resolves the NSID's authority:"]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Extract the authority from the NSID (all segments except the last). For example, ",(0,n.jsx)(t.code,{children:"xyz.statusphere.status"})," has authority ",(0,n.jsx)(t.code,{children:"xyz.statusphere"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Reverse the authority segments to form a domain: ",(0,n.jsx)(t.code,{children:"statusphere.xyz"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Look up the DNS TXT record at ",(0,n.jsx)(t.code,{children:"_lexicon.{domain}"})," (e.g. ",(0,n.jsx)(t.code,{children:"_lexicon.statusphere.xyz"}),")."]}),"\n",(0,n.jsxs)(t.li,{children:["Parse the TXT record for a ",(0,n.jsx)(t.code,{children:"did="})," value."]}),"\n",(0,n.jsx)(t.li,{children:"Resolve the DID to a PDS endpoint via the PLC directory."}),"\n"]}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["The spec states that resolution must be ",(0,n.jsx)(t.strong,{children:"non-hierarchical"}),". Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. ",(0,n.jsx)(t.code,{children:"xyz.statusphere.status"})," and ",(0,n.jsx)(t.code,{children:"xyz.statusphere.actor.profile"}),"), each level must have an explicit TXT record."]})}),"\n",(0,n.jsx)(t.h3,{id:"fetching",children:"Fetching"}),"\n",(0,n.jsxs)(t.p,{children:["Once the authority DID and PDS endpoint are known, HappyView calls ",(0,n.jsx)(t.code,{children:"com.atproto.repo.getRecord"})," with:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"repo"})," = the authority DID"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"collection"})," = ",(0,n.jsx)(t.code,{children:"com.atproto.lexicon.schema"})]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.code,{children:"rkey"})," = the NSID"]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"value"})," field of the response is the raw lexicon JSON."]}),"\n",(0,n.jsx)(t.h3,{id:"live-updates-via-jetstream",children:"Live updates via Jetstream"}),"\n",(0,n.jsxs)(t.p,{children:["HappyView's Jetstream subscription always includes the ",(0,n.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," collection, so it receives real-time events whenever a lexicon schema record is created, updated, or deleted on the network. When an event arrives, HappyView checks whether the record's DID and rkey (the NSID) match any tracked network lexicon:"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"create/update"}),": The new schema is parsed and upserted into the ",(0,n.jsx)(t.code,{children:"lexicons"})," table and the in-memory registry. If it's a record-type lexicon, Jetstream collection filters are updated to include the new collection."]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.strong,{children:"delete"}),": The lexicon is removed from the ",(0,n.jsx)(t.code,{children:"lexicons"})," table and registry, and collection filters are updated accordingly."]}),"\n"]}),"\n",(0,n.jsx)(t.h3,{id:"startup-re-fetch",children:"Startup re-fetch"}),"\n",(0,n.jsx)(t.p,{children:"On every startup, HappyView re-fetches all network lexicons from their respective PDSes. This ensures consistency even if events were missed while offline. Failures are logged as warnings but don't block startup."}),"\n",(0,n.jsx)(t.h2,{id:"xrpc-routing-for-unknown-methods",children:"XRPC routing for unknown methods"}),"\n",(0,n.jsxs)(t.p,{children:["When a client calls ",(0,n.jsx)(t.code,{children:"/xrpc/{method}"})," and HappyView has a local lexicon for that NSID, the request is handled by the lexicon's Lua script (or HappyView's default behavior if no script is attached). Otherwise, HappyView attempts to proxy the request to the method's ",(0,n.jsx)(t.strong,{children:"home authority"})," using the same DNS-based authority resolution described above:"]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["Extract the authority from the NSID (all segments except the last). ",(0,n.jsx)(t.code,{children:"com.example.foo.getBar"})," \u2192 authority ",(0,n.jsx)(t.code,{children:"com.example.foo"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Reverse it to form a domain: ",(0,n.jsx)(t.code,{children:"foo.example.com"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Look up the ",(0,n.jsx)(t.code,{children:"_lexicon.foo.example.com"})," TXT record for the authority's DID."]}),"\n",(0,n.jsx)(t.li,{children:"Resolve that DID to a PDS endpoint via the PLC directory."}),"\n",(0,n.jsxs)(t.li,{children:["Proxy the request to ",(0,n.jsx)(t.code,{children:"{pds_endpoint}/xrpc/{method}"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"A few things to note:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["HappyView does ",(0,n.jsx)(t.strong,{children:"not"})," proxy to the reversed hostname directly. ",(0,n.jsx)(t.code,{children:"foo.example.com"})," is only the DNS host for the TXT record \u2014 the actual XRPC request goes to whatever PDS endpoint the authority DID resolves to."]}),"\n",(0,n.jsxs)(t.li,{children:["Proxying applies equally to queries and procedures. For procedures, HappyView uses the caller's OAuth session to attach a DPoP-bound access token (see ",(0,n.jsx)(t.a,{href:"/getting-started/authentication#proxying-procedures-to-the-users-pds",children:"Authentication"}),")."]}),"\n",(0,n.jsx)(t.li,{children:"If authority resolution fails \u2014 no TXT record, unresolvable DID, or the target PDS doesn't support the method \u2014 the client gets an error back. HappyView does not fall back to any other routing strategy."}),"\n",(0,n.jsxs)(t.li,{children:["Tracking a network lexicon does ",(0,n.jsx)(t.strong,{children:"not"})," make HappyView handle requests for that NSID locally. Network lexicons are only about indexing record collections and keeping the schema up to date. If a client calls a query NSID that you've tracked as a network lexicon but haven't uploaded a local query lexicon for, HappyView still proxies the request out \u2014 it won't query your local record table. To serve a method locally, upload a local query or procedure lexicon with a matching ",(0,n.jsx)(t.code,{children:"target_collection"}),"."]}),"\n"]}),"\n",(0,n.jsx)(t.p,{children:"In short: if you want to serve an XRPC method on your instance, you need a local lexicon for it. Otherwise HappyView attempts to proxy to the method's home authority."}),"\n",(0,n.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Add custom query and procedure logic to your endpoints"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/index-hooks",children:"Index Hooks"}),": Run Lua scripts when records are indexed from the network"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/guides/backfill",children:"Backfill"}),": Learn how historical records are indexed"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/reference/admin-api",children:"Admin API"}),": Full reference for lexicon management endpoints"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},2560:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>l});var o=r(63);const n={},i=o.createContext(n);function s(e){const t=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d81f4320.64443987.js b/assets/js/d81f4320.64443987.js new file mode 100644 index 0000000..00d55e9 --- /dev/null +++ b/assets/js/d81f4320.64443987.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9819],{3617:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"id":"sdk/overview","title":"JavaScript SDK","description":"HappyView provides JavaScript packages for building third-party apps that authenticate with a HappyView instance and make XRPC requests on behalf of users.","source":"@site/docs/sdk/overview.md","sourceDirName":"sdk","slug":"/sdk/overview","permalink":"/sdk/overview","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"SQLite \u2192 Postgres Migration","permalink":"/guides/sqlite-to-postgres-migration"},"next":{"title":"Lex Agent","permalink":"/sdk/lex-agent"}}');var s=n(199),r=n(2560);const a={},o="JavaScript SDK",c={},l=[{value:"Which package do I need?",id:"which-package-do-i-need",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Quick start",id:"quick-start",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"javascript-sdk",children:"JavaScript SDK"})}),"\n",(0,s.jsx)(t.p,{children:"HappyView provides JavaScript packages for building third-party apps that authenticate with a HappyView instance and make XRPC requests on behalf of users."}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Package"}),(0,s.jsx)(t.th,{children:"Purpose"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@happyview/lex-agent",children:(0,s.jsx)(t.code,{children:"@happyview/lex-agent"})})}),(0,s.jsxs)(t.td,{children:["Recommended \u2014 type-safe XRPC via ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@atproto/lex",children:(0,s.jsx)(t.code,{children:"@atproto/lex"})})," ",(0,s.jsx)(t.code,{children:"Client"})," with HappyView DPoP auth"]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@happyview/oauth-client",children:(0,s.jsx)(t.code,{children:"@happyview/oauth-client"})})}),(0,s.jsx)(t.td,{children:"Platform-agnostic core \u2014 DPoP key provisioning, session management, authenticated fetch"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@happyview/oauth-client-browser",children:(0,s.jsx)(t.code,{children:"@happyview/oauth-client-browser"})})}),(0,s.jsxs)(t.td,{children:["Browser OAuth wrapper for apps already using ",(0,s.jsx)(t.code,{children:"@atproto/oauth-client-browser"})]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"which-package-do-i-need",children:"Which package do I need?"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Starting a new app?"})," Use ",(0,s.jsx)(t.code,{children:"@happyview/lex-agent"})," with ",(0,s.jsx)(t.code,{children:"@atproto/lex"}),". It gives you type-safe XRPC calls through a ",(0,s.jsx)(t.code,{children:"Client"})," that routes requests to your HappyView instance with DPoP authentication. This is the recommended way to interact with HappyView from JavaScript."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsxs)(t.strong,{children:["Already using ",(0,s.jsx)(t.code,{children:"@atproto/oauth-client-browser"}),"?"]})," Add ",(0,s.jsx)(t.code,{children:"@happyview/oauth-client-browser"})," to get a ",(0,s.jsx)(t.code,{children:"HappyViewBrowserClient"})," that handles the HappyView-specific DPoP key provisioning and session registration on top of the standard atproto OAuth flow."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Building a server-side app or something more custom?"})," Use ",(0,s.jsx)(t.code,{children:"@happyview/oauth-client"})," directly and provide your own ",(0,s.jsx)(t.code,{children:"CryptoAdapter"})," and ",(0,s.jsx)(t.code,{children:"StorageAdapter"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(t.p,{children:["Third-party apps authenticate using HappyView's ",(0,s.jsx)(t.a,{href:"/getting-started/authentication#dpop-key-provisioning-for-third-party-apps",children:"DPoP key provisioning"})," flow:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"The SDK requests a DPoP keypair from the HappyView instance."}),"\n",(0,s.jsx)(t.li,{children:"Your app runs a standard atproto OAuth flow with the user's PDS using that keypair."}),"\n",(0,s.jsx)(t.li,{children:"The SDK registers the resulting tokens with HappyView."}),"\n",(0,s.jsx)(t.li,{children:"All subsequent XRPC requests are authenticated with DPoP proofs \u2014 HappyView handles its own lexicons locally and proxies standard atproto writes to the user's PDS."}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"quick-start",children:"Quick start"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"npm install @happyview/lex-agent @happyview/oauth-client-browser @atproto/lex\n"})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-typescript",children:'import { Client } from "@atproto/lex";\nimport { HappyViewBrowserClient } from "@happyview/oauth-client-browser";\nimport { createAgent } from "@happyview/lex-agent";\n\n// Set up the OAuth client\nconst oauthClient = new HappyViewBrowserClient({\n instanceUrl: "https://happyview.example.com",\n clientKey: "hvc_your_client_key",\n});\n\n// Login \u2014 redirects to the user\'s PDS\nawait oauthClient.login("alice.bsky.social");\n\n// On /oauth/callback \u2014 complete the flow\nconst session = await oauthClient.callback();\n\n// Create a type-safe Lex client\nconst agent = createAgent(session);\nconst lex = new Client(agent);\n\n// Make type-safe XRPC calls\nconst result = await lex.xrpc(myLexicons.com.example.getGame, {\n params: { slug: "celeste" },\n});\n'})}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/sdk/lex-agent",children:"Lex Agent"}),": type-safe XRPC with ",(0,s.jsx)(t.code,{children:"@atproto/lex"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/sdk/oauth-client",children:"OAuth Client"}),": platform-agnostic core client"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/sdk/oauth-client-browser",children:"Browser Client"}),": browser OAuth redirect flow"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/getting-started/authentication",children:"Authentication"}),": full details on DPoP key provisioning and API client types"]}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},2560:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>o});var i=n(63);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7f37855.2ac5d28e.js b/assets/js/e7f37855.2ac5d28e.js new file mode 100644 index 0000000..3b59270 --- /dev/null +++ b/assets/js/e7f37855.2ac5d28e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9097],{7914:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/scripts/meilisearch-sync","title":"Index Hook: Meilisearch Sync","description":"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network.","source":"@site/docs/reference/scripts/meilisearch-sync.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/meilisearch-sync","permalink":"/reference/scripts/meilisearch-sync","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Algolia Sync","permalink":"/reference/scripts/algolia-sync"},"next":{"title":"Labelers","permalink":"/guides/labelers"}}');var i=r(199),t=r(2560);const c={},d="Index Hook: Meilisearch Sync",a={},o=[{value:"How it works",id:"how-it-works",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"index-hook-meilisearch-sync",children:"Index Hook: Meilisearch Sync"})}),"\n",(0,i.jsx)(n.p,{children:"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Lexicon type:"})," record (index hook)"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {\n headers = headers\n })\n else\n http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {\n headers = headers,\n body = json.encode(toarray({\n {\n id = uri,\n collection = collection,\n did = did,\n record = record\n }\n }))\n })\n end\n\n return record\nend\n'})}),"\n",(0,i.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["On ",(0,i.jsx)(n.strong,{children:"create"})," or ",(0,i.jsx)(n.strong,{children:"update"}),": sends a ",(0,i.jsx)(n.code,{children:"POST"})," request to Meilisearch's document API with the record data wrapped in an array. Meilisearch upserts by ",(0,i.jsx)(n.code,{children:"id"})," \u2014 if a document with the same AT URI already exists, it's replaced."]}),"\n",(0,i.jsxs)(n.li,{children:["On ",(0,i.jsx)(n.strong,{children:"delete"}),": sends a ",(0,i.jsx)(n.code,{children:"DELETE"})," request to remove the document from the index by its AT URI."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"toarray()"})," function ensures the table is encoded as a JSON array (Meilisearch expects an array of documents). See ",(0,i.jsx)(n.a,{href:"/guides/index-hooks#json-api",children:"JSON API"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["This script uses ",(0,i.jsx)(n.a,{href:"/guides/scripting",children:"script variables"})," instead of hardcoded values. Set these via the ",(0,i.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," or dashboard:"]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Value"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MEILISEARCH_URL"})}),(0,i.jsxs)(n.td,{children:["Your Meilisearch instance URL (e.g. ",(0,i.jsx)(n.code,{children:"http://meilisearch.railway.internal:7700"}),")"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MEILISEARCH_API_KEY"})}),(0,i.jsx)(n.td,{children:"A Meilisearch API key with write permissions"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Script variables are stored in the ",(0,i.jsx)(n.code,{children:"script_variables"})," table and accessible as ",(0,i.jsx)(n.code,{children:"env.*"})," in Lua."]}),"\n",(0,i.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,i.jsx)(n.p,{children:"This hook keeps an external search index in sync with your indexed records in real time. Users searching through Meilisearch get results that reflect the latest state of the network without polling or scheduled jobs."}),"\n",(0,i.jsx)(n.p,{children:"Meilisearch is a good fit for self-hosted deployments \u2014 colocate it alongside HappyView (e.g. on the same Railway project) for sub-millisecond network latency."}),"\n",(0,i.jsxs)(n.p,{children:["Combine this with a ",(0,i.jsx)(n.a,{href:"/guides/scripting",children:"query script"})," that searches Meilisearch instead of the local database for a full-text search experience that goes beyond what ",(0,i.jsx)(n.code,{children:"db.search"})," offers."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},2560:(e,n,r)=>{r.d(n,{R:()=>c,x:()=>d});var s=r(63);const i={},t=s.createContext(i);function c(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e7f37855.6b9a8f63.js b/assets/js/e7f37855.6b9a8f63.js deleted file mode 100644 index 5816998..0000000 --- a/assets/js/e7f37855.6b9a8f63.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9097],{2371(e,n,r){r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/scripts/meilisearch-sync","title":"Index Hook: Meilisearch Sync","description":"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network.","source":"@site/docs/reference/scripts/meilisearch-sync.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/meilisearch-sync","permalink":"/reference/scripts/meilisearch-sync","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Algolia Sync","permalink":"/reference/scripts/algolia-sync"},"next":{"title":"Glossary","permalink":"/reference/glossary"}}');var i=r(4848),t=r(8453);const c={},d="Index Hook: Meilisearch Sync",a={},o=[{value:"How it works",id:"how-it-works",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"index-hook-meilisearch-sync",children:"Index Hook: Meilisearch Sync"})}),"\n",(0,i.jsx)(n.p,{children:"Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Lexicon type:"})," record (index hook)"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-lua",children:'function handle()\n local headers = {\n ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,\n ["Content-Type"] = "application/json"\n }\n\n if action == "delete" then\n http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {\n headers = headers\n })\n else\n http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {\n headers = headers,\n body = json.encode(toarray({\n {\n id = uri,\n collection = collection,\n did = did,\n record = record\n }\n }))\n })\n end\n\n return record\nend\n'})}),"\n",(0,i.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["On ",(0,i.jsx)(n.strong,{children:"create"})," or ",(0,i.jsx)(n.strong,{children:"update"}),": sends a ",(0,i.jsx)(n.code,{children:"POST"})," request to Meilisearch's document API with the record data wrapped in an array. Meilisearch upserts by ",(0,i.jsx)(n.code,{children:"id"})," \u2014 if a document with the same AT URI already exists, it's replaced."]}),"\n",(0,i.jsxs)(n.li,{children:["On ",(0,i.jsx)(n.strong,{children:"delete"}),": sends a ",(0,i.jsx)(n.code,{children:"DELETE"})," request to remove the document from the index by its AT URI."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"toarray()"})," function ensures the table is encoded as a JSON array (Meilisearch expects an array of documents). See ",(0,i.jsx)(n.a,{href:"/guides/index-hooks#json-api",children:"JSON API"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,i.jsxs)(n.p,{children:["This script uses ",(0,i.jsx)(n.a,{href:"/guides/scripting",children:"script variables"})," instead of hardcoded values. Set these via the ",(0,i.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," or dashboard:"]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Value"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MEILISEARCH_URL"})}),(0,i.jsxs)(n.td,{children:["Your Meilisearch instance URL (e.g. ",(0,i.jsx)(n.code,{children:"http://meilisearch.railway.internal:7700"}),")"]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MEILISEARCH_API_KEY"})}),(0,i.jsx)(n.td,{children:"A Meilisearch API key with write permissions"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["Script variables are stored in the ",(0,i.jsx)(n.code,{children:"script_variables"})," table and accessible as ",(0,i.jsx)(n.code,{children:"env.*"})," in Lua."]}),"\n",(0,i.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,i.jsx)(n.p,{children:"This hook keeps an external search index in sync with your indexed records in real time. Users searching through Meilisearch get results that reflect the latest state of the network without polling or scheduled jobs."}),"\n",(0,i.jsx)(n.p,{children:"Meilisearch is a good fit for self-hosted deployments \u2014 colocate it alongside HappyView (e.g. on the same Railway project) for sub-millisecond network latency."}),"\n",(0,i.jsxs)(n.p,{children:["Combine this with a ",(0,i.jsx)(n.a,{href:"/guides/scripting",children:"query script"})," that searches Meilisearch instead of the local database for a full-text search experience that goes beyond what ",(0,i.jsx)(n.code,{children:"db.search"})," offers."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453(e,n,r){r.d(n,{R:()=>c,x:()=>d});var s=r(6540);const i={},t=s.createContext(i);function c(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8644baa.350e6ac9.js b/assets/js/e8644baa.350e6ac9.js deleted file mode 100644 index 21eba36..0000000 --- a/assets/js/e8644baa.350e6ac9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9178],{8525(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","source":"@site/docs/reference/scripts/paginated-list.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/paginated-list","permalink":"/reference/scripts/paginated-list","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"},"next":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"}}');var n=t(4848),i=t(8453);const c={},o="Query: Paginated List",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"query-paginated-list",children:"Query: Paginated List"})}),"\n",(0,n.jsx)(r.p,{children:"List records from a collection with cursor-based pagination and an optional DID filter."}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:"function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = collection,\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n return result\nend\n"})}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Parse ",(0,n.jsx)(r.code,{children:"limit"})," from the query string, defaulting to 20 and capping at 100."]}),"\n",(0,n.jsxs)(r.li,{children:["Call ",(0,n.jsx)(r.a,{href:"/guides/scripting#dbquery",children:(0,n.jsx)(r.code,{children:"db.query"})})," with the target collection, optional DID filter, and offset-based pagination."]}),"\n",(0,n.jsxs)(r.li,{children:["Return the result directly. ",(0,n.jsx)(r.code,{children:"db.query"})," returns ",(0,n.jsx)(r.code,{children:'{ records = [...], cursor = "..." }'})," where ",(0,n.jsx)(r.code,{children:"cursor"})," is present when more records exist."]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listStatuses\nGET /xrpc/xyz.statusphere.listStatuses?limit=50\nGET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10\nGET /xrpc/xyz.statusphere.listStatuses?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsxs)(r.p,{children:["A straightforward list endpoint for feeds, timelines, or browsing records by collection. The ",(0,n.jsx)(r.code,{children:"cursor"})," value returned by ",(0,n.jsx)(r.code,{children:"db.query"})," is an offset. Clients pass it back as the ",(0,n.jsx)(r.code,{children:"cursor"})," parameter to fetch the next page. Since all query parameters arrive as strings, use ",(0,n.jsx)(r.code,{children:"tonumber()"})," to convert ",(0,n.jsx)(r.code,{children:"limit"})," and ",(0,n.jsx)(r.code,{children:"cursor"})," to numbers."]})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var s=t(6540);const n={},i=s.createContext(n);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8644baa.4c8d12f5.js b/assets/js/e8644baa.4c8d12f5.js new file mode 100644 index 0000000..b9dd545 --- /dev/null +++ b/assets/js/e8644baa.4c8d12f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9178],{7678:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","source":"@site/docs/reference/scripts/paginated-list.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/paginated-list","permalink":"/reference/scripts/paginated-list","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"},"next":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"}}');var n=t(199),i=t(2560);const c={},o="Query: Paginated List",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"query-paginated-list",children:"Query: Paginated List"})}),"\n",(0,n.jsx)(r.p,{children:"List records from a collection with cursor-based pagination and an optional DID filter."}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:"function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = collection,\n did = params.did,\n limit = limit,\n cursor = params.cursor,\n })\n\n return result\nend\n"})}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Parse ",(0,n.jsx)(r.code,{children:"limit"})," from the query string, defaulting to 20 and capping at 100."]}),"\n",(0,n.jsxs)(r.li,{children:["Call ",(0,n.jsx)(r.a,{href:"/reference/lua/database-api#dbquery",children:(0,n.jsx)(r.code,{children:"db.query"})})," with the target collection, optional DID filter, and cursor for pagination."]}),"\n",(0,n.jsxs)(r.li,{children:["Return the result directly. ",(0,n.jsx)(r.code,{children:"db.query"})," returns ",(0,n.jsx)(r.code,{children:'{ records = [...], cursor = "..." }'})," where ",(0,n.jsx)(r.code,{children:"cursor"})," is an opaque string present when more records exist."]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listStatuses\nGET /xrpc/xyz.statusphere.listStatuses?limit=50\nGET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10\nGET /xrpc/xyz.statusphere.listStatuses?cursor=&limit=20\n"})}),"\n",(0,n.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsxs)(r.p,{children:["A straightforward list endpoint for feeds, timelines, or browsing records by collection. The ",(0,n.jsx)(r.code,{children:"cursor"})," value returned by ",(0,n.jsx)(r.code,{children:"db.query"})," is an opaque string. Clients pass it back as the ",(0,n.jsx)(r.code,{children:"cursor"})," parameter to fetch the next page \u2014 don't parse or modify it."]})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},2560:(e,r,t)=>{t.d(r,{R:()=>c,x:()=>o});var s=t(63);const n={},i=s.createContext(n);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e93ec707.944cbd91.js b/assets/js/e93ec707.944cbd91.js new file mode 100644 index 0000000..690d73f --- /dev/null +++ b/assets/js/e93ec707.944cbd91.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5620],{4377:(e,s,l)=>{l.r(s),l.d(s,{assets:()=>d,contentTitle:()=>t,default:()=>h,frontMatter:()=>i,metadata:()=>n,toc:()=>o});const n=JSON.parse('{"id":"guides/labelers","title":"Labelers","description":"Labelers are external services that apply content labels to records. They operate out-of-band \u2014 labeler data does not appear in repos or flow through relays. HappyView can subscribe to labelers and store the labels they emit, making them available on records in the admin dashboard and via Lua scripts.","source":"@site/docs/guides/labelers.md","sourceDirName":"guides","slug":"/guides/labelers","permalink":"/guides/labelers","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Meilisearch Sync","permalink":"/reference/scripts/meilisearch-sync"},"next":{"title":"Plugins","permalink":"/guides/plugins"}}');var r=l(199),a=l(2560);const i={},t="Labelers",d={},o=[{value:"How labelers work",id:"how-labelers-work",level:2},{value:"Adding a labeler",id:"adding-a-labeler",level:2},{value:"Pausing and resuming",id:"pausing-and-resuming",level:2},{value:"Deleting a labeler",id:"deleting-a-labeler",level:2},{value:"Labels on records",id:"labels-on-records",level:2},{value:"Using labels in your AppView",id:"using-labels-in-your-appview",level:2},{value:"Permissions",id:"permissions",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.header,{children:(0,r.jsx)(s.h1,{id:"labelers",children:"Labelers"})}),"\n",(0,r.jsx)(s.p,{children:"Labelers are external services that apply content labels to records. They operate out-of-band \u2014 labeler data does not appear in repos or flow through relays. HappyView can subscribe to labelers and store the labels they emit, making them available on records in the admin dashboard and via Lua scripts."}),"\n",(0,r.jsx)(s.h2,{id:"how-labelers-work",children:"How labelers work"}),"\n",(0,r.jsxs)(s.p,{children:["A labeler is identified by its DID. When you subscribe to a labeler, HappyView connects directly to the labeler's WebSocket and streams label events in real time. Each label targets a specific record URI and carries a value like ",(0,r.jsx)(s.code,{children:"nudity"}),", ",(0,r.jsx)(s.code,{children:"spam"}),", or any custom string the labeler defines."]}),"\n",(0,r.jsxs)(s.p,{children:["Labels are stored in a ",(0,r.jsx)(s.code,{children:"labels"})," table in the database. HappyView tracks a cursor per labeler subscription so it can resume from where it left off after a restart."]}),"\n",(0,r.jsxs)(s.p,{children:["Records can also have ",(0,r.jsx)(s.strong,{children:"self-labels"})," \u2014 labels applied by the record's author and embedded directly in the record's ",(0,r.jsx)(s.code,{children:"labels.values"})," array. These are not managed by external labelers but are displayed alongside external labels in the dashboard."]}),"\n",(0,r.jsx)(s.h2,{id:"adding-a-labeler",children:"Adding a labeler"}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsxs)(s.li,{children:["Go to ",(0,r.jsx)(s.strong,{children:"Settings > Labelers"})," in the dashboard sidebar"]}),"\n",(0,r.jsxs)(s.li,{children:["Click ",(0,r.jsx)(s.strong,{children:"Add Labeler"})]}),"\n",(0,r.jsxs)(s.li,{children:["Enter the labeler's DID (e.g., ",(0,r.jsx)(s.code,{children:"did:plc:ar7c4by46qjdydhdevvrndac"}),")"]}),"\n",(0,r.jsxs)(s.li,{children:["Click ",(0,r.jsx)(s.strong,{children:"Add"})]}),"\n"]}),"\n",(0,r.jsxs)(s.p,{children:["HappyView begins consuming labels from the labeler immediately. The subscription appears in the table with an ",(0,r.jsx)(s.code,{children:"active"})," status."]}),"\n",(0,r.jsx)(s.p,{children:"You can also add a labeler via the API:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/labelers \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "did": "did:plc:ar7c4by46qjdydhdevvrndac" }\'\n'})}),"\n",(0,r.jsx)(s.h2,{id:"pausing-and-resuming",children:"Pausing and resuming"}),"\n",(0,r.jsx)(s.p,{children:"You can pause a labeler subscription to temporarily stop consuming labels without losing your cursor position. Click the pause icon next to the labeler in the table, or use the API:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-sh",children:'curl -X PATCH http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "paused" }\'\n'})}),"\n",(0,r.jsxs)(s.p,{children:["Resume by clicking the play icon or sending ",(0,r.jsx)(s.code,{children:'{ "status": "active" }'}),"."]}),"\n",(0,r.jsx)(s.h2,{id:"deleting-a-labeler",children:"Deleting a labeler"}),"\n",(0,r.jsxs)(s.p,{children:["Deleting a labeler removes the subscription ",(0,r.jsx)(s.strong,{children:"and all labels it has emitted"}),". This cannot be undone."]}),"\n",(0,r.jsxs)(s.ol,{children:["\n",(0,r.jsx)(s.li,{children:"Click the trash icon next to the labeler"}),"\n",(0,r.jsx)(s.li,{children:"Confirm in the dialog"}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"Or via the API:"}),"\n",(0,r.jsx)(s.pre,{children:(0,r.jsx)(s.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \\\n -H "$AUTH"\n'})}),"\n",(0,r.jsx)(s.h2,{id:"labels-on-records",children:"Labels on records"}),"\n",(0,r.jsxs)(s.p,{children:["Labels appear in the ",(0,r.jsx)(s.strong,{children:"Labels"})," column on the Records page as color-coded badges:"]}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Red"})," \u2014 content warnings: ",(0,r.jsx)(s.code,{children:"nudity"}),", ",(0,r.jsx)(s.code,{children:"sexual"}),", ",(0,r.jsx)(s.code,{children:"graphic-media"}),", ",(0,r.jsx)(s.code,{children:"violence"}),", ",(0,r.jsx)(s.code,{children:"gore"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Amber"})," \u2014 moderation labels: ",(0,r.jsx)(s.code,{children:"spam"}),", ",(0,r.jsx)(s.code,{children:"impersonation"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Neutral"})," \u2014 everything else"]}),"\n"]}),"\n",(0,r.jsx)(s.p,{children:"Self-labels (applied by the record author) use an outline badge style to distinguish them from external labels. Hover over a badge to see the source labeler's DID."}),"\n",(0,r.jsxs)(s.p,{children:["Labels are also available in the records API response and in Lua scripts via the ",(0,r.jsxs)(s.a,{href:"/reference/lua/atproto-api#atprotoget_labels",children:[(0,r.jsx)(s.code,{children:"atproto.get_labels"})," and ",(0,r.jsx)(s.code,{children:"atproto.get_labels_batch"})]})," functions."]}),"\n",(0,r.jsx)(s.h2,{id:"using-labels-in-your-appview",children:"Using labels in your AppView"}),"\n",(0,r.jsx)(s.p,{children:"Labeler subscriptions give your AppView access to content moderation signals without building your own moderation system. Some ways to use them:"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Content filtering"}),": Use labels in query scripts to exclude or down-rank flagged content. Check labels with ",(0,r.jsx)(s.code,{children:"atproto.get_labels"})," and filter results before returning them."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Moderation dashboards"}),": Display labels alongside records in your admin dashboard to review flagged content. Labels appear automatically on the Records page once a labeler is subscribed."]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.strong,{children:"Custom labelers"}),": You can subscribe to any labeler that implements the atproto labeler spec, including community-run labelers or one you operate yourself for domain-specific moderation (e.g. labeling game content by age rating)."]}),"\n"]}),"\n",(0,r.jsx)(s.h2,{id:"permissions",children:"Permissions"}),"\n",(0,r.jsxs)(s.table,{children:[(0,r.jsx)(s.thead,{children:(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.th,{children:"Action"}),(0,r.jsx)(s.th,{children:"Permission"})]})}),(0,r.jsxs)(s.tbody,{children:[(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"View labeler list"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"labelers:read"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Add or pause/resume"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"labelers:create"})})]}),(0,r.jsxs)(s.tr,{children:[(0,r.jsx)(s.td,{children:"Delete a labeler"}),(0,r.jsx)(s.td,{children:(0,r.jsx)(s.code,{children:"labelers:delete"})})]})]})]}),"\n",(0,r.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(s.ul,{children:["\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/reference/admin/labelers",children:"Admin API \u2014 Labelers"})," \u2014 full endpoint documentation"]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/reference/lua/atproto-api",children:"atproto API"})," \u2014 access labels in Lua scripts with ",(0,r.jsx)(s.code,{children:"get_labels"})," and ",(0,r.jsx)(s.code,{children:"get_labels_batch"})]}),"\n",(0,r.jsxs)(s.li,{children:[(0,r.jsx)(s.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 manage user access to labeler operations"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,r.jsx)(s,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},2560:(e,s,l)=>{l.d(s,{R:()=>i,x:()=>t});var n=l(63);const r={},a=n.createContext(r);function i(e){const s=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function t(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(a.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec125a10.3fe16f05.js b/assets/js/ec125a10.3fe16f05.js deleted file mode 100644 index 5b347dc..0000000 --- a/assets/js/ec125a10.3fe16f05.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9659],{2192(e,n,s){s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>l,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under /admin and require an AIP-issued Bearer token from a DID that exists in the admins table. You can also manage all of this through the web dashboard.","source":"@site/docs/reference/admin-api.md","sourceDirName":"reference","slug":"/reference/admin-api","permalink":"/reference/admin-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"XRPC API","permalink":"/reference/xrpc-api"},"next":{"title":"Get a Record","permalink":"/reference/scripts/get-record"}}');var d=s(4848),r=s(8453);const l={},c="Admin API",t={},a=[{value:"Auth",id:"auth",level:2},{value:"Lexicons",id:"lexicons",level:2},{value:"Upload / upsert a lexicon",id:"upload--upsert-a-lexicon",level:3},{value:"List lexicons",id:"list-lexicons",level:3},{value:"Get a lexicon",id:"get-a-lexicon",level:3},{value:"Delete a lexicon",id:"delete-a-lexicon",level:3},{value:"Network Lexicons",id:"network-lexicons",level:2},{value:"Add a network lexicon",id:"add-a-network-lexicon",level:3},{value:"List network lexicons",id:"list-network-lexicons",level:3},{value:"Remove a network lexicon",id:"remove-a-network-lexicon",level:3},{value:"Stats",id:"stats",level:2},{value:"Record counts",id:"record-counts",level:3},{value:"Tap Stats",id:"tap-stats",level:2},{value:"Get Tap stats",id:"get-tap-stats",level:3},{value:"Backfill",id:"backfill",level:2},{value:"Create a backfill job",id:"create-a-backfill-job",level:3},{value:"List backfill jobs",id:"list-backfill-jobs",level:3},{value:"Event Logs",id:"event-logs",level:2},{value:"List event logs",id:"list-event-logs",level:3},{value:"API Keys",id:"api-keys",level:2},{value:"Create an API key",id:"create-an-api-key",level:3},{value:"List API keys",id:"list-api-keys",level:3},{value:"Revoke an API key",id:"revoke-an-api-key",level:3},{value:"Admin management",id:"admin-management",level:2},{value:"Add an admin",id:"add-an-admin",level:3},{value:"List admins",id:"list-admins",level:3},{value:"Remove an admin",id:"remove-an-admin",level:3}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"admin-api",children:"Admin API"})}),"\n",(0,d.jsxs)(n.p,{children:["The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under ",(0,d.jsx)(n.code,{children:"/admin"})," and require an ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),"-issued Bearer token from a DID that exists in the ",(0,d.jsx)(n.code,{children:"admins"})," table. You can also manage all of this through the ",(0,d.jsx)(n.a,{href:"/getting-started/dashboard",children:"web dashboard"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"auth",children:"Auth"}),"\n",(0,d.jsx)(n.p,{children:"The admin API supports two authentication methods:"}),"\n",(0,d.jsxs)(n.ol,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.strong,{children:"OAuth (AIP)"})," \u2014 the Bearer token is validated against AIP's ",(0,d.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint to retrieve the caller's DID."]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.strong,{children:"API keys"})," \u2014 read/write tokens starting with ",(0,d.jsx)(n.code,{children:"hv_"}),". See the ",(0,d.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys guide"})," for details."]}),"\n"]}),"\n",(0,d.jsxs)(n.p,{children:["In both cases the resolved DID is checked against the ",(0,d.jsx)(n.code,{children:"admins"})," table."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Auto-bootstrap"}),": If the ",(0,d.jsx)(n.code,{children:"admins"})," table is empty, the first authenticated request automatically inserts the caller as the initial admin."]}),"\n",(0,d.jsxs)(n.p,{children:["Non-admin DIDs receive a ",(0,d.jsx)(n.code,{children:"403 Forbidden"})," response."]}),"\n",(0,d.jsxs)(n.p,{children:["All error responses return JSON with an ",(0,d.jsx)(n.code,{children:"error"})," field:"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Status"}),(0,d.jsx)(n.th,{children:"Meaning"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"400 Bad Request"})}),(0,d.jsx)(n.td,{children:"Invalid input (missing required fields, malformed lexicon JSON)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"401 Unauthorized"})}),(0,d.jsxs)(n.td,{children:["Missing or invalid Bearer token. See ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"403 Forbidden"})}),(0,d.jsx)(n.td,{children:"Authenticated DID is not in the admins table"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"404 Not Found"})}),(0,d.jsx)(n.td,{children:"Lexicon, admin, or backfill job not found"})]})]})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an AIP-issued access token or API key\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(n.h2,{id:"lexicons",children:"Lexicons"}),"\n",(0,d.jsx)(n.h3,{id:"upload--upsert-a-lexicon",children:"Upload / upsert a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },\n "backfill": true,\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"lexicon_json"})}),(0,d.jsx)(n.td,{children:"object"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsxs)(n.td,{children:["Raw lexicon JSON (must have ",(0,d.jsx)(n.code,{children:"lexicon: 1"})," and ",(0,d.jsx)(n.code,{children:"id"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"backfill"})}),(0,d.jsx)(n.td,{children:"boolean"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Whether uploading triggers historical backfill (default ",(0,d.jsx)(n.code,{children:"true"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"script"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Lua script for query/procedure endpoints"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"index_hook"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:[(0,d.jsx)(n.a,{href:"/guides/index-hooks",children:"Index hook"})," Lua script for record lexicons"]})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})," (new) or ",(0,d.jsx)(n.code,{children:"200 OK"})," (upsert)"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "xyz.statusphere.status",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-lexicons",children:"List lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "xyz.statusphere.status",\n "revision": 1,\n "lexicon_type": "record",\n "backfill": true,\n "created_at": "2025-01-01T00:00:00Z",\n "updated_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"get-a-lexicon",children:"Get a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})," with full lexicon details including raw JSON."]}),"\n",(0,d.jsx)(n.h3,{id:"delete-a-lexicon",children:"Delete a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"network-lexicons",children:"Network Lexicons"}),"\n",(0,d.jsxs)(n.p,{children:["Network lexicons are fetched from the AT Protocol network via DNS TXT resolution and kept updated via Tap. See ",(0,d.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for background."]}),"\n",(0,d.jsx)(n.h3,{id:"add-a-network-lexicon",children:"Add a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "nsid": "xyz.statusphere.status",\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"nsid"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsx)(n.td,{children:"The NSID of the lexicon to watch"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,d.jsx)(n.p,{children:"HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it."}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-network-lexicons",children:"List network lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/network-lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "target_collection": null,\n "last_fetched_at": "2025-01-01T00:00:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-a-network-lexicon",children:"Remove a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/network-lexicons/{nsid}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Removes the network lexicon tracking and also deletes the lexicon from the ",(0,d.jsx)(n.code,{children:"lexicons"})," table and in-memory registry."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"stats",children:"Stats"}),"\n",(0,d.jsx)(n.h3,{id:"record-counts",children:"Record counts"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "total_records": 12345,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]\n}\n'})}),"\n",(0,d.jsx)(n.h2,{id:"tap-stats",children:"Tap Stats"}),"\n",(0,d.jsxs)(n.p,{children:["Aggregate stats from the ",(0,d.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance. Useful for monitoring backfill progress. See ",(0,d.jsx)(n.a,{href:"/guides/backfill#job-lifecycle",children:"Backfill - Job lifecycle"})," for context."]}),"\n",(0,d.jsx)(n.h3,{id:"get-tap-stats",children:"Get Tap stats"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/tap/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/tap/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "repo_count": 5234,\n "record_count": 1048576,\n "outbox_buffer": 42\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"repo_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total repos Tap is tracking"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"record_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total records Tap has indexed"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"outbox_buffer"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Pending events awaiting delivery (high = Tap is busy)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:["Returns ",(0,d.jsx)(n.code,{children:"502 Bad Gateway"})," if Tap is unreachable."]}),"\n",(0,d.jsx)(n.h2,{id:"backfill",children:"Backfill"}),"\n",(0,d.jsx)(n.h3,{id:"create-a-backfill-job",children:"Create a backfill job"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/backfill\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/backfill \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "collection": "xyz.statusphere.status" }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single collection (backfills all if omitted)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"did"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single DID (discovers all via relay if omitted)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "status": "pending"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-backfill-jobs",children:"List backfill jobs"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/backfill/status\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/backfill/status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "collection": "xyz.statusphere.status",\n "did": null,\n "status": "completed",\n "total_repos": 42,\n "processed_repos": 42,\n "total_records": 1000,\n "error": null,\n "started_at": "2025-01-01T00:01:00Z",\n "completed_at": "2025-01-01T00:05:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h2,{id:"event-logs",children:"Event Logs"}),"\n",(0,d.jsxs)(n.p,{children:["HappyView records an audit trail of system events: lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. See the ",(0,d.jsx)(n.a,{href:"/guides/event-logs",children:"Event Logs guide"})," for details on event types and retention."]}),"\n",(0,d.jsx)(n.h3,{id:"list-event-logs",children:"List event logs"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/events\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl "http://localhost:3000/admin/events?severity=error&limit=10" -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Param"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"event_type"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Filter by exact event type (e.g. ",(0,d.jsx)(n.code,{children:"script.error"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"category"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Filter by category prefix (e.g. ",(0,d.jsx)(n.code,{children:"lexicon"})," matches all lexicon events)"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"severity"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Filter by severity: ",(0,d.jsx)(n.code,{children:"info"}),", ",(0,d.jsx)(n.code,{children:"warn"}),", or ",(0,d.jsx)(n.code,{children:"error"})]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"subject"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Filter by subject (lexicon ID, record URI, admin DID, etc.)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"cursor"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Pagination cursor (ISO 8601 timestamp from previous response)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"limit"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Results per page (default ",(0,d.jsx)(n.code,{children:"50"}),", max ",(0,d.jsx)(n.code,{children:"100"}),")"]})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "events": [\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "event_type": "script.error",\n "severity": "error",\n "actor_did": "did:plc:abc123",\n "subject": "com.example.feed.like",\n "detail": {\n "error": "attempt to index nil value",\n "script_source": "function handle() ... end",\n "input": { "status": "hello" },\n "caller_did": "did:plc:abc123",\n "method": "com.example.feed.like"\n },\n "created_at": "2026-03-01T12:00:00Z"\n }\n ],\n "cursor": "2026-03-01T11:59:00Z"\n}\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Events are returned in reverse chronological order (newest first). Pass the ",(0,d.jsx)(n.code,{children:"cursor"})," value from the response to fetch the next page."]}),"\n",(0,d.jsx)(n.h2,{id:"api-keys",children:"API Keys"}),"\n",(0,d.jsxs)(n.p,{children:["Manage API keys for programmatic access. See the ",(0,d.jsx)(n.a,{href:"/guides/api-keys",children:"API Keys guide"})," for usage details."]}),"\n",(0,d.jsx)(n.h3,{id:"create-an-api-key",children:"Create an API key"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/api-keys\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/api-keys \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "name": "CI Deploy" }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsx)(n.tbody,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"name"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsx)(n.td,{children:"A label to identify this key's usage"})]})})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "name": "CI Deploy",\n "key": "hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",\n "key_prefix": "hv_a1b2c3d4"\n}\n'})}),"\n",(0,d.jsxs)(n.p,{children:["The ",(0,d.jsx)(n.code,{children:"key"})," field contains the full API key. It is only returned in this response \u2014 store it securely."]}),"\n",(0,d.jsx)(n.h3,{id:"list-api-keys",children:"List API keys"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/api-keys\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/api-keys -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "name": "CI Deploy",\n "key_prefix": "hv_a1b2c3d4",\n "created_at": "2026-03-01T00:00:00Z",\n "last_used_at": "2026-03-06T12:00:00Z",\n "revoked_at": null\n }\n]\n'})}),"\n",(0,d.jsx)(n.p,{children:"Only returns keys belonging to the authenticated admin. The full key is never included \u2014 only the prefix."}),"\n",(0,d.jsx)(n.h3,{id:"revoke-an-api-key",children:"Revoke an API key"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/api-keys/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/api-keys/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Sets ",(0,d.jsx)(n.code,{children:"revoked_at"})," on the key. The key remains in the database for audit purposes but can no longer authenticate."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"admin-management",children:"Admin management"}),"\n",(0,d.jsx)(n.h3,{id:"add-an-admin",children:"Add an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/admins \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "did": "did:plc:newadmin" }\'\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:newadmin"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-admins",children:"List admins"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/admins -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:admin",\n "created_at": "2025-01-01T00:00:00Z",\n "last_used_at": "2025-01-02T12:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-an-admin",children:"Remove an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/admins/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/admins/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},8453(e,n,s){s.d(n,{R:()=>l,x:()=>c});var i=s(6540);const d={},r=i.createContext(d);function l(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:l(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec125a10.56ce15ca.js b/assets/js/ec125a10.56ce15ca.js new file mode 100644 index 0000000..72c2a03 --- /dev/null +++ b/assets/js/ec125a10.56ce15ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9659],{5824:(e,d,s)=>{s.r(d),s.d(d,{assets:()=>t,contentTitle:()=>l,default:()=>x,frontMatter:()=>c,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control user access. All endpoints live under /admin and require authentication from a DID that exists in the users table, with the appropriate permissions for the endpoint being called. You can also manage all of this through the web dashboard.","source":"@site/docs/reference/admin-api.md","sourceDirName":"reference","slug":"/reference/admin-api","permalink":"/reference/admin-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"XRPC API","permalink":"/reference/xrpc-api"},"next":{"title":"Lexicons","permalink":"/reference/admin/lexicons"}}');var r=s(199),n=s(2560);const c={},l="Admin API",t={},h=[{value:"Auth",id:"auth",level:2},{value:"Errors",id:"errors",level:2},{value:"Endpoint groups",id:"endpoint-groups",level:2},{value:"Permissions",id:"permissions",level:2}];function a(e){const d={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.header,{children:(0,r.jsx)(d.h1,{id:"admin-api",children:"Admin API"})}),"\n",(0,r.jsxs)(d.p,{children:["The admin API lets you manage lexicons, monitor records, run backfill jobs, and control user access. All endpoints live under ",(0,r.jsx)(d.code,{children:"/admin"})," and require authentication from a DID that exists in the ",(0,r.jsx)(d.code,{children:"users"})," table, with the appropriate ",(0,r.jsx)(d.a,{href:"/guides/permissions",children:"permissions"})," for the endpoint being called. You can also manage all of this through the ",(0,r.jsx)(d.a,{href:"/getting-started/dashboard",children:"web dashboard"}),"."]}),"\n",(0,r.jsx)(d.h2,{id:"auth",children:"Auth"}),"\n",(0,r.jsx)(d.p,{children:"The admin API supports two authentication methods:"}),"\n",(0,r.jsxs)(d.ol,{children:["\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.strong,{children:"API keys"})," \u2014 read/write tokens starting with ",(0,r.jsx)(d.code,{children:"hv_"}),", passed as ",(0,r.jsx)(d.code,{children:"Authorization: Bearer hv_..."}),". See the ",(0,r.jsx)(d.a,{href:"/guides/api-keys",children:"API Keys guide"})," for details."]}),"\n",(0,r.jsxs)(d.li,{children:[(0,r.jsx)(d.strong,{children:"Service auth JWT"})," \u2014 atproto inter-service authentication via signed JWTs."]}),"\n"]}),"\n",(0,r.jsxs)(d.p,{children:["In all cases the resolved DID is checked against the ",(0,r.jsx)(d.code,{children:"users"})," table, and the user's permissions are loaded to authorize the request."]}),"\n",(0,r.jsxs)(d.p,{children:[(0,r.jsx)(d.strong,{children:"Auto-bootstrap"}),": If the ",(0,r.jsx)(d.code,{children:"users"})," table is empty, the first authenticated request automatically creates the caller as the ",(0,r.jsx)(d.strong,{children:"super user"})," with all permissions granted."]}),"\n",(0,r.jsxs)(d.p,{children:["Non-user DIDs receive a ",(0,r.jsx)(d.code,{children:"403 Forbidden"})," response. Users without the required permission for a specific endpoint also receive ",(0,r.jsx)(d.code,{children:"403 Forbidden"}),"."]}),"\n",(0,r.jsx)(d.h2,{id:"errors",children:"Errors"}),"\n",(0,r.jsxs)(d.p,{children:["All error responses return JSON with an ",(0,r.jsx)(d.code,{children:"error"})," field:"]}),"\n",(0,r.jsx)(d.pre,{children:(0,r.jsx)(d.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Status"}),(0,r.jsx)(d.th,{children:"Meaning"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"400 Bad Request"})}),(0,r.jsx)(d.td,{children:"Invalid input (missing required fields, malformed lexicon JSON)"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"401 Unauthorized"})}),(0,r.jsx)(d.td,{children:"Missing or invalid API key or service auth JWT"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"403 Forbidden"})}),(0,r.jsx)(d.td,{children:"Authenticated DID is not in the users table, or user lacks the required permission"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"404 Not Found"})}),(0,r.jsx)(d.td,{children:"Lexicon, user, or backfill job not found"})]})]})]}),"\n",(0,r.jsx)(d.pre,{children:(0,r.jsx)(d.code,{className:"language-sh",children:'# All examples assume $TOKEN is an API key (hv_...)\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(d.h2,{id:"endpoint-groups",children:"Endpoint groups"}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Group"}),(0,r.jsx)(d.th,{children:"Description"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/lexicons",children:"Lexicons"})}),(0,r.jsx)(d.td,{children:"Upload, list, get, and delete lexicons and network lexicons"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/stats",children:"Stats"})}),(0,r.jsx)(d.td,{children:"Record counts by collection"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/backfill",children:"Backfill"})}),(0,r.jsx)(d.td,{children:"Create and monitor historical backfill jobs"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/events",children:"Event Logs"})}),(0,r.jsx)(d.td,{children:"Query the audit trail of system events"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/api-keys",children:"API Keys"})}),(0,r.jsx)(d.td,{children:"Create, list, and revoke API keys"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/users",children:"Users"})}),(0,r.jsx)(d.td,{children:"Create, list, update, and delete admin users"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/labelers",children:"Labelers"})}),(0,r.jsx)(d.td,{children:"Manage external labeler subscriptions"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/settings",children:"Instance Settings"})}),(0,r.jsx)(d.td,{children:"Configure app name, logo, and policy URLs"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/domains",children:"Domains"})}),(0,r.jsx)(d.td,{children:"Manage domains and their OAuth client identities"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/script-variables",children:"Script Variables"})}),(0,r.jsx)(d.td,{children:"Encrypted key/value pairs for Lua scripts"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/api-clients",children:"API Clients"})}),(0,r.jsx)(d.td,{children:"Register and manage third-party XRPC clients"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.a,{href:"/reference/admin/plugins",children:"Plugins"})}),(0,r.jsx)(d.td,{children:"Install, configure, and manage WASM plugins"})]})]})]}),"\n",(0,r.jsx)(d.h2,{id:"permissions",children:"Permissions"}),"\n",(0,r.jsxs)(d.p,{children:["Each admin API endpoint requires a specific permission. See the ",(0,r.jsx)(d.a,{href:"/guides/permissions",children:"Permissions guide"})," for the full list of permissions and templates."]}),"\n",(0,r.jsxs)(d.table,{children:[(0,r.jsx)(d.thead,{children:(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.th,{children:"Endpoint"}),(0,r.jsx)(d.th,{children:"Required Permission"})]})}),(0,r.jsxs)(d.tbody,{children:[(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/lexicons"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/lexicons"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/lexicons/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/lexicons/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/network-lexicons"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/network-lexicons"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/network-lexicons/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"lexicons:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/stats"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"stats:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/backfill"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"backfill:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/backfill/status"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"backfill:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/events"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"events:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/api-keys"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-keys:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/api-keys"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-keys:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/api-keys/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-keys:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/users"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"users:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/users"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"users:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/users/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"users:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PATCH /admin/users/{id}/permissions"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"users:update"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/users/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"users:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/users/transfer-super"})}),(0,r.jsx)(d.td,{children:"Super user only"})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/script-variables"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script-variables:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/script-variables"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script-variables:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/script-variables/{key}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"script-variables:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/labelers"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"labelers:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/labelers"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"labelers:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PATCH /admin/labelers/{did}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"labelers:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/labelers/{did}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"labelers:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/settings"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PUT /admin/settings/{key}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/settings/{key}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PUT /admin/settings/logo"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/settings/logo"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/plugins"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/plugins"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/plugins/preview"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/plugins/official"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/plugins/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:delete"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/plugins/{id}/reload"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/plugins/{id}/check-update"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/plugins/{id}/secrets"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:read"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PUT /admin/plugins/{id}/secrets"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"plugins:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/domains"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/domains"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/domains/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/domains/{id}/primary"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"settings:manage"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/api-clients"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-clients:view"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"POST /admin/api-clients"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-clients:create"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"GET /admin/api-clients/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-clients:view"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"PUT /admin/api-clients/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-clients:edit"})})]}),(0,r.jsxs)(d.tr,{children:[(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"DELETE /admin/api-clients/{id}"})}),(0,r.jsx)(d.td,{children:(0,r.jsx)(d.code,{children:"api-clients:delete"})})]})]})]})]})}function x(e={}){const{wrapper:d}={...(0,n.R)(),...e.components};return d?(0,r.jsx)(d,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},2560:(e,d,s)=>{s.d(d,{R:()=>c,x:()=>l});var i=s(63);const r={},n=i.createContext(r);function c(e){const d=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(d):{...d,...e}},[d,e])}function l(e){let d;return d=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),i.createElement(n.Provider,{value:d},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f142c65c.366ae717.js b/assets/js/f142c65c.366ae717.js deleted file mode 100644 index 48ce997..0000000 --- a/assets/js/f142c65c.366ae717.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9957],{9573(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","source":"@site/docs/reference/scripts/list-or-fetch.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/list-or-fetch","permalink":"/reference/scripts/list-or-fetch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"},"next":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"}}');var t=n(4848),i=n(8453);const c={},o="Query: List or Fetch Records",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"query-list-or-fetch-records",children:"Query: List or Fetch Records"})}),"\n",(0,t.jsxs)(r.p,{children:["This query handles both single-record lookups (when a ",(0,t.jsx)(r.code,{children:"uri"})," param is provided) and paginated listing."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "record not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["If a ",(0,t.jsx)(r.code,{children:"uri"})," query parameter is provided, fetch that single record with ",(0,t.jsx)(r.a,{href:"/guides/scripting#dbget",children:(0,t.jsx)(r.code,{children:"db.get"})})," and return it. If it doesn't exist, return a structured error (using ",(0,t.jsx)(r.code,{children:"error()"})," would trigger a 500 response)."]}),"\n",(0,t.jsxs)(r.li,{children:["Otherwise, list records from the target collection using ",(0,t.jsx)(r.a,{href:"/guides/scripting#dbquery",children:(0,t.jsx)(r.code,{children:"db.query"})}),", with optional filtering by ",(0,t.jsx)(r.code,{children:"did"})," and pagination via ",(0,t.jsx)(r.code,{children:"limit"}),"/",(0,t.jsx)(r.code,{children:"offset"}),". Since query parameters arrive as strings, ",(0,t.jsx)(r.code,{children:"tonumber()"})," converts them to numbers."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listRecords?limit=10\nGET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsx)(r.p,{children:"This is a good default query script when you want a single endpoint that serves double duty: list browsing for feeds/timelines and direct record fetching for detail views."})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>c,x:()=>o});var s=n(6540);const t={},i=s.createContext(t);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f142c65c.a2f59d47.js b/assets/js/f142c65c.a2f59d47.js new file mode 100644 index 0000000..52015d3 --- /dev/null +++ b/assets/js/f142c65c.a2f59d47.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9957],{7294:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","source":"@site/docs/reference/scripts/list-or-fetch.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/list-or-fetch","permalink":"/reference/scripts/list-or-fetch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"},"next":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"}}');var t=n(199),i=n(2560);const c={},o="Query: List or Fetch Records",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"query-list-or-fetch-records",children:"Query: List or Fetch Records"})}),"\n",(0,t.jsxs)(r.p,{children:["This query handles both single-record lookups (when a ",(0,t.jsx)(r.code,{children:"uri"})," param is provided) and paginated listing."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "record not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n cursor = params.cursor,\n })\nend\n'})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["If a ",(0,t.jsx)(r.code,{children:"uri"})," query parameter is provided, fetch that single record with ",(0,t.jsx)(r.a,{href:"/reference/lua/database-api#dbget",children:(0,t.jsx)(r.code,{children:"db.get"})})," and return it. If it doesn't exist, return a structured error (using ",(0,t.jsx)(r.code,{children:"error()"})," would trigger a 500 response)."]}),"\n",(0,t.jsxs)(r.li,{children:["Otherwise, list records from the target collection using ",(0,t.jsx)(r.a,{href:"/reference/lua/database-api#dbquery",children:(0,t.jsx)(r.code,{children:"db.query"})}),", with optional filtering by ",(0,t.jsx)(r.code,{children:"did"})," and cursor-based pagination. The ",(0,t.jsx)(r.code,{children:"cursor"})," is an opaque string from a previous response \u2014 pass it through directly. Since ",(0,t.jsx)(r.code,{children:"limit"})," arrives as a string, ",(0,t.jsx)(r.code,{children:"tonumber()"})," converts it to a number."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listRecords?limit=10\nGET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsx)(r.p,{children:"Useful when one endpoint needs to handle both listing and single-record fetches."})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},2560:(e,r,n)=>{n.d(r,{R:()=>c,x:()=>o});var s=n(63);const t={},i=s.createContext(t);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2031820.6d24a989.js b/assets/js/f2031820.6d24a989.js new file mode 100644 index 0000000..e9d794d --- /dev/null +++ b/assets/js/f2031820.6d24a989.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[9697],{3635:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"guides/database-setup","title":"Database Setup","description":"HappyView supports two database backends: SQLite (default) and PostgreSQL. The backend is auto-detected from your DATABASEURL scheme, or you can set DATABASEBACKEND explicitly.","source":"@site/docs/guides/database-setup.md","sourceDirName":"guides","slug":"/guides/database-setup","permalink":"/guides/database-setup","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Event Logs","permalink":"/guides/event-logs"},"next":{"title":"Postgres \u2192 SQLite Migration","permalink":"/guides/postgres-to-sqlite-migration"}}');var i=t(199),r=t(2560);const o={},a="Database Setup",d={},l=[{value:"SQLite (default)",id:"sqlite-default",level:2},{value:"PostgreSQL (optional)",id:"postgresql-optional",level:2},{value:"Environment variables",id:"environment-variables",level:2},{value:"Docker Compose",id:"docker-compose",level:2},{value:"Lua scripts",id:"lua-scripts",level:2},{value:"Next steps",id:"next-steps",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.header,{children:(0,i.jsx)(s.h1,{id:"database-setup",children:"Database Setup"})}),"\n",(0,i.jsxs)(s.p,{children:["HappyView supports two database backends: ",(0,i.jsx)(s.strong,{children:"SQLite"})," (default) and ",(0,i.jsx)(s.strong,{children:"PostgreSQL"}),". The backend is auto-detected from your ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," scheme, or you can set ",(0,i.jsx)(s.code,{children:"DATABASE_BACKEND"})," explicitly."]}),"\n",(0,i.jsx)(s.h2,{id:"sqlite-default",children:"SQLite (default)"}),"\n",(0,i.jsx)(s.p,{children:"SQLite requires zero setup. HappyView creates the database file automatically on first startup."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"DATABASE_URL=sqlite://data/happyview.db?mode=rwc\n"})}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"?mode=rwc"})," parameter tells SQLite to create the file if it does not exist. The path is relative to the working directory (or use an absolute path)."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"When to use SQLite:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Getting started or local development"}),"\n",(0,i.jsx)(s.li,{children:"Small to medium deployments"}),"\n",(0,i.jsx)(s.li,{children:"Single-server setups where simplicity is preferred"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"postgresql-optional",children:"PostgreSQL (optional)"}),"\n",(0,i.jsx)(s.p,{children:"For larger deployments or when you need concurrent write scalability, use Postgres."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\n"})}),"\n",(0,i.jsx)(s.p,{children:"You need to create the database before starting HappyView:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,i.jsx)(s.p,{children:"HappyView runs migrations automatically on startup for both backends."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"When to use Postgres:"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"High write concurrency from many simultaneous users"}),"\n",(0,i.jsx)(s.li,{children:"You need Postgres-specific features (e.g., advanced JSON queries in Lua scripts)"}),"\n",(0,i.jsx)(s.li,{children:"You already have a Postgres infrastructure"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,i.jsxs)(s.table,{children:[(0,i.jsx)(s.thead,{children:(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.th,{children:"Variable"}),(0,i.jsx)(s.th,{children:"Description"})]})}),(0,i.jsxs)(s.tbody,{children:[(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"DATABASE_URL"})}),(0,i.jsxs)(s.td,{children:["Connection string. ",(0,i.jsx)(s.code,{children:"sqlite://..."})," for SQLite, ",(0,i.jsx)(s.code,{children:"postgres://..."})," for Postgres"]})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{children:(0,i.jsx)(s.code,{children:"DATABASE_BACKEND"})}),(0,i.jsxs)(s.td,{children:["Optional. Force ",(0,i.jsx)(s.code,{children:"sqlite"})," or ",(0,i.jsx)(s.code,{children:"postgres"}),". Auto-detected from ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," if not set"]})]})]})]}),"\n",(0,i.jsx)(s.h2,{id:"docker-compose",children:"Docker Compose"}),"\n",(0,i.jsxs)(s.p,{children:["The default ",(0,i.jsx)(s.code,{children:"docker-compose.yml"})," ships with the Postgres service commented out. To use Postgres:"]}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["Uncomment the ",(0,i.jsx)(s.code,{children:"postgres"})," service and ",(0,i.jsx)(s.code,{children:"pgdata"})," volume in ",(0,i.jsx)(s.code,{children:"docker-compose.yml"})]}),"\n",(0,i.jsxs)(s.li,{children:["Uncomment the ",(0,i.jsx)(s.code,{children:"depends_on: postgres"})," block in the ",(0,i.jsx)(s.code,{children:"happyview"})," service"]}),"\n",(0,i.jsxs)(s.li,{children:["Update ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," in ",(0,i.jsx)(s.code,{children:".env"}),":","\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@postgres/happyview\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["Set the Postgres credentials:","\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"POSTGRES_USER=happyview\nPOSTGRES_PASSWORD=happyview\nPOSTGRES_DB=happyview\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"lua-scripts",children:"Lua scripts"}),"\n",(0,i.jsxs)(s.p,{children:["Both backends support the same Lua database API (",(0,i.jsx)(s.code,{children:"db.query"}),", ",(0,i.jsx)(s.code,{children:"db.get"}),", ",(0,i.jsx)(s.code,{children:"db.count"}),"). Write SQL in ",(0,i.jsx)(s.strong,{children:"SQLite syntax"})," by default. If you are using Postgres, HappyView automatically translates common SQLite patterns to Postgres equivalents at runtime."]}),"\n",(0,i.jsxs)(s.p,{children:["If you are migrating existing Lua scripts from Postgres SQL syntax to SQLite syntax, see the ",(0,i.jsx)(s.a,{href:"/guides/postgres-to-sqlite-migration",children:"Postgres to SQLite migration guide"}),"."]}),"\n",(0,i.jsx)(s.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/guides/sqlite-to-postgres-migration",children:"SQLite \u2192 Postgres migration"})," \u2014 switch an existing instance from SQLite to Postgres"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/guides/postgres-to-sqlite-migration",children:"Postgres \u2192 SQLite migration"})," \u2014 switch an existing instance from Postgres to SQLite"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/guides/scripting",children:"Lua scripting"})," \u2014 write queries that target either backend"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/getting-started/configuration",children:"Configuration"})," \u2014 ",(0,i.jsx)(s.code,{children:"DATABASE_URL"})," and related variables"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},2560:(e,s,t)=>{t.d(s,{R:()=>o,x:()=>a});var n=t(63);const i={},r=n.createContext(i);function o(e){const s=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f839662b.9ae0aa4c.js b/assets/js/f839662b.9ae0aa4c.js new file mode 100644 index 0000000..5d2c7be --- /dev/null +++ b/assets/js/f839662b.9ae0aa4c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[7177],{4711:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>i,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>d,toc:()=>l});const d=JSON.parse('{"id":"reference/lua/database-api","title":"Database API","description":"The db table provides access to the database. Available in queries, procedures, and index hooks.","source":"@site/docs/reference/lua/database-api.md","sourceDirName":"reference/lua","slug":"/reference/lua/database-api","permalink":"/reference/lua/database-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Record API","permalink":"/reference/lua/record-api"},"next":{"title":"HTTP API","permalink":"/reference/lua/http-api"}}');var n=s(199),a=s(2560);const t={},c="Database API",i={},l=[{value:"db.query",id:"dbquery",level:2},{value:"db.get",id:"dbget",level:2},{value:"db.search",id:"dbsearch",level:2},{value:"db.backlinks",id:"dbbacklinks",level:2},{value:"db.count",id:"dbcount",level:2},{value:"db.raw",id:"dbraw",level:2},{value:"SQL dialect",id:"sql-dialect",level:3},{value:"Column type mapping",id:"column-type-mapping",level:3}];function o(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"database-api",children:"Database API"})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"db"})," table provides access to the database. Available in queries, procedures, and ",(0,n.jsx)(r.a,{href:"/guides/index-hooks",children:"index hooks"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"dbquery",children:"db.query"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'local result = db.query({\n collection = "xyz.statusphere.status", -- required\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n cursor = params.cursor, -- optional: opaque cursor from a previous response\n sort = "name", -- optional: field to sort by, default "indexed_at"\n sortDirection = "asc", -- optional: "asc" or "desc", default "desc"\n})\n\n-- result.records \u2014 array of record tables (each includes a "uri" field)\n-- result.cursor \u2014 present when more records exist (opaque string, pass back as-is)\n'})}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"cursor"})," is an opaque string returned in a previous response. Pass it through directly \u2014 don't parse or modify it. When no ",(0,n.jsx)(r.code,{children:"sort"})," field is specified, ",(0,n.jsx)(r.code,{children:"db.query"})," uses keyset pagination (based on ",(0,n.jsx)(r.code,{children:"created_at"})," and ",(0,n.jsx)(r.code,{children:"uri"}),"), which is stable even when records are inserted between pages. When a custom ",(0,n.jsx)(r.code,{children:"sort"})," field is specified, offset-based pagination is used instead."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"sort"})," field can be a top-level column (",(0,n.jsx)(r.code,{children:"indexed_at"}),", ",(0,n.jsx)(r.code,{children:"did"}),", ",(0,n.jsx)(r.code,{children:"uri"}),") or any field inside the record's ",(0,n.jsx)(r.code,{children:"value"})," object (e.g. ",(0,n.jsx)(r.code,{children:"name"}),", ",(0,n.jsx)(r.code,{children:"createdAt"}),"). Field names must contain only alphanumeric characters and underscores."]}),"\n",(0,n.jsx)(r.h2,{id:"dbget",children:"db.get"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns the record table or nil\n-- The returned table includes a "uri" field\n'})}),"\n",(0,n.jsx)(r.h2,{id:"dbsearch",children:"db.search"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'local result = db.search({\n collection = "xyz.statusphere.status", -- required\n field = "displayName", -- required: record field to search\n query = "alice", -- required: search term\n limit = 10, -- optional: max 100, default 10\n})\n\n-- result.records \u2014 array of matching records, ranked by relevance:\n-- exact match > prefix match > contains match, then alphabetical\n'})}),"\n",(0,n.jsx)(r.h2,{id:"dbbacklinks",children:"db.backlinks"}),"\n",(0,n.jsx)(r.p,{children:"Find records that reference a given AT URI anywhere in their data. Useful for finding likes on a post, replies to a thread, or any record that links to another."}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'local result = db.backlinks({\n collection = "xyz.statusphere.status", -- required\n uri = "at://did:plc:abc/xyz.statusphere.status/foo", -- required: the URI to find references to\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n cursor = params.cursor, -- optional: opaque cursor from a previous response\n})\n\n-- result.records \u2014 array of records whose data contains the given URI\n-- result.cursor \u2014 present when more records exist (opaque string, pass back as-is)\n'})}),"\n",(0,n.jsxs)(r.p,{children:["The search checks the full record data, so it works regardless of which field holds the reference (",(0,n.jsx)(r.code,{children:"subject"}),", ",(0,n.jsx)(r.code,{children:"parent"}),", ",(0,n.jsx)(r.code,{children:"reply.root"}),", etc.)."]}),"\n",(0,n.jsx)(r.h2,{id:"dbcount",children:"db.count"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'local n = db.count("xyz.statusphere.status")\nlocal n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID\n'})}),"\n",(0,n.jsx)(r.h2,{id:"dbraw",children:"db.raw"}),"\n",(0,n.jsxs)(r.p,{children:["Run a raw SQL query against the database. Supports ",(0,n.jsx)(r.code,{children:"SELECT"}),", ",(0,n.jsx)(r.code,{children:"INSERT"}),", ",(0,n.jsx)(r.code,{children:"UPDATE"}),", ",(0,n.jsx)(r.code,{children:"DELETE"}),", and ",(0,n.jsx)(r.code,{children:"CREATE TABLE"})," statements."]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:'-- Read query\nlocal rows = db.raw(\n "SELECT uri, did, record FROM records WHERE collection = $1 AND did = $2 LIMIT $3",\n { "xyz.statusphere.status", "did:plc:abc", 10 }\n)\n\nfor _, row in ipairs(rows) do\n -- row.uri, row.did, row.record (JSONB is returned as a Lua table)\nend\n\n-- Write query (returns affected rows, if any)\ndb.raw("CREATE TABLE IF NOT EXISTS my_table (id TEXT PRIMARY KEY, value TEXT NOT NULL)")\ndb.raw("INSERT INTO my_table (id, value) VALUES ($1, $2) ON CONFLICT (id) DO UPDATE SET value = $2",\n { "key1", "hello" })\n'})}),"\n",(0,n.jsxs)(r.p,{children:["Parameters are passed as an array and bound to ",(0,n.jsx)(r.code,{children:"$1"}),", ",(0,n.jsx)(r.code,{children:"$2"}),", etc. Supported parameter types: strings, integers, numbers, booleans, and nil."]}),"\n",(0,n.jsx)(r.h3,{id:"sql-dialect",children:"SQL dialect"}),"\n",(0,n.jsxs)(r.p,{children:["Write SQL in ",(0,n.jsx)(r.strong,{children:"SQLite syntax"})," \u2014 HappyView translates it to Postgres at runtime if you're using Postgres. See ",(0,n.jsx)(r.a,{href:"/guides/database-setup",children:"Database Setup"})," for details on what gets translated. If you need database-specific SQL that can't be translated, check ",(0,n.jsx)(r.code,{children:"db.is_postgres()"})," at runtime."]}),"\n",(0,n.jsx)(r.h3,{id:"column-type-mapping",children:"Column type mapping"}),"\n",(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"SQLite type"}),(0,n.jsx)(r.th,{children:"Postgres type"}),(0,n.jsx)(r.th,{children:"Lua type"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:(0,n.jsx)(r.code,{children:"TEXT"})}),(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"TEXT"}),", ",(0,n.jsx)(r.code,{children:"VARCHAR"})]}),(0,n.jsx)(r.td,{children:"string"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:(0,n.jsx)(r.code,{children:"INTEGER"})}),(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"INT4"}),", ",(0,n.jsx)(r.code,{children:"INT8"})]}),(0,n.jsx)(r.td,{children:"integer"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:(0,n.jsx)(r.code,{children:"REAL"})}),(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"FLOAT4"}),", ",(0,n.jsx)(r.code,{children:"FLOAT8"})]}),(0,n.jsx)(r.td,{children:"number"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"INTEGER"})," (0/1)"]}),(0,n.jsx)(r.td,{children:(0,n.jsx)(r.code,{children:"BOOL"})}),(0,n.jsx)(r.td,{children:"boolean"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"TEXT"})," (JSON)"]}),(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"JSON"}),", ",(0,n.jsx)(r.code,{children:"JSONB"})]}),(0,n.jsx)(r.td,{children:"table"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsxs)(r.td,{children:[(0,n.jsx)(r.code,{children:"TEXT"})," (ISO 8601)"]}),(0,n.jsx)(r.td,{children:(0,n.jsx)(r.code,{children:"TIMESTAMPTZ"})}),(0,n.jsx)(r.td,{children:"string (ISO 8601)"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"Other"}),(0,n.jsx)(r.td,{children:"Other"}),(0,n.jsx)(r.td,{children:"string (fallback)"})]})]})]})]})}function h(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(o,{...e})}):o(e)}},2560:(e,r,s)=>{s.d(r,{R:()=>t,x:()=>c});var d=s(63);const n={},a=d.createContext(n);function t(e){const r=d.useContext(a);return d.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:t(e.components),d.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fac68122.66f4e9f8.js b/assets/js/fac68122.66f4e9f8.js deleted file mode 100644 index f5e0790..0000000 --- a/assets/js/fac68122.66f4e9f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5986],{4924(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"reference/production-deployment","title":"Deployment","description":"HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.","source":"@site/docs/reference/production-deployment.md","sourceDirName":"reference","slug":"/reference/production-deployment","permalink":"/reference/production-deployment","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Troubleshooting","permalink":"/reference/troubleshooting"}}');var o=t(4848),r=t(8453);const s={},a="Deployment",l={},c=[{value:"Docker",id:"docker",level:2},{value:"Production Compose example",id:"production-compose-example",level:3},{value:"Railway / Fly.io / other platforms",id:"railway--flyio--other-platforms",level:2},{value:"Database",id:"database",level:2},{value:"TLS",id:"tls",level:2},{value:"Logging",id:"logging",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"deployment",children:"Deployment"})}),"\n",(0,o.jsxs)(n.p,{children:["HappyView requires a Postgres database and an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," covers the fastest path with Railway. This page covers other deployment options."]}),"\n",(0,o.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,o.jsx)(n.p,{children:"Build the image:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"docker build -t happyview .\n"})}),"\n",(0,o.jsxs)(n.p,{children:["For local development, see ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/docker",children:"Docker deployment"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"production-compose-example",children:"Production Compose example"}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["This example omits ",(0,o.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", which is required for real-time record streaming and backfill. See the full ",(0,o.jsx)(n.code,{children:"docker-compose.yml"})," in the repository for a complete configuration including Tap."]})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'services:\n postgres:\n image: postgres:17\n environment:\n POSTGRES_USER: happyview\n POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"\n POSTGRES_DB: happyview\n volumes:\n - pgdata:/var/lib/postgresql/data\n\n happyview:\n image: happyview:latest\n ports:\n - "3000:3000"\n environment:\n DATABASE_URL: "postgres://happyview:${POSTGRES_PASSWORD}@postgres/happyview"\n AIP_URL: "https://aip.example.com"\n depends_on:\n postgres:\n condition: service_healthy\n\nvolumes:\n pgdata:\n'})}),"\n",(0,o.jsx)(n.h2,{id:"railway--flyio--other-platforms",children:"Railway / Fly.io / other platforms"}),"\n",(0,o.jsx)(n.p,{children:"The general process for any hosting platform:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Provision a Postgres 17+ database"}),"\n",(0,o.jsxs)(n.li,{children:["Deploy an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth for your AppView)"]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.code,{children:"DATABASE_URL"})," and ",(0,o.jsx)(n.code,{children:"AIP_URL"})," environment variables (see ",(0,o.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for all options)"]}),"\n",(0,o.jsx)(n.li,{children:"Deploy the Docker image or build from source"}),"\n",(0,o.jsxs)(n.li,{children:["HappyView listens on ",(0,o.jsx)(n.code,{children:"PORT"})," (default ",(0,o.jsx)(n.code,{children:"3000"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:["Health check: ",(0,o.jsx)(n.code,{children:"GET /health"})," returns ",(0,o.jsx)(n.code,{children:"ok"})]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For Railway specifically, the ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," template handles all of this with a single click."]}),"\n",(0,o.jsx)(n.h2,{id:"database",children:"Database"}),"\n",(0,o.jsxs)(n.p,{children:["Migrations run automatically on startup via ",(0,o.jsx)(n.code,{children:"sqlx::migrate!()"}),". No manual migration step is needed."]}),"\n",(0,o.jsx)(n.h2,{id:"tls",children:"TLS"}),"\n",(0,o.jsx)(n.p,{children:"HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS."}),"\n",(0,o.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,o.jsxs)(n.p,{children:["HappyView uses the ",(0,o.jsx)(n.code,{children:"RUST_LOG"})," environment variable to control log output. The default (",(0,o.jsx)(n.code,{children:"happyview=debug,tower_http=debug"}),") logs all HappyView activity and HTTP requests. For production, consider ",(0,o.jsx)(n.code,{children:"happyview=info,tower_http=info"})," to reduce noise. See ",(0,o.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for details."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>s,x:()=>a});var i=t(6540);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fac68122.ea1f1bd1.js b/assets/js/fac68122.ea1f1bd1.js new file mode 100644 index 0000000..f5435c9 --- /dev/null +++ b/assets/js/fac68122.ea1f1bd1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[5986],{5385:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/production-deployment","title":"Production","description":"This page covers what to change when taking a HappyView instance from local development to production. For setup instructions, see Deployment. This page assumes you already have a working deployment and focuses on hardening and operational concerns.","source":"@site/docs/reference/production-deployment.md","sourceDirName":"reference","slug":"/reference/production-deployment","permalink":"/reference/production-deployment","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"From Source","permalink":"/getting-started/deployment/other"},"next":{"title":"Configuration","permalink":"/getting-started/configuration"}}');var i=s(199),r=s(2560);const a={},o="Production",c={},l=[{value:"Session secret",id:"session-secret",level:2},{value:"Token encryption key",id:"token-encryption-key",level:2},{value:"TLS and PUBLIC_URL",id:"tls-and-public_url",level:2},{value:"Database",id:"database",level:2},{value:"Rate limits",id:"rate-limits",level:2},{value:"Logging",id:"logging",level:2},{value:"Event log retention",id:"event-log-retention",level:2},{value:"Health checks",id:"health-checks",level:2},{value:"Backups",id:"backups",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"production",children:"Production"})}),"\n",(0,i.jsxs)(n.p,{children:["This page covers what to change when taking a HappyView instance from local development to production. For setup instructions, see ",(0,i.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Deployment"}),". This page assumes you already have a working deployment and focuses on hardening and operational concerns."]}),"\n",(0,i.jsx)(n.h2,{id:"session-secret",children:"Session secret"}),"\n",(0,i.jsxs)(n.p,{children:["Set ",(0,i.jsx)(n.code,{children:"SESSION_SECRET"})," to a random string of at least 64 characters. This signs the session cookies issued during OAuth login; rotating it invalidates every existing session."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"openssl rand -base64 48\n"})}),"\n",(0,i.jsx)(n.p,{children:"Never commit the secret to source control. Store it in your platform's secret manager (Railway variables, Docker secrets, Kubernetes secrets, etc.)."}),"\n",(0,i.jsx)(n.h2,{id:"token-encryption-key",children:"Token encryption key"}),"\n",(0,i.jsxs)(n.p,{children:["If you use ",(0,i.jsx)(n.a,{href:"/guides/plugins",children:"plugins"})," that require secrets (API keys, OAuth credentials), set ",(0,i.jsx)(n.code,{children:"TOKEN_ENCRYPTION_KEY"})," to a base64-encoded 32-byte key. This encrypts plugin secrets at rest using AES-256-GCM:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"openssl rand -base64 32\n"})}),"\n",(0,i.jsx)(n.p,{children:"Without this variable, the dashboard's plugin secret fields are disabled and plugins can only read secrets from environment variables."}),"\n",(0,i.jsxs)(n.h2,{id:"tls-and-public_url",children:["TLS and ",(0,i.jsx)(n.code,{children:"PUBLIC_URL"})]}),"\n",(0,i.jsxs)(n.p,{children:["HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, a platform-managed load balancer) and set ",(0,i.jsx)(n.code,{children:"PUBLIC_URL"})," to the public HTTPS URL:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"PUBLIC_URL=https://happyview.example.com\n"})}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"PUBLIC_URL"})," is used to construct OAuth redirect URIs, so it must exactly match the URL users hit \u2014 including scheme. A mismatch breaks OAuth login."]}),"\n",(0,i.jsx)(n.h2,{id:"database",children:"Database"}),"\n",(0,i.jsx)(n.p,{children:"SQLite is fine for small to medium instances and is the default. Switch to Postgres if you need:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Multiple HappyView replicas sharing one database"}),"\n",(0,i.jsx)(n.li,{children:"Larger-than-memory working sets"}),"\n",(0,i.jsx)(n.li,{children:"External tools that need direct read access to the records table"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"/guides/database-setup",children:"database setup guide"})," for configuration details and ",(0,i.jsx)(n.a,{href:"/guides/postgres-to-sqlite-migration",children:"Postgres \u2192 SQLite migration"})," if you're moving the other direction. Migrations run automatically on startup regardless of backend."]}),"\n",(0,i.jsx)(n.h2,{id:"rate-limits",children:"Rate limits"}),"\n",(0,i.jsxs)(n.p,{children:["HappyView has a per-client token-bucket rate limiter for XRPC endpoints. The defaults (set via ",(0,i.jsx)(n.code,{children:"DEFAULT_RATE_LIMIT_CAPACITY"})," and ",(0,i.jsx)(n.code,{children:"DEFAULT_RATE_LIMIT_REFILL_RATE"}),") apply to any ",(0,i.jsx)(n.a,{href:"/guides/api-keys",children:"API client"})," that doesn't have per-client overrides. Raise the defaults cautiously \u2014 they exist so one misbehaving integrator can't saturate the server."]}),"\n",(0,i.jsxs)(n.p,{children:["Per-client overrides are set at client creation or via ",(0,i.jsx)(n.code,{children:"PUT /admin/api-clients/{id}"})," (see ",(0,i.jsx)(n.a,{href:"/reference/admin/api-clients",children:"Admin API \u2014 API Clients"}),")."]}),"\n",(0,i.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,i.jsxs)(n.p,{children:["The default ",(0,i.jsx)(n.code,{children:"RUST_LOG"})," setting (",(0,i.jsx)(n.code,{children:"happyview=debug,tower_http=debug"}),") is noisy. For production, drop the verbosity:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-sh",children:"RUST_LOG=happyview=info,tower_http=info\n"})}),"\n",(0,i.jsx)(n.p,{children:"Structured logs go to stdout, so any platform that captures container stdout (Railway, Fly, ECS, Kubernetes) will ingest them without further configuration. For retention and querying, ship stdout to your usual log aggregator."}),"\n",(0,i.jsx)(n.h2,{id:"event-log-retention",children:"Event log retention"}),"\n",(0,i.jsxs)(n.p,{children:["The admin ",(0,i.jsx)(n.a,{href:"/guides/event-logs",children:"event log"})," is stored in the same database as records. ",(0,i.jsx)(n.code,{children:"EVENT_LOG_RETENTION_DAYS"})," (default ",(0,i.jsx)(n.code,{children:"30"}),") controls automatic cleanup. Set to ",(0,i.jsx)(n.code,{children:"0"})," to keep events indefinitely \u2014 useful for compliance-sensitive deployments, but plan for database growth."]}),"\n",(0,i.jsx)(n.h2,{id:"health-checks",children:"Health checks"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"GET /health"})," returns ",(0,i.jsx)(n.code,{children:"200 ok"})," when HappyView can bind its HTTP listener. Use it as the readiness/liveness probe for your platform."]}),"\n",(0,i.jsxs)(n.p,{children:["For a deeper check, hit ",(0,i.jsx)(n.code,{children:"GET /xrpc/com.atproto.server.describeServer"})," \u2014 this exercises the database and lexicon registry, and only returns ",(0,i.jsx)(n.code,{children:"200"})," if HappyView can actually serve requests."]}),"\n",(0,i.jsx)(n.h2,{id:"backups",children:"Backups"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"SQLite"}),": back up the database file (e.g. ",(0,i.jsx)(n.code,{children:"data/happyview.db"}),") plus its ",(0,i.jsx)(n.code,{children:"-wal"})," and ",(0,i.jsx)(n.code,{children:"-shm"})," sidecar files. Use ",(0,i.jsx)(n.code,{children:"sqlite3 happyview.db \".backup '/path/backup.db'\""})," for a consistent snapshot while HappyView is running."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.strong,{children:"Postgres"}),": standard ",(0,i.jsx)(n.code,{children:"pg_dump"})," / managed-Postgres snapshots."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Most of what HappyView stores is derivable from the network \u2014 lost records can be re-indexed via ",(0,i.jsx)(n.a,{href:"/guides/backfill",children:"backfill"}),". You can't recover from the network: user accounts and permissions, API keys, API clients, plugin secrets, and the Jetstream cursor. Prioritize those in your backup plan."]}),"\n",(0,i.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," \u2014 full environment variable reference"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/guides/permissions",children:"Permissions"})," \u2014 lock down admin access before exposing the dashboard publicly"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/reference/troubleshooting",children:"Troubleshooting"})," \u2014 diagnose issues with a running instance"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2560:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>o});var t=s(63);const i={},r=t.createContext(i);function a(e){const n=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fbd7a87c.9890fbc2.js b/assets/js/fbd7a87c.9890fbc2.js new file mode 100644 index 0000000..3bb7c2e --- /dev/null +++ b/assets/js/fbd7a87c.9890fbc2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[1361],{6723:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the atproto network and serves XRPC endpoints.","source":"@site/docs/getting-started/quickstart.md","sourceDirName":"getting-started","slug":"/getting-started/quickstart","permalink":"/getting-started/quickstart","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/"},"next":{"title":"Railway","permalink":"/getting-started/deployment/railway"}}');var i=r(199),s=r(2560);const o={},d="Quickstart",a={},c=[{value:"1. Deploy HappyView",id:"1-deploy-happyview",level:2},{value:"2. Log in to the dashboard",id:"2-log-in-to-the-dashboard",level:2},{value:"3. Add your first lexicon",id:"3-add-your-first-lexicon",level:2},{value:"4. Verify records are being indexed",id:"4-verify-records-are-being-indexed",level:2},{value:"5. Query your data",id:"5-query-your-data",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,i.jsx)(t.p,{children:"This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the atproto network and serves XRPC endpoints."}),"\n",(0,i.jsx)(t.h2,{id:"1-deploy-happyview",children:"1. Deploy HappyView"}),"\n",(0,i.jsx)(t.p,{children:"Pick whichever option fits your situation:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Best for"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/railway",children:(0,i.jsx)(t.strong,{children:"Railway"})})}),(0,i.jsx)(t.td,{children:"Fastest path \u2014 one-click deploy of HappyView + Postgres"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/docker",children:(0,i.jsx)(t.strong,{children:"Docker Compose"})})}),(0,i.jsx)(t.td,{children:"Local development with the full stack in containers"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/other",children:(0,i.jsx)(t.strong,{children:"From source"})})}),(0,i.jsxs)(t.td,{children:["Running HappyView with ",(0,i.jsx)(t.code,{children:"cargo run"})," and managing dependencies yourself"]})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"If you're just trying HappyView for the first time, start with Railway."}),"\n",(0,i.jsx)(t.h2,{id:"2-log-in-to-the-dashboard",children:"2. Log in to the dashboard"}),"\n",(0,i.jsxs)(t.p,{children:["The built-in ",(0,i.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"})," is served at your instance's root URL. Log in with your atproto identity \u2014 on a fresh deployment, the first handle to authenticate is automatically bootstrapped as the ",(0,i.jsx)(t.strong,{children:"super user"})," with all permissions, so use the handle you want to own the instance."]}),"\n",(0,i.jsx)(t.h2,{id:"3-add-your-first-lexicon",children:"3. Add your first lexicon"}),"\n",(0,i.jsx)(t.p,{children:"Lexicons tell HappyView what data to index and what endpoints to serve. The quickest way to get started is to add one from the network:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["In the dashboard, go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Network"})]}),"\n",(0,i.jsxs)(t.li,{children:["Enter an NSID (e.g. ",(0,i.jsx)(t.code,{children:"xyz.statusphere.status"}),")"]}),"\n",(0,i.jsxs)(t.li,{children:["HappyView ",(0,i.jsx)(t.a,{href:"https://atproto.com/specs/lexicon#lexicon-publication-and-resolution",children:"resolves the schema"})," from its authority domain records and shows a preview"]}),"\n",(0,i.jsxs)(t.li,{children:["Click ",(0,i.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"HappyView starts indexing records for that collection. A backfill job fetches historical records, and new records stream in via Jetstream."}),"\n",(0,i.jsxs)(t.p,{children:["You can also upload lexicons manually via the dashboard or the ",(0,i.jsx)(t.a,{href:"/reference/admin-api",children:"admin API"}),". See ",(0,i.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"})," for the full details."]}),"\n",(0,i.jsx)(t.h2,{id:"4-verify-records-are-being-indexed",children:"4. Verify records are being indexed"}),"\n",(0,i.jsxs)(t.p,{children:["The dashboard home shows a live record count and a per-collection breakdown. For a deeper look, browse ",(0,i.jsx)(t.strong,{children:"Records"})," to inspect individual rows or ",(0,i.jsx)(t.strong,{children:"Backfill"})," to watch the historical fetch job drain."]}),"\n",(0,i.jsx)(t.h2,{id:"5-query-your-data",children:"5. Query your data"}),"\n",(0,i.jsxs)(t.p,{children:["Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})," and create a query lexicon with ",(0,i.jsx)(t.code,{children:"target_collection"})," set to your record collection's NSID. (",(0,i.jsx)(t.code,{children:"target_collection"})," is a HappyView-specific field that tells a query or procedure which record collection it operates on.)"]}),"\n",(0,i.jsxs)(t.p,{children:["Without a Lua script, HappyView generates a default query endpoint that supports ",(0,i.jsx)(t.code,{children:"limit"}),", ",(0,i.jsx)(t.code,{children:"cursor"}),", ",(0,i.jsx)(t.code,{children:"did"}),", and ",(0,i.jsx)(t.code,{children:"uri"})," parameters:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses?limit=5\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For custom query logic, attach a ",(0,i.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsx)(t.p,{children:"Here's where to go from here:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/tutorials/statusphere",children:(0,i.jsx)(t.strong,{children:"Statusphere tutorial"})}),": end-to-end walkthrough building a complete AppView with record, query, and procedure lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/lexicons",children:(0,i.jsx)(t.strong,{children:"Lexicons guide"})}),": target collections, backfill flag, network lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/scripting",children:(0,i.jsx)(t.strong,{children:"Lua Scripting"})}),": custom query and procedure logic"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/configuration",children:(0,i.jsx)(t.strong,{children:"Configuration"})}),": environment variables and tuning"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/authentication",children:(0,i.jsx)(t.strong,{children:"Authentication"})}),": how OAuth works and how to get API tokens"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},2560:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>d});var n=r(63);const i={},s=n.createContext(i);function o(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fbd7a87c.e3e74927.js b/assets/js/fbd7a87c.e3e74927.js deleted file mode 100644 index e91f0e7..0000000 --- a/assets/js/fbd7a87c.e3e74927.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1361],{8594(e,t,n){n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints.","source":"@site/docs/getting-started/quickstart.md","sourceDirName":"getting-started","slug":"/getting-started/quickstart","permalink":"/getting-started/quickstart","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/"},"next":{"title":"Railway","permalink":"/getting-started/deployment/railway"}}');var i=n(4848),s=n(8453);const o={},d="Quickstart",a={},c=[{value:"1. Deploy HappyView",id:"1-deploy-happyview",level:2},{value:"2. Log in to the dashboard",id:"2-log-in-to-the-dashboard",level:2},{value:"3. Add your first lexicon",id:"3-add-your-first-lexicon",level:2},{value:"4. Verify records are being indexed",id:"4-verify-records-are-being-indexed",level:2},{value:"5. Query your data",id:"5-query-your-data",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,i.jsx)(t.p,{children:"This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints."}),"\n",(0,i.jsx)(t.h2,{id:"1-deploy-happyview",children:"1. Deploy HappyView"}),"\n",(0,i.jsx)(t.p,{children:"Pick whichever option fits your situation:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Best for"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/railway",children:(0,i.jsx)(t.strong,{children:"Railway"})})}),(0,i.jsx)(t.td,{children:"Fastest path \u2014 one-click deploy of the full stack (HappyView + AIP + Tap + Postgres)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/docker",children:(0,i.jsx)(t.strong,{children:"Docker Compose"})})}),(0,i.jsx)(t.td,{children:"Local development with the full stack running in containers"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/other",children:(0,i.jsx)(t.strong,{children:"From source"})})}),(0,i.jsxs)(t.td,{children:["Running HappyView with ",(0,i.jsx)(t.code,{children:"cargo run"})," and managing dependencies yourself"]})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"If you're just trying HappyView for the first time, start with Railway."}),"\n",(0,i.jsx)(t.h2,{id:"2-log-in-to-the-dashboard",children:"2. Log in to the dashboard"}),"\n",(0,i.jsxs)(t.p,{children:["Open your HappyView instance in a browser. The built-in ",(0,i.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"})," is served at the root URL."]}),"\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Log in"})," and authenticate with your AT Protocol identity. On a fresh deployment with no admins configured, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."]}),"\n",(0,i.jsx)(t.h2,{id:"3-add-your-first-lexicon",children:"3. Add your first lexicon"}),"\n",(0,i.jsx)(t.p,{children:"Lexicons tell HappyView what data to index and what endpoints to serve. The quickest way to get started is to add one from the network:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["In the dashboard, go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Network"})]}),"\n",(0,i.jsxs)(t.li,{children:["Enter an NSID (e.g. ",(0,i.jsx)(t.code,{children:"xyz.statusphere.status"}),")"]}),"\n",(0,i.jsx)(t.li,{children:"HappyView resolves the schema from the AT Protocol network and shows a preview"}),"\n",(0,i.jsxs)(t.li,{children:["Click ",(0,i.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"HappyView immediately starts indexing records for that collection. A backfill job is created to fetch historical records, and new records stream in via Tap in real time."}),"\n",(0,i.jsxs)(t.p,{children:["You can also upload lexicons manually via the dashboard or the ",(0,i.jsx)(t.a,{href:"/reference/admin-api",children:"admin API"}),". See ",(0,i.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"})," for the full details."]}),"\n",(0,i.jsx)(t.h2,{id:"4-verify-records-are-being-indexed",children:"4. Verify records are being indexed"}),"\n",(0,i.jsxs)(t.p,{children:["Go to the ",(0,i.jsx)(t.strong,{children:"Dashboard"})," home page. The stat cards show the total record count and a breakdown by collection. You can also browse indexed records on the ",(0,i.jsx)(t.strong,{children:"Records"})," page."]}),"\n",(0,i.jsxs)(t.p,{children:["To check backfill progress, go to the ",(0,i.jsx)(t.strong,{children:"Backfill"})," page. The Tap stats cards show how many repos and records Tap has processed."]}),"\n",(0,i.jsx)(t.h2,{id:"5-query-your-data",children:"5. Query your data"}),"\n",(0,i.jsxs)(t.p,{children:["Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})," and create a query lexicon with ",(0,i.jsx)(t.code,{children:"target_collection"})," set to your record collection's NSID."]}),"\n",(0,i.jsxs)(t.p,{children:["Without a Lua script, HappyView generates a default query endpoint that supports ",(0,i.jsx)(t.code,{children:"limit"}),", ",(0,i.jsx)(t.code,{children:"cursor"}),", ",(0,i.jsx)(t.code,{children:"did"}),", and ",(0,i.jsx)(t.code,{children:"uri"})," parameters:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses?limit=5\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For custom query logic, attach a ",(0,i.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsx)(t.p,{children:"You now have a working AppView. Here's where to go from here:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/tutorials/statusphere",children:(0,i.jsx)(t.strong,{children:"Statusphere tutorial"})}),": end-to-end walkthrough building a complete AppView with record, query, and procedure lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/lexicons",children:(0,i.jsx)(t.strong,{children:"Lexicons guide"})}),": target collections, backfill flag, network lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/scripting",children:(0,i.jsx)(t.strong,{children:"Lua Scripting"})}),": custom query and procedure logic"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/configuration",children:(0,i.jsx)(t.strong,{children:"Configuration"})}),": environment variables and tuning"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/authentication",children:(0,i.jsx)(t.strong,{children:"Authentication"})}),": how OAuth works and how to get API tokens"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>d});var r=n(6540);const i={},s=r.createContext(i);function o(e){const t=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.6a50479b.js b/assets/js/main.6a50479b.js deleted file mode 100644 index c351fc3..0000000 --- a/assets/js/main.6a50479b.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.6a50479b.js.LICENSE.txt */ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8792],{8328(e,t,n){"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"009f1e98":[function(){return n.e(7715).then(n.bind(n,3511))},"@site/docs/getting-started/configuration.md",3511],"111eee19":[function(){return n.e(8779).then(n.bind(n,9071))},"@site/docs/reference/troubleshooting.md",9071],"121e86a6":[function(){return n.e(5011).then(n.bind(n,7544))},"@site/docs/reference/scripts/get-record.md",7544],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,1527))},"@theme/DocItem",1527],"22dd74f7":[function(){return n.e(1567).then(n.t.bind(n,5226,19))},"@generated/docusaurus-plugin-content-docs/default/p/index-466.json",5226],"23374ca6":[function(){return n.e(2278).then(n.bind(n,7403))},"@site/docs/README.md",7403],"280f48ec":[function(){return n.e(787).then(n.bind(n,4796))},"@site/docs/reference/scripts/sidecar-records.md",4796],"2d1b556d":[function(){return n.e(1952).then(n.bind(n,8385))},"@site/docs/reference/scripts/algolia-sync.md",8385],"2df7fd65":[function(){return n.e(1977).then(n.bind(n,853))},"@site/docs/guides/event-logs.md",853],"33ec3d65":[function(){return n.e(6803).then(n.bind(n,6974))},"@site/docs/reference/architecture.md",6974],"3d80a749":[function(){return n.e(5219).then(n.bind(n,6755))},"@site/docs/reference/changelog.md",6755],"43880f7a":[function(){return n.e(6590).then(n.bind(n,1572))},"@site/docs/reference/scripts/create-record.md",1572],"539fb2af":[function(){return n.e(5563).then(n.bind(n,8289))},"@site/docs/getting-started/dashboard.md",8289],"5d3a5990":[function(){return n.e(3197).then(n.bind(n,7825))},"@site/docs/reference/scripts/expanded-query.md",7825],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5fd2dbdb":[function(){return n.e(4440).then(n.bind(n,6395))},"@site/docs/tutorials/statusphere.md",6395],"6acefe75":[function(){return n.e(6495).then(n.bind(n,1438))},"@site/docs/reference/scripts/update-or-delete.md",1438],"774696b9":[function(){return n.e(8865).then(n.bind(n,8158))},"@site/docs/guides/index-hooks.md",8158],"846656e5":[function(){return n.e(9492).then(n.bind(n,5231))},"@site/docs/reference/glossary.md",5231],"89877b86":[function(){return n.e(7520).then(n.bind(n,2749))},"@site/docs/getting-started/deployment/docker.md",2749],"919abb94":[function(){return n.e(20).then(n.bind(n,521))},"@site/docs/reference/scripts/upsert-record.md",521],"920ba7ef":[function(){return n.e(5953).then(n.bind(n,1189))},"@site/docs/guides/scripting.md",1189],"9985d6d5":[function(){return n.e(203).then(n.bind(n,2223))},"@site/docs/getting-started/deployment/railway.md",2223],a4086a70:[function(){return n.e(7194).then(n.bind(n,9297))},"@site/docs/reference/scripts/batch-save.md",9297],a51dfc20:[function(){return n.e(8897).then(n.bind(n,4783))},"@site/docs/reference/xrpc-api.md",4783],a77ba7fa:[function(){return n.e(6087).then(n.bind(n,6494))},"@site/docs/getting-started/authentication.md",6494],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,1723))},"@theme/DocVersionRoot",1723],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,8115))},"@theme/DocRoot",8115],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,7093,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b27c7406:[function(){return n.e(2618).then(n.bind(n,537))},"@site/docs/getting-started/deployment/other.md",537],bccc5e9b:[function(){return n.e(2431).then(n.bind(n,9641))},"@site/docs/guides/backfill.md",9641],bde15bec:[function(){return n.e(6438).then(n.bind(n,8796))},"@site/docs/reference/scripts/complex-mutations.md",8796],c985d368:[function(){return n.e(2007).then(n.bind(n,4436))},"@site/docs/reference/scripts/cascading-delete.md",4436],d26b9010:[function(){return n.e(9301).then(n.bind(n,1952))},"@site/docs/guides/api-keys.md",1952],d2e94323:[function(){return n.e(3993).then(n.bind(n,7791))},"@site/docs/guides/lexicons.md",7791],e7f37855:[function(){return n.e(9097).then(n.bind(n,2371))},"@site/docs/reference/scripts/meilisearch-sync.md",2371],e8644baa:[function(){return n.e(9178).then(n.bind(n,8525))},"@site/docs/reference/scripts/paginated-list.md",8525],ec125a10:[function(){return n.e(9659).then(n.bind(n,2192))},"@site/docs/reference/admin-api.md",2192],f142c65c:[function(){return n.e(9957).then(n.bind(n,9573))},"@site/docs/reference/scripts/list-or-fetch.md",9573],fac68122:[function(){return n.e(5986).then(n.bind(n,4924))},"@site/docs/reference/production-deployment.md",4924],fbd7a87c:[function(){return n.e(1361).then(n.bind(n,8594))},"@site/docs/getting-started/quickstart.md",8594]};var l=n(4848);function s(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:function(){return n.e(2237).then(n.bind(n,2237))},modules:["@theme/NotFound"],webpack:function(){return[2237]},render:function(e,t){var n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach(function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))}),a().Map({loading:s,loader:d,modules:f,webpack:function(){return p},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach(function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter(function(e){return"default"!==e}).forEach(function(e){o[e]=r[e]});var i=a,l=n.split(".");l.slice(0,-1).forEach(function(e){i=i[e]}),i[l[l.length-1]]=o});var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var s=a.__props;return delete a.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,Object.assign({},a,s,n))})}})}const f=[{path:"/",component:d("/","b55"),routes:[{path:"/",component:d("/","ef3"),routes:[{path:"/",component:d("/","56a"),routes:[{path:"/getting-started/authentication",component:d("/getting-started/authentication","fd3"),exact:!0,sidebar:"docs"},{path:"/getting-started/configuration",component:d("/getting-started/configuration","641"),exact:!0,sidebar:"docs"},{path:"/getting-started/dashboard",component:d("/getting-started/dashboard","889"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/docker",component:d("/getting-started/deployment/docker","d4f"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/other",component:d("/getting-started/deployment/other","a50"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/railway",component:d("/getting-started/deployment/railway","d15"),exact:!0,sidebar:"docs"},{path:"/getting-started/quickstart",component:d("/getting-started/quickstart","c60"),exact:!0,sidebar:"docs"},{path:"/guides/api-keys",component:d("/guides/api-keys","d38"),exact:!0},{path:"/guides/backfill",component:d("/guides/backfill","8e9"),exact:!0,sidebar:"docs"},{path:"/guides/event-logs",component:d("/guides/event-logs","a81"),exact:!0,sidebar:"docs"},{path:"/guides/index-hooks",component:d("/guides/index-hooks","755"),exact:!0,sidebar:"docs"},{path:"/guides/lexicons",component:d("/guides/lexicons","f9a"),exact:!0,sidebar:"docs"},{path:"/guides/scripting",component:d("/guides/scripting","259"),exact:!0,sidebar:"docs"},{path:"/reference/admin-api",component:d("/reference/admin-api","cec"),exact:!0,sidebar:"docs"},{path:"/reference/architecture",component:d("/reference/architecture","5c9"),exact:!0,sidebar:"docs"},{path:"/reference/changelog",component:d("/reference/changelog","03b"),exact:!0},{path:"/reference/glossary",component:d("/reference/glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/reference/production-deployment",component:d("/reference/production-deployment","935"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/algolia-sync",component:d("/reference/scripts/algolia-sync","ae9"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/batch-save",component:d("/reference/scripts/batch-save","e3f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/cascading-delete",component:d("/reference/scripts/cascading-delete","2dc"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/complex-mutations",component:d("/reference/scripts/complex-mutations","a45"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/create-record",component:d("/reference/scripts/create-record","d2f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/expanded-query",component:d("/reference/scripts/expanded-query","7c6"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/get-record",component:d("/reference/scripts/get-record","5c8"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/list-or-fetch",component:d("/reference/scripts/list-or-fetch","62b"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/meilisearch-sync",component:d("/reference/scripts/meilisearch-sync","c95"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/paginated-list",component:d("/reference/scripts/paginated-list","917"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/sidecar-records",component:d("/reference/scripts/sidecar-records","b55"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/update-or-delete",component:d("/reference/scripts/update-or-delete","d03"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/upsert-record",component:d("/reference/scripts/upsert-record","279"),exact:!0,sidebar:"docs"},{path:"/reference/troubleshooting",component:d("/reference/troubleshooting","af4"),exact:!0,sidebar:"docs"},{path:"/reference/xrpc-api",component:d("/reference/xrpc-api","a2e"),exact:!0,sidebar:"docs"},{path:"/tutorials/statusphere",component:d("/tutorials/statusphere","187"),exact:!0,sidebar:"docs"},{path:"/",component:d("/","280"),exact:!0,sidebar:"docs"}]}]}]},{path:"*",component:d("*")}]},6125(e,t,n){"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],l=n[1];return(0,r.useEffect)(function(){l(!0)},[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},8600(e,t,n){"use strict";var r=n(6540),a=n(5338),o=n(545),i=n(4625),l=n(4784),s=n(8193);const u=[n(119),n(6134),n(6294)];var c=n(8328),d=n(6347),f=n(2831),p=n(4848);function m(e){var t=e.children;return(0,p.jsx)(p.Fragment,{children:t})}var g=n(4563),h=function(e){return e.defaultFormatter(e)};function y(e){var t=e.children;return(0,p.jsx)(g.AL,{formatter:h,children:t})}function b(e){var t=e.children;return(0,p.jsx)(y,{children:t})}var v=n(5260),w=n(4586),k=n(6025),x=n(6342),S=n(5500),E=n(2131),_=n(4090),A=n(440),C=n(1463);function T(){var e=(0,w.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,E.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,p.jsxs)(v.A,{children:[Object.entries(r).map(function(e){var t=e[0],n=e[1].htmlLang;return(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)}),(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter(function(e){return o!==e.htmlLang}).map(function(e){return(0,p.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)})]})}function j(e){var t=e.permalink,n=(0,w.A)().siteConfig.url,r=function(){var e=(0,w.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,A.Ks)((0,k.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function O(){var e=(0,w.A)().i18n.currentLocale,t=(0,x.p)(),n=t.metadata,r=t.image;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:_.w})]}),r&&(0,p.jsx)(S.be,{image:r}),(0,p.jsx)(j,{}),(0,p.jsx)(T,{}),(0,p.jsx)(C.A,{tag:"default",locale:e}),(0,p.jsx)(v.A,{children:n.map(function(e,t){return(0,p.jsx)("meta",Object.assign({},e),t)})})]})}var P=new Map;var N=n(6125),L=n(6988),R=n(7387),I=n(205);function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

    Your Docusaurus site did not load properly.

    \n

    A very common reason is a wrong site baseUrl configuration.

    \n

    Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

    \n

    We suggest trying baseUrl =

    \n\n'}(e)).replace(/d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"README","docs":[{"id":"getting-started/authentication","path":"/getting-started/authentication","sidebar":"docs"},{"id":"getting-started/configuration","path":"/getting-started/configuration","sidebar":"docs"},{"id":"getting-started/dashboard","path":"/getting-started/dashboard","sidebar":"docs"},{"id":"getting-started/deployment/docker","path":"/getting-started/deployment/docker","sidebar":"docs"},{"id":"getting-started/deployment/other","path":"/getting-started/deployment/other","sidebar":"docs"},{"id":"getting-started/deployment/railway","path":"/getting-started/deployment/railway","sidebar":"docs"},{"id":"getting-started/quickstart","path":"/getting-started/quickstart","sidebar":"docs"},{"id":"guides/api-keys","path":"/guides/api-keys"},{"id":"guides/backfill","path":"/guides/backfill","sidebar":"docs"},{"id":"guides/event-logs","path":"/guides/event-logs","sidebar":"docs"},{"id":"guides/index-hooks","path":"/guides/index-hooks","sidebar":"docs"},{"id":"guides/lexicons","path":"/guides/lexicons","sidebar":"docs"},{"id":"guides/scripting","path":"/guides/scripting","sidebar":"docs"},{"id":"README","path":"/","sidebar":"docs"},{"id":"reference/admin-api","path":"/reference/admin-api","sidebar":"docs"},{"id":"reference/architecture","path":"/reference/architecture","sidebar":"docs"},{"id":"reference/changelog","path":"/reference/changelog"},{"id":"reference/glossary","path":"/reference/glossary","sidebar":"docs"},{"id":"reference/production-deployment","path":"/reference/production-deployment","sidebar":"docs"},{"id":"reference/scripts/algolia-sync","path":"/reference/scripts/algolia-sync","sidebar":"docs"},{"id":"reference/scripts/batch-save","path":"/reference/scripts/batch-save","sidebar":"docs"},{"id":"reference/scripts/cascading-delete","path":"/reference/scripts/cascading-delete","sidebar":"docs"},{"id":"reference/scripts/complex-mutations","path":"/reference/scripts/complex-mutations","sidebar":"docs"},{"id":"reference/scripts/create-record","path":"/reference/scripts/create-record","sidebar":"docs"},{"id":"reference/scripts/expanded-query","path":"/reference/scripts/expanded-query","sidebar":"docs"},{"id":"reference/scripts/get-record","path":"/reference/scripts/get-record","sidebar":"docs"},{"id":"reference/scripts/list-or-fetch","path":"/reference/scripts/list-or-fetch","sidebar":"docs"},{"id":"reference/scripts/meilisearch-sync","path":"/reference/scripts/meilisearch-sync","sidebar":"docs"},{"id":"reference/scripts/paginated-list","path":"/reference/scripts/paginated-list","sidebar":"docs"},{"id":"reference/scripts/sidecar-records","path":"/reference/scripts/sidecar-records","sidebar":"docs"},{"id":"reference/scripts/update-or-delete","path":"/reference/scripts/update-or-delete","sidebar":"docs"},{"id":"reference/scripts/upsert-record","path":"/reference/scripts/upsert-record","sidebar":"docs"},{"id":"reference/troubleshooting","path":"/reference/troubleshooting","sidebar":"docs"},{"id":"reference/xrpc-api","path":"/reference/xrpc-api","sidebar":"docs"},{"id":"tutorials/statusphere","path":"/tutorials/statusphere","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/","label":"Introduction"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en","translate":false,"url":"https://happyview.dev","baseUrl":"/"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.9.2","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.9.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.9.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.9.2"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.9.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.9.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.9.2"}}}');var u=n(4848),c={siteConfig:a.A,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){var t=e.children;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(7387),a=n(6540),o=n(8193),i=n(5260),l=n(440),s=n(9139),u=n(3102),c=n(4848);function d(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(f,{error:t})]})}function f(e){var t=e.error,n=(0,l.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){var t=e.children;return(0,c.jsx)(u.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:function(){return(0,c.jsx)(d,{error:t,tryAgain:n})},children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(d,{error:t,tryAgain:n})})]})})}var g=function(e){return(0,c.jsx)(m,Object.assign({},e))},h=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:g)(a)}return null!=t?t:null},t}(a.Component)},8193(e,t,n){"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},8774(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(8587),a=n(6540),o=n(4625),i=n(440),l=n(4586),s=n(6654),u=n(8193),c=n(3427),d=n(6025),f=n(4848),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,g,h=e.isNavLink,y=e.to,b=e.href,v=e.activeClassName,w=e.isActive,k=e["data-noBrokenLinkCheck"],x=e.autoAddBaseUrl,S=void 0===x||x,E=(0,r.A)(e,p),_=(0,l.A)().siteConfig,A=_.trailingSlash,C=_.baseUrl,T=_.future.experimental_router,j=(0,d.hH)().withBaseUrl,O=(0,c.A)(),P=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,function(){return P.current});var N=y||b;var L,R,I=(0,s.A)(N),F=null==N?void 0:N.replace("pathname://",""),D=void 0!==F?(L=F,S&&function(e){return e.startsWith("/")}(L)?j(L):L):void 0;"hash"===T&&null!=(n=D)&&n.startsWith("./")&&(D=null==(R=D)?void 0:R.slice(1));D&&I&&(D=(0,i.Ks)(D,{trailingSlash:A,baseUrl:C}));var z=(0,a.useRef)(!1),M=h?o.k2:o.N_,B=u.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){z.current||null==D||(window.docusaurus.preload(D),z.current=!0)};(0,a.useEffect)(function(){return!B&&I&&u.A.canUseDOM&&null!=D&&window.docusaurus.prefetch(D),function(){B&&U.current&&U.current.disconnect()}},[U,D,B,I]);var H=null!=(m=null==(g=D)?void 0:g.startsWith("#"))&&m,V=!E.target||"_self"===E.target,W=!D||!I||!V||H&&"hash"!==T;k||!H&&W||O.collectLink(D),E.id&&O.collectAnchor(E.id);var q={};return W?(0,f.jsx)("a",Object.assign({ref:P,href:D},N&&!I&&{target:"_blank",rel:"noopener noreferrer"},E,q)):(0,f.jsx)(M,Object.assign({},E,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){P.current=e,B&&e&&I&&(U.current=new window.IntersectionObserver(function(t){t.forEach(function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))})}),U.current.observe(e))},to:D},h&&{isActive:w,activeClassName:v},q))}const g=a.forwardRef(m)},1312(e,t,n){"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),a=n(4848);function o(e,t){var n=e.split(/(\{\w+\})/).map(function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e});return n.some(function(e){return(0,r.isValidElement)(e)})?n.map(function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e}).filter(function(e){return""!==e}):n.join("")}var i=n(2654);function l(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function s(e,t){return o(l({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065(e,t,n){"use strict";n.d(t,{W:()=>r});var r="default"},6654(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025(e,t,n){"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,l=(0,r.useCallback)(function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,l=i.forcePrependBaseUrl,s=void 0!==l&&l,u=i.absolute,c=void 0!==u&&u,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(s)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var f=r.startsWith(n)?r:n+r.replace(/^\//,"");return c?t+f:f}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})},[n,t,i]);return{withBaseUrl:l}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},3427(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=(n(4848),r.createContext({collectAnchor:function(){},collectLink:function(){}}));function o(){return(0,r.useContext)(a)}},4586(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},2303(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6803(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3102);function o(){var e=r.useContext(a.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},6921(e,t,n){"use strict";n.d(t,{A:()=>r});function r(e){var t={};return function e(n,r){Object.entries(n).forEach(function(n){var a,o=n[0],i=n[1],l=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,l):t[l]=i})}(e),t}},3102(e,t,n){"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),l=(0,r.useMemo)(function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})},[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},3886(e,t,n){"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(679),s=n(3807),u=n(4848),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,l.Wf)(c(e),{persistence:t}).set(n)},f=function(e,t){return(0,l.Wf)(c(e),{persistence:t}).get()},p=function(e,t){(0,l.Wf)(c(e),{persistence:t}).del()};var m=r.createContext(null);function g(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)(function(){return Object.keys(e)},[e]),o=(0,r.useState)(function(){return function(e){return Object.fromEntries(e.map(function(e){return[e,{preferredVersionName:null}]}))}(n)}),l=o[0],s=o[1];return(0,r.useEffect)(function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map(function(e){return[e,(t=e,a=f(t,n),r[t].versions.some(function(e){return e.name===a})?{preferredVersionName:a}:(p(t,n),{preferredVersionName:null}))];var t,a}))}({allDocsData:e,versionPersistence:t,pluginIds:n}))},[e,t,n]),[l,(0,r.useMemo)(function(){return{savePreferredVersion:function(e,n){d(e,t,n),s(function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))})}}},[t])]}function h(e){var t=e.children,n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function y(e){var t=e.children;return(0,u.jsx)(h,{children:t})}function b(){var e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=b(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find(function(e){return e.name===u}))?t:null,savePreferredVersionName:(0,r.useCallback)(function(t){s.savePreferredVersion(e,t)},[s,e])}}},609(e,t,n){"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),a=n(3807),o=n(4848),i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)(function(){return n&&a?{name:n,items:a}:null},[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function u(){var e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},4718(e,t,n){"use strict";n.d(t,{Nr:()=>p,w8:()=>g,B5:()=>S,Vd:()=>w,QB:()=>x,fW:()=>k,OF:()=>v,Y:()=>y});var r=n(3845),a=n(6540),o=n(6347),i=n(2831),l=n(4070),s=n(9169);function u(e){return Array.from(new Set(e))}var c=n(3886),d=n(3025),f=n(609);function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=p(t.value);if(a)return a}}(e):void 0:e.href}var m=function(e,t){return void 0!==e&&(0,s.ys)(e,t)};function g(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||function(e,t){return e.some(function(e){return g(e,t)})}(e.items,t))}function h(e,t){switch(e.type){case"category":return g(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some(function(e){return h(e,t)});case"link":return!e.unlisted||g(e,t);default:return!0}}function y(e,t){return(0,a.useMemo)(function(){return e.filter(function(e){return h(e,t)})},[e,t])}function b(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,l=(0,r.A)(t);!(a=l()).done;){var u=a.value;if("category"===u.type&&((0,s.ys)(u.href,n)||e(u.items))||"link"===u.type&&(0,s.ys)(u.href,n))return o&&"category"!==u.type||i.unshift(u),!0}return!1}(t),i}function v(){var e,t=(0,f.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,l.vT)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function w(e){var t=(0,l.zK)(e).activeVersion,n=(0,c.g1)(e).preferredVersion,r=(0,l.r7)(e);return(0,a.useMemo)(function(){return u([t,n,r].filter(Boolean))},[t,n,r])}function k(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.sidebars?Object.entries(e.sidebars):[]}),r=t.find(function(t){return t[0]===e});if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map(function(e){return e.name}).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map(function(e){return e[0]}).join("\n- "));return r[1]},[e,n])}function x(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.docs}),r=t.find(function(t){return t.id===e});if(!r){if(n.flatMap(function(e){return e.draftIds}).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map(function(e){return e.name}).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map(function(e){return e.id})).join("\n- "))}return r},[e,n])}function S(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,l=a.find(function(e){return(0,o.B6)(n.pathname,e)});if(!l)return null;var s=l.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,i.v)(a),sidebarName:s,sidebarItems:u}}},3025(e,t,n){"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},4070(e,t,n){"use strict";n.d(t,{zK:()=>g,vT:()=>f,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>p});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find(function(e){return e.isLast})};function s(e,t){var n,a,o=function(e,t){return[].concat(e.versions).sort(function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0}).find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})})}(e,t),i=null==o?void 0:o.docs.find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})});return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach(function(e){e.docs.forEach(function(t){t.id===n&&(a[e.name]=t)})}),a):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort(function(e,t){return t[1].path.localeCompare(e[1].path)}).find(function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})}),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map(function(e){return e.path}).join(", "));return o}(c(),(0,r.zy)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return l(t)}function g(e){return s(d(e),(0,r.zy)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.zy)().pathname)}},6294(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout(function(){a().start()},200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},6134(e,t,n){"use strict";var r,a,o,i=n(1765),l=n(4784);r=i.My,a=l.A.themeConfig.prism.additionalLanguages,o=globalThis.Prism,globalThis.Prism=r,a.forEach(function(e){"php"===e&&n(9700),n(3890)("./prism-"+e)}),delete globalThis.Prism,void 0!==o&&(globalThis.Prism=r)},1107(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(8587),a=(n(6540),n(4164)),o=n(1312),i=n(3535),l=n(8774),s=n(3427),u=n(4848),c=["as","id"];function d(e){var t=e.as,n=e.id,d=(0,r.A)(e,c),f=(0,s.A)(),p=(0,i.v)(n);if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},d,{id:void 0}));f.collectAnchor(n);var m=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return(0,u.jsxs)(t,Object.assign({},d,{className:(0,a.A)("anchor",p,d.className),id:n,children:[d.children,(0,u.jsx)(l.A,{className:"hash-link",to:"#"+n,"aria-label":m,title:m,translate:"no",children:"\u200b"})]}))}},3186(e,t,n){"use strict";n.d(t,{A:()=>i});n(6540);var r=n(1312);const a="iconExternalLink_nPIU";var o=n(4848);function i(e){var t=e.width,n=void 0===t?13.5:t,i=e.height,l=void 0===i?13.5:i;return(0,o.jsx)("svg",{width:n,height:l,"aria-label":(0,r.T)({id:"theme.IconExternalLink.ariaLabel",message:"(opens in new tab)",description:"The ARIA label for the external link icon"}),className:a,children:(0,o.jsx)("use",{href:"#theme-svg-external-link"})})}},9139(e,t,n){"use strict";n.d(t,{A:()=>Wt});var r=n(6540),a=n(4164),o=n(7489),i=n(5500),l=n(6347),s=n(1312),u=n(5062),c=n(4848),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.W6)().action,n=(0,r.useCallback)(function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)},[]);return(0,u.$)(function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)}),{containerRef:e,onClick:n}}var m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,r=p(),a=r.containerRef,o=r.onClick;return(0,c.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,c.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var h=n(7559),y=n(4090);const b="skipToContent_fXgn";function v(){return(0,c.jsx)(g,{className:b})}var w=n(6342),k=n(5041),x=n(8587),S=["width","height","color","strokeWidth","className"];function E(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,l=e.strokeWidth,s=void 0===l?1.2:l,u=(e.className,(0,x.A)(e,S));return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},u,{children:(0,c.jsx)("g",{stroke:i,strokeWidth:s,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const _="closeButton_CVFx";function A(e){return(0,c.jsx)("button",Object.assign({type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",_,e.className),children:(0,c.jsx)(E,{width:14,height:14,strokeWidth:3.1})}))}const C="content_knG7";function T(e){var t=(0,w.p)().announcementBar.content;return(0,c.jsx)("div",Object.assign({},e,{className:(0,a.A)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}const j="announcementBar_mb4j",O="announcementBarPlaceholder_vyr4",P="announcementBarClose_gvF7",N="announcementBarContent_xLdY";function L(){var e=(0,w.p)().announcementBar,t=(0,k.M)(),n=t.isActive,r=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,l=e.isCloseable;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.announcementBar.container,j),style:{backgroundColor:o,color:i},role:"banner",children:[l&&(0,c.jsx)("div",{className:O}),(0,c.jsx)(T,{className:N}),l&&(0,c.jsx)(A,{onClick:r,className:P})]})}var R=n(2069),I=n(3104);var F=n(3807),D=n(5600),z=r.createContext(null);function M(e){var t,n,a,o,i,l,s,u=e.children,d=(t=(0,R.M)(),n=(0,D.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,s=(0,F.ZC)(l),(0,r.useEffect)(function(){l&&!s&&i(!0)},[l,s]),(0,r.useEffect)(function(){l?t.shown||i(!0):i(!1)},[t.shown,l]),(0,r.useMemo)(function(){return[o,i]},[o]));return(0,c.jsx)(z.Provider,{value:d,children:u})}function B(e){if(e.component){var t=e.component;return(0,c.jsx)(t,Object.assign({},e.props))}}function U(){var e=(0,r.useContext)(z);if(!e)throw new F.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)(function(){return n(!1)},[n]),o=(0,D.YL)();return(0,r.useMemo)(function(){return{shown:t,hide:a,content:B(o)}},[a,o,t])}function $(e){var t=e.children,n=e.inert;return(0,c.jsx)("div",Object.assign({className:(0,a.A)(h.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu")},function(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}(n),{children:t}))}function H(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=U().shown;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)($,{inert:o,children:n}),(0,c.jsx)($,{inert:!o,children:r})]})]})}var V=n(5293),W=n(2303);function q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function G(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}function Q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})}))}const Y="toggle_vylO",K="toggleButton_gllP",Z="toggleIcon_g3eP",X="systemToggleIcon_QzmC",J="lightToggleIcon_pyhR",ee="darkToggleIcon_wfgR",te="toggleButtonDisabled_aARS";function ne(e){switch(e){case null:return(0,s.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error("unexpected color mode "+e)}}function re(e){return(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:ne(e)})}function ae(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(q,{"aria-hidden":!0,className:(0,a.A)(Z,J)}),(0,c.jsx)(G,{"aria-hidden":!0,className:(0,a.A)(Z,ee)}),(0,c.jsx)(Q,{"aria-hidden":!0,className:(0,a.A)(Z,X)})]})}function oe(e){var t=e.className,n=e.buttonClassName,r=e.respectPrefersColorScheme,o=e.value,i=e.onChange,l=(0,W.A)();return(0,c.jsx)("div",{className:(0,a.A)(Y,t),children:(0,c.jsx)("button",{className:(0,a.A)("clean-btn",K,!l&&te,n),type:"button",onClick:function(){return i(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error("unexpected color mode "+e)}}(o,r))},disabled:!l,title:ne(o),"aria-label":re(o),children:(0,c.jsx)(ae,{})})})}const ie=r.memo(oe),le="darkNavbarColorModeToggle_X3D1";function se(e){var t=e.className,n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode,a=r.disableSwitch,o=r.respectPrefersColorScheme,i=(0,V.G)(),l=i.colorModeChoice,s=i.setColorMode;return a?null:(0,c.jsx)(ie,{className:t,buttonClassName:"dark"===n?le:void 0,respectPrefersColorScheme:o,value:l,onChange:s})}var ue=n(3465);function ce(){return(0,c.jsx)(ue.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function de(){var e=(0,R.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,c.jsx)(E,{color:"var(--ifm-color-emphasis-600)"})})}function fe(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(ce,{}),(0,c.jsx)(se,{className:"margin-right--md"}),(0,c.jsx)(de,{})]})}var pe=n(8774),me=n(6025),ge=n(6654);function he(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var ye=n(3186),be=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ve(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,l=e.isDropdownLink,s=e.prependBaseUrlToHref,u=(0,x.A)(e,be),d=(0,me.Ay)(r),f=(0,me.Ay)(t),p=(0,me.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,ge.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,m&&(0,c.jsx)(ye.A,Object.assign({},l&&{width:12,height:12}))]})};return a?(0,c.jsx)(pe.A,Object.assign({href:s?p:a},u,g)):(0,c.jsx)(pe.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?he(n,t.pathname):t.pathname.startsWith(f)}},u,g))}var we=["className","isDropdownItem"];function ke(e){var t=e.className,n=(e.isDropdownItem,(0,x.A)(e,we));return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ve,Object.assign({className:(0,a.A)("menu__link",t)},n))})}var xe=["className","isDropdownItem"];function Se(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,x.A)(e,xe),i=(0,c.jsx)(ve,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,c.jsx)("li",{children:i}):i}var Ee=["mobile","position"];function _e(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,x.A)(e,Ee)),o=r?ke:Se;return(0,c.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var Ae=n(1422),Ce=n(9169),Te=n(4586);const je="dropdownNavbarItemMobile_J0Sd";var Oe=["items","className","position","onClick"];function Pe(e,t){return e.some(function(e){return function(e,t){return!!(0,Ce.ys)(e.to,t)||!!he(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)})}function Ne(e){var t=e.collapsed,n=e.onClick;return(0,c.jsx)("button",{"aria-label":t?(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:n})}function Le(e){var t,n,o=e.items,i=e.className,s=(e.position,e.onClick),u=(0,x.A)(e,Oe),d=(n=(0,Te.A)().siteConfig.baseUrl,(0,l.zy)().pathname.replace(n,"/")),f=(0,Ce.ys)(u.to,d),p=Pe(o,d),m=function(e){var t=e.active,n=(0,Ae.u)({initialState:function(){return!t}}),a=n.collapsed,o=n.toggleCollapsed,i=n.setCollapsed;return(0,r.useEffect)(function(){t&&i(!1)},[t,i]),{collapsed:a,toggleCollapsed:o}}({active:f||p}),g=m.collapsed,h=m.toggleCollapsed,y=u.to?void 0:"#";return(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":g}),children:[(0,c.jsxs)("div",{className:(0,a.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":f}),children:[(0,c.jsx)(ve,Object.assign({role:"button",className:(0,a.A)(je,"menu__link menu__link--sublist",i),href:y},u,{onClick:function(e){"#"===y&&e.preventDefault(),h()},children:null!=(t=u.children)?t:u.label})),(0,c.jsx)(Ne,{collapsed:g,onClick:function(e){e.preventDefault(),h()}})]}),(0,c.jsx)(Ae.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:o.map(function(e,t){return(0,r.createElement)(ot,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))})})]})}var Re=["items","position","className","onClick"];function Ie(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,x.A)(e,Re)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[s]),(0,c.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,c.jsx)(ve,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))},children:null!=(t=l.children)?t:l.label})),(0,c.jsx)("ul",{className:"dropdown__menu",children:n.map(function(e,t){return(0,r.createElement)(ot,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))})})]})}var Fe=["mobile"];function De(e){var t=e.mobile,n=void 0!==t&&t,r=(0,x.A)(e,Fe),a=n?Le:Ie;return(0,c.jsx)(a,Object.assign({},r))}var ze=n(2131),Me=n(7485),Be=["width","height"];function Ue(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,x.A)(e,Be);return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const $e="iconLanguage_nlXk";var He=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];function Ve(){var e=(0,Te.A)(),t=e.siteConfig,n=e.i18n.localeConfigs,r=(0,ze.o)(),a=(0,Me.Hl)(function(e){return e.location.search}),o=(0,Me.Hl)(function(e){return e.location.hash}),i=function(e){var t=n[e];if(!t)throw new Error("Docusaurus bug, no locale config found for locale="+e);return t};return{getURL:function(e,n){var l=(0,Me.jy)([a,n.queryString],"append");return""+function(e){return i(e).url===t.url?"pathname://"+r.createUrl({locale:e,fullyQualified:!1}):r.createUrl({locale:e,fullyQualified:!0})}(e)+l+o},getLabel:function(e){return i(e).label},getLang:function(e){return i(e).htmlLang}}}const We=function(){return null},qe="navbarSearchContainer_Bca1";function Ge(e){var t=e.children,n=e.className;return(0,c.jsx)("div",{className:(0,a.A)(n,qe),children:t})}var Qe=n(4070),Ye=n(4718),Ke=["docId","label","docsPluginId"];var Ze=["sidebarId","label","docsPluginId"];var Xe=["label","to","docsPluginId"];var Je=n(3886),et=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter","versions"];function tt(e){var t=e.docsPluginId,n=e.configs;return function(e,t){if(t){var n=new Map(e.map(function(e){return[e.name,e]})),r=function(t,r){var a,o=n.get(t);if(!o)throw new Error("No docs version exist for name '"+t+"', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- "+e.map(function(e){return""+e.name}).join("\n- "));return{version:o,label:null!=(a=null==r?void 0:r.label)?a:o.label}};return Array.isArray(t)?t.map(function(e){return r(e,void 0)}):Object.entries(t).map(function(e){var t=e[0],n=e[1];return r(t,n)})}return e.map(function(e){return{version:e,label:e.label}})}((0,Qe.jh)(t),n)}function nt(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(e)}const rt={default:_e,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=(0,x.A)(e,He),i=Ve(),l=(0,Te.A)().i18n,u=l.currentLocale,d=l.locales.map(function(e){return{label:i.getLabel(e),lang:i.getLang(e),to:i.getURL(e,{queryString:a}),target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}}),f=[].concat(n,d,r),p=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):i.getLabel(u);return(0,c.jsx)(De,Object.assign({},o,{mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ue,{className:$e}),p]}),items:f}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,c.jsx)(Ge,{className:n,children:(0,c.jsx)(We,{})})},dropdown:De,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,l=void 0!==i&&i,s=l?"li":"div";return(0,c.jsx)(s,{className:(0,a.A)({navbar__item:!o&&!l,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ke),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.QB)(t,r),l=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!l?null:(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return l||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ze),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,x.A)(e,Xe),o=(0,Ye.Vd)(r)[0],i=null!=t?t:o.label,l=null!=n?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(o).path;return(0,c.jsx)(_e,Object.assign({},a,{label:i,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=e.versions,l=(0,x.A)(e,et),u=(0,Me.Hl)(function(e){return e.location.search}),d=(0,Me.Hl)(function(e){return e.location.hash}),f=(0,Qe.zK)(n),p=(0,Je.g1)(n).savePreferredVersionName,m=tt({docsPluginId:n,configs:i}),g=function(e){var t,n=e.docsPluginId,r=e.versionItems;return null!=(t=(0,Ye.Vd)(n).map(function(e){return r.find(function(t){return t.version===e})}).filter(function(e){return void 0!==e})[0])?t:r[0]}({docsPluginId:n,versionItems:m}),h=[].concat(a,m.map(function(e){var t=e.version;return{label:e.label,to:""+nt(t,f).path+u+d,isActive:function(){return t===f.activeVersion},onClick:function(){return p(t.name)}}}),o),y=t&&h.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:nt(g.version,f).path;return h.length<=1?(0,c.jsx)(_e,Object.assign({},l,{mobile:t,label:y,to:b,isActive:r?function(){return!1}:void 0})):(0,c.jsx)(De,Object.assign({},l,{mobile:t,label:y,to:b,items:h,isActive:r?function(){return!1}:void 0}))}};var at=["type"];function ot(e){var t=e.type,n=(0,x.A)(e,at),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=rt[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,c.jsx)(a,Object.assign({},n))}function it(){var e=(0,R.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(function(t,n){return(0,r.createElement)(ot,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})})}function lt(e){return(0,c.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function st(){var e=0===(0,w.p)().navbar.items.length,t=U();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(lt,{onClick:function(){return t.hide()}}),t.content]})}function ut(){var e,t=(0,R.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)(function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}},[e]),t.shouldRender?(0,c.jsx)(H,{header:(0,c.jsx)(fe,{}),primaryMenu:(0,c.jsx)(it,{}),secondaryMenu:(0,c.jsx)(st,{})}):null}const ct="navbarHideable_m1mJ",dt="navbarHidden_jGov";function ft(e){return(0,c.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function pt(e){var t=e.children,n=(0,w.p)().navbar,o=n.hideOnScroll,i=n.style,l=(0,R.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)(function(e){null!==e&&(i.current=e.getBoundingClientRect().height)},[]);return(0,I.Mq)(function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+u0&&(0,c.jsx)(Pt,{links:n}),logo:r&&(0,c.jsx)(It,{logo:r}),copyright:t&&(0,c.jsx)(Ft,{copyright:t})})}const Mt=r.memo(zt);var Bt=(0,F.fM)([V.a,k.o,I.Tv,Je.VQ,i.Jx,function(e){var t=e.children;return(0,c.jsx)(D.y_,{children:(0,c.jsx)(R.e,{children:(0,c.jsx)(M,{children:t})})})}]);function Ut(e){var t=e.children;return(0,c.jsx)(Bt,{children:t})}var $t=n(1107);function Ht(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)($t.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(mt.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(mt.bq,{error:t})})]})})})}const Vt="mainWrapper_z2l0";function Wt(e){var t=e.children,n=e.noFooter,r=e.wrapperClassName,l=e.title,s=e.description;return(0,y.J)(),(0,c.jsxs)(Ut,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(L,{}),(0,c.jsx)(xt,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.layout.main.container,h.G.wrapper.main,Vt,r),children:(0,c.jsx)(o.A,{fallback:function(e){return(0,c.jsx)(Ht,Object.assign({},e))},children:t})}),!n&&(0,c.jsx)(Mt,{})]})}},3465(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=(n(6540),n(8774)),o=n(6025),i=n(4586),l=n(6342),s=n(1122),u=n(4848),c=["imageClassName","titleClassName"];function d(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,u.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,u.jsx)("div",{className:r,children:i}):i}function f(e){var t,n=(0,i.A)().siteConfig.title,s=(0,l.p)().navbar,f=s.title,p=s.logo,m=e.imageClassName,g=e.titleClassName,h=(0,r.A)(e,c),y=(0,o.Ay)((null==p?void 0:p.href)||"/"),b=f?"":n,v=null!=(t=null==p?void 0:p.alt)?t:b;return(0,u.jsxs)(a.A,Object.assign({to:y},h,(null==p?void 0:p.target)&&{target:p.target},{children:[p&&(0,u.jsx)(d,{logo:p,alt:v,imageClassName:m}),null!=f&&(0,u.jsx)("b",{className:g,children:f})]}))}},1463(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=n(6540),o=n(4164),i=n(2303),l=n(5293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var u=n(4848);function c(e){var t=e.className,n=e.children,r=(0,i.A)(),c=(0,l.G)().colorMode;return(0,u.jsx)(u.Fragment,{children:(r?"dark"===c?["dark"]:["light"]:["light","dark"]).map(function(e){var r=n({theme:e,className:(0,o.A)(t,s.themedComponent,s["themedComponent--"+e])});return(0,u.jsx)(a.Fragment,{children:r},e)})})}var d=["sources","className","alt"];function f(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,d);return(0,u.jsx)(c,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,u.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}},1422(e,t,n){"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(8587),a=n(6540),o=n(205),i=n(3109),l=n(4848),s=["collapsed"],u=["lazy"];function c(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)(function(){o(function(e){return!e})},[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var d={display:"none",overflow:"hidden",height:"0px"},f={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?d:f;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)(function(){var e,a=t.current;function l(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,i.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function s(){var e=l();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame(function(){n?(s(),requestAnimationFrame(function(){a.style.height=d.height,a.style.overflow=d.overflow})):(a.style.display="block",requestAnimationFrame(function(){s()}))}),function(){return cancelAnimationFrame(e)}},[t,n,r])}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,u=e.className,c=(0,a.useRef)(null);return m({collapsibleRef:c,collapsed:r,animation:i}),(0,l.jsx)(n,{ref:c,onTransitionEnd:function(e){"height"===e.propertyName&&(p(c.current,r),null==s||s(r))},className:u,children:o})}function h(e){var t=e.collapsed,n=(0,r.A)(e,s),i=(0,a.useState)(!t),u=i[0],c=i[1],d=(0,a.useState)(t),f=d[0],p=d[1];return(0,o.A)(function(){t||c(!0)},[t]),(0,o.A)(function(){u&&p(t)},[u,t]),u?(0,l.jsx)(g,Object.assign({},n,{collapsed:f})):null}function y(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?h:g;return(0,l.jsx)(a,Object.assign({},n))}},5041(e,t,n){"use strict";n.d(t,{M:()=>g,o:()=>m});var r=n(6540),a=n(2303),o=n(679),i=n(3807),l=n(6342),s=n(4848),u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===u.get()},f=function(e){return u.set(String(e))},p=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,l.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)(function(){return!!t&&d()}),o=n[0],i=n[1];(0,r.useEffect)(function(){i(d())},[]);var s=(0,r.useCallback)(function(){f(!0),i(!0)},[]);return(0,r.useEffect)(function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&f(!1),!r&&d()||i(!1)}},[e]),(0,r.useMemo)(function(){return{isActive:!!e&&!o,close:s}},[e,o,s])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293(e,t,n){"use strict";n.d(t,{G:()=>x,a:()=>k});var r=n(6540),a=n(2303),o=n(3807),i=n(679),l=n(6342),s=n(4848);function u(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function c(e){return t="(prefers-color-scheme: dark)",n=function(){return e(u())},(r=window.matchMedia(t)).addEventListener("change",n),function(){return r.removeEventListener("change",n)};var t,n,r}var d=r.createContext(void 0),f=(0,i.Wf)("theme"),p="system",m=function(e){return"dark"===e?"dark":"light"},g=function(e){return null===e||e===p?null:m(e)},h=function(){return m(document.documentElement.getAttribute("data-theme"))},y=function(e){document.documentElement.setAttribute("data-theme",m(e))},b=function(){return g(document.documentElement.getAttribute("data-theme-choice"))},v=function(e){var t;document.documentElement.setAttribute("data-theme-choice",null!=(t=g(e))?t:p)};function w(){var e=(0,l.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=function(){var e=(0,l.p)().colorMode.defaultMode,t=(0,a.A)(),n=(0,r.useState)(t?h():e),o=n[0],i=n[1],s=(0,r.useState)(t?b():null),u=s[0],c=s[1];return(0,r.useEffect)(function(){i(h()),c(b())},[]),{colorMode:o,setColorModeState:i,colorModeChoice:u,setColorModeChoiceState:c}}(),s=i.colorMode,d=i.setColorModeState,p=i.colorModeChoice,w=i.setColorModeChoiceState;(0,r.useEffect)(function(){n&&f.del()},[n]);var k=(0,r.useCallback)(function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;if(null===e){var i=o?u():t;y(i),d(i),v(null),w(null)}else y(e),v(e),d(e),w(e);a&&function(e){null===e?f.del():f.set(m(e))}(e)},[d,w,o,t]);return(0,r.useEffect)(function(){return f.listen(function(e){k(g(e.newValue))})},[k]),(0,r.useEffect)(function(){if(null===p&&o)return c(function(e){d(e),y(e)})},[o,p,d]),(0,r.useMemo)(function(){return{colorMode:s,colorModeChoice:p,setColorMode:k,get isDarkTheme(){return"dark"===s},setLightTheme:function(){k("light")},setDarkTheme:function(){k("dark")}}},[s,p,k])}function k(e){var t=e.children,n=w();return(0,s.jsx)(d.Provider,{value:n,children:t})}function x(){var e=(0,r.useContext)(d);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2069(e,t,n){"use strict";n.d(t,{M:()=>m,e:()=>p});var r=n(6540),a=n(5600),o=n(4581),i=n(7485),l=n(6342),s=n(3807),u=n(4848),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,l.p)().navbar.items.length&&!e.component),n=(0,o.l)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],c=s[1],d=(0,r.useCallback)(function(){c(function(e){return!e})},[]);return(0,r.useEffect)(function(){"desktop"===n&&c(!1)},[n]),(0,r.useMemo)(function(){return{disabled:t,shouldRender:i,toggle:d,shown:u}},[t,i,d,u])}function f(e){var t=e.handler;return(0,i.$Z)(t),null}function p(e){var t=e.children,n=d();return(0,u.jsxs)(u.Fragment,{children:[n.shown&&(0,u.jsx)(f,{handler:function(){return n.toggle(),!1}}),(0,u.jsx)(c.Provider,{value:n,children:t})]})}function m(){var e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600(e,t,n){"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var l=o[1],s=(0,a.Be)(n);return(0,r.useEffect)(function(){l({component:t,props:s})},[l,t,s]),(0,r.useEffect)(function(){return function(){return l({component:null,props:null})}},[l]),null}},4090(e,t,n){"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540),a="navigation-with-keyboard";function o(){(0,r.useEffect)(function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}},[])}},4581(e,t,n){"use strict";n.d(t,{l:()=>l});var r=n(6540),a=n(8193),o="desktop",i="mobile";function l(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?996:t,l=(0,r.useState)(function(){return"ssr"}),s=l[0],u=l[1];return(0,r.useEffect)(function(){function e(){u(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o:i}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n]),s}},7559(e,t,n){"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},announcementBar:{container:"theme-announcement-bar"},tabs:{container:"theme-tabs-container"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},3535(e,t,n){"use strict";n.d(t,{v:()=>i});var r=n(6342);const a="anchorTargetStickyNavbar_Vzrq",o="anchorTargetHideOnScrollNavbar_vjPI";function i(e){var t=(0,r.p)().navbar.hideOnScroll;if(void 0!==e)return t?o:a}},2181(e,t,n){"use strict";n.d(t,{bq:()=>f,MN:()=>d,a2:()=>c,k2:()=>p});var r=n(7387),a=n(6540),o=n(1312),i=n(440);const l="errorBoundaryError_a6uf",s="errorBoundaryFallback_VBag";var u=n(4848);function c(e){return(0,u.jsx)("button",Object.assign({type:"button"},e,{children:(0,u.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{className:s,children:[(0,u.jsx)("p",{children:t.message}),(0,u.jsx)(c,{onClick:n})]})}function f(e){var t=e.error,n=(0,i.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,u.jsx)("p",{className:l,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},7485(e,t,n){"use strict";n.d(t,{$Z:()=>l,Hl:()=>s,jy:()=>u});var r=n(3845),a=n(6540),o=n(6347),i=n(3807);function l(e){!function(e){var t=(0,o.W6)(),n=(0,i._q)(e);(0,a.useEffect)(function(){return t.block(function(e,t){return n(e,t)})},[t,n])}(function(t,n){if("POP"===n)return e(t,n)})}function s(e){var t=(0,o.W6)();return(0,a.useSyncExternalStore)(t.listen,function(){return e(t)},function(){return e(Object.assign({},t,{location:Object.assign({},t.location,{search:"",hash:"",state:void 0})}))})}function u(e,t){var n=function(e,t){for(var n,a=new URLSearchParams,o=(0,r.A)(e);!(n=o()).done;)for(var i,l=n.value,s=(0,r.A)(l.entries());!(i=s()).done;){var u=i.value,c=u[0],d=u[1];"append"===t?a.append(c,d):a.set(c,d)}return a}(e.map(function(e){return new URLSearchParams(null!=e?e:"")}),t),a=n.toString();return a?"?"+a:a}},5500(e,t,n){"use strict";n.d(t,{Jx:()=>y,be:()=>m,e3:()=>h});var r=n(6540),a=n(4164),o=n(5260),i=n(6803),l=n(6025),s=n(4563),u=n(4848);function c(e){var t=e.title,n=(0,s.s$)().format(t);return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("title",{children:n}),(0,u.jsx)("meta",{property:"og:title",content:n})]})}function d(e){var t=e.description;return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{name:"description",content:t}),(0,u.jsx)("meta",{property:"og:description",content:t})]})}function f(e){var t=e.image,n=(0,(0,l.hH)().withBaseUrl)(t,{absolute:!0});return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{property:"og:image",content:n}),(0,u.jsx)("meta",{name:"twitter:image",content:n})]})}function p(e){var t=e.keywords;return(0,u.jsx)(o.A,{children:(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(t)?t.join(","):t})})}function m(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children;return(0,u.jsxs)(u.Fragment,{children:[t&&(0,u.jsx)(c,{title:t}),n&&(0,u.jsx)(d,{description:n}),r&&(0,u.jsx)(p,{keywords:r}),a&&(0,u.jsx)(f,{image:a}),i&&(0,u.jsx)(o.A,{children:i})]})}var g=r.createContext(void 0);function h(e){var t=e.className,n=e.children,i=r.useContext(g),l=(0,a.A)(i,t);return(0,u.jsxs)(g.Provider,{value:l,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:l})}),n]})}function y(e){var t=e.children,n=(0,i.A)(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(h,{className:(0,a.A)(r,o),children:t})}},3807(e,t,n){"use strict";n.d(t,{dV:()=>m,fM:()=>h,_q:()=>f,ZC:()=>p,Be:()=>g});var r=n(8634),a=n(7387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(3662);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},s(e)}var u=n(6540),c=n(205),d=n(4848);function f(e){var t=(0,u.useRef)(e);return(0,c.A)(function(){t.current=e},[e]),(0,u.useCallback)(function(){return t.current.apply(t,arguments)},[])}function p(e){var t=(0,u.useRef)();return(0,c.A)(function(){t.current=e}),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(s(Error));function g(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0].localeCompare(t[0])}),(0,u.useMemo)(function(){return e},t.flat())}function h(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight(function(e,t){return(0,d.jsx)(t,{children:e})},n)})}}},9169(e,t,n){"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)(function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap(function(e){var t;return null!=(t=e.routes)?t:[]}))}(e.routes)}({routes:a.A,baseUrl:e})},[e])}},3104(e,t,n){"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,gk:()=>p});var r=n(6540),a=n(8193),o=n(2303),i=(n(205),n(3807)),l=n(4848);var s=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)(function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}},[]));return(0,l.jsx)(s.Provider,{value:a,children:n})}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}var d=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)(function(){var e=function(){if(n.current){var e=d();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}},[o,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&au});n(6540);const r=JSON.parse('{"N":"localStorage","M":""}');var a=r.N;function o(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}var l=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+r.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var a=i(null==t?void 0:t.persistence);return null===a?s:{get:function(){try{return a.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=a.getItem(n);a.setItem(n,e),o({key:n,oldValue:t,newValue:e,storage:a})}catch(r){console.error("Docusaurus storage error, can't set "+n+"="+e,r)}},del:function(){try{var e=a.getItem(n);a.removeItem(n),o({key:n,oldValue:e,newValue:null,storage:a})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===a&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(r){return console.error("Docusaurus storage error, can't listen for changes of key="+n,r),function(){}}}}}},4563(e,t,n){"use strict";n.d(t,{AL:()=>c,s$:()=>d});var r=n(6540),a=n(4586),o=n(6803),i=n(3807),l=n(4848),s=function(e){var t=e.title,n=e.siteTitle,r=e.titleDelimiter,a=null==t?void 0:t.trim();return a&&a!==n?a+" "+r+" "+n:n},u=(0,r.createContext)(null);function c(e){var t=e.formatter,n=e.children;return(0,l.jsx)(u.Provider,{value:t,children:n})}function d(){var e=function(){var e=(0,r.useContext)(u);if(null===e)throw new i.dV("TitleFormatterProvider");return e}(),t=(0,a.A)().siteConfig,n=t.title,l=t.titleDelimiter,c=(0,o.A)().plugin;return{format:function(t){return e({title:t,siteTitle:n,titleDelimiter:l,plugin:c,defaultFormatter:s})}}}},2131(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.trailingSlash,l=e.i18n.localeConfigs,s=(0,a.zy)().pathname,u=(0,o.Ks)(s,{trailingSlash:i,baseUrl:n}).replace(n,"");return{createUrl:function(e){var t=e.locale,n=e.fullyQualified,r=function(e){var t=l[e];if(!t)throw new Error("Unexpected Docusaurus bug, no locale config found for locale="+e);return t}(t);return""+(""+(n?r.url:""))+r.baseUrl+u}}}},5062(e,t,n){"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(3807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)(function(){n&&t!==n&&i({location:t,previousLocation:n})},[i,t,n])}},6342(e,t,n){"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],l="/"===i||i===r?i:(s=i,u=n,u?a(s):o(s));var s,u;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(2566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},253(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},440(e,t,n){"use strict";t.rA=t.Ks=void 0;var r=n(1635);var a=n(2983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(2566);var i=n(253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},1513(e,t,n){"use strict";n.d(t,{zR:()=>w,TM:()=>A,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
    '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},c)},c)):setTimeout(t,c)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5302(e,t,n){var r=n(4634);e.exports=g,e.exports.parse=o,e.exports.compile=function(e,t){return u(o(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=m;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,l=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var c=n[0],f=n[1],p=n.index;if(s+=e.slice(l,p),l=p+c.length,f)s+=f[1];else{var m=e[l],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,S="?"===v||"*"===v,E=g||u,_=y||b,A=g||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:h||o++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?d(_):w?".*":i(E,A)})}}return l-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function l(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e,t){for(var n=new Array(e.length),a=0;a[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},9700(){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},3890(e,t,n){var r={"./prism-lua":64};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3890},2694(e,t,n){"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1247(e,t,n){"use strict";var r=n(9982),a=n(6540),o=n(961);function i(e){var t="https://react.dev/errors/"+e;if(1z||(e.current=D[z],D[z]=null,z--)}function U(e,t){z++,D[z]=e.current,e.current=t}var $,H,V=M(null),W=M(null),q=M(null),G=M(null);function Q(e,t){switch(U(q,t),U(W,e),U(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(V),U(V,e)}function Y(){B(V),B(W),B(q)}function K(e){null!==e.memoizedState&&U(G,e);var t=V.current,n=bd(t,e.type);t!==n&&(U(W,e),U(V,n))}function Z(e){W.current===e&&(B(V),B(W)),G.current===e&&(B(G),df._currentValue=F)}function X(e){if(void 0===$)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",H=-1)":-1--a||s[r]!==u[a]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=r&&0<=a);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ie=r.unstable_shouldYield,le=r.unstable_requestPaint,se=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,fe=r.unstable_NormalPriority,pe=r.unstable_LowPriority,me=r.unstable_IdlePriority,ge=r.log,he=r.unstable_setDisableYieldValue,ye=null,be=null;function ve(e){if("function"==typeof ge&&he(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ke(e)/xe|0)|0},ke=Math.log,xe=Math.LN2;var Se=256,Ee=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var l=134217727&r;return 0!==l?0!==(r=l&~o)?a=Ae(r):0!==(i&=l)?a=Ae(i):n||0!==(n=l&~e)&&(a=Ae(n)):0!==(l=r&~o)?a=Ae(l):0!==i?a=Ae(i):n||0!==(n=r&~e)&&(a=Ae(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&4194048&n)?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ne(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),a=1<=An),jn=String.fromCharCode(32),On=!1;function Pn(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ln=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function In(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Fn(e,t,n,r){It?Ft?Ft.push(r):Ft=[r]:It=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,zn=null;function Mn(e){Yc(e,0)}function Bn(e){if(mt(Xe(e)))return e}function Un(e,t){if("change"===e)return t}var $n=!1;if(Ut){var Hn;if(Ut){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Hn=Vn}else Hn=!1;$n=Hn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,lr=null,sr=null,ur=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==ir||ir!==gt(r)||("selectionStart"in(r=ir)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Jn(sr,r)||(sr=r,0<(r=rd(lr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},mr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return pr[e]=n[t];return e}Ut&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var hr=gr("animationend"),yr=gr("animationiteration"),br=gr("animationstart"),vr=gr("transitionrun"),wr=gr("transitionstart"),kr=gr("transitioncancel"),xr=gr("transitionend"),Sr=new Map,Er="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Sr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Cr=[],Tr=0,jr=0;function Or(){for(var e=Tr,t=jr=Tr=0;t>=i,a-=i,na=1<<32-we(t)+a|n<g?(h=d,d=null):h=d.sibling;var y=p(a,d,l[g],s);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(a,d),i=o(y,i,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===l.length)return n(a,d),da&&aa(a,g),u;if(null===d){for(;gh?(y=g,g=null):y=g.sibling;var v=p(a,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),l=o(v,l,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),da&&aa(a,h),c;if(null===g){for(;!b.done;h++,b=s.next())null!==(b=f(a,b.value,u))&&(l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return da&&aa(a,h),c}for(g=r(g);!b.done;h++,b=s.next())null!==(b=m(g,a,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach(function(e){return t(a,e)}),da&&aa(a,h),c}(s,u,c=v.call(c),d)}if("function"==typeof c.then)return b(s,u,uo(c),d);if(c.$$typeof===k)return b(s,u,La(s,c),d);fo(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(d=a(u,c)).return=s,s=d):(n(s,u),(d=Vr(c,s.mode,d)).return=s,s=d),l(s)):n(s,u)}return function(e,t,n,r){try{so=0;var a=b(e,t,n,r);return lo=null,a}catch(i){if(i===Za||i===Ja)throw i;var o=zr(29,i,null,e.mode);return o.lanes=r,o.return=e,o}}}var mo=po(!0),go=po(!1),ho=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pu){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Ir(e),Rr(e,null,n),t}return Pr(e,r,t,n),Ir(e)}function ko(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function xo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Eo(){if(So){if(null!==Va)throw Va}}function _o(e,t,n,r){So=!1;var a=e.updateQueue;ho=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,u=s.next;s.next=null,null===i?o=u:i.next=u,i=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=u=s=null,l=o;;){var f=-536870913&l.lane,m=f!==l.lane;if(m?(hu&f)===f:(r&f)===f){0!==f&&f===Ha&&(So=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,h=l;f=t;var y=n;switch(h.tag){case 1:if("function"==typeof(g=h.payload)){d=g.call(y,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=h.payload)?g.call(y,d,f):g))break e;d=p({},d,f);break e;case 2:ho=!0}}null!==(f=l.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=a.callbacks)?a.callbacks=[f]:m.push(f))}else m={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=m,s=d):c=c.next=m,i|=f;if(null===(l=l.next)){if(null===(l=a.shared.pending))break;l=(m=l).next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null===o&&(a.shared.lanes=0),Eu|=i,e.lanes=i,e.memoizedState=d}}function Ao(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;eo?o:8;var i,l,s,u=R.T,c={};R.T=c,dl(e,!1,t,n);try{var d=a(),f=R.S;if(null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)cl(e,t,(i=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then(function(){s.status="fulfilled",s.value=i;for(var e=0;e<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(a,{is:r.is}):l.createElement(a)}}o[Ue]=t,o[$e]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch(fd(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ls(t)}}return fs(t),ss(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ls(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=q.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ua))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||ga(t,!0)}else(e=hd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fs(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ba(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));e[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Mo(t),t):(Mo(t),null);if(128&t.flags)throw Error(i(558))}return fs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ba(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),a=!1}else a=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Mo(t),t):(Mo(t),null)}return Mo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cs(t,t.updateQueue),fs(t),null);case 4:return Y(),null===e&&Jc(t.stateNode.containerInfo),fs(t),null;case 10:return Aa(t.type),fs(t),null;case 19:if(B(Bo),null===(r=t.memoizedState))return fs(t),null;if(a=!!(128&t.flags),null===(o=r.rendering))if(a)ds(r,!1);else{if(0!==Su||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Uo(e))){for(t.flags|=128,ds(r,!1),e=o.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Bo,1&Bo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&se()>Ru&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Uo(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),ds(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!da)return fs(t),null}else 2*se()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=se(),e.sibling=null,n=Bo.current,U(Bo,a?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fs(t),null);case 22:case 23:return Mo(t),No(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fs(t),6&t.subtreeFlags&&(t.flags|=8192)):fs(t),null!==(n=t.updateQueue)&&cs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ga),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(za),fs(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}function ms(e,t){switch(la(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Aa(za),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(Mo(t),null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Mo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bo),null;case 4:return Y(),null;case 10:return Aa(t.type),null;case 22:case 23:return Mo(t),No(),null!==e&&B(Ga),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Aa(za),null;default:return null}}function gs(e,t){switch(la(t),t.tag){case 3:Aa(za),Y();break;case 26:case 27:case 5:Z(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Mo(t);break;case 13:Mo(t);break;case 19:B(Bo);break;case 10:Aa(t.type);break;case 22:case 23:Mo(t),No(),null!==e&&B(Ga);break;case 24:Aa(za)}}function hs(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,i=n.inst;r=o(),i.destroy=r}n=n.next}while(n!==a)}}catch(l){Sc(t,t.return,l)}}function ys(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;var s=n,u=l;try{u()}catch(c){Sc(a,s,c)}}}r=r.next}while(r!==o)}}catch(c){Sc(t,t.return,c)}}function bs(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Co(t,n)}catch(r){Sc(e,e.return,r)}}}function vs(e,t,n){n.props=Sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Sc(e,t,r)}}function ws(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Sc(e,t,a)}}function ks(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Sc(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(o){Sc(e,t,o)}else n.current=null}function xs(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Sc(e,e.return,a)}}function Ss(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,l=null,s=null,u=null,c=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&null!=f)switch(m){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(m)||cd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=m||null!=f))switch(p){case"type":o=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":d=m;break;case"value":l=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(i(137,t));break;default:m!==f&&cd(e,t,p,m,r,f)}}return void bt(e,l,s,u,c,d,o,a);case"select":for(o in m=l=s=p=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":m=u;default:r.hasOwnProperty(o)||cd(e,t,o,null,r,u)}for(a in r)if(o=r[a],u=n[a],r.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":l=o;default:o!==u&&cd(e,t,a,o,r,u)}return t=s,n=l,r=m,void(null!=p?kt(e,!!n,p,!1):!!r!=!!n&&(null!=t?kt(e,!!n,t,!0):kt(e,!!n,n?[]:"",!1)));case"textarea":for(s in m=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:cd(e,t,s,null,r,a)}for(l in r)if(a=r[l],o=n[l],r.hasOwnProperty(l)&&(null!=a||null!=o))switch(l){case"value":p=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(i(91));break;default:a!==o&&cd(e,t,l,a,r,o)}return void xt(e,p,m);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else cd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(null!=p||null!=m))if("selected"===u)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else cd(e,t,u,p,r,m);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&cd(e,t,h,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:cd(e,t,c,p,r,m)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||void 0===p&&void 0===m||dd(e,t,d,p,r,m);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!r.hasOwnProperty(b)&&cd(e,t,b,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||null==p&&null==m||cd(e,t,f,p,r,m)}(r,e.type,n,t),r[$e]=t}catch(a){Sc(e,e.return,a)}}function Es(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _s(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Es(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function As(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Nt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(As(e,t,n),e=e.sibling;null!==e;)As(e,t,n),e=e.sibling}function Cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Cs(e,t,n),e=e.sibling;null!==e;)Cs(e,t,n),e=e.sibling}function Ts(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t,r,n),t[Ue]=e,t[$e]=n}catch(o){Sc(e,e.return,o)}}var js=!1,Os=!1,Ps=!1,Ns="function"==typeof WeakSet?WeakSet:Set,Ls=null;function Rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Qs(e,n),4&r&&hs(5,n);break;case 1:if(Qs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Sc(n,n.return,i)}else{var a=Sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Sc(n,n.return,l)}}64&r&&bs(n),512&r&&ws(n,n.return);break;case 3:if(Qs(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Co(e,t)}catch(i){Sc(n,n.return,i)}}break;case 27:null===t&&4&r&&Ts(n);case 26:case 5:Qs(e,n),null===t&&4&r&&xs(n),512&r&&ws(n,n.return);break;case 12:Qs(e,n);break;case 31:Qs(e,n),4&r&&Bs(e,n);break;case 13:Qs(e,n),4&r&&Us(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Cc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||js)){t=null!==t&&null!==t.memoizedState||Os,a=js;var o=Os;js=r,(Os=t)&&!o?Ks(e,n,!!(8772&n.subtreeFlags)):Qs(e,n),js=a,Os=o}break;case 30:break;default:Qs(e,n)}}function Is(e){var t=e.alternate;null!==t&&(e.alternate=null,Is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fs=null,Ds=!1;function zs(e,t,n){for(n=n.child;null!==n;)Ms(e,t,n),n=n.sibling}function Ms(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:Os||ks(n,t),zs(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Os||ks(n,t);var r=Fs,a=Ds;Ad(n.type)&&(Fs=n.stateNode,Ds=!1),zs(e,t,n),zd(n.stateNode),Fs=r,Ds=a;break;case 5:Os||ks(n,t);case 6:if(r=Fs,a=Ds,Fs=null,zs(e,t,n),Ds=a,null!==(Fs=r))if(Ds)try{(9===Fs.nodeType?Fs.body:"HTML"===Fs.nodeName?Fs.ownerDocument.body:Fs).removeChild(n.stateNode)}catch(i){Sc(n,t,i)}else try{Fs.removeChild(n.stateNode)}catch(i){Sc(n,t,i)}break;case 18:null!==Fs&&(Ds?(Cd(9===(e=Fs).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Wf(e)):Cd(Fs,n.stateNode));break;case 4:r=Fs,a=Ds,Fs=n.stateNode.containerInfo,Ds=!0,zs(e,t,n),Fs=r,Ds=a;break;case 0:case 11:case 14:case 15:ys(2,n,t),Os||ys(4,n,t),zs(e,t,n);break;case 1:Os||(ks(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&vs(n,t,r)),zs(e,t,n);break;case 21:zs(e,t,n);break;case 22:Os=(r=Os)||null!==n.memoizedState,zs(e,t,n),Os=r;break;default:zs(e,t,n)}}function Bs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Wf(e)}catch(n){Sc(t,t.return,n)}}}function Us(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Wf(e)}catch(n){Sc(t,t.return,n)}}function $s(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ns),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ns),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tc.bind(null,e,t);t.then(r,r)}})}function Hs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),fd(o,r,n),o[Ue]=e,et(o),r=o;break e;case"link":var l=nf("link","href",a).get(r+(n.href||""));if(l)for(var s=0;sl)break;var c=s.transferSize,d=s.initiatorType;c&&pd(d)&&(i+=c*((s=s.responseEnd)of?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,m)))return Bu=o,e.cancelPendingCommit=m(gc.bind(null,e,t,o,n,r,a,i,l,s,c,d,null,f,p)),void Xu(e,o,i,!u)}gc(e,t,o,n,r,a,i,l,s)}function Zu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rh&&(i=h,h=g,g=i);var y=tr(l,g),b=tr(l,h);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),g>h?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;ln?32:n,R.T=null,n=$u,$u=null;var o=zu,l=Bu;if(Du=0,Mu=zu=null,Bu=0,6&pu)throw Error(i(331));var s=pu;if(pu|=4,su(o.current),eu(o,o.current,l,n),pu=s,Fc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ye,o)}catch(u){}return!0}finally{I.p=a,R.T=r,vc(e,t)}}function xc(e,t,n){t=Qr(n,t),null!==(e=wo(e,t=jl(e.stateNode,t,2),2))&&(Ne(e,2),Ic(e))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Fu||!Fu.has(r))){e=Qr(n,e),null!==(r=wo(t,n=Ol(2),2))&&(Pl(n,r,t,e),Ne(r,2),Ic(r));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fu;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(ku=!0,a.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mu===e&&(hu&n)===n&&(4===Su||3===Su&&(62914560&hu)===hu&&300>se()-Nu?!(2&pu)&&tc(e,0):Au|=n,Tu===hu&&(Tu=0)),Ic(e)}function Ac(e,t){0===t&&(t=Oe()),null!==(e=Lr(e,t))&&(Ne(e,t),Ic(e))}function Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ac(e,n)}var jc=null,Oc=null,Pc=!1,Nc=!1,Lc=!1,Rc=0;function Ic(e){e!==Oc&&null===e.next&&(null===Oc?jc=Oc=e:Oc=Oc.next=e),Nc=!0,Pc||(Pc=!0,Ed(function(){6&pu?ae(ce,Dc):zc()}))}function Fc(e,t){if(!Lc&&Nc){Lc=!0;do{for(var n=!1,r=jc;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=a&~(i&~l))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Uc(r,o))}else o=hu,!(3&(o=Ce(r,r===mu?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Uc(r,o));r=r.next}}while(n);Lc=!1}}function Dc(){zc()}function zc(){Nc=Pc=!1;var e=0;0!==Rc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Rc);for(var t=se(),n=null,r=jc;null!==r;){var a=r.next,o=Mc(r,t);0===o?(r.next=null,null===n?jc=a:n.next=a,null===a&&(Oc=n)):(n=r,(0!==e||3&o)&&(Nc=!0)),r=a}0!==Du&&5!==Du||Fc(e,!1),0!==Rc&&(Rc=0)}function Mc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function af(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var of=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sf=new Map,t.forEach(cf,e),sf=null,lf.call(e))}function cf(e,t){if(!(4&t.state.loading)){var n=sf.get(e);if(n)var r=n.get(null);else{n=new Map,sf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oJ,vd:()=>W});var r=n(6540),a=n(5556),o=n.n(a),i=n(115),l=n.n(i),s=n(311),u=n.n(s),c=n(2833),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map(function(e){return h[e]}),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce(function(e,t){return e[k[t]]=t,e},{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},A=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return f({},e,t)},{})},C=function(e,t){return t.filter(function(e){return void 0!==e[h.BASE]}).map(function(e){return e[h.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},F=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,n){return t[k[n]||n]=e[n],t},t)},D=function(e,t){return t.map(function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach(function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),r.createElement(e,o)})},z=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=F(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=I(n),o=O(t);return a?"<"+e+' data-rh="true" '+a+">"+R(o,r)+"":"<"+e+' data-rh="true">'+R(o,r)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return F(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return D(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var a=Object.keys(r).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var a=void 0===r[t]?t:t+'="'+R(r[t],n)+'"';return e?e+" "+a:a},""),o=r.innerHTML||r.cssText||"",i=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"")},"")}(e,t,n)}}}},M=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=P(e.metaTags,v),o=P(t,y),i=P(n,b);return{priorityMethods:{toComponent:function(){return[].concat(D(h.META,a.priority),D(h.LINK,o.priority),D(h.SCRIPT,i.priority))},toString:function(){return z(h.META,a.priority,r)+" "+z(h.LINK,o.priority,r)+" "+z(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:z(h.BASE,t,r),bodyAttributes:z("bodyAttributes",n,r),htmlAttributes:z("htmlAttributes",a,r),link:z(h.LINK,c,r),meta:z(h.META,d,r),noscript:z(h.NOSCRIPT,o,r),script:z(h.SCRIPT,f,r),style:z(h.STYLE,i,r),title:z(h.TITLE,{title:s,titleAttributes:u},r)}},B=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=M({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),H=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),V="undefined"!=typeof document,W=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);W.canUseDOM=V,W.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},W.defaultProps={context:{}},W.displayName="HelmetProvider";var q=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some(function(e,t){return n=t,r.isEqualNode(e)})?o.splice(n,1):i.push(r)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return r.appendChild(e)}),{oldTags:o,newTags:i}},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;G(h.BODY,e.bodyAttributes),G(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=O(e)),G(h.TITLE,t)}(c,d);var f={baseTag:q(h.BASE,n),linkTags:q(h.LINK,a),metaTags:q(h.META,o),noscriptTags:q(h.NOSCRIPT,i),scriptTags:q(h.SCRIPT,s),styleTags:q(h.STYLE,u)},p={},m={};Object.keys(f).forEach(function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},Y=null,K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case h.BODY:return f({},a,{bodyAttributes:f({},o)});case h.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach(function(t){var r;n=f({},n,((r={})[t]=e[t],r))}),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Z),l=Object.keys(i).reduce(function(e,t){return e[x[t]||t]=i[t],e},{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(K,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,function(e){return r.createElement(K,f({},a,{context:e}))})},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},2799(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case g:case s:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},4363(e,t,n){"use strict";e.exports=n(2799)},3259(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;ti,v:()=>l});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some(function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a}),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map(function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})})):null}},4625(e,t,n){"use strict";n.d(t,{I9:()=>d,Kd:()=>c,N_:()=>y,k2:()=>w});var r=n(6347),a=n(7387),o=n(6540),i=n(1513),l=n(8168),s=n(8587),u=n(1561),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;ax,Ix:()=>v,W6:()=>P,XZ:()=>b,dO:()=>j,qh:()=>S,zy:()=>N});var r=n(7387),a=n(6540),o=n(5556),i=n.n(o),l=n(1513),s=n(1561),u=n(8168),c=n(5302),d=n.n(c),f=(n(4363),n(8587)),p=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i>>1,a=e[r];if(!(0>>1;ro(s,n))uo(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,p=3,m=!1,g=!1,h=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(h=!1,k(e),!g)if(null!==r(u))g=!0,E||(E=!0,S());else{var t=r(c);null!==t&&N(x,t.startTime-e)}}var S,E=!1,_=-1,A=5,C=-1;function T(){return!!y||!(t.unstable_now()-Ce&&T());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,k(e),n=!0;break t}f===r(u)&&a(u),k(e)}else a(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&N(x,s.startTime-e),n=!1}}break e}finally{f=null,p=o,m=!1}n=void 0}}finally{n?S():E=!1}}}if("function"==typeof w)S=function(){w(j)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,P=O.port2;O.port1.onmessage=j,S=function(){P.postMessage(null)}}else S=function(){b(j,0)};function N(e,n){_=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(h?(v(_),_=-1):h=!0,N(x,o-i))):(e.sortIndex=l,n(u,e),g||m||(g=!0,E||(E=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},9982(e,t,n){"use strict";e.exports=n(4477)},2833(e){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;sr});const r={title:"HappyView",tagline:"Lexicon-driven ATProto AppView",url:"https://happyview.dev",baseUrl:"/",favicon:"img/favicon.png",onBrokenLinks:"throw",markdown:{mermaid:!0,format:"mdx",emoji:!0,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1},hooks:{onBrokenMarkdownLinks:"warn",onBrokenMarkdownImages:"throw"}},themes:["@docusaurus/theme-mermaid"],i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"docs",routeBasePath:"/",sidebarPath:"./sidebars.ts"},blog:!1,theme:{}}]],themeConfig:{image:"img/og.png",navbar:{title:"",logo:{alt:"HappyView",src:"img/logo.light.png",srcDark:"img/logo.dark.png"},items:[{type:"docSidebar",sidebarId:"docs",position:"left",label:"Docs"},{href:"https://github.com/gamesgamesgamesgamesgames/happyview",label:"GitHub",position:"right"}],hideOnScroll:!1},prism:{additionalLanguages:["lua"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},footer:{copyright:"Copyright \xa9 2026 [Birbhouse Games](https://birb.house).",style:"light",links:[]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3},mermaid:{theme:{dark:"dark",light:"default"},options:{}}},baseUrlIssueBanner:!0,future:{v4:{removeLegacyPostBuildHeadAttribute:!1,useCssCascadeLayers:!1},experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1,rspackPersistentCache:!1,ssgWorkerThreads:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},3845(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>a})},8168(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},7387(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},8587(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},3662(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},8634(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>o});var a=n(3662);function o(){o=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=RegExp(e,r);return t.set(i,o||t.get(e)),(0,a.A)(i,n.prototype)}function i(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var a=r[n];if("number"==typeof a)t[n]=e[a];else{for(var o=0;void 0===e[a[o]]&&o+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof a){var l=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=r(e[e.length-1])&&(e=[].slice.call(e)).push(i(e,l)),a.apply(this,e)})}return e[Symbol.replace].call(this,n,a)},o.apply(this,arguments)}},4164(e,t,n){"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;ta});const a=function(){for(var e,t,n=0,a="",o=arguments.length;nC,f4:()=>ne});var r,a,o,i,l,s,u,c=n(6540),d=n(4164),f=Object.create,p=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},A=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof a)){var _,A=1;if(b){if(!(_=o(k,S,e,y))||_.index>=e.length)break;var C=_.index,T=_.index+_[0].length,j=S;for(j+=x.value.length;C>=j;)j+=(x=x.next).value.length;if(S=j-=x.value.length,x.value instanceof a)continue;for(var O=x;O!==t.tail&&(jd.reach&&(d.reach=R);var I=x.prev;if(N&&(I=s(t,I,N),S+=N.length),u(t,I,A),x=s(t,I,new a(f,h?r.tokenize(P,h):P,v,P)),L&&s(t,x,L),A>1){var F={cause:f+","+m,reach:R};i(e,t,n,x.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}();t.exports=n,n.default=n}},function(){return a||(0,r[y(r)[0]])((a={exports:{}}).exports,a),a.exports}),C=((e,t,n)=>(n=null!=e?f(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of y(t))w.call(e,a)||a===n||p(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:p(n,"default",{value:e,enumerable:!0}),e)))(A());C.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},C.languages.markup.tag.inside["attr-value"].inside.entity=C.languages.markup.entity,C.languages.markup.doctype.inside["internal-subset"].inside=C.languages.markup,C.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(C.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:C.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:C.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},C.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(C.languages.markup.tag,"addAttribute",{value:function(e,t){C.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:C.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),C.languages.html=C.languages.markup,C.languages.mathml=C.languages.markup,C.languages.svg=C.languages.markup,C.languages.xml=C.languages.extend("markup",{}),C.languages.ssml=C.languages.xml,C.languages.atom=C.languages.xml,C.languages.rss=C.languages.xml,o=C,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s="(?:[^\\\\-]|"+(l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",s=RegExp(s+"-"+s),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},C.languages.javascript=C.languages.extend("clike",{"class-name":[C.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),C.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,C.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:C.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:C.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:C.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:C.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:C.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),C.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:C.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),C.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),C.languages.markup&&(C.languages.markup.tag.addInlined("script","javascript"),C.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),C.languages.js=C.languages.javascript,C.languages.actionscript=C.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),C.languages.actionscript["class-name"].alias="function",delete C.languages.actionscript.parameter,delete C.languages.actionscript["literal-property"],C.languages.markup&&C.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:C.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(C),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach(function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var l=0,s=i.length;l|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(C),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(C),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(C),C.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:C.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},C.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function s(t,n,i){var s=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),u=0,c={},d=(s=l(s.map(function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=u++,n="___"+i.toUpperCase()+"_"+r+"___")););return c[n]=e,n}).join(""),n,i),Object.keys(c));return u=0,function t(n){for(var o=0;o=d.length)return;var i,s,f,p,m,g,h,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[u],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(i))&&(++u,s=g.substring(0,h),m=c[i],f=void 0,(p={})["interpolation-punctuation"]=a,3===(p=e.tokenize(m,p)).length&&((f=[1,1]).push.apply(f,l(p[1],e.languages.javascript,"javascript")),p.splice.apply(p,f)),f=new e.Token("interpolation",p,r.alias,m),p=g.substring(h+i.length),m=[],s&&m.push(s),m.push(f),p&&(t(g=[p]),m.push.apply(m,g)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(m)),o+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?t(h):t([h]))}}(s),new e.Token(i,s,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",function(t){t.language in u&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(C),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(C),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(C),C.languages.n4js=C.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),C.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),C.languages.n4jsd=C.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(//g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,function(){return n}).replace(//g,function(){return r}).replace(//g,function(){return a}),RegExp(e,t)}function i(t){for(var n=[],r=0;r"!==a.content[a.content.length-1].content&&n.push({tagName:l(a.content[0].content[1]),openedBraces:0}):0+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)})}(C),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(C),C.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},C.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=C.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(C),C.languages.c=C.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),C.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),C.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},C.languages.c.string],char:C.languages.c.char,comment:C.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:C.languages.c}}}}),C.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete C.languages.c.boolean,C.languages.objectivec=C.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete C.languages.objectivec["class-name"],C.languages.objc=C.languages.objectivec,C.languages.reason=C.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),C.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete C.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(C),C.languages.go=C.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),C.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete C.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(C),C.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},C.languages.python["string-interpolation"].inside.interpolation.inside.rest=C.languages.python,C.languages.py=C.languages.python,C.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},C.languages.webmanifest=C.languages.json;((e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>T,duotoneDark:()=>j,duotoneLight:()=>O,github:()=>P,gruvboxMaterialDark:()=>Q,gruvboxMaterialLight:()=>Y,jettwaveDark:()=>V,jettwaveLight:()=>W,nightOwl:()=>N,nightOwlLight:()=>L,oceanicNext:()=>F,okaidia:()=>D,oneDark:()=>q,oneLight:()=>G,palenight:()=>z,shadesOfPurple:()=>M,synthwave84:()=>B,ultramin:()=>U,vsDark:()=>$,vsLight:()=>H});var T={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},O={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},P={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},N={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},R="#c5a5c5",I="#8dc891",F={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:R}},{types:["attr-value"],style:{color:I}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:I}},{types:["punctuation"],style:{color:I}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:R}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},D={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},z={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},M={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},B={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},U={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},$={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},H={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},V={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},W={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},q={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},G={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Q={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Y={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},K=/\r\n|\r|\n/,Z=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},X=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},J=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,l=[];const s=[l];for(;i>-1;){for(;(o=r[i]++)0?u:["plain"],e=c):(u=X(u,c.type),c.alias&&(u=X(u,c.alias)),e=c.content),"string"!=typeof e){i++,t.push(u),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(K),f=d.length;l.push({types:u,content:d[0]});for(let t=1;t{const{plain:n}=e,r=e.styles.reduce((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach(t=>{const n=S(S({},e[t]),a);e[t]=n}),e},{});return r.root=n,r.plain=E(S({},n),{backgroundColor:void 0}),r},te=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=ee(r,o),l=(e=>(0,c.useCallback)(t=>{var n=t,{className:r,style:a,line:o}=n,i=_(n,["className","style","line"]);const l=E(S({},i),{className:(0,d.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof a&&(l.style=S(S({},l.style||{}),a)),l},[e]))(i),s=(e=>{const t=(0,c.useCallback)(({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map(t=>e[t]))},[e]);return(0,c.useCallback)(e=>{var n=e,{token:r,className:a,style:o}=n,i=_(n,["token","className","style"]);const l=E(S({},i),{className:(0,d.A)("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(l.style=S(S({},l.style||{}),o)),l},[t])})(i),u=(({prism:e,code:t,grammar:n,language:r})=>(0,c.useMemo)(()=>{if(null==n)return J([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),J(a.tokens)},[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:u,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:l,getTokenProps:s})},ne=e=>(0,c.createElement)(te,E(S({},e),{prism:e.prism||C,theme:e.theme||$,code:e.code,language:e.language}))},1561(e,t,n){"use strict";n.d(t,{A:()=>a});var r="Invariant failed";function a(e,t){if(!e)throw new Error(r)}},1635(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>I,__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>A,__await:()=>S,__awaiter:()=>m,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>L,__createBinding:()=>h,__decorate:()=>l,__disposeResources:()=>D,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>a,__generator:()=>g,__importDefault:()=>P,__importStar:()=>O,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>s,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>z,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>k,__values:()=>b,default:()=>M});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var h=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[u],m);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=i(h.get))&&(d.get=l),(l=i(h.set))&&(d.set=l),(l=i(h.init))&&a.unshift(l)}else(l=i(h))&&("field"===s?a.unshift(l):d[u]=l)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{(n=a[e](t)).value instanceof S?Promise.resolve(n.value.v).then(s,u):c(o[0][2],n)}catch(r){c(o[0][3],r)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:a?a(t):t}:a}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,a,(t=e[n](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},j=function(e){return j=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},j(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=j(e),r=0;r{e.O(0,[1869],()=>{return t=8600,e(e.s=t);var t});e.O()}]); \ No newline at end of file diff --git a/assets/js/main.c991874c.js b/assets/js/main.c991874c.js new file mode 100644 index 0000000..8df5a7d --- /dev/null +++ b/assets/js/main.c991874c.js @@ -0,0 +1,2 @@ +/*! For license information please see main.c991874c.js.LICENSE.txt */ +(self.webpackChunk_happyview_docs=self.webpackChunk_happyview_docs||[]).push([[8792],{7973:(e,t,n)=>{var r={"./prism-lua":3871};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=7973},2065:(e,t,n)=>{"use strict";n.d(t,{mg:()=>J,vd:()=>q});var r=n(63),a=n(2497),o=n.n(a),i=n(971),l=n.n(i),s=n(526),u=n.n(s),c=n(6358),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map(function(e){return h[e]}),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce(function(e,t){return e[k[t]]=t,e},{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},A=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return f({},e,t)},{})},C=function(e,t){return t.filter(function(e){return void 0!==e[h.BASE]}).map(function(e){return e[h.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},F=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,n){return t[k[n]||n]=e[n],t},t)},D=function(e,t){return t.map(function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach(function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),r.createElement(e,o)})},M=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=F(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=I(n),o=O(t);return a?"<"+e+' data-rh="true" '+a+">"+R(o,r)+"":"<"+e+' data-rh="true">'+R(o,r)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return F(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return D(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var a=Object.keys(r).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var a=void 0===r[t]?t:t+'="'+R(r[t],n)+'"';return e?e+" "+a:a},""),o=r.innerHTML||r.cssText||"",i=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"")},"")}(e,t,n)}}}},z=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=N(e.metaTags,v),o=N(t,y),i=N(n,b);return{priorityMethods:{toComponent:function(){return[].concat(D(h.META,a.priority),D(h.LINK,o.priority),D(h.SCRIPT,i.priority))},toString:function(){return M(h.META,a.priority,r)+" "+M(h.LINK,o.priority,r)+" "+M(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:M(h.BASE,t,r),bodyAttributes:M("bodyAttributes",n,r),htmlAttributes:M("htmlAttributes",a,r),link:M(h.LINK,c,r),meta:M(h.META,d,r),noscript:M(h.NOSCRIPT,o,r),script:M(h.SCRIPT,f,r),style:M(h.STYLE,i,r),title:M(h.TITLE,{title:s,titleAttributes:u},r)}},B=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=z({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),H=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),V="undefined"!=typeof document,q=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);q.canUseDOM=V,q.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},q.defaultProps={context:{}},q.displayName="HelmetProvider";var W=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some(function(e,t){return n=t,r.isEqualNode(e)})?o.splice(n,1):i.push(r)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return r.appendChild(e)}),{oldTags:o,newTags:i}},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;G(h.BODY,e.bodyAttributes),G(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=O(e)),G(h.TITLE,t)}(c,d);var f={baseTag:W(h.BASE,n),linkTags:W(h.LINK,a),metaTags:W(h.META,o),noscriptTags:W(h.NOSCRIPT,i),scriptTags:W(h.SCRIPT,s),styleTags:W(h.STYLE,u)},p={},m={};Object.keys(f).forEach(function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},K=null,Y=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case h.BODY:return f({},a,{bodyAttributes:f({},o)});case h.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach(function(t){var r;n=f({},n,((r={})[t]=e[t],r))}),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Z),l=Object.keys(i).reduce(function(e,t){return e[x[t]||t]=i[t],e},{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(Y,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,function(e){return r.createElement(Y,f({},a,{context:e}))})},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},8277:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(63),a=n(199),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],l=n[1];return(0,r.useEffect)(function(){l(!0)},[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},9338:(e,t,n)=>{"use strict";var r=n(63),a=n(2086),o=n(2065),i=n(540),l=n(4784),s=n(1785);const u=[n(8723),n(3196),n(2046)];var c=n(3921),d=n(1071),f=n(5034),p=n(199);function m(e){var t=e.children;return(0,p.jsx)(p.Fragment,{children:t})}var g=n(952),h=function(e){return e.defaultFormatter(e)};function y(e){var t=e.children;return(0,p.jsx)(g.AL,{formatter:h,children:t})}function b(e){var t=e.children;return(0,p.jsx)(y,{children:t})}var v=n(4420),w=n(9778),k=n(1969),x=n(6239),S=n(4315),E=n(8764),_=n(664),A=n(2463);function C(){var e=(0,w.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,E.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,p.jsxs)(v.A,{children:[Object.entries(r).map(function(e){var t=e[0],n=e[1].htmlLang;return(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)}),(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter(function(e){return o!==e.htmlLang}).map(function(e){return(0,p.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)})]})}function T(e){var t=e.permalink,n=(0,w.A)().siteConfig.url,r=function(){var e=(0,w.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,_.Ks)((0,k.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function j(){var e=(0,w.A)().i18n.currentLocale,t=(0,x.p)(),n=t.metadata,r=t.image;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{})]}),r&&(0,p.jsx)(S.be,{image:r}),(0,p.jsx)(T,{}),(0,p.jsx)(C,{}),(0,p.jsx)(A.A,{tag:"default",locale:e}),(0,p.jsx)(v.A,{children:n.map(function(e,t){return(0,p.jsx)("meta",Object.assign({},e),t)})})]})}var O=new Map;var N=n(8277),P=n(684),L=n(6189),R=n(3493);function I(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

    Your Docusaurus site did not load properly.

    \n

    A very common reason is a wrong site baseUrl configuration.

    \n

    Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

    \n

    We suggest trying baseUrl =

    \n\n'}(e)).replace(/{"use strict";n.d(t,{o:()=>d,l:()=>f});var r=n(63),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"README","docs":[{"id":"getting-started/authentication","path":"/getting-started/authentication","sidebar":"docs"},{"id":"getting-started/configuration","path":"/getting-started/configuration","sidebar":"docs"},{"id":"getting-started/dashboard","path":"/getting-started/dashboard","sidebar":"docs"},{"id":"getting-started/deployment/docker","path":"/getting-started/deployment/docker","sidebar":"docs"},{"id":"getting-started/deployment/other","path":"/getting-started/deployment/other","sidebar":"docs"},{"id":"getting-started/deployment/railway","path":"/getting-started/deployment/railway","sidebar":"docs"},{"id":"getting-started/quickstart","path":"/getting-started/quickstart","sidebar":"docs"},{"id":"guides/api-keys","path":"/guides/api-keys","sidebar":"docs"},{"id":"guides/backfill","path":"/guides/backfill","sidebar":"docs"},{"id":"guides/database-setup","path":"/guides/database-setup","sidebar":"docs"},{"id":"guides/developing-plugins","path":"/guides/developing-plugins","sidebar":"docs"},{"id":"guides/event-logs","path":"/guides/event-logs","sidebar":"docs"},{"id":"guides/index-hooks","path":"/guides/index-hooks","sidebar":"docs"},{"id":"guides/labelers","path":"/guides/labelers","sidebar":"docs"},{"id":"guides/lexicons","path":"/guides/lexicons","sidebar":"docs"},{"id":"guides/permissions","path":"/guides/permissions","sidebar":"docs"},{"id":"guides/plugins","path":"/guides/plugins","sidebar":"docs"},{"id":"guides/postgres-to-sqlite-migration","path":"/guides/postgres-to-sqlite-migration","sidebar":"docs"},{"id":"guides/scripting","path":"/guides/scripting","sidebar":"docs"},{"id":"guides/sqlite-to-postgres-migration","path":"/guides/sqlite-to-postgres-migration","sidebar":"docs"},{"id":"README","path":"/","sidebar":"docs"},{"id":"reference/admin-api","path":"/reference/admin-api","sidebar":"docs"},{"id":"reference/admin/api-clients","path":"/reference/admin/api-clients","sidebar":"docs"},{"id":"reference/admin/api-keys","path":"/reference/admin/api-keys","sidebar":"docs"},{"id":"reference/admin/backfill","path":"/reference/admin/backfill","sidebar":"docs"},{"id":"reference/admin/domains","path":"/reference/admin/domains","sidebar":"docs"},{"id":"reference/admin/events","path":"/reference/admin/events","sidebar":"docs"},{"id":"reference/admin/labelers","path":"/reference/admin/labelers","sidebar":"docs"},{"id":"reference/admin/lexicons","path":"/reference/admin/lexicons","sidebar":"docs"},{"id":"reference/admin/plugins","path":"/reference/admin/plugins","sidebar":"docs"},{"id":"reference/admin/script-variables","path":"/reference/admin/script-variables","sidebar":"docs"},{"id":"reference/admin/settings","path":"/reference/admin/settings","sidebar":"docs"},{"id":"reference/admin/stats","path":"/reference/admin/stats","sidebar":"docs"},{"id":"reference/admin/users","path":"/reference/admin/users","sidebar":"docs"},{"id":"reference/architecture","path":"/reference/architecture","sidebar":"docs"},{"id":"reference/changelog","path":"/reference/changelog"},{"id":"reference/glossary","path":"/reference/glossary","sidebar":"docs"},{"id":"reference/lua/atproto-api","path":"/reference/lua/atproto-api","sidebar":"docs"},{"id":"reference/lua/database-api","path":"/reference/lua/database-api","sidebar":"docs"},{"id":"reference/lua/http-api","path":"/reference/lua/http-api","sidebar":"docs"},{"id":"reference/lua/json-api","path":"/reference/lua/json-api","sidebar":"docs"},{"id":"reference/lua/record-api","path":"/reference/lua/record-api","sidebar":"docs"},{"id":"reference/lua/standard-libraries","path":"/reference/lua/standard-libraries","sidebar":"docs"},{"id":"reference/lua/utility-globals","path":"/reference/lua/utility-globals","sidebar":"docs"},{"id":"reference/production-deployment","path":"/reference/production-deployment","sidebar":"docs"},{"id":"reference/scripts/algolia-sync","path":"/reference/scripts/algolia-sync","sidebar":"docs"},{"id":"reference/scripts/batch-save","path":"/reference/scripts/batch-save","sidebar":"docs"},{"id":"reference/scripts/cascading-delete","path":"/reference/scripts/cascading-delete","sidebar":"docs"},{"id":"reference/scripts/complex-mutations","path":"/reference/scripts/complex-mutations","sidebar":"docs"},{"id":"reference/scripts/create-record","path":"/reference/scripts/create-record","sidebar":"docs"},{"id":"reference/scripts/expanded-query","path":"/reference/scripts/expanded-query","sidebar":"docs"},{"id":"reference/scripts/get-record","path":"/reference/scripts/get-record","sidebar":"docs"},{"id":"reference/scripts/list-or-fetch","path":"/reference/scripts/list-or-fetch","sidebar":"docs"},{"id":"reference/scripts/meilisearch-sync","path":"/reference/scripts/meilisearch-sync","sidebar":"docs"},{"id":"reference/scripts/paginated-list","path":"/reference/scripts/paginated-list","sidebar":"docs"},{"id":"reference/scripts/sidecar-records","path":"/reference/scripts/sidecar-records","sidebar":"docs"},{"id":"reference/scripts/update-or-delete","path":"/reference/scripts/update-or-delete","sidebar":"docs"},{"id":"reference/scripts/upsert-record","path":"/reference/scripts/upsert-record","sidebar":"docs"},{"id":"reference/troubleshooting","path":"/reference/troubleshooting","sidebar":"docs"},{"id":"reference/xrpc-api","path":"/reference/xrpc-api","sidebar":"docs"},{"id":"sdk/lex-agent","path":"/sdk/lex-agent","sidebar":"docs"},{"id":"sdk/oauth-client","path":"/sdk/oauth-client","sidebar":"docs"},{"id":"sdk/oauth-client-browser","path":"/sdk/oauth-client-browser","sidebar":"docs"},{"id":"sdk/overview","path":"/sdk/overview","sidebar":"docs"},{"id":"tutorials/statusphere","path":"/tutorials/statusphere","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/","label":"Introduction"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en","translate":false,"url":"https://happyview.dev","baseUrl":"/"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.10.0","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.10.0"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.10.0"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.10.0"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.10.0"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.10.0"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.10.0"}}}');var u=n(199),c={siteConfig:a.A,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){var t=e.children;return(0,u.jsx)(d.Provider,{value:c,children:t})}},8610:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(6189),a=n(63),o=n(1785),i=n(4420),l=n(664),s=n(4498),u=n(2342),c=n(199);function d(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(f,{error:t})]})}function f(e){var t=e.error,n=(0,l.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){var t=e.children;return(0,c.jsx)(u.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:function(){return(0,c.jsx)(d,{error:t,tryAgain:n})},children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(d,{error:t,tryAgain:n})})]})})}var g=function(e){return(0,c.jsx)(m,Object.assign({},e))},h=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:g)(a)}return null!=t?t:null},t}(a.Component)},1785:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},4420:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(63);var r=n(2065),a=n(199);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},1598:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(429),a=n(63),o=n(540),i=n(664),l=n(9778),s=n(3494),u=n(1785),c=n(4169),d=n(1969),f=n(199),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,g,h=e.isNavLink,y=e.to,b=e.href,v=e.activeClassName,w=e.isActive,k=e["data-noBrokenLinkCheck"],x=e.autoAddBaseUrl,S=void 0===x||x,E=(0,r.A)(e,p),_=(0,l.A)().siteConfig,A=_.trailingSlash,C=_.baseUrl,T=_.future.experimental_router,j=(0,d.hH)().withBaseUrl,O=(0,c.A)(),N=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,function(){return N.current});var P=y||b;var L,R,I=(0,s.A)(P),F=null==P?void 0:P.replace("pathname://",""),D=void 0!==F?(L=F,S&&function(e){return e.startsWith("/")}(L)?j(L):L):void 0;"hash"===T&&null!=(n=D)&&n.startsWith("./")&&(D=null==(R=D)?void 0:R.slice(1));D&&I&&(D=(0,i.Ks)(D,{trailingSlash:A,baseUrl:C}));var M=(0,a.useRef)(!1),z=h?o.k2:o.N_,B=u.A.canUseIntersectionObserver,U=(0,a.useRef)(void 0),$=function(){M.current||null==D||(window.docusaurus.preload(D),M.current=!0)};(0,a.useEffect)(function(){return!B&&I&&u.A.canUseDOM&&null!=D&&window.docusaurus.prefetch(D),function(){B&&U.current&&U.current.disconnect()}},[U,D,B,I]);var H=null!=(m=null==(g=D)?void 0:g.startsWith("#"))&&m,V=!E.target||"_self"===E.target,q=!D||!I||!V||H&&"hash"!==T;k||!H&&q||O.collectLink(D),E.id&&O.collectAnchor(E.id);var W={};return q?(0,f.jsx)("a",Object.assign({ref:N,href:D},P&&!I&&{target:"_blank",rel:"noopener noreferrer"},E,W)):(0,f.jsx)(z,Object.assign({},E,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){N.current=e,B&&e&&I&&(U.current=new window.IntersectionObserver(function(t){t.forEach(function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))})}),U.current.observe(e))},to:D},h&&{isActive:w,activeClassName:v},W))}const g=a.forwardRef(m)},5819:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(63),a=n(199);function o(e,t){var n=e.split(/(\{\w+\})/).map(function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e});return n.some(function(e){return(0,r.isValidElement)(e)})?n.map(function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e}).filter(function(e){return""!==e}):n.join("")}var i=n(2654);function l(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function s(e,t){return o(l({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},9217:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});var r="default"},3494:(e,t,n)=>{"use strict";function r(e){return/^(?:[A-Za-z][A-Za-z\d+.-]*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},1969:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(63),a=n(9778),o=n(3494);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,l=(0,r.useCallback)(function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,l=i.forcePrependBaseUrl,s=void 0!==l&&l,u=i.absolute,c=void 0!==u&&u,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(s)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var f=r.startsWith(n)?r:n+r.replace(/^\//,"");return c?t+f:f}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})},[n,t,i]);return{withBaseUrl:l}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},4169:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(63),a=(n(199),r.createContext({collectAnchor:function(){},collectLink:function(){}})),o=function(){return(0,r.useContext)(a)};function i(){return o()}},9778:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63),a=n(684);function o(){return(0,r.useContext)(a.o)}},5287:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63),a=n(8277);function o(){return(0,r.useContext)(a.o)}},3493:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(63);const a=n(1785).A.canUseDOM?r.useLayoutEffect:r.useEffect},7595:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63),a=n(2342);function o(){var e=r.useContext(a.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},6433:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=function(e){return"object"==typeof e&&!!e&&Object.keys(e).length>0};function a(e){var t={};return function e(n,a){Object.entries(n).forEach(function(n){var o=n[0],i=n[1],l=a?a+"."+o:o;r(i)?e(i,l):t[l]=i})}(e),t}},2342:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(63),a=n(199),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),l=(0,r.useMemo)(function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})},[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},7541:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>S,g1:()=>_});var r=n(63),a=n(7584),o=n(9217),i=n(9778);var l=n(4180),s=l.N;function u(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function c(e){if(void 0===e&&(e=s),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,d||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),d=!0),null}var t}var d=!1;var f={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function p(e,t){var n=function(e){return""+e+l.M}(e);if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var r=c(null==t?void 0:t.persistence);return null===r?f:{get:function(){try{return r.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=r.getItem(n);r.setItem(n,e),u({key:n,oldValue:t,newValue:e,storage:r})}catch(a){console.error("Docusaurus storage error, can't set "+n+"="+e,a)}},del:function(){try{var e=r.getItem(n);r.removeItem(n),u({key:n,oldValue:e,newValue:null,storage:r})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(a){return console.error("Docusaurus storage error, can't listen for changes of key="+n,a),function(){}}}}}var m=n(9835),g=n(199),h=function(e){return"docs-preferred-version-"+e},y={save:function(e,t,n){p(h(e),{persistence:t}).set(n)},read:function(e,t){return p(h(e),{persistence:t}).get()},clear:function(e,t){p(h(e),{persistence:t}).del()}},b=function(e){return Object.fromEntries(e.map(function(e){return[e,{preferredVersionName:null}]}))};function v(){return(0,i.A)().siteConfig.themeConfig.docs.versionPersistence}var w=r.createContext(null);function k(){var e=(0,a.Gy)(),t=v(),n=(0,r.useMemo)(function(){return Object.keys(e)},[e]),o=(0,r.useState)(function(){return b(n)}),i=o[0],l=o[1];return(0,r.useEffect)(function(){l(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map(function(e){return[e,(t=e,a=y.read(t,n),r[t].versions.some(function(e){return e.name===a})?{preferredVersionName:a}:(y.clear(t,n),{preferredVersionName:null}))];var t,a}))}({allDocsData:e,versionPersistence:t,pluginIds:n}))},[e,t,n]),[i,(0,r.useMemo)(function(){return{savePreferredVersion:function(e,n){y.save(e,t,n),l(function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))})}}},[t])]}function x(e){var t=e.children,n=k();return(0,g.jsx)(w.Provider,{value:n,children:t})}function S(e){var t=e.children;return(0,g.jsx)(x,{children:t})}function E(){var e=(0,r.useContext)(w);if(!e)throw new m.dV("DocsPreferredVersionContextProvider");return e}function _(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=E(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find(function(e){return e.name===u}))?t:null,savePreferredVersionName:(0,r.useCallback)(function(t){s.savePreferredVersion(e,t)},[s,e])}}},3978:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(63),a=n(9835),o=n(199),i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)(function(){return n&&a?{name:n,items:a}:null},[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function u(){var e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},3996:(e,t,n)=>{"use strict";n.d(t,{Nr:()=>p,w8:()=>h,B5:()=>E,Vd:()=>k,QB:()=>S,fW:()=>x,OF:()=>w,Y:()=>b});var r=n(6763),a=n(63),o=n(1071),i=n(5034),l=n(7584);n(3921),n(9778);function s(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function u(e){return Array.from(new Set(e))}var c=n(7541),d=n(7738),f=n(3978);function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=p(t.value);if(a)return a}}(e):void 0:e.href}var m=function(e,t){return void 0!==e&&s(e,t)},g=function(e,t){return e.some(function(e){return h(e,t)})};function h(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||g(e.items,t))}function y(e,t){switch(e.type){case"category":return h(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some(function(e){return y(e,t)});case"link":return!e.unlisted||h(e,t);default:return!0}}function b(e,t){return(0,a.useMemo)(function(){return e.filter(function(e){return y(e,t)})},[e,t])}function v(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,l=(0,r.A)(t);!(a=l()).done;){var u=a.value;if("category"===u.type){if(s(u.href,n)||e(u.items))return i.unshift(u),!0}else if("link"===u.type&&u.docId&&s(u.href,n))return o||i.unshift(u),!0}return!1}(t),i}function w(){var e,t=(0,f.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,l.vT)())?void 0:e.pluginData.breadcrumbs)&&t?v({sidebarItems:t.items,pathname:n}):null}function k(e){var t=(0,l.zK)(e).activeVersion,n=(0,c.g1)(e).preferredVersion,r=(0,l.r7)(e);return(0,a.useMemo)(function(){return u([t,n,r].filter(Boolean))},[t,n,r])}function x(e,t){var n=k(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.sidebars?Object.entries(e.sidebars):[]}),r=t.find(function(t){return t[0]===e});if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map(function(e){return e.name}).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map(function(e){return e[0]}).join("\n- "));return r[1]},[e,n])}function S(e,t){var n=k(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.docs}),r=t.find(function(t){return t.id===e});if(!r){if(n.flatMap(function(e){return e.draftIds}).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map(function(e){return e.name}).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map(function(e){return e.id})).join("\n- "))}return r},[e,n])}function E(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,l=a.find(function(e){return(0,o.B6)(n.pathname,e)});if(!l)return null;var s=l.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,i.v)(a),sidebarName:s,sidebarItems:u}}},7738:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(63),a=n(9835),o=n(199),i=r.createContext(null);function l(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},7584:(e,t,n)=>{"use strict";n.d(t,{zK:()=>g,vT:()=>f,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>p});var r=n(1071),a=n(9778),o=n(9217);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find(function(e){return e.isLast})};function s(e,t){var n,a,o=function(e,t){return[].concat(e.versions).sort(function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0}).find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})})}(e,t),i=null==o?void 0:o.docs.find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})});return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach(function(e){e.docs.forEach(function(t){t.id===n&&(a[e.name]=t)})}),a):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort(function(e,t){return t[1].path.localeCompare(e[1].path)}).find(function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})}),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map(function(e){return e.path}).join(", "));return o}(c(),(0,r.zy)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return l(t)}function g(e){return s(d(e),(0,r.zy)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.zy)().pathname)}},2613:(e,t,n)=>{"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;t{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5535),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout(function(){a().start()},200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},3196:(e,t,n)=>{"use strict";var r,a,o,i=n(6198),l=n(4784);r=i.My,a=l.A.themeConfig.prism.additionalLanguages,o=globalThis.Prism,globalThis.Prism=r,a.forEach(function(e){"php"===e&&n(3931),n(7973)("./prism-"+e)}),delete globalThis.Prism,void 0!==o&&(globalThis.Prism=r)},7172:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var r=n(429),a=(n(63),n(8573)),o=n(5819),i=n(9499),l=n(1598),s=n(4169),u=n(199),c=["as","id"];function d(e){var t=e.as,n=e.id,d=(0,r.A)(e,c),f=(0,s.A)(),p=(0,i.v)(n);if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},d,{id:void 0}));f.collectAnchor(n);var m=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return(0,u.jsxs)(t,Object.assign({},d,{className:(0,a.A)("anchor",p,d.className),id:n,children:[d.children,(0,u.jsx)(l.A,{className:"hash-link",to:"#"+n,"aria-label":m,title:m,translate:"no",children:"\u200b"})]}))}},795:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});n(63);var r=n(5819);const a={iconExternalLink:"iconExternalLink_yqny"};var o=n(199),i="#theme-svg-external-link";function l(e){var t=e.width,n=void 0===t?13.5:t,l=e.height,s=void 0===l?13.5:l;return(0,o.jsx)("svg",{width:n,height:s,"aria-label":(0,r.T)({id:"theme.IconExternalLink.ariaLabel",message:"(opens in new tab)",description:"The ARIA label for the external link icon"}),className:a.iconExternalLink,children:(0,o.jsx)("use",{href:i})})}},4498:(e,t,n)=>{"use strict";n.d(t,{A:()=>Ut});var r=n(63),a=n(8573),o=n(8610),i=n(4315),l=n(1071),s=n(5819),u=n(9825),c=n(199),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.W6)().action,n=(0,r.useCallback)(function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)},[]);return(0,u.$)(function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)}),{containerRef:e,onClick:n}}var m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,r=p(),a=r.containerRef,o=r.onClick;return(0,c.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,c.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var h=n(568);const y={skipToContent:"skipToContent_hn_G"};function b(){return(0,c.jsx)(g,{className:y.skipToContent})}var v=n(6239),w=n(2584),k=n(429),x=["width","height","color","strokeWidth","className"];function S(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,l=e.strokeWidth,s=void 0===l?1.2:l,u=(e.className,(0,k.A)(e,x));return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},u,{children:(0,c.jsx)("g",{stroke:i,strokeWidth:s,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const E={closeButton:"closeButton_aDnp"};function _(e){return(0,c.jsx)("button",Object.assign({type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",E.closeButton,e.className),children:(0,c.jsx)(S,{width:14,height:14,strokeWidth:3.1})}))}const A={content:"content_aTb_"};function C(e){var t=(0,v.p)().announcementBar.content;return(0,c.jsx)("div",Object.assign({},e,{className:(0,a.A)(A.content,e.className),dangerouslySetInnerHTML:{__html:t}}))}const T={announcementBar:"announcementBar_kOTg",announcementBarPlaceholder:"announcementBarPlaceholder_Vkrq",announcementBarClose:"announcementBarClose_kag2",announcementBarContent:"announcementBarContent_uG4Y"};function j(){var e=(0,v.p)().announcementBar,t=(0,w.M)(),n=t.isActive,r=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,l=e.isCloseable;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.announcementBar.container,T.announcementBar),style:{backgroundColor:o,color:i},role:"banner",children:[l&&(0,c.jsx)("div",{className:T.announcementBarPlaceholder}),(0,c.jsx)(C,{className:T.announcementBarContent}),l&&(0,c.jsx)(_,{onClick:r,className:T.announcementBarClose})]})}var O=n(844),N=n(5527);var P=n(7597),L=n(4805),R=r.createContext(null);function I(e){var t,n,a,o,i,l,s,u=e.children,d=(t=(0,O.M)(),n=(0,L.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,s=(0,P.ZC)(l),(0,r.useEffect)(function(){l&&!s&&i(!0)},[l,s]),(0,r.useEffect)(function(){l?t.shown||i(!0):i(!1)},[t.shown,l]),(0,r.useMemo)(function(){return[o,i]},[o]));return(0,c.jsx)(R.Provider,{value:d,children:u})}function F(e){if(e.component){var t=e.component;return(0,c.jsx)(t,Object.assign({},e.props))}}function D(){var e=(0,r.useContext)(R);if(!e)throw new P.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)(function(){return n(!1)},[n]),o=(0,L.YL)();return(0,r.useMemo)(function(){return{shown:t,hide:a,content:F(o)}},[a,o,t])}function M(e){var t=e.children,n=e.inert;return(0,c.jsx)("div",Object.assign({className:(0,a.A)(h.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu")},function(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}(n),{children:t}))}function z(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=D().shown;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)(M,{inert:o,children:n}),(0,c.jsx)(M,{inert:!o,children:r})]})]})}var B=n(272),U=n(5287);function $(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function H(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}function V(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})}))}const q="toggle_pDN8",W="toggleButton__Co1",G="toggleIcon_IF_c",Q="systemToggleIcon_SKeC",K="lightToggleIcon_z1QC",Y="darkToggleIcon_O_bk",Z="toggleButtonDisabled_pTNf";function X(e){switch(e){case null:return(0,s.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error("unexpected color mode "+e)}}function J(e){return(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:X(e)})}function ee(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)($,{"aria-hidden":!0,className:(0,a.A)(G,K)}),(0,c.jsx)(H,{"aria-hidden":!0,className:(0,a.A)(G,Y)}),(0,c.jsx)(V,{"aria-hidden":!0,className:(0,a.A)(G,Q)})]})}function te(e){var t=e.className,n=e.buttonClassName,r=e.respectPrefersColorScheme,o=e.value,i=e.onChange,l=(0,U.A)();return(0,c.jsx)("div",{className:(0,a.A)(q,t),children:(0,c.jsx)("button",{className:(0,a.A)("clean-btn",W,!l&&Z,n),type:"button",onClick:function(){return i(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error("unexpected color mode "+e)}}(o,r))},disabled:!l,title:X(o),"aria-label":J(o),children:(0,c.jsx)(ee,{})})})}const ne=r.memo(te),re={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_QIye"};function ae(e){var t=e.className,n=(0,v.p)().navbar.style,r=(0,v.p)().colorMode,a=r.disableSwitch,o=r.respectPrefersColorScheme,i=(0,B.G)(),l=i.colorModeChoice,s=i.setColorMode;return a?null:(0,c.jsx)(ne,{className:t,buttonClassName:"dark"===n?re.darkNavbarColorModeToggle:void 0,respectPrefersColorScheme:o,value:l,onChange:s})}var oe=n(7841);function ie(){return(0,c.jsx)(oe.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function le(){var e=(0,O.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,c.jsx)(S,{color:"var(--ifm-color-emphasis-600)"})})}function se(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(ie,{}),(0,c.jsx)(ae,{className:"margin-right--md"}),(0,c.jsx)(le,{})]})}var ue=n(1598),ce=n(1969),de=n(3494);function fe(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var pe=n(795),me=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ge(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,l=e.isDropdownLink,s=e.prependBaseUrlToHref,u=(0,k.A)(e,me),d=(0,ce.Ay)(r),f=(0,ce.Ay)(t),p=(0,ce.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,de.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,m&&(0,c.jsx)(pe.A,Object.assign({},l&&{width:12,height:12}))]})};return a?(0,c.jsx)(ue.A,Object.assign({href:s?p:a},u,g)):(0,c.jsx)(ue.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?fe(n,t.pathname):t.pathname.startsWith(f)}},u,g))}var he=["className","isDropdownItem"];function ye(e){var t=e.className,n=(e.isDropdownItem,(0,k.A)(e,he));return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ge,Object.assign({className:(0,a.A)("menu__link",t)},n))})}var be=["className","isDropdownItem"];function ve(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,k.A)(e,be),i=(0,c.jsx)(ge,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,c.jsx)("li",{children:i}):i}var we=["mobile","position"];function ke(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,k.A)(e,we)),o=r?ye:ve;return(0,c.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var xe=n(3995),Se=n(7322),Ee=n(9778);const _e="dropdownNavbarItemMobile_BOJ6";var Ae=["items","className","position","onClick"];function Ce(e,t){return e.some(function(e){return function(e,t){return!!(0,Se.ys)(e.to,t)||!!fe(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)})}function Te(e){var t=e.collapsed,n=e.onClick;return(0,c.jsx)("button",{"aria-label":t?(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:n})}function je(e){var t,n,o=e.items,i=e.className,s=(e.position,e.onClick),u=(0,k.A)(e,Ae),d=(n=(0,Ee.A)().siteConfig.baseUrl,(0,l.zy)().pathname.replace(n,"/")),f=(0,Se.ys)(u.to,d),p=Ce(o,d),m=function(e){var t=e.active,n=(0,xe.u)({initialState:function(){return!t}}),a=n.collapsed,o=n.toggleCollapsed,i=n.setCollapsed;return(0,r.useEffect)(function(){t&&i(!1)},[t,i]),{collapsed:a,toggleCollapsed:o}}({active:f||p}),g=m.collapsed,h=m.toggleCollapsed,y=u.to?void 0:"#";return(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":g}),children:[(0,c.jsxs)("div",{className:(0,a.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":f}),children:[(0,c.jsx)(ge,Object.assign({role:"button",className:(0,a.A)(_e,"menu__link menu__link--sublist",i),href:y},u,{onClick:function(e){"#"===y&&e.preventDefault(),h()},children:null!=(t=u.children)?t:u.label})),(0,c.jsx)(Te,{collapsed:g,onClick:function(e){e.preventDefault(),h()}})]}),(0,c.jsx)(xe.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:o.map(function(e,t){return(0,r.createElement)(tt,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))})})]})}var Oe=["items","position","className","onClick"];function Ne(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,k.A)(e,Oe)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[s]),(0,c.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,c.jsx)(ge,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),f(!d))},children:null!=(t=l.children)?t:l.label})),(0,c.jsx)("ul",{className:"dropdown__menu",children:n.map(function(e,t){return(0,r.createElement)(tt,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))})})]})}var Pe=["mobile"];function Le(e){var t=e.mobile,n=void 0!==t&&t,r=(0,k.A)(e,Pe),a=n?je:Ne;return(0,c.jsx)(a,Object.assign({},r))}var Re=n(8764),Ie=n(203),Fe=["width","height"];function De(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,k.A)(e,Fe);return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const Me="iconLanguage_Ixml";var ze=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];function Be(){var e=(0,Ee.A)(),t=e.siteConfig,n=e.i18n.localeConfigs,r=(0,Re.o)(),a=(0,Ie.Hl)(function(e){return e.location.search}),o=(0,Ie.Hl)(function(e){return e.location.hash}),i=function(e){var t=n[e];if(!t)throw new Error("Docusaurus bug, no locale config found for locale="+e);return t};return{getURL:function(e,n){var l=(0,Ie.jy)([a,n.queryString],"append");return""+function(e){return i(e).url===t.url?"pathname://"+r.createUrl({locale:e,fullyQualified:!1}):r.createUrl({locale:e,fullyQualified:!0})}(e)+l+o},getLabel:function(e){return i(e).label},getLang:function(e){return i(e).htmlLang}}}const Ue=function(){return null},$e={navbarSearchContainer:"navbarSearchContainer_qQFS"};function He(e){var t=e.children,n=e.className;return(0,c.jsx)("div",{className:(0,a.A)(n,$e.navbarSearchContainer),children:t})}var Ve=n(7584),qe=n(3996),We=["docId","label","docsPluginId"];var Ge=["sidebarId","label","docsPluginId"];var Qe=["label","to","docsPluginId"];var Ke=n(7541),Ye=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter","versions"];function Ze(e){var t=e.docsPluginId,n=e.configs;return function(e,t){if(t){var n=new Map(e.map(function(e){return[e.name,e]})),r=function(t,r){var a,o=n.get(t);if(!o)throw new Error("No docs version exist for name '"+t+"', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- "+e.map(function(e){return""+e.name}).join("\n- "));return{version:o,label:null!=(a=null==r?void 0:r.label)?a:o.label}};return Array.isArray(t)?t.map(function(e){return r(e,void 0)}):Object.entries(t).map(function(e){var t=e[0],n=e[1];return r(t,n)})}return e.map(function(e){return{version:e,label:e.label}})}((0,Ve.jh)(t),n)}function Xe(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(e)}const Je={default:ke,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=(0,k.A)(e,ze),i=Be(),l=(0,Ee.A)().i18n,u=l.currentLocale,d=l.locales.map(function(e){return{label:i.getLabel(e),lang:i.getLang(e),to:i.getURL(e,{queryString:a}),target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}}),f=[].concat(n,d,r),p=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):i.getLabel(u);return(0,c.jsx)(Le,Object.assign({},o,{mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(De,{className:Me}),p]}),items:f}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,c.jsx)(He,{className:n,children:(0,c.jsx)(Ue,{})})},dropdown:Le,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,l=void 0!==i&&i,s=l?"li":"div";return(0,c.jsx)(s,{className:(0,a.A)({navbar__item:!o&&!l,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,We),o=(0,Ve.zK)(r).activeDoc,i=(0,qe.QB)(t,r),l=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!l?null:(0,c.jsx)(ke,Object.assign({exact:!0},a,{isActive:function(){return l||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,k.A)(e,Ge),o=(0,Ve.zK)(r).activeDoc,i=(0,qe.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,c.jsx)(ke,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,k.A)(e,Qe),o=(0,qe.Vd)(r)[0],i=null!=t?t:o.label,l=null!=n?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(o).path;return(0,c.jsx)(ke,Object.assign({},a,{label:i,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=e.versions,l=(0,k.A)(e,Ye),u=(0,Ie.Hl)(function(e){return e.location.search}),d=(0,Ie.Hl)(function(e){return e.location.hash}),f=(0,Ve.zK)(n),p=(0,Ke.g1)(n).savePreferredVersionName,m=Ze({docsPluginId:n,configs:i}),g=function(e){var t,n=e.docsPluginId,r=e.versionItems;return null!=(t=(0,qe.Vd)(n).map(function(e){return r.find(function(t){return t.version===e})}).filter(function(e){return void 0!==e})[0])?t:r[0]}({docsPluginId:n,versionItems:m}),h=[].concat(a,m.map(function(e){var t=e.version;return{label:e.label,to:""+Xe(t,f).path+u+d,isActive:function(){return t===f.activeVersion},onClick:function(){return p(t.name)}}}),o),y=t&&h.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:Xe(g.version,f).path;return h.length<=1?(0,c.jsx)(ke,Object.assign({},l,{mobile:t,label:y,to:b,isActive:r?function(){return!1}:void 0})):(0,c.jsx)(Le,Object.assign({},l,{mobile:t,label:y,to:b,items:h,isActive:r?function(){return!1}:void 0}))}};var et=["type"];function tt(e){var t=e.type,n=(0,k.A)(e,et),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=Je[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,c.jsx)(a,Object.assign({},n))}function nt(){var e=(0,O.M)(),t=(0,v.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(function(t,n){return(0,r.createElement)(tt,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})})}function rt(e){return(0,c.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function at(){var e=0===(0,v.p)().navbar.items.length,t=D();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(rt,{onClick:function(){return t.hide()}}),t.content]})}function ot(){var e,t=(0,O.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)(function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}},[e]),t.shouldRender?(0,c.jsx)(z,{header:(0,c.jsx)(se,{}),primaryMenu:(0,c.jsx)(nt,{}),secondaryMenu:(0,c.jsx)(at,{})}):null}const it={navbarHideable:"navbarHideable_uLUf",navbarHidden:"navbarHidden_tObj"};function lt(e){return(0,c.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function st(e){var t=e.children,n=(0,v.p)().navbar,o=n.hideOnScroll,i=n.style,l=(0,O.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)(function(e){null!==e&&(i.current=e.getBoundingClientRect().height)},[]);return(0,N.Mq)(function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+u0&&(0,c.jsx)(Ct,{links:n}),logo:r&&(0,c.jsx)(Nt,{logo:r}),copyright:t&&(0,c.jsx)(Pt,{copyright:t})})}const It=r.memo(Rt);var Ft=(0,P.fM)([B.a,w.o,N.Tv,Ke.VQ,i.Jx,function(e){var t=e.children;return(0,c.jsx)(L.y_,{children:(0,c.jsx)(O.e,{children:(0,c.jsx)(I,{children:t})})})}]);function Dt(e){var t=e.children;return(0,c.jsx)(Ft,{children:t})}var Mt=n(7172);function zt(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)(Mt.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(ut.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(ut.bq,{error:t})})]})})})}const Bt={mainWrapper:"mainWrapper_NcQk"};function Ut(e){var t=e.children,n=e.noFooter,r=e.wrapperClassName,l=e.title,s=e.description;return(0,c.jsxs)(Dt,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(b,{}),(0,c.jsx)(j,{}),(0,c.jsx)(bt,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.layout.main.container,h.G.wrapper.main,Bt.mainWrapper,r),children:(0,c.jsx)(o.A,{fallback:function(e){return(0,c.jsx)(zt,Object.assign({},e))},children:t})}),!n&&(0,c.jsx)(It,{})]})}},7841:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(429),a=(n(63),n(1598)),o=n(1969),i=n(9778),l=n(6239),s=n(4263),u=n(199),c=["imageClassName","titleClassName"];function d(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,u.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,u.jsx)("div",{className:r,children:i}):i}function f(e){var t,n=(0,i.A)().siteConfig.title,s=(0,l.p)().navbar,f=s.title,p=s.logo,m=e.imageClassName,g=e.titleClassName,h=(0,r.A)(e,c),y=(0,o.Ay)((null==p?void 0:p.href)||"/"),b=f?"":n,v=null!=(t=null==p?void 0:p.alt)?t:b;return(0,u.jsxs)(a.A,Object.assign({to:y},h,(null==p?void 0:p.target)&&{target:p.target},{children:[p&&(0,u.jsx)(d,{logo:p,alt:v,imageClassName:m}),null!=f&&(0,u.jsx)("b",{className:g,children:f})]}))}},2463:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});n(63);var r=n(4420),a=n(199);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},4263:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(429),a=n(63),o=n(8573),i=n(5287),l=n(272);const s={themedComponent:"themedComponent_EfZ_","themedComponent--light":"themedComponent--light_EnZ3","themedComponent--dark":"themedComponent--dark_UTRq"};var u=n(199);function c(e){var t=e.className,n=e.children,r=(0,i.A)(),c=(0,l.G)().colorMode;return(0,u.jsx)(u.Fragment,{children:(r?"dark"===c?["dark"]:["light"]:["light","dark"]).map(function(e){var r=n({theme:e,className:(0,o.A)(t,s.themedComponent,s["themedComponent--"+e])});return(0,u.jsx)(a.Fragment,{children:r},e)})})}var d=["sources","className","alt"];function f(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,d);return(0,u.jsx)(c,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,u.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}},3995:(e,t,n)=>{"use strict";n.d(t,{N:()=>b,u:()=>d});var r=n(429),a=n(63),o=n(3493),i=n(8160),l=n(199),s=["collapsed"],u=["lazy"],c="ease-in-out";function d(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)(function(){o(function(e){return!e})},[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var f={display:"none",overflow:"hidden",height:"0px"},p={display:"block",overflow:"visible",height:"auto"};function m(e,t){var n=t?f:p;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function g(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)(function(){var e,a=t.current;function l(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,i.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:c),height:n+"px"}}function s(){var e=l();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return m(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame(function(){n?(s(),requestAnimationFrame(function(){a.style.height=f.height,a.style.overflow=f.overflow})):(a.style.display="block",requestAnimationFrame(function(){s()}))}),function(){return cancelAnimationFrame(e)}},[t,n,r])}function h(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,u=e.className,c=(0,a.useRef)(null);return g({collapsibleRef:c,collapsed:r,animation:i}),(0,l.jsx)(n,{ref:c,onTransitionEnd:function(e){"height"===e.propertyName&&(m(c.current,r),null==s||s(r))},className:u,children:o})}function y(e){var t=e.collapsed,n=(0,r.A)(e,s),i=(0,a.useState)(!t),u=i[0],c=i[1],d=(0,a.useState)(t),f=d[0],p=d[1];return(0,o.A)(function(){t||c(!0)},[t]),(0,o.A)(function(){u&&p(t)},[u,t]),u?(0,l.jsx)(h,Object.assign({},n,{collapsed:f})):null}function b(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?y:h;return(0,l.jsx)(a,Object.assign({},n))}},2584:(e,t,n)=>{"use strict";n.d(t,{M:()=>g,o:()=>m});var r=n(63),a=n(5287),o=n(7339),i=n(7597),l=n(6239),s=n(199),u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===u.get()},f=function(e){return u.set(String(e))},p=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,l.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)(function(){return!!t&&d()}),o=n[0],i=n[1];(0,r.useEffect)(function(){i(d())},[]);var s=(0,r.useCallback)(function(){f(!0),i(!0)},[]);return(0,r.useEffect)(function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&f(!1),!r&&d()||i(!1)}},[e]),(0,r.useMemo)(function(){return{isActive:!!e&&!o,close:s}},[e,o,s])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},272:(e,t,n)=>{"use strict";n.d(t,{G:()=>k,a:()=>w});var r=n(63),a=n(5287),o=n(7597),i=n(7339),l=n(6239),s=n(199);function u(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function c(e){return t="(prefers-color-scheme: dark)",n=function(){return e(u())},(r=window.matchMedia(t)).addEventListener("change",n),function(){return r.removeEventListener("change",n)};var t,n,r}var d=r.createContext(void 0),f=(0,i.Wf)("theme"),p="system",m=function(e){return"dark"===e?"dark":"light"},g=function(e){return null===e||e===p?null:m(e)},h={get:function(){return m(document.documentElement.getAttribute("data-theme"))},set:function(e){document.documentElement.setAttribute("data-theme",m(e))}},y={get:function(){return g(document.documentElement.getAttribute("data-theme-choice"))},set:function(e){var t;document.documentElement.setAttribute("data-theme-choice",null!=(t=g(e))?t:p)}},b=function(e){null===e?f.del():f.set(m(e))};function v(){var e=(0,l.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=function(){var e=(0,l.p)().colorMode.defaultMode,t=(0,a.A)(),n=(0,r.useState)(t?h.get():e),o=n[0],i=n[1],s=(0,r.useState)(t?y.get():null),u=s[0],c=s[1];return(0,r.useEffect)(function(){i(h.get()),c(y.get())},[]),{colorMode:o,setColorModeState:i,colorModeChoice:u,setColorModeChoiceState:c}}(),s=i.colorMode,d=i.setColorModeState,p=i.colorModeChoice,m=i.setColorModeChoiceState;(0,r.useEffect)(function(){n&&f.del()},[n]);var v=(0,r.useCallback)(function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;if(null===e){var i=o?u():t;h.set(i),d(i),y.set(null),m(null)}else h.set(e),y.set(e),d(e),m(e);a&&b(e)},[d,m,o,t]);return(0,r.useEffect)(function(){return f.listen(function(e){v(g(e.newValue))})},[v]),(0,r.useEffect)(function(){if(null===p&&o)return c(function(e){d(e),h.set(e)})},[o,p,d]),(0,r.useMemo)(function(){return{colorMode:s,colorModeChoice:p,setColorMode:v,get isDarkTheme(){return"dark"===s},setLightTheme:function(){v("light")},setDarkTheme:function(){v("dark")}}},[s,p,v])}function w(e){var t=e.children,n=v();return(0,s.jsx)(d.Provider,{value:n,children:t})}function k(){var e=(0,r.useContext)(d);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},844:(e,t,n)=>{"use strict";n.d(t,{M:()=>m,e:()=>p});var r=n(63),a=n(4805),o=n(1070),i=n(203),l=n(6239),s=n(7597),u=n(199),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,l.p)().navbar.items.length&&!e.component),n=(0,o.l)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],c=s[1],d=(0,r.useCallback)(function(){c(function(e){return!e})},[]);return(0,r.useEffect)(function(){"desktop"===n&&c(!1)},[n]),(0,r.useMemo)(function(){return{disabled:t,shouldRender:i,toggle:d,shown:u}},[t,i,d,u])}function f(e){var t=e.handler;return(0,i.$Z)(t),null}function p(e){var t=e.children,n=d();return(0,u.jsxs)(u.Fragment,{children:[n.shown&&(0,u.jsx)(f,{handler:function(){return n.toggle(),!1}}),(0,u.jsx)(c.Provider,{value:n,children:t})]})}function m(){var e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},4805:(e,t,n)=>{"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(63),a=n(7597),o=n(199),i=r.createContext(null);function l(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var l=o[1],s=(0,a.Be)(n);return(0,r.useEffect)(function(){l({component:t,props:s})},[l,t,s]),(0,r.useEffect)(function(){return function(){return l({component:null,props:null})}},[l]),null}},1070:(e,t,n)=>{"use strict";n.d(t,{l:()=>l});var r=n(63),a=n(1785),o={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function l(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?i:t,l=(0,r.useState)(function(){return"ssr"}),s=l[0],u=l[1];return(0,r.useEffect)(function(){function e(){u(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o.desktop:o.mobile}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n]),s}},568:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},announcementBar:{container:"theme-announcement-bar"},tabs:{container:"theme-tabs-container"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e},docCard:{container:"theme-doc-card-container",heading:"theme-doc-card-heading",icon:"theme-doc-card-icon",title:"theme-doc-card-title",description:"theme-doc-card-description"}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},8160:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},9499:(e,t,n)=>{"use strict";n.d(t,{v:()=>o});var r=n(6239);const a={anchorTargetStickyNavbar:"anchorTargetStickyNavbar_zGuS",anchorTargetHideOnScrollNavbar:"anchorTargetHideOnScrollNavbar_K8Of"};function o(e){var t=(0,r.p)().navbar.hideOnScroll;if(void 0!==e)return t?a.anchorTargetHideOnScrollNavbar:a.anchorTargetStickyNavbar}},8007:(e,t,n)=>{"use strict";n.d(t,{bq:()=>d,MN:()=>c,a2:()=>u,k2:()=>f});var r=n(6189),a=n(63),o=n(5819),i=n(664);const l={errorBoundaryError:"errorBoundaryError_M0dS",errorBoundaryFallback:"errorBoundaryFallback_ZUBw"};var s=n(199);function u(e){return(0,s.jsx)("button",Object.assign({type:"button"},e,{children:(0,s.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function c(e){var t=e.error,n=e.tryAgain;return(0,s.jsxs)("div",{className:l.errorBoundaryFallback,children:[(0,s.jsx)("p",{children:t.message}),(0,s.jsx)(u,{onClick:n})]})}function d(e){var t=e.error,n=(0,i.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,s.jsx)("p",{className:l.errorBoundaryError,children:n})}var f=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},203:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>l,Hl:()=>s,jy:()=>u});var r=n(6763),a=n(63),o=n(1071),i=n(7597);function l(e){!function(e){var t=(0,o.W6)(),n=(0,i._q)(e);(0,a.useEffect)(function(){return t.block(function(e,t){return n(e,t)})},[t,n])}(function(t,n){if("POP"===n)return e(t,n)})}function s(e){var t=(0,o.W6)();return(0,a.useSyncExternalStore)(t.listen,function(){return e(t)},function(){return e(Object.assign({},t,{location:Object.assign({},t.location,{search:"",hash:"",state:void 0})}))})}function u(e,t){var n=function(e,t){for(var n,a=new URLSearchParams,o=(0,r.A)(e);!(n=o()).done;)for(var i,l=n.value,s=(0,r.A)(l.entries());!(i=s()).done;){var u=i.value,c=u[0],d=u[1];"append"===t?a.append(c,d):a.set(c,d)}return a}(e.map(function(e){return new URLSearchParams(null!=e?e:"")}),t),a=n.toString();return a?"?"+a:a}},4315:(e,t,n)=>{"use strict";n.d(t,{Jx:()=>y,be:()=>m,e3:()=>h});var r=n(63),a=n(8573),o=n(4420),i=n(7595),l=n(1969),s=n(952),u=n(199);function c(e){var t=e.title,n=(0,s.s$)().format(t);return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("title",{children:n}),(0,u.jsx)("meta",{property:"og:title",content:n})]})}function d(e){var t=e.description;return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{name:"description",content:t}),(0,u.jsx)("meta",{property:"og:description",content:t})]})}function f(e){var t=e.image,n=(0,(0,l.hH)().withBaseUrl)(t,{absolute:!0});return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{property:"og:image",content:n}),(0,u.jsx)("meta",{name:"twitter:image",content:n})]})}function p(e){var t=e.keywords;return(0,u.jsx)(o.A,{children:(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(t)?t.join(","):t})})}function m(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children;return(0,u.jsxs)(u.Fragment,{children:[t&&(0,u.jsx)(c,{title:t}),n&&(0,u.jsx)(d,{description:n}),r&&(0,u.jsx)(p,{keywords:r}),a&&(0,u.jsx)(f,{image:a}),i&&(0,u.jsx)(o.A,{children:i})]})}var g=r.createContext(void 0);function h(e){var t=e.className,n=e.children,i=r.useContext(g),l=(0,a.A)(i,t);return(0,u.jsxs)(g.Provider,{value:l,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:l})}),n]})}function y(e){var t=e.children,n=(0,i.A)(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(h,{className:(0,a.A)(r,o),children:t})}},7597:(e,t,n)=>{"use strict";n.d(t,{Be:()=>f,ZC:()=>c,_q:()=>u,dV:()=>d,fM:()=>p});var r=n(360),a=n(6189),o=n(9715),i=n(63),l=n(3493),s=n(199);function u(e){var t=(0,i.useRef)(e);return(0,l.A)(function(){t.current=e},[e]),(0,i.useCallback)(function(){return t.current.apply(t,arguments)},[])}function c(e){var t=(0,i.useRef)(void 0);return(0,l.A)(function(){t.current=e}),t.current}var d=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}((0,o.A)(Error));function f(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0].localeCompare(t[0])}),(0,i.useMemo)(function(){return e},t.flat())}function p(e){return function(t){var n=t.children;return(0,s.jsx)(s.Fragment,{children:e.reduceRight(function(e,t){return(0,s.jsx)(t,{children:e})},n)})}}},7322:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(63),a=n(3921),o=n(9778);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)(function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap(function(e){var t;return null!=(t=e.routes)?t:[]}))}(e.routes)}({routes:a.A,baseUrl:e})},[e])}},5527:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,gk:()=>p});var r=n(63),a=n(1785),o=n(5287),i=(n(3493),n(7597)),l=n(199);var s=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)(function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}},[]));return(0,l.jsx)(s.Provider,{value:a,children:n})}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}var d=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)(function(){var e=function(){if(n.current){var e=d();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}},[o,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&a{"use strict";n.d(t,{Wf:()=>u});n(63);var r=n(4180),a=r.N;function o(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}var l=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+r.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var a=i(null==t?void 0:t.persistence);return null===a?s:{get:function(){try{return a.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=a.getItem(n);a.setItem(n,e),o({key:n,oldValue:t,newValue:e,storage:a})}catch(r){console.error("Docusaurus storage error, can't set "+n+"="+e,r)}},del:function(){try{var e=a.getItem(n);a.removeItem(n),o({key:n,oldValue:e,newValue:null,storage:a})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===a&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(r){return console.error("Docusaurus storage error, can't listen for changes of key="+n,r),function(){}}}}}},952:(e,t,n)=>{"use strict";n.d(t,{AL:()=>c,s$:()=>d});var r=n(63),a=n(9778),o=n(7595),i=n(7597),l=n(199),s=function(e){var t=e.title,n=e.siteTitle,r=e.titleDelimiter,a=null==t?void 0:t.trim();return a&&a!==n?a+" "+r+" "+n:n},u=(0,r.createContext)(null);function c(e){var t=e.formatter,n=e.children;return(0,l.jsx)(u.Provider,{value:t,children:n})}function d(){var e=function(){var e=(0,r.useContext)(u);if(null===e)throw new i.dV("TitleFormatterProvider");return e}(),t=(0,a.A)().siteConfig,n=t.title,l=t.titleDelimiter,c=(0,o.A)().plugin;return{format:function(t){return e({title:t,siteTitle:n,titleDelimiter:l,plugin:c,defaultFormatter:s})}}}},8764:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(9778),a=n(1071),o=n(664);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.trailingSlash,l=e.i18n.localeConfigs,s=(0,a.zy)().pathname,u=(0,o.Ks)(s,{trailingSlash:i,baseUrl:n}).replace(n,"");return{createUrl:function(e){var t=e.locale,n=e.fullyQualified,r=function(e){var t=l[e];if(!t)throw new Error("Unexpected Docusaurus bug, no locale config found for locale="+e);return t}(t);return""+(""+(n?r.url:""))+r.baseUrl+u}}}},9825:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(63),a=n(1071),o=n(7597);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)(function(){n&&t!==n&&i({location:t,previousLocation:n})},[i,t,n])}},6239:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(9778);function a(){return(0,r.A)().siteConfig.themeConfig}},9835:(e,t,n)=>{"use strict";n.d(t,{dV:()=>i});var r=n(360),a=n(6189),o=n(9715);n(63),n(3493),n(199);var i=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}((0,o.A)(Error))},3799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],l="/"===i||i===r?i:(s=i,u=n,u?a(s):o(s));var s,u;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(4486);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},9949:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},664:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;var r=n(6453);var a=n(3799);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(4486);var i=n(9949);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},4486:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},3921:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(63);var r=n(2613),a=n.n(r),o=n(4054);const i={"009f1e98":[function(){return n.e(7715).then(n.bind(n,1823))},"@site/docs/getting-started/configuration.md",1823],"0510ba17":[function(){return n.e(3334).then(n.bind(n,8626))},"@site/docs/reference/admin/users.md",8626],"09c1314d":[function(){return n.e(6590).then(n.bind(n,2959))},"@site/docs/reference/admin/lexicons.md",2959],"0a7e20de":[function(){return n.e(5309).then(n.bind(n,2969))},"@site/docs/reference/lua/json-api.md",2969],"0eda1588":[function(){return n.e(9329).then(n.bind(n,7045))},"@site/docs/reference/admin/stats.md",7045],"111eee19":[function(){return n.e(8779).then(n.bind(n,513))},"@site/docs/reference/troubleshooting.md",513],"121e86a6":[function(){return n.e(5011).then(n.bind(n,4138))},"@site/docs/reference/scripts/get-record.md",4138],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,4822))},"@theme/DocItem",4822],"224113b7":[function(){return n.e(2863).then(n.bind(n,3172))},"@site/docs/guides/permissions.md",3172],"22dd74f7":[function(){return n.e(1567).then(n.t.bind(n,5226,19))},"@generated/docusaurus-plugin-content-docs/default/p/index-466.json",5226],"23374ca6":[function(){return n.e(2278).then(n.bind(n,4447))},"@site/docs/README.md",4447],"280f48ec":[function(){return n.e(787).then(n.bind(n,9344))},"@site/docs/reference/scripts/sidecar-records.md",9344],"2a23be56":[function(){return n.e(339).then(n.bind(n,9493))},"@site/docs/guides/sqlite-to-postgres-migration.md",9493],"2ce38126":[function(){return n.e(9715).then(n.bind(n,5037))},"@site/docs/reference/admin/api-keys.md",5037],"2d1b556d":[function(){return n.e(1952).then(n.bind(n,861))},"@site/docs/reference/scripts/algolia-sync.md",861],"2df7fd65":[function(){return n.e(1977).then(n.bind(n,8941))},"@site/docs/guides/event-logs.md",8941],"32955cd4":[function(){return n.e(9630).then(n.bind(n,5624))},"@site/docs/reference/lua/atproto-api.md",5624],"33ec3d65":[function(){return n.e(6803).then(n.bind(n,9275))},"@site/docs/reference/architecture.md",9275],"35de558a":[function(){return n.e(9281).then(n.bind(n,320))},"@site/docs/reference/admin/script-variables.md",320],"3d80a749":[function(){return n.e(5219).then(n.bind(n,5975))},"@site/docs/reference/changelog.md",5975],"43880f7a":[function(){return n.e(4209).then(n.bind(n,2183))},"@site/docs/reference/scripts/create-record.md",2183],49330316:[function(){return n.e(6922).then(n.bind(n,7715))},"@site/docs/reference/admin/labelers.md",7715],"4a041602":[function(){return n.e(2605).then(n.bind(n,6776))},"@site/docs/sdk/oauth-client.md",6776],"5084391c":[function(){return n.e(4348).then(n.bind(n,693))},"@site/docs/reference/lua/record-api.md",693],"539fb2af":[function(){return n.e(5563).then(n.bind(n,7629))},"@site/docs/getting-started/dashboard.md",7629],"5b2964ea":[function(){return n.e(2001).then(n.bind(n,1799))},"@site/docs/reference/admin/plugins.md",1799],"5d3a5990":[function(){return n.e(3197).then(n.bind(n,6425))},"@site/docs/reference/scripts/expanded-query.md",6425],"5e95c892":[function(){return n.e(9647).then(n.bind(n,201))},"@theme/DocsRoot",201],"5fd2dbdb":[function(){return n.e(4440).then(n.bind(n,1597))},"@site/docs/tutorials/statusphere.md",1597],"6acefe75":[function(){return n.e(6495).then(n.bind(n,6510))},"@site/docs/reference/scripts/update-or-delete.md",6510],"713f9d9e":[function(){return n.e(6277).then(n.bind(n,1266))},"@site/docs/reference/lua/http-api.md",1266],"7680ac5f":[function(){return n.e(3961).then(n.bind(n,184))},"@site/docs/reference/admin/events.md",184],"774696b9":[function(){return n.e(8865).then(n.bind(n,1315))},"@site/docs/guides/index-hooks.md",1315],"80ccde35":[function(){return n.e(3164).then(n.bind(n,168))},"@site/docs/sdk/lex-agent.md",168],"846656e5":[function(){return n.e(9492).then(n.bind(n,7070))},"@site/docs/reference/glossary.md",7070],"8468a657":[function(){return n.e(9556).then(n.bind(n,1692))},"@site/docs/reference/admin/backfill.md",1692],"85480c2f":[function(){return n.e(6737).then(n.bind(n,68))},"@site/docs/guides/developing-plugins.md",68],"89877b86":[function(){return n.e(7520).then(n.bind(n,724))},"@site/docs/getting-started/deployment/docker.md",724],"89d775e6":[function(){return n.e(8856).then(n.bind(n,4554))},"@site/docs/reference/admin/settings.md",4554],"8eefb1eb":[function(){return n.e(2009).then(n.bind(n,6273))},"@site/docs/reference/lua/utility-globals.md",6273],"919abb94":[function(){return n.e(20).then(n.bind(n,6616))},"@site/docs/reference/scripts/upsert-record.md",6616],"920ba7ef":[function(){return n.e(5953).then(n.bind(n,8839))},"@site/docs/guides/scripting.md",8839],"9985d6d5":[function(){return n.e(203).then(n.bind(n,6663))},"@site/docs/getting-started/deployment/railway.md",6663],a4086a70:[function(){return n.e(7194).then(n.bind(n,9760))},"@site/docs/reference/scripts/batch-save.md",9760],a42f7e02:[function(){return n.e(5594).then(n.bind(n,5415))},"@site/docs/reference/admin/api-clients.md",5415],a51dfc20:[function(){return n.e(8897).then(n.bind(n,5027))},"@site/docs/reference/xrpc-api.md",5027],a77ba7fa:[function(){return n.e(6087).then(n.bind(n,5331))},"@site/docs/getting-started/authentication.md",5331],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,1924))},"@theme/DocVersionRoot",1924],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,9065))},"@theme/DocRoot",9065],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,7093,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b27c7406:[function(){return n.e(2618).then(n.bind(n,4212))},"@site/docs/getting-started/deployment/other.md",4212],bb350c59:[function(){return n.e(7658).then(n.bind(n,8411))},"@site/docs/guides/plugins.md",8411],bccc5e9b:[function(){return n.e(2431).then(n.bind(n,4969))},"@site/docs/guides/backfill.md",4969],bde15bec:[function(){return n.e(6438).then(n.bind(n,7938))},"@site/docs/reference/scripts/complex-mutations.md",7938],c1dc14fc:[function(){return n.e(8030).then(n.bind(n,6322))},"@site/docs/sdk/oauth-client-browser.md",6322],c6f1ff95:[function(){return n.e(8649).then(n.bind(n,7667))},"@site/docs/reference/lua/standard-libraries.md",7667],c985d368:[function(){return n.e(2007).then(n.bind(n,4799))},"@site/docs/reference/scripts/cascading-delete.md",4799],cdc0cfc2:[function(){return n.e(5003).then(n.bind(n,9638))},"@site/docs/reference/admin/domains.md",9638],d1a0112a:[function(){return n.e(5080).then(n.bind(n,7538))},"@site/docs/guides/postgres-to-sqlite-migration.md",7538],d26b9010:[function(){return n.e(9301).then(n.bind(n,927))},"@site/docs/guides/api-keys.md",927],d2e94323:[function(){return n.e(3993).then(n.bind(n,4015))},"@site/docs/guides/lexicons.md",4015],d81f4320:[function(){return n.e(9819).then(n.bind(n,3617))},"@site/docs/sdk/overview.md",3617],e7f37855:[function(){return n.e(9097).then(n.bind(n,7914))},"@site/docs/reference/scripts/meilisearch-sync.md",7914],e8644baa:[function(){return n.e(9178).then(n.bind(n,7678))},"@site/docs/reference/scripts/paginated-list.md",7678],e93ec707:[function(){return n.e(5620).then(n.bind(n,4377))},"@site/docs/guides/labelers.md",4377],ec125a10:[function(){return n.e(9659).then(n.bind(n,5824))},"@site/docs/reference/admin-api.md",5824],f142c65c:[function(){return n.e(9957).then(n.bind(n,7294))},"@site/docs/reference/scripts/list-or-fetch.md",7294],f2031820:[function(){return n.e(9697).then(n.bind(n,3635))},"@site/docs/guides/database-setup.md",3635],f839662b:[function(){return n.e(7177).then(n.bind(n,4711))},"@site/docs/reference/lua/database-api.md",4711],fac68122:[function(){return n.e(5986).then(n.bind(n,5385))},"@site/docs/reference/production-deployment.md",5385],fbd7a87c:[function(){return n.e(1361).then(n.bind(n,6723))},"@site/docs/getting-started/quickstart.md",6723]};var l=n(199);function s(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6433),c=n(2342);function d(e,t){if("*"===e)return a()({loading:s,loader:function(){return n.e(2725).then(n.bind(n,2725))},modules:["@theme/NotFound"],webpack:function(){return[2725]},render:function(e,t){var n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach(function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))}),a().Map({loading:s,loader:d,modules:f,webpack:function(){return p},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach(function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter(function(e){return"default"!==e}).forEach(function(e){o[e]=r[e]});var i=a,l=n.split(".");l.slice(0,-1).forEach(function(e){i=i[e]}),i[l[l.length-1]]=o});var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var s=a.__props;return delete a.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,Object.assign({},a,s,n))})}})}const f=[{path:"/",component:d("/","67a"),routes:[{path:"/",component:d("/","804"),routes:[{path:"/",component:d("/","4dc"),routes:[{path:"/getting-started/authentication",component:d("/getting-started/authentication","fd3"),exact:!0,sidebar:"docs"},{path:"/getting-started/configuration",component:d("/getting-started/configuration","641"),exact:!0,sidebar:"docs"},{path:"/getting-started/dashboard",component:d("/getting-started/dashboard","889"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/docker",component:d("/getting-started/deployment/docker","d4f"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/other",component:d("/getting-started/deployment/other","a50"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/railway",component:d("/getting-started/deployment/railway","d15"),exact:!0,sidebar:"docs"},{path:"/getting-started/quickstart",component:d("/getting-started/quickstart","c60"),exact:!0,sidebar:"docs"},{path:"/guides/api-keys",component:d("/guides/api-keys","f7a"),exact:!0,sidebar:"docs"},{path:"/guides/backfill",component:d("/guides/backfill","8e9"),exact:!0,sidebar:"docs"},{path:"/guides/database-setup",component:d("/guides/database-setup","7ff"),exact:!0,sidebar:"docs"},{path:"/guides/developing-plugins",component:d("/guides/developing-plugins","2ce"),exact:!0,sidebar:"docs"},{path:"/guides/event-logs",component:d("/guides/event-logs","a81"),exact:!0,sidebar:"docs"},{path:"/guides/index-hooks",component:d("/guides/index-hooks","755"),exact:!0,sidebar:"docs"},{path:"/guides/labelers",component:d("/guides/labelers","60e"),exact:!0,sidebar:"docs"},{path:"/guides/lexicons",component:d("/guides/lexicons","f9a"),exact:!0,sidebar:"docs"},{path:"/guides/permissions",component:d("/guides/permissions","755"),exact:!0,sidebar:"docs"},{path:"/guides/plugins",component:d("/guides/plugins","704"),exact:!0,sidebar:"docs"},{path:"/guides/postgres-to-sqlite-migration",component:d("/guides/postgres-to-sqlite-migration","6c0"),exact:!0,sidebar:"docs"},{path:"/guides/scripting",component:d("/guides/scripting","259"),exact:!0,sidebar:"docs"},{path:"/guides/sqlite-to-postgres-migration",component:d("/guides/sqlite-to-postgres-migration","d0d"),exact:!0,sidebar:"docs"},{path:"/reference/admin-api",component:d("/reference/admin-api","cec"),exact:!0,sidebar:"docs"},{path:"/reference/admin/api-clients",component:d("/reference/admin/api-clients","7f1"),exact:!0,sidebar:"docs"},{path:"/reference/admin/api-keys",component:d("/reference/admin/api-keys","909"),exact:!0,sidebar:"docs"},{path:"/reference/admin/backfill",component:d("/reference/admin/backfill","500"),exact:!0,sidebar:"docs"},{path:"/reference/admin/domains",component:d("/reference/admin/domains","5f3"),exact:!0,sidebar:"docs"},{path:"/reference/admin/events",component:d("/reference/admin/events","768"),exact:!0,sidebar:"docs"},{path:"/reference/admin/labelers",component:d("/reference/admin/labelers","956"),exact:!0,sidebar:"docs"},{path:"/reference/admin/lexicons",component:d("/reference/admin/lexicons","9e3"),exact:!0,sidebar:"docs"},{path:"/reference/admin/plugins",component:d("/reference/admin/plugins","d30"),exact:!0,sidebar:"docs"},{path:"/reference/admin/script-variables",component:d("/reference/admin/script-variables","578"),exact:!0,sidebar:"docs"},{path:"/reference/admin/settings",component:d("/reference/admin/settings","14f"),exact:!0,sidebar:"docs"},{path:"/reference/admin/stats",component:d("/reference/admin/stats","ee4"),exact:!0,sidebar:"docs"},{path:"/reference/admin/users",component:d("/reference/admin/users","ae5"),exact:!0,sidebar:"docs"},{path:"/reference/architecture",component:d("/reference/architecture","5c9"),exact:!0,sidebar:"docs"},{path:"/reference/changelog",component:d("/reference/changelog","03b"),exact:!0},{path:"/reference/glossary",component:d("/reference/glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/reference/lua/atproto-api",component:d("/reference/lua/atproto-api","b9d"),exact:!0,sidebar:"docs"},{path:"/reference/lua/database-api",component:d("/reference/lua/database-api","5b8"),exact:!0,sidebar:"docs"},{path:"/reference/lua/http-api",component:d("/reference/lua/http-api","014"),exact:!0,sidebar:"docs"},{path:"/reference/lua/json-api",component:d("/reference/lua/json-api","86e"),exact:!0,sidebar:"docs"},{path:"/reference/lua/record-api",component:d("/reference/lua/record-api","09b"),exact:!0,sidebar:"docs"},{path:"/reference/lua/standard-libraries",component:d("/reference/lua/standard-libraries","3bd"),exact:!0,sidebar:"docs"},{path:"/reference/lua/utility-globals",component:d("/reference/lua/utility-globals","a2b"),exact:!0,sidebar:"docs"},{path:"/reference/production-deployment",component:d("/reference/production-deployment","935"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/algolia-sync",component:d("/reference/scripts/algolia-sync","ae9"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/batch-save",component:d("/reference/scripts/batch-save","e3f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/cascading-delete",component:d("/reference/scripts/cascading-delete","2dc"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/complex-mutations",component:d("/reference/scripts/complex-mutations","a45"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/create-record",component:d("/reference/scripts/create-record","d2f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/expanded-query",component:d("/reference/scripts/expanded-query","7c6"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/get-record",component:d("/reference/scripts/get-record","5c8"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/list-or-fetch",component:d("/reference/scripts/list-or-fetch","62b"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/meilisearch-sync",component:d("/reference/scripts/meilisearch-sync","c95"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/paginated-list",component:d("/reference/scripts/paginated-list","917"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/sidecar-records",component:d("/reference/scripts/sidecar-records","b55"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/update-or-delete",component:d("/reference/scripts/update-or-delete","d03"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/upsert-record",component:d("/reference/scripts/upsert-record","279"),exact:!0,sidebar:"docs"},{path:"/reference/troubleshooting",component:d("/reference/troubleshooting","af4"),exact:!0,sidebar:"docs"},{path:"/reference/xrpc-api",component:d("/reference/xrpc-api","a2e"),exact:!0,sidebar:"docs"},{path:"/sdk/lex-agent",component:d("/sdk/lex-agent","55f"),exact:!0,sidebar:"docs"},{path:"/sdk/oauth-client",component:d("/sdk/oauth-client","ef0"),exact:!0,sidebar:"docs"},{path:"/sdk/oauth-client-browser",component:d("/sdk/oauth-client-browser","fe2"),exact:!0,sidebar:"docs"},{path:"/sdk/overview",component:d("/sdk/overview","6ed"),exact:!0,sidebar:"docs"},{path:"/tutorials/statusphere",component:d("/tutorials/statusphere","187"),exact:!0,sidebar:"docs"},{path:"/",component:d("/","280"),exact:!0,sidebar:"docs"}]}]}]},{path:"*",component:d("*")}]},9243:(e,t,n)=>{"use strict";n.d(t,{zR:()=>w,TM:()=>A,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(2010);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(4748);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(6232),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||a}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var a=p(n);a&&a!==m&&e(t,a,r)}var i=c(n);d&&(i=i.concat(d(n)));for(var l=s(t),g=s(n),h=0;h{"use strict";e.exports=function(e,t,n,r,a,o,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,o,i,l],c=0;(s=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},5457:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},8723:(e,t,n)=>{"use strict";n.r(t)},5535:function(e,t,n){var r,a;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
    '};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},c)},c)):setTimeout(t,c)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5950:(e,t,n)=>{var r=n(5457);e.exports=g,e.exports.parse=o,e.exports.compile=function(e,t){return u(o(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=m;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,l=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var c=n[0],f=n[1],p=n.index;if(s+=e.slice(l,p),l=p+c.length,f)s+=f[1];else{var m=e[l],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,S="?"===v||"*"===v,E=g||u,_=y||b,A=g||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:h||o++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?d(_):w?".*":i(E,A)})}}return l-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function l(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e,t){for(var n=new Array(e.length),a=0;a{Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},3931:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},4877:(e,t,n)=>{"use strict";var r=n(5870);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},2497:(e,t,n)=>{e.exports=n(4877)()},5870:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9115:(e,t,n)=>{"use strict";var r=n(5215),a=n(63),o=n(7453);function i(e){var t="https://react.dev/errors/"+e;if(1M||(e.current=D[M],D[M]=null,M--)}function U(e,t){M++,D[M]=e.current,e.current=t}var $,H,V=z(null),q=z(null),W=z(null),G=z(null);function Q(e,t){switch(U(W,t),U(q,e),U(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(V),U(V,e)}function K(){B(V),B(q),B(W)}function Y(e){null!==e.memoizedState&&U(G,e);var t=V.current,n=bd(t,e.type);t!==n&&(U(q,e),U(V,n))}function Z(e){q.current===e&&(B(V),B(q)),G.current===e&&(B(G),df._currentValue=F)}function X(e){if(void 0===$)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",H=-1)":-1--a||s[r]!==u[a]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=r&&0<=a);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ie=r.unstable_shouldYield,le=r.unstable_requestPaint,se=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,fe=r.unstable_NormalPriority,pe=r.unstable_LowPriority,me=r.unstable_IdlePriority,ge=r.log,he=r.unstable_setDisableYieldValue,ye=null,be=null;function ve(e){if("function"==typeof ge&&he(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ke(e)/xe|0)|0},ke=Math.log,xe=Math.LN2;var Se=256,Ee=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var l=134217727&r;return 0!==l?0!==(r=l&~o)?a=Ae(r):0!==(i&=l)?a=Ae(i):n||0!==(n=l&~e)&&(a=Ae(n)):0!==(l=r&~o)?a=Ae(l):0!==i?a=Ae(i):n||0!==(n=r&~e)&&(a=Ae(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&4194048&n)?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Ne(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pe(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),a=1<=An),jn=String.fromCharCode(32),On=!1;function Nn(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ln=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function In(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Fn(e,t,n,r){It?Ft?Ft.push(r):Ft=[r]:It=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,Mn=null;function zn(e){Kc(e,0)}function Bn(e){if(mt(Xe(e)))return e}function Un(e,t){if("change"===e)return t}var $n=!1;if(Ut){var Hn;if(Ut){var Vn="oninput"in document;if(!Vn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Vn="function"==typeof qn.oninput}Hn=Vn}else Hn=!1;$n=Hn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,lr=null,sr=null,ur=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==ir||ir!==gt(r)||("selectionStart"in(r=ir)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Jn(sr,r)||(sr=r,0<(r=rd(lr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},mr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return pr[e]=n[t];return e}Ut&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var hr=gr("animationend"),yr=gr("animationiteration"),br=gr("animationstart"),vr=gr("transitionrun"),wr=gr("transitionstart"),kr=gr("transitioncancel"),xr=gr("transitionend"),Sr=new Map,Er="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Sr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Cr=[],Tr=0,jr=0;function Or(){for(var e=Tr,t=jr=Tr=0;t>=i,a-=i,na=1<<32-we(t)+a|n<g?(h=d,d=null):h=d.sibling;var y=p(a,d,l[g],s);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(a,d),i=o(y,i,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===l.length)return n(a,d),da&&aa(a,g),u;if(null===d){for(;gh?(y=g,g=null):y=g.sibling;var v=p(a,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),l=o(v,l,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),da&&aa(a,h),c;if(null===g){for(;!b.done;h++,b=s.next())null!==(b=f(a,b.value,u))&&(l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return da&&aa(a,h),c}for(g=r(g);!b.done;h++,b=s.next())null!==(b=m(g,a,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach(function(e){return t(a,e)}),da&&aa(a,h),c}(s,u,c=v.call(c),d)}if("function"==typeof c.then)return b(s,u,uo(c),d);if(c.$$typeof===k)return b(s,u,La(s,c),d);fo(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(d=a(u,c)).return=s,s=d):(n(s,u),(d=Vr(c,s.mode,d)).return=s,s=d),l(s)):n(s,u)}return function(e,t,n,r){try{so=0;var a=b(e,t,n,r);return lo=null,a}catch(i){if(i===Za||i===Ja)throw i;var o=Mr(29,i,null,e.mode);return o.lanes=r,o.return=e,o}}}var mo=po(!0),go=po(!1),ho=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pu){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Ir(e),Rr(e,null,n),t}return Nr(e,r,t,n),Ir(e)}function ko(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function xo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Eo(){if(So){if(null!==Va)throw Va}}function _o(e,t,n,r){So=!1;var a=e.updateQueue;ho=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,u=s.next;s.next=null,null===i?o=u:i.next=u,i=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=u=s=null,l=o;;){var f=-536870913&l.lane,m=f!==l.lane;if(m?(hu&f)===f:(r&f)===f){0!==f&&f===Ha&&(So=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,h=l;f=t;var y=n;switch(h.tag){case 1:if("function"==typeof(g=h.payload)){d=g.call(y,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=h.payload)?g.call(y,d,f):g))break e;d=p({},d,f);break e;case 2:ho=!0}}null!==(f=l.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=a.callbacks)?a.callbacks=[f]:m.push(f))}else m={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=m,s=d):c=c.next=m,i|=f;if(null===(l=l.next)){if(null===(l=a.shared.pending))break;l=(m=l).next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null===o&&(a.shared.lanes=0),Eu|=i,e.lanes=i,e.memoizedState=d}}function Ao(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;eo?o:8;var i,l,s,u=R.T,c={};R.T=c,dl(e,!1,t,n);try{var d=a(),f=R.S;if(null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)cl(e,t,(i=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then(function(){s.status="fulfilled",s.value=i;for(var e=0;e<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(a,{is:r.is}):l.createElement(a)}}o[Ue]=t,o[$e]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch(fd(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ls(t)}}return fs(t),ss(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ls(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=W.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ua))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||ga(t,!0)}else(e=hd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fs(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ba(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));e[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(zo(t),t):(zo(t),null);if(128&t.flags)throw Error(i(558))}return fs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ba(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),a=!1}else a=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(zo(t),t):(zo(t),null)}return zo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cs(t,t.updateQueue),fs(t),null);case 4:return K(),null===e&&Jc(t.stateNode.containerInfo),fs(t),null;case 10:return Aa(t.type),fs(t),null;case 19:if(B(Bo),null===(r=t.memoizedState))return fs(t),null;if(a=!!(128&t.flags),null===(o=r.rendering))if(a)ds(r,!1);else{if(0!==Su||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Uo(e))){for(t.flags|=128,ds(r,!1),e=o.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Bo,1&Bo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&se()>Ru&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Uo(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),ds(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!da)return fs(t),null}else 2*se()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=se(),e.sibling=null,n=Bo.current,U(Bo,a?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fs(t),null);case 22:case 23:return zo(t),Po(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fs(t),6&t.subtreeFlags&&(t.flags|=8192)):fs(t),null!==(n=t.updateQueue)&&cs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ga),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(Ma),fs(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}function ms(e,t){switch(la(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Aa(Ma),K(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(zo(t),null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(zo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bo),null;case 4:return K(),null;case 10:return Aa(t.type),null;case 22:case 23:return zo(t),Po(),null!==e&&B(Ga),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Aa(Ma),null;default:return null}}function gs(e,t){switch(la(t),t.tag){case 3:Aa(Ma),K();break;case 26:case 27:case 5:Z(t);break;case 4:K();break;case 31:null!==t.memoizedState&&zo(t);break;case 13:zo(t);break;case 19:B(Bo);break;case 10:Aa(t.type);break;case 22:case 23:zo(t),Po(),null!==e&&B(Ga);break;case 24:Aa(Ma)}}function hs(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,i=n.inst;r=o(),i.destroy=r}n=n.next}while(n!==a)}}catch(l){Sc(t,t.return,l)}}function ys(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;var s=n,u=l;try{u()}catch(c){Sc(a,s,c)}}}r=r.next}while(r!==o)}}catch(c){Sc(t,t.return,c)}}function bs(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Co(t,n)}catch(r){Sc(e,e.return,r)}}}function vs(e,t,n){n.props=Sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Sc(e,t,r)}}function ws(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Sc(e,t,a)}}function ks(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Sc(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(o){Sc(e,t,o)}else n.current=null}function xs(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Sc(e,e.return,a)}}function Ss(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,l=null,s=null,u=null,c=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&null!=f)switch(m){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(m)||cd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=m||null!=f))switch(p){case"type":o=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":d=m;break;case"value":l=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(i(137,t));break;default:m!==f&&cd(e,t,p,m,r,f)}}return void bt(e,l,s,u,c,d,o,a);case"select":for(o in m=l=s=p=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":m=u;default:r.hasOwnProperty(o)||cd(e,t,o,null,r,u)}for(a in r)if(o=r[a],u=n[a],r.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":l=o;default:o!==u&&cd(e,t,a,o,r,u)}return t=s,n=l,r=m,void(null!=p?kt(e,!!n,p,!1):!!r!=!!n&&(null!=t?kt(e,!!n,t,!0):kt(e,!!n,n?[]:"",!1)));case"textarea":for(s in m=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:cd(e,t,s,null,r,a)}for(l in r)if(a=r[l],o=n[l],r.hasOwnProperty(l)&&(null!=a||null!=o))switch(l){case"value":p=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(i(91));break;default:a!==o&&cd(e,t,l,a,r,o)}return void xt(e,p,m);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else cd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(null!=p||null!=m))if("selected"===u)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else cd(e,t,u,p,r,m);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&cd(e,t,h,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:cd(e,t,c,p,r,m)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||void 0===p&&void 0===m||dd(e,t,d,p,r,m);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!r.hasOwnProperty(b)&&cd(e,t,b,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||null==p&&null==m||cd(e,t,f,p,r,m)}(r,e.type,n,t),r[$e]=t}catch(a){Sc(e,e.return,a)}}function Es(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _s(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Es(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function As(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Pt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(As(e,t,n),e=e.sibling;null!==e;)As(e,t,n),e=e.sibling}function Cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Cs(e,t,n),e=e.sibling;null!==e;)Cs(e,t,n),e=e.sibling}function Ts(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t,r,n),t[Ue]=e,t[$e]=n}catch(o){Sc(e,e.return,o)}}var js=!1,Os=!1,Ns=!1,Ps="function"==typeof WeakSet?WeakSet:Set,Ls=null;function Rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Qs(e,n),4&r&&hs(5,n);break;case 1:if(Qs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Sc(n,n.return,i)}else{var a=Sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Sc(n,n.return,l)}}64&r&&bs(n),512&r&&ws(n,n.return);break;case 3:if(Qs(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Co(e,t)}catch(i){Sc(n,n.return,i)}}break;case 27:null===t&&4&r&&Ts(n);case 26:case 5:Qs(e,n),null===t&&4&r&&xs(n),512&r&&ws(n,n.return);break;case 12:Qs(e,n);break;case 31:Qs(e,n),4&r&&Bs(e,n);break;case 13:Qs(e,n),4&r&&Us(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Cc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||js)){t=null!==t&&null!==t.memoizedState||Os,a=js;var o=Os;js=r,(Os=t)&&!o?Ys(e,n,!!(8772&n.subtreeFlags)):Qs(e,n),js=a,Os=o}break;case 30:break;default:Qs(e,n)}}function Is(e){var t=e.alternate;null!==t&&(e.alternate=null,Is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ke(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fs=null,Ds=!1;function Ms(e,t,n){for(n=n.child;null!==n;)zs(e,t,n),n=n.sibling}function zs(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:Os||ks(n,t),Ms(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Os||ks(n,t);var r=Fs,a=Ds;Ad(n.type)&&(Fs=n.stateNode,Ds=!1),Ms(e,t,n),Md(n.stateNode),Fs=r,Ds=a;break;case 5:Os||ks(n,t);case 6:if(r=Fs,a=Ds,Fs=null,Ms(e,t,n),Ds=a,null!==(Fs=r))if(Ds)try{(9===Fs.nodeType?Fs.body:"HTML"===Fs.nodeName?Fs.ownerDocument.body:Fs).removeChild(n.stateNode)}catch(i){Sc(n,t,i)}else try{Fs.removeChild(n.stateNode)}catch(i){Sc(n,t,i)}break;case 18:null!==Fs&&(Ds?(Cd(9===(e=Fs).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),qf(e)):Cd(Fs,n.stateNode));break;case 4:r=Fs,a=Ds,Fs=n.stateNode.containerInfo,Ds=!0,Ms(e,t,n),Fs=r,Ds=a;break;case 0:case 11:case 14:case 15:ys(2,n,t),Os||ys(4,n,t),Ms(e,t,n);break;case 1:Os||(ks(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&vs(n,t,r)),Ms(e,t,n);break;case 21:Ms(e,t,n);break;case 22:Os=(r=Os)||null!==n.memoizedState,Ms(e,t,n),Os=r;break;default:Ms(e,t,n)}}function Bs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{qf(e)}catch(n){Sc(t,t.return,n)}}}function Us(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{qf(e)}catch(n){Sc(t,t.return,n)}}function $s(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ps),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ps),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tc.bind(null,e,t);t.then(r,r)}})}function Hs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),fd(o,r,n),o[Ue]=e,et(o),r=o;break e;case"link":var l=nf("link","href",a).get(r+(n.href||""));if(l)for(var s=0;sl)break;var c=s.transferSize,d=s.initiatorType;c&&pd(d)&&(i+=c*((s=s.responseEnd)of?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,m)))return Bu=o,e.cancelPendingCommit=m(gc.bind(null,e,t,o,n,r,a,i,l,s,c,d,null,f,p)),void Xu(e,o,i,!u)}gc(e,t,o,n,r,a,i,l,s)}function Zu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rh&&(i=h,h=g,g=i);var y=tr(l,g),b=tr(l,h);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),g>h?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;ln?32:n,R.T=null,n=$u,$u=null;var o=Mu,l=Bu;if(Du=0,zu=Mu=null,Bu=0,6&pu)throw Error(i(331));var s=pu;if(pu|=4,su(o.current),eu(o,o.current,l,n),pu=s,Fc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ye,o)}catch(u){}return!0}finally{I.p=a,R.T=r,vc(e,t)}}function xc(e,t,n){t=Qr(n,t),null!==(e=wo(e,t=jl(e.stateNode,t,2),2))&&(Pe(e,2),Ic(e))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Fu||!Fu.has(r))){e=Qr(n,e),null!==(r=wo(t,n=Ol(2),2))&&(Nl(n,r,t,e),Pe(r,2),Ic(r));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fu;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(ku=!0,a.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mu===e&&(hu&n)===n&&(4===Su||3===Su&&(62914560&hu)===hu&&300>se()-Pu?!(2&pu)&&tc(e,0):Au|=n,Tu===hu&&(Tu=0)),Ic(e)}function Ac(e,t){0===t&&(t=Oe()),null!==(e=Lr(e,t))&&(Pe(e,t),Ic(e))}function Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ac(e,n)}var jc=null,Oc=null,Nc=!1,Pc=!1,Lc=!1,Rc=0;function Ic(e){e!==Oc&&null===e.next&&(null===Oc?jc=Oc=e:Oc=Oc.next=e),Pc=!0,Nc||(Nc=!0,Ed(function(){6&pu?ae(ce,Dc):Mc()}))}function Fc(e,t){if(!Lc&&Pc){Lc=!0;do{for(var n=!1,r=jc;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=a&~(i&~l))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Uc(r,o))}else o=hu,!(3&(o=Ce(r,r===mu?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Uc(r,o));r=r.next}}while(n);Lc=!1}}function Dc(){Mc()}function Mc(){Pc=Nc=!1;var e=0;0!==Rc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Rc);for(var t=se(),n=null,r=jc;null!==r;){var a=r.next,o=zc(r,t);0===o?(r.next=null,null===n?jc=a:n.next=a,null===a&&(Oc=n)):(n=r,(0!==e||3&o)&&(Pc=!0)),r=a}0!==Du&&5!==Du||Fc(e,!1),0!==Rc&&(Rc=0)}function zc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function af(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var of=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sf=new Map,t.forEach(cf,e),sf=null,lf.call(e))}function cf(e,t){if(!(4&t.state.loading)){var n=sf.get(e);if(n)var r=n.get(null);else{n=new Map,sf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o{"use strict";var r=n(63);function a(e){var t="https://react.dev/errors/"+e;if(1{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(9115)},7453:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4233)},971:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,i){if(e===i)return!0;if(e&&i&&"object"==typeof e&&"object"==typeof i){if(e.constructor!==i.constructor)return!1;var l,s,u,c;if(Array.isArray(e)){if((l=e.length)!=i.length)return!1;for(s=l;0!==s--;)if(!o(e[s],i[s]))return!1;return!0}if(n&&e instanceof Map&&i instanceof Map){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;for(c=e.entries();!(s=c.next()).done;)if(!o(s.value[1],i.get(s.value[0])))return!1;return!0}if(r&&e instanceof Set&&i instanceof Set){if(e.size!==i.size)return!1;for(c=e.entries();!(s=c.next()).done;)if(!i.has(s.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(i)){if((l=e.length)!=i.length)return!1;for(s=l;0!==s--;)if(e[s]!==i[s])return!1;return!0}if(e.constructor===RegExp)return e.source===i.source&&e.flags===i.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof i.valueOf)return e.valueOf()===i.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof i.toString)return e.toString()===i.toString();if((l=(u=Object.keys(e)).length)!==Object.keys(i).length)return!1;for(s=l;0!==s--;)if(!Object.prototype.hasOwnProperty.call(i,u[s]))return!1;if(t&&e instanceof Element)return!1;for(s=l;0!==s--;)if(("_owner"!==u[s]&&"__v"!==u[s]&&"__o"!==u[s]||!e.$$typeof)&&!o(e[u[s]],i[u[s]]))return!1;return!0}return e!=e&&i!=i}e.exports=function(e,t){try{return o(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}}},6324:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case g:case s:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},6232:(e,t,n)=>{"use strict";e.exports=n(6324)},5034:(e,t,n)=>{"use strict";n.d(t,{u:()=>i,v:()=>l});var r=n(1071),a=n(2010),o=n(63);function i(e,t,n){return void 0===n&&(n=[]),e.some(function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a}),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map(function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})})):null}},540:(e,t,n)=>{"use strict";n.d(t,{I9:()=>d,Kd:()=>c,N_:()=>y,k2:()=>w});var r=n(1071),a=n(6189),o=n(63),i=n(9243),l=n(2010),s=n(429),u=n(4748),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a{"use strict";n.d(t,{B6:()=>S,Ix:()=>v,W6:()=>P,XZ:()=>b,dO:()=>O,qh:()=>E,zy:()=>L});var r=n(6189),a=n(63),o=n(2497),i=n.n(o),l=n(9243),s=n(4748),u=n(2010),c=n(5950),d=n.n(c),f=(n(6232),n(429)),p=(n(4998),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(e,t,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),"key"in t)for(var o in r={},t)"key"!==o&&(r[o]=t[o]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:a,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=a,t.jsxs=a},908:(e,t)=>{"use strict";var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),s=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,y={};function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}function v(){}function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||g}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var k=w.prototype=new v;k.constructor=w,h(k,b.prototype),k.isPureReactComponent=!0;var x=Array.isArray;function S(){}var E={H:null,A:null,T:null,S:null},_=Object.prototype.hasOwnProperty;function A(e,t,r){var a=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:r}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function j(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36);var n,r}function O(e,t,a,o,i){var l=typeof e;"undefined"!==l&&"boolean"!==l||(e=null);var s,u,c=!1;if(null===e)c=!0;else switch(l){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case n:case r:c=!0;break;case f:return O((c=e._init)(e._payload),t,a,o,i)}}if(c)return i=i(e),c=""===o?"."+j(e,0):o,x(i)?(a="",null!=c&&(a=c.replace(T,"$&/")+"/"),O(i,t,a,"",function(e){return e})):null!=i&&(C(i)&&(s=i,u=a+(null==i.key||e&&e.key===i.key?"":(""+i.key).replace(T,"$&/")+"/")+c,i=A(s.type,u,s.props)),t.push(i)),1;c=0;var d,p=""===o?".":o+":";if(x(e))for(var g=0;g{"use strict";e.exports=n(908)},199:(e,t,n)=>{"use strict";e.exports=n(6131)},6262:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,a=e[r];if(!(0>>1;ro(s,n))uo(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,p=3,m=!1,g=!1,h=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(h=!1,k(e),!g)if(null!==r(u))g=!0,E||(E=!0,S());else{var t=r(c);null!==t&&P(x,t.startTime-e)}}var S,E=!1,_=-1,A=5,C=-1;function T(){return!!y||!(t.unstable_now()-Ce&&T());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,k(e),n=!0;break t}f===r(u)&&a(u),k(e)}else a(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&P(x,s.startTime-e),n=!1}}break e}finally{f=null,p=o,m=!1}n=void 0}}finally{n?S():E=!1}}}if("function"==typeof w)S=function(){w(j)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,N=O.port2;O.port1.onmessage=j,S=function(){N.postMessage(null)}}else S=function(){b(j,0)};function P(e,n){_=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(h?(v(_),_=-1):h=!0,P(x,o-i))):(e.sortIndex=l,n(u,e),g||m||(g=!0,E||(E=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},5215:(e,t,n)=>{"use strict";e.exports=n(6262)},6358:e=>{e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>a})},2010:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},6189:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(6372);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},429:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},6372:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},9715:(e,t,n)=>{"use strict";function r(e){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},r(e)}n.d(t,{A:()=>i});var a=n(6372);function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(o=function(){return!!e})()}function i(e){var t="function"==typeof Map?new Map:void 0;return i=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(o())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&(0,a.A)(i,n.prototype),i}(e,arguments,r(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,a.A)(n,e)},i(e)}},360:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>o});var a=n(6372);function o(){o=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=RegExp(e,r);return t.set(i,o||t.get(e)),(0,a.A)(i,n.prototype)}function i(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var a=r[n];if("number"==typeof a)t[n]=e[a];else{for(var o=0;void 0===e[a[o]]&&o+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof a){var l=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=r(e[e.length-1])&&(e=[].slice.call(e)).push(i(e,l)),a.apply(this,e)})}return e[Symbol.replace].call(this,n,a)},o.apply(this,arguments)}},8573:(e,t,n)=>{"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;ta});const a=function(){for(var e,t,n=0,a="",o=arguments.length;n{"use strict";n.d(t,{My:()=>C,f4:()=>ne});var r,a,o,i,l,s,u,c=n(63),d=n(8573),f=Object.create,p=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},A=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof a)){var _,A=1;if(b){if(!(_=o(k,S,e,y))||_.index>=e.length)break;var C=_.index,T=_.index+_[0].length,j=S;for(j+=x.value.length;C>=j;)j+=(x=x.next).value.length;if(S=j-=x.value.length,x.value instanceof a)continue;for(var O=x;O!==t.tail&&(jd.reach&&(d.reach=R);var I=x.prev;if(P&&(I=s(t,I,P),S+=P.length),u(t,I,A),x=s(t,I,new a(f,h?r.tokenize(N,h):N,v,N)),L&&s(t,x,L),A>1){var F={cause:f+","+m,reach:R};i(e,t,n,x.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}();t.exports=n,n.default=n}},function(){return a||(0,r[y(r)[0]])((a={exports:{}}).exports,a),a.exports}),C=((e,t,n)=>(n=null!=e?f(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of y(t))w.call(e,a)||a===n||p(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:p(n,"default",{value:e,enumerable:!0}),e)))(A());C.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},C.languages.markup.tag.inside["attr-value"].inside.entity=C.languages.markup.entity,C.languages.markup.doctype.inside["internal-subset"].inside=C.languages.markup,C.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(C.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:C.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:C.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},C.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(C.languages.markup.tag,"addAttribute",{value:function(e,t){C.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:C.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),C.languages.html=C.languages.markup,C.languages.mathml=C.languages.markup,C.languages.svg=C.languages.markup,C.languages.xml=C.languages.extend("markup",{}),C.languages.ssml=C.languages.xml,C.languages.atom=C.languages.xml,C.languages.rss=C.languages.xml,o=C,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s="(?:[^\\\\-]|"+(l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",s=RegExp(s+"-"+s),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},C.languages.javascript=C.languages.extend("clike",{"class-name":[C.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),C.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,C.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:C.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:C.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:C.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:C.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:C.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),C.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:C.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),C.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),C.languages.markup&&(C.languages.markup.tag.addInlined("script","javascript"),C.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),C.languages.js=C.languages.javascript,C.languages.actionscript=C.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),C.languages.actionscript["class-name"].alias="function",delete C.languages.actionscript.parameter,delete C.languages.actionscript["literal-property"],C.languages.markup&&C.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:C.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(C),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach(function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var l=0,s=i.length;l|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(C),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(C),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(C),C.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:C.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},C.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function s(t,n,i){var s=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),u=0,c={},d=(s=l(s.map(function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=u++,n="___"+i.toUpperCase()+"_"+r+"___")););return c[n]=e,n}).join(""),n,i),Object.keys(c));return u=0,function t(n){for(var o=0;o=d.length)return;var i,s,f,p,m,g,h,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[u],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(i))&&(++u,s=g.substring(0,h),m=c[i],f=void 0,(p={})["interpolation-punctuation"]=a,3===(p=e.tokenize(m,p)).length&&((f=[1,1]).push.apply(f,l(p[1],e.languages.javascript,"javascript")),p.splice.apply(p,f)),f=new e.Token("interpolation",p,r.alias,m),p=g.substring(h+i.length),m=[],s&&m.push(s),m.push(f),p&&(t(g=[p]),m.push.apply(m,g)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(m)),o+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?t(h):t([h]))}}(s),new e.Token(i,s,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",function(t){t.language in u&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(C),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(C),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(C),C.languages.n4js=C.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),C.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),C.languages.n4jsd=C.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(//g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,function(){return n}).replace(//g,function(){return r}).replace(//g,function(){return a}),RegExp(e,t)}function i(t){for(var n=[],r=0;r"!==a.content[a.content.length-1].content&&n.push({tagName:l(a.content[0].content[1]),openedBraces:0}):0+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)})}(C),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(C),C.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},C.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=C.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(C),C.languages.c=C.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),C.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),C.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},C.languages.c.string],char:C.languages.c.char,comment:C.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:C.languages.c}}}}),C.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete C.languages.c.boolean,C.languages.objectivec=C.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete C.languages.objectivec["class-name"],C.languages.objc=C.languages.objectivec,C.languages.reason=C.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),C.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete C.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(C),C.languages.go=C.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),C.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete C.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(C),C.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},C.languages.python["string-interpolation"].inside.interpolation.inside.rest=C.languages.python,C.languages.py=C.languages.python,C.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},C.languages.webmanifest=C.languages.json;((e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>T,duotoneDark:()=>j,duotoneLight:()=>O,github:()=>N,gruvboxMaterialDark:()=>Q,gruvboxMaterialLight:()=>K,jettwaveDark:()=>V,jettwaveLight:()=>q,nightOwl:()=>P,nightOwlLight:()=>L,oceanicNext:()=>F,okaidia:()=>D,oneDark:()=>W,oneLight:()=>G,palenight:()=>M,shadesOfPurple:()=>z,synthwave84:()=>B,ultramin:()=>U,vsDark:()=>$,vsLight:()=>H});var T={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},O={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},N={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},P={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},R="#c5a5c5",I="#8dc891",F={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:R}},{types:["attr-value"],style:{color:I}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:I}},{types:["punctuation"],style:{color:I}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:R}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},D={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},M={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},z={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},B={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},U={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},$={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},H={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},V={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},q={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},W={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},G={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Q={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},K={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},Y=/\r\n|\r|\n/,Z=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},X=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},J=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,l=[];const s=[l];for(;i>-1;){for(;(o=r[i]++)0?u:["plain"],e=c):(u=X(u,c.type),c.alias&&(u=X(u,c.alias)),e=c.content),"string"!=typeof e){i++,t.push(u),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(Y),f=d.length;l.push({types:u,content:d[0]});for(let t=1;t{const{plain:n}=e,r=e.styles.reduce((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach(t=>{const n=S(S({},e[t]),a);e[t]=n}),e},{});return r.root=n,r.plain=E(S({},n),{backgroundColor:void 0}),r},te=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=ee(r,o),l=(e=>(0,c.useCallback)(t=>{var n=t,{className:r,style:a,line:o}=n,i=_(n,["className","style","line"]);const l=E(S({},i),{className:(0,d.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof a&&(l.style=S(S({},l.style||{}),a)),l},[e]))(i),s=(e=>{const t=(0,c.useCallback)(({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map(t=>e[t]))},[e]);return(0,c.useCallback)(e=>{var n=e,{token:r,className:a,style:o}=n,i=_(n,["token","className","style"]);const l=E(S({},i),{className:(0,d.A)("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(l.style=S(S({},l.style||{}),o)),l},[t])})(i),u=(({prism:e,code:t,grammar:n,language:r})=>(0,c.useMemo)(()=>{if(null==n)return J([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),J(a.tokens)},[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:u,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:l,getTokenProps:s})},ne=e=>(0,c.createElement)(te,E(S({},e),{prism:e.prism||C,theme:e.theme||$,code:e.code,language:e.language}))},4748:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=!0,a="Invariant failed";function o(e,t){if(!e){if(r)throw new Error(a);var n="function"==typeof t?t():t,o=n?"".concat(a,": ").concat(n):a;throw new Error(o)}}},6453:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>I,__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>A,__await:()=>S,__awaiter:()=>m,__classPrivateFieldGet:()=>P,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>L,__createBinding:()=>h,__decorate:()=>l,__disposeResources:()=>D,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>a,__generator:()=>g,__importDefault:()=>N,__importStar:()=>O,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>s,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>M,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>k,__values:()=>b,default:()=>z});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var h=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[u],m);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=i(h.get))&&(d.get=l),(l=i(h.set))&&(d.set=l),(l=i(h.init))&&a.unshift(l)}else(l=i(h))&&("field"===s?a.unshift(l):d[u]=l)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{(n=a[e](t)).value instanceof S?Promise.resolve(n.value.v).then(s,u):c(o[0][2],n)}catch(r){c(o[0][3],r)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:a?a(t):t}:a}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,a,(t=e[n](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},j=function(e){return j=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},j(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=j(e),r=0;r{"use strict";n.d(t,{A:()=>r});const r={title:"HappyView",tagline:"Lexicon-driven ATProto AppView",url:"https://happyview.dev",baseUrl:"/",favicon:"img/favicon.png",onBrokenLinks:"throw",markdown:{mermaid:!0,format:"mdx",emoji:!0,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1},hooks:{onBrokenMarkdownLinks:"warn",onBrokenMarkdownImages:"throw"}},themes:["@docusaurus/theme-mermaid"],i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"docs",routeBasePath:"/",sidebarPath:"./sidebars.ts"},blog:!1,theme:{}}]],themeConfig:{image:"img/og.png",navbar:{title:"",logo:{alt:"HappyView",src:"img/logo.light.png",srcDark:"img/logo.dark.png"},items:[{type:"docSidebar",sidebarId:"docs",position:"left",label:"Docs"},{href:"https://github.com/gamesgamesgamesgamesgames/happyview",label:"GitHub",position:"right"}],hideOnScroll:!1},prism:{additionalLanguages:["lua"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},footer:{copyright:'Copyright \xa9 2026 Birbhouse Games.',style:"light",links:[]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3},mermaid:{theme:{dark:"dark",light:"default"},options:{}}},baseUrlIssueBanner:!0,storage:{type:"localStorage",namespace:!1},future:{v4:{removeLegacyPostBuildHeadAttribute:!1,useCssCascadeLayers:!1,siteStorageNamespacing:!1,fasterByDefault:!1,mdx1CompatDisabledByDefault:!1},faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1,rspackPersistentCache:!1,ssgWorkerThreads:!1,gitEagerVcs:!1},experimental_vcs:{},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},2654:e=>{"use strict";e.exports={}},4054:e=>{"use strict";e.exports=JSON.parse('{"/-67a":{"__comp":"5e95c892","__context":{"plugin":"aba21aa0"}},"/-804":{"__comp":"a7bd4aaa","__props":"22dd74f7"},"/-4dc":{"__comp":"a94703ab"},"/getting-started/authentication-fd3":{"__comp":"17896441","content":"a77ba7fa"},"/getting-started/configuration-641":{"__comp":"17896441","content":"009f1e98"},"/getting-started/dashboard-889":{"__comp":"17896441","content":"539fb2af"},"/getting-started/deployment/docker-d4f":{"__comp":"17896441","content":"89877b86"},"/getting-started/deployment/other-a50":{"__comp":"17896441","content":"b27c7406"},"/getting-started/deployment/railway-d15":{"__comp":"17896441","content":"9985d6d5"},"/getting-started/quickstart-c60":{"__comp":"17896441","content":"fbd7a87c"},"/guides/api-keys-f7a":{"__comp":"17896441","content":"d26b9010"},"/guides/backfill-8e9":{"__comp":"17896441","content":"bccc5e9b"},"/guides/database-setup-7ff":{"__comp":"17896441","content":"f2031820"},"/guides/developing-plugins-2ce":{"__comp":"17896441","content":"85480c2f"},"/guides/event-logs-a81":{"__comp":"17896441","content":"2df7fd65"},"/guides/index-hooks-755":{"__comp":"17896441","content":"774696b9"},"/guides/labelers-60e":{"__comp":"17896441","content":"e93ec707"},"/guides/lexicons-f9a":{"__comp":"17896441","content":"d2e94323"},"/guides/permissions-755":{"__comp":"17896441","content":"224113b7"},"/guides/plugins-704":{"__comp":"17896441","content":"bb350c59"},"/guides/postgres-to-sqlite-migration-6c0":{"__comp":"17896441","content":"d1a0112a"},"/guides/scripting-259":{"__comp":"17896441","content":"920ba7ef"},"/guides/sqlite-to-postgres-migration-d0d":{"__comp":"17896441","content":"2a23be56"},"/reference/admin-api-cec":{"__comp":"17896441","content":"ec125a10"},"/reference/admin/api-clients-7f1":{"__comp":"17896441","content":"a42f7e02"},"/reference/admin/api-keys-909":{"__comp":"17896441","content":"2ce38126"},"/reference/admin/backfill-500":{"__comp":"17896441","content":"8468a657"},"/reference/admin/domains-5f3":{"__comp":"17896441","content":"cdc0cfc2"},"/reference/admin/events-768":{"__comp":"17896441","content":"7680ac5f"},"/reference/admin/labelers-956":{"__comp":"17896441","content":"49330316"},"/reference/admin/lexicons-9e3":{"__comp":"17896441","content":"09c1314d"},"/reference/admin/plugins-d30":{"__comp":"17896441","content":"5b2964ea"},"/reference/admin/script-variables-578":{"__comp":"17896441","content":"35de558a"},"/reference/admin/settings-14f":{"__comp":"17896441","content":"89d775e6"},"/reference/admin/stats-ee4":{"__comp":"17896441","content":"0eda1588"},"/reference/admin/users-ae5":{"__comp":"17896441","content":"0510ba17"},"/reference/architecture-5c9":{"__comp":"17896441","content":"33ec3d65"},"/reference/changelog-03b":{"__comp":"17896441","content":"3d80a749"},"/reference/glossary-aa6":{"__comp":"17896441","content":"846656e5"},"/reference/lua/atproto-api-b9d":{"__comp":"17896441","content":"32955cd4"},"/reference/lua/database-api-5b8":{"__comp":"17896441","content":"f839662b"},"/reference/lua/http-api-014":{"__comp":"17896441","content":"713f9d9e"},"/reference/lua/json-api-86e":{"__comp":"17896441","content":"0a7e20de"},"/reference/lua/record-api-09b":{"__comp":"17896441","content":"5084391c"},"/reference/lua/standard-libraries-3bd":{"__comp":"17896441","content":"c6f1ff95"},"/reference/lua/utility-globals-a2b":{"__comp":"17896441","content":"8eefb1eb"},"/reference/production-deployment-935":{"__comp":"17896441","content":"fac68122"},"/reference/scripts/algolia-sync-ae9":{"__comp":"17896441","content":"2d1b556d"},"/reference/scripts/batch-save-e3f":{"__comp":"17896441","content":"a4086a70"},"/reference/scripts/cascading-delete-2dc":{"__comp":"17896441","content":"c985d368"},"/reference/scripts/complex-mutations-a45":{"__comp":"17896441","content":"bde15bec"},"/reference/scripts/create-record-d2f":{"__comp":"17896441","content":"43880f7a"},"/reference/scripts/expanded-query-7c6":{"__comp":"17896441","content":"5d3a5990"},"/reference/scripts/get-record-5c8":{"__comp":"17896441","content":"121e86a6"},"/reference/scripts/list-or-fetch-62b":{"__comp":"17896441","content":"f142c65c"},"/reference/scripts/meilisearch-sync-c95":{"__comp":"17896441","content":"e7f37855"},"/reference/scripts/paginated-list-917":{"__comp":"17896441","content":"e8644baa"},"/reference/scripts/sidecar-records-b55":{"__comp":"17896441","content":"280f48ec"},"/reference/scripts/update-or-delete-d03":{"__comp":"17896441","content":"6acefe75"},"/reference/scripts/upsert-record-279":{"__comp":"17896441","content":"919abb94"},"/reference/troubleshooting-af4":{"__comp":"17896441","content":"111eee19"},"/reference/xrpc-api-a2e":{"__comp":"17896441","content":"a51dfc20"},"/sdk/lex-agent-55f":{"__comp":"17896441","content":"80ccde35"},"/sdk/oauth-client-ef0":{"__comp":"17896441","content":"4a041602"},"/sdk/oauth-client-browser-fe2":{"__comp":"17896441","content":"c1dc14fc"},"/sdk/overview-6ed":{"__comp":"17896441","content":"d81f4320"},"/tutorials/statusphere-187":{"__comp":"17896441","content":"5fd2dbdb"},"/-280":{"__comp":"17896441","content":"23374ca6"}}')},4180:e=>{"use strict";e.exports=JSON.parse('{"N":"localStorage","M":""}')}},e=>{e.O(0,[1869],()=>{return t=9338,e(e.s=t);var t});e.O()}]); \ No newline at end of file diff --git a/assets/js/main.6a50479b.js.LICENSE.txt b/assets/js/main.c991874c.js.LICENSE.txt similarity index 100% rename from assets/js/main.6a50479b.js.LICENSE.txt rename to assets/js/main.c991874c.js.LICENSE.txt diff --git a/assets/js/runtime~main.4874316a.js b/assets/js/runtime~main.4874316a.js new file mode 100644 index 0000000..95bb42f --- /dev/null +++ b/assets/js/runtime~main.4874316a.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,c,d,f,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={exports:{}};return b[e].call(c.exports,c,c.exports,r),c.exports}r.m=b,e=[],r.O=(a,c,d,f)=>{if(!c){var b=1/0;for(i=0;i=f)&&Object.keys(r.O).every(e=>r.O[e](c[o]))?c.splice(o--,1):(t=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[c,d,f]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var f=Object.create(null);r.r(f);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach(a=>b[a]=()=>e[a]);return b.default=()=>e,r.d(f,b),f},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((a,c)=>(r.f[c](e,a),a),[])),r.u=e=>"assets/js/"+({20:"919abb94",203:"9985d6d5",339:"2a23be56",787:"280f48ec",1361:"fbd7a87c",1567:"22dd74f7",1952:"2d1b556d",1977:"2df7fd65",2001:"5b2964ea",2007:"c985d368",2009:"8eefb1eb",2278:"23374ca6",2431:"bccc5e9b",2605:"4a041602",2618:"b27c7406",2863:"224113b7",3164:"80ccde35",3197:"5d3a5990",3334:"0510ba17",3961:"7680ac5f",3993:"d2e94323",4209:"43880f7a",4348:"5084391c",4440:"5fd2dbdb",5003:"cdc0cfc2",5011:"121e86a6",5080:"d1a0112a",5219:"3d80a749",5309:"0a7e20de",5563:"539fb2af",5594:"a42f7e02",5620:"e93ec707",5742:"aba21aa0",5953:"920ba7ef",5986:"fac68122",6087:"a77ba7fa",6277:"713f9d9e",6438:"bde15bec",6495:"6acefe75",6590:"09c1314d",6737:"85480c2f",6803:"33ec3d65",6922:"49330316",7098:"a7bd4aaa",7177:"f839662b",7194:"a4086a70",7520:"89877b86",7658:"bb350c59",7715:"009f1e98",8030:"c1dc14fc",8401:"17896441",8649:"c6f1ff95",8779:"111eee19",8856:"89d775e6",8865:"774696b9",8897:"a51dfc20",9048:"a94703ab",9097:"e7f37855",9178:"e8644baa",9281:"35de558a",9301:"d26b9010",9329:"0eda1588",9492:"846656e5",9556:"8468a657",9630:"32955cd4",9647:"5e95c892",9659:"ec125a10",9697:"f2031820",9715:"2ce38126",9819:"d81f4320",9957:"f142c65c"}[e]||e)+"."+{20:"354e4aca",125:"6690f5ff",156:"c3e6c79e",203:"3dd91ebe",339:"6aa8c0c8",401:"f53c1ac3",646:"e9971c6c",787:"233dc95f",866:"47e1c36a",1361:"9890fbc2",1485:"a2d3345d",1567:"e7d0ca31",1571:"216fe5d3",1952:"b658549a",1977:"045af8d0",2001:"142fbe85",2007:"52ae0993",2009:"cd8a45a8",2264:"ab183745",2278:"a8726fc2",2391:"383149c0",2431:"73f8e292",2605:"56376067",2613:"ac78cea0",2618:"938e6855",2712:"0002b7ed",2725:"454d74d5",2858:"ccd0540d",2863:"83e258f6",2913:"df9d075c",3164:"a9b4188c",3197:"05192a54",3334:"e5e327f0",3640:"ab87713a",3674:"68984e32",3718:"2a1cf4e7",3961:"43677969",3993:"f6aaf207",4209:"883fc571",4266:"90c963e9",4326:"ef82c4b3",4348:"61a5cbb3",4419:"f68c49e6",4440:"9494322b",4456:"d5a85b09",4541:"14cee742",4574:"095e876c",4640:"54289f4a",5003:"8866f544",5011:"7988cc8d",5043:"2bc13b96",5080:"021f365a",5105:"56948e52",5219:"b56095d6",5298:"dfe74fea",5309:"0ed755f3",5319:"33afc3dc",5428:"ed2bd8da",5471:"8c36f303",5537:"d669d0d1",5563:"bdd86b5a",5594:"ac92b70f",5613:"71ca5510",5620:"944cbd91",5725:"9f82ae1a",5742:"de0df825",5763:"3c4dfa82",5769:"004c2474",5905:"a482ad94",5953:"8db30372",5986:"ea1f1bd1",6076:"f916ec29",6087:"f9bd1afe",6101:"1225bb35",6194:"2e4ca43a",6277:"7a4c4e6b",6325:"2cd44d9a",6370:"8940c7dd",6438:"006959b8",6495:"365eee6d",6545:"d609905c",6590:"df6dc576",6621:"df644f70",6669:"e47e086b",6737:"61b9b3cf",6803:"4fb486eb",6895:"8e72dbe9",6922:"c05e31ae",7098:"b8087602",7177:"9ae0aa4c",7194:"2bc0519d",7508:"2bdb1473",7520:"d43afb4c",7658:"6c9f0db2",7715:"79c081e2",8030:"80693b03",8227:"1a854c60",8401:"278c1b8c",8649:"1c536871",8705:"d6a6d1e2",8779:"c36f8bff",8856:"ffddc2da",8865:"17d674a8",8897:"32412972",9048:"221a3d47",9097:"2ac5d28e",9115:"93100042",9178:"4c8d12f5",9281:"441a7f8b",9288:"d0db207e",9301:"e422b779",9314:"bd050d62",9329:"4f831c59",9332:"d43c2c03",9492:"ca9020b1",9556:"f4fcc9de",9630:"7f42c651",9647:"d8f9e391",9659:"56ce15ca",9697:"6d24a989",9715:"96bfbff8",9808:"710ea9f4",9819:"64443987",9911:"44547840",9957:"a2f59d47"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},f="@happyview/docs:",r.l=(e,a,c,b)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var f=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),f&&f.forEach(e=>e(c)),a)return a(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"8401",49330316:"6922","919abb94":"20","9985d6d5":"203","2a23be56":"339","280f48ec":"787",fbd7a87c:"1361","22dd74f7":"1567","2d1b556d":"1952","2df7fd65":"1977","5b2964ea":"2001",c985d368:"2007","8eefb1eb":"2009","23374ca6":"2278",bccc5e9b:"2431","4a041602":"2605",b27c7406:"2618","224113b7":"2863","80ccde35":"3164","5d3a5990":"3197","0510ba17":"3334","7680ac5f":"3961",d2e94323:"3993","43880f7a":"4209","5084391c":"4348","5fd2dbdb":"4440",cdc0cfc2:"5003","121e86a6":"5011",d1a0112a:"5080","3d80a749":"5219","0a7e20de":"5309","539fb2af":"5563",a42f7e02:"5594",e93ec707:"5620",aba21aa0:"5742","920ba7ef":"5953",fac68122:"5986",a77ba7fa:"6087","713f9d9e":"6277",bde15bec:"6438","6acefe75":"6495","09c1314d":"6590","85480c2f":"6737","33ec3d65":"6803",a7bd4aaa:"7098",f839662b:"7177",a4086a70:"7194","89877b86":"7520",bb350c59:"7658","009f1e98":"7715",c1dc14fc:"8030",c6f1ff95:"8649","111eee19":"8779","89d775e6":"8856","774696b9":"8865",a51dfc20:"8897",a94703ab:"9048",e7f37855:"9097",e8644baa:"9178","35de558a":"9281",d26b9010:"9301","0eda1588":"9329","846656e5":"9492","8468a657":"9556","32955cd4":"9630","5e95c892":"9647",ec125a10:"9659",f2031820:"9697","2ce38126":"9715",d81f4320:"9819",f142c65c:"9957"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,c)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)c.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise((c,f)=>d=e[a]=[c,f]);c.push(d[2]=f);var b=r.p+r.u(a),t=new Error;r.l(b,c=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var f=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+f+": "+b+")",t.name="ChunkLoadError",t.type=f,t.request=b,d[1](t)}},"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var d,f,[b,t,o]=c,n=0;if(b.some(a=>0!==e[a])){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(c);n{"use strict";var e,a,d,t,r,f={},c={};function b(e){var a=c[e];if(void 0!==a)return a.exports;var d=c[e]={exports:{}};return f[e].call(d.exports,d,d.exports,b),d.exports}b.m=f,e=[],b.O=(a,d,t,r)=>{if(!d){var f=1/0;for(i=0;i=r)&&Object.keys(b.O).every(e=>b.O[e](d[o]))?d.splice(o--,1):(c=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[d,t,r]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},d=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);b.r(r);var f={};a=a||[null,d({}),d([]),d(d)];for(var c=2&t&&e;("object"==typeof c||"function"==typeof c)&&!~a.indexOf(c);c=d(c))Object.getOwnPropertyNames(c).forEach(a=>f[a]=()=>e[a]);return f.default=()=>e,b.d(r,f),r},b.d=(e,a)=>{for(var d in a)b.o(a,d)&&!b.o(e,d)&&Object.defineProperty(e,d,{enumerable:!0,get:a[d]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,d)=>(b.f[d](e,a),a),[])),b.u=e=>"assets/js/"+({20:"919abb94",203:"9985d6d5",787:"280f48ec",1361:"fbd7a87c",1567:"22dd74f7",1952:"2d1b556d",1977:"2df7fd65",2007:"c985d368",2278:"23374ca6",2431:"bccc5e9b",2618:"b27c7406",3197:"5d3a5990",3993:"d2e94323",4440:"5fd2dbdb",5011:"121e86a6",5219:"3d80a749",5563:"539fb2af",5742:"aba21aa0",5953:"920ba7ef",5986:"fac68122",6087:"a77ba7fa",6438:"bde15bec",6495:"6acefe75",6590:"43880f7a",6803:"33ec3d65",7098:"a7bd4aaa",7194:"a4086a70",7520:"89877b86",7715:"009f1e98",8401:"17896441",8779:"111eee19",8865:"774696b9",8897:"a51dfc20",9048:"a94703ab",9097:"e7f37855",9178:"e8644baa",9301:"d26b9010",9492:"846656e5",9647:"5e95c892",9659:"ec125a10",9957:"f142c65c"}[e]||e)+"."+{20:"3ec12698",165:"4c5708a1",203:"2071e97d",225:"04246537",291:"e48169fe",787:"8ce2f590",1203:"4c8aeaab",1361:"e3e74927",1567:"d275db6e",1741:"e6304f1e",1746:"afdbc2a0",1903:"c19e32df",1952:"cb991d70",1977:"5f144859",2007:"9be5144d",2130:"6aca0963",2217:"7fbe9dae",2237:"02886161",2278:"a9405a6f",2279:"14e9bbca",2291:"742b3f1e",2334:"0d54c30f",2431:"c3f06d4f",2492:"04a5c13d",2618:"d8754146",2821:"25ddbeb7",3197:"a75f4a7b",3356:"916f8094",3624:"3861afa5",3815:"62684417",3993:"dec694d1",4312:"3fc60254",4440:"3f63380d",4616:"c38d0c4b",4732:"37c818cd",4802:"c2bb0f45",4981:"a26c6f29",5011:"4a23b8e6",5149:"dc032f86",5219:"4b7483e6",5480:"0ac51d82",5563:"ab94867b",5734:"a0ed7a40",5742:"dfe711f3",5953:"b802a833",5955:"5524a460",5986:"66f4e9f8",5996:"973aad9b",6087:"be66bc37",6241:"ddb16fb6",6438:"3fe537d8",6495:"bf671ca4",6567:"ba0bae2c",6590:"a0c8f815",6803:"9c357e99",6992:"6dfc4d99",7098:"1619d051",7194:"58f7d6fe",7520:"b544ad88",7592:"a68b31ac",7715:"4381c598",7873:"c42f29b1",7928:"08dd813c",8142:"f23a31c7",8249:"c71477f6",8401:"0e3115cb",8731:"da0fb09f",8756:"2c2f045b",8779:"94292821",8795:"1c60dc80",8865:"08c2c2c4",8897:"c793654e",9032:"6c8ca03c",9048:"df97c324",9097:"6b9a8f63",9178:"350e6ac9",9301:"6c09a47c",9412:"2ce5e84d",9492:"7a01fd59",9510:"2071eba3",9620:"117206fb",9647:"ac259cea",9659:"3fe16f05",9717:"bdeb521f",9957:"366ae717"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),t={},r="happyview-docs:",b.l=(e,a,d,f)=>{if(t[e])t[e].push(a);else{var c,o;if(void 0!==d)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(s);var r=t[e];if(delete t[e],c.parentNode&&c.parentNode.removeChild(c),r&&r.forEach(e=>e(d)),a)return a(d)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),o&&document.head.appendChild(c)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401","919abb94":"20","9985d6d5":"203","280f48ec":"787",fbd7a87c:"1361","22dd74f7":"1567","2d1b556d":"1952","2df7fd65":"1977",c985d368:"2007","23374ca6":"2278",bccc5e9b:"2431",b27c7406:"2618","5d3a5990":"3197",d2e94323:"3993","5fd2dbdb":"4440","121e86a6":"5011","3d80a749":"5219","539fb2af":"5563",aba21aa0:"5742","920ba7ef":"5953",fac68122:"5986",a77ba7fa:"6087",bde15bec:"6438","6acefe75":"6495","43880f7a":"6590","33ec3d65":"6803",a7bd4aaa:"7098",a4086a70:"7194","89877b86":"7520","009f1e98":"7715","111eee19":"8779","774696b9":"8865",a51dfc20:"8897",a94703ab:"9048",e7f37855:"9097",e8644baa:"9178",d26b9010:"9301","846656e5":"9492","5e95c892":"9647",ec125a10:"9659",f142c65c:"9957"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,d)=>{var t=b.o(e,a)?e[a]:void 0;if(0!==t)if(t)d.push(t[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var r=new Promise((d,r)=>t=e[a]=[d,r]);d.push(t[2]=r);var f=b.p+b.u(a),c=new Error;b.l(f,d=>{if(b.o(e,a)&&(0!==(t=e[a])&&(e[a]=void 0),t)){var r=d&&("load"===d.type?"missing":d.type),f=d&&d.target&&d.target.src;c.message="Loading chunk "+a+" failed.\n("+r+": "+f+")",c.name="ChunkLoadError",c.type=r,c.request=f,t[1](c)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,d)=>{var t,r,[f,c,o]=d,n=0;if(f.some(a=>0!==e[a])){for(t in c)b.o(c,t)&&(b.m[t]=c[t]);if(o)var i=o(b)}for(a&&a(d);n - -Authentication | HappyView - - + +Authentication | HappyView + + - + -

    Authentication

    -

    HappyView uses AT Protocol OAuth for authentication, handled by an external AIP instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP.

    -

    Which endpoints require auth?​

    -
    Endpoint typeAuth required?
    Queries (GET /xrpc/{method})No
    Procedures (POST /xrpc/{method})Yes
    Admin API (/admin/*)Yes (must be an admin)
    Health check (GET /health)No
    -

    Authenticated requests must include an Authorization header with a token issued by AIP:

    -
    Authorization: Bearer <token>
    -

    Getting a token from the dashboard​

    -

    The easiest way to get a token for CLI or curl usage is through the web dashboard:

    -
      -
    1. Open the dashboard and log in with your AT Protocol identity
    2. -
    3. Open your browser's developer tools (F12 or Cmd+Shift+I)
    4. -
    5. Go to Application (Chrome) or Storage (Firefox) > Session Storage
    6. -
    7. Find the entry for your dashboard's URL
    8. -
    9. Copy the value of the session key: this contains your access token
    10. -
    -

    You can then use it in curl:

    -
    export TOKEN="your-token-here"
    curl http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN"
    -

    Tokens expire based on AIP's configuration. When a token expires, log in again through the dashboard to get a new one.

    -

    Programmatic access​

    -

    For scripts or applications that need to authenticate programmatically, you'll need to implement the AT Protocol OAuth flow against your AIP instance. This involves:

    +

    Authentication

    +

    HappyView has two distinct authentication surfaces:

    +
      +
    • XRPC (/xrpc/*) — client-level identification via an API client key on every request, plus optional user-level atproto OAuth for endpoints that need a specific user's identity (e.g. procedures that write to a PDS).
    • +
    • Admin API (/admin/*) — user-level authentication via admin API keys or service auth JWTs, gated by permissions.
    • +
    +

    Which endpoints require what?​

    +
    Endpoint typeClient identificationUser authentication
    Queries (GET /xrpc/{method})X-Client-Key requiredOptional — DPoP auth if the query needs to know who the user is
    Procedures (POST /xrpc/{method})X-Client-Key requiredRequired — DPoP auth so HappyView can proxy writes to the user's PDS
    Admin API (/admin/*)—Required — admin API key or service auth JWT with the right permissions
    Health check (GET /health)——
    +

    XRPC: API client identification​

    +

    Every XRPC request — including unauthenticated GET queries — must identify itself with a registered API client. The client key is HappyView's rate-limit bucket key and its way of knowing who is calling. A request without one returns 401 Unauthorized with Missing client identification.

    +

    Register a client in the dashboard (Settings > API Clients > New client) or via POST /admin/api-clients. You'll get back an hvc_… client key and an hvs_… client secret — the secret is only shown once, so capture it immediately.

    +

    HappyView resolves the client key from the first of:

      -
    1. Registering an OAuth client with AIP
    2. -
    3. Redirecting the user to AIP's authorization endpoint
    4. -
    5. Exchanging the authorization code for an access token
    6. -
    7. Using that token with HappyView
    8. +
    9. The X-Client-Key request header.
    10. +
    11. A client_key query-string parameter.
    -

    See the AIP documentation for endpoint details and the ATProto OAuth spec for the full protocol.

    -

    How token validation works​

    -

    When HappyView receives an authenticated request, it forwards the token to AIP's /oauth/userinfo endpoint. AIP responds with the user's DID, which HappyView uses to:

    +

    On top of the client key, HappyView does best-effort validation that the caller actually controls the client:

    +
      +
    • If an Origin header is present (typical for browser apps), it must match the client's registered client_uri.
    • +
    • Otherwise, an X-Client-Secret header may be supplied and must match the stored secret (typical for server-to-server callers).
    • +
    +

    Both checks currently log warnings on mismatch rather than rejecting the request, but the intent is clear: don't share client keys, and treat the secret like a password.

    +

    Calling a query​

    +
    curl 'https://happyview.example.com/xrpc/com.example.feed.getHot' \
    -H 'X-Client-Key: hvc_a1b2c3...'
    +

    For a server-to-server integration, add the secret:

    +
    curl 'https://happyview.example.com/xrpc/com.example.feed.getHot' \
    -H 'X-Client-Key: hvc_a1b2c3...' \
    -H 'X-Client-Secret: hvs_d4e5f6...'
    +

    Authenticating users for procedures​

    +

    Queries that don't care who is calling need nothing more than the client key. Procedures — and queries whose Lua scripts read the caller's DID — need a real atproto OAuth session.

    +

    XRPC routes only accept DPoP auth (Authorization: DPoP <token> + DPoP proof header + X-Client-Key). Bearer tokens and service auth JWTs are not accepted on XRPC endpoints.

    +

    Third-party apps authenticate users through the DPoP key provisioning flow: your app gets a DPoP keypair from HappyView, runs a standard OAuth flow with the user's PDS using that keypair, then registers the resulting tokens back with HappyView.

    +

    The JavaScript SDK handles this entire flow for you:

    +
    import { Client } from "@atproto/lex";
    import { HappyViewBrowserClient } from "@happyview/oauth-client-browser";
    import { createAgent } from "@happyview/lex-agent";

    const oauthClient = new HappyViewBrowserClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    });

    // Login — redirects to the user's PDS for authorization
    await oauthClient.login("alice.bsky.social");

    // On /oauth/callback — complete the token exchange
    const session = await oauthClient.callback();

    // Create a type-safe Lex client
    const agent = createAgent(session);
    const lex = new Client(agent);

    // Make authenticated XRPC calls
    await lex.xrpc(myLexicons.com.example.createPost, {
    input: { text: "Hello from HappyView!" },
    });
    +

    For procedures, HappyView proxies the write to the user's PDS using the stored OAuth session (see Proxying procedures below).

    +

    Admin API: user authentication​

    +

    Admin endpoints don't use API clients. They require a real HappyView user, identified by one of two methods:

    +

    Admin API key​

    +

    For automation — CI/CD, monitoring, cron jobs — create an admin API key at Settings > API Keys or via POST /admin/api-keys and pass it as a bearer token:

    +
    export TOKEN="hv_your-api-key-here"
    curl http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN"
    +

    A key only carries the permissions selected at creation time and can never exceed the permissions of the user who created it. Admin API keys are not valid for XRPC endpoints — they exist solely for admin API access.

    +

    Service auth JWT​

    +

    HappyView also accepts standard atproto inter-service auth JWTs in the Authorization header. Another AppView, relay, or PDS can sign a short-lived ES256 or ES256K JWT with its DID's signing key; HappyView resolves the issuer's DID document, verifies the signature against the #atproto verification method, and treats the issuer DID as the caller identity.

    +

    For a service auth JWT to validate:

      -
    • Identify who is making the request
    • -
    • Proxy writes to the correct PDS
    • -
    • Check admin permissions (for admin endpoints)
    • +
    • alg must be ES256 or ES256K.
    • +
    • typ must not be at+jwt, refresh+jwt, or dpop+jwt (those are other token types, not inter-service JWTs).
    • +
    • exp must be in the future.
    • +
    • The signature must verify against the issuer DID's atproto signing key.
    -

    Token validation happens on every request; there is no local token caching.

    -

    Admin access​

    -

    Admin endpoints require the authenticated user's DID to exist in the admins table. If the table is empty (fresh deployment), the first authenticated request to any admin endpoint auto-bootstraps that user as the initial admin.

    -

    To add more admins, use POST /admin/admins or the dashboard. See Admin API for details.

    +

    As with the other methods, the resolved DID still has to exist in the HappyView users table with the right permissions to hit admin endpoints — service auth gets you identified, not privileged.

    +

    Admin access and the first user​

    +

    On a fresh deployment, the users table is empty. The first authenticated request to any admin endpoint auto-bootstraps that user as the super user with all permissions granted. This includes logging in to the dashboard — the dashboard makes admin API calls on your behalf, so the first person to log in becomes the super user.

    +

    To add more users after that, use POST /admin/users or the dashboard. You can assign permissions individually or use a template (viewer, operator, manager, full_access). See Admin API — Users for details.

    +

    Proxying procedures to the user's PDS​

    +

    When a client calls an XRPC procedure that writes a record, HappyView proxies the write to the user's PDS. This requires a DPoP-authenticated session — the app must have gone through the DPoP key provisioning flow and registered tokens for the user. HappyView uses the app's provisioned DPoP key to generate fresh proofs and attach the stored access token to the outbound PDS request.

    +

    A request that only carries an X-Client-Key header (no DPoP token) can hit queries but can't proxy writes — there's no user to write as.

    +

    DPoP key provisioning for third-party apps​

    +

    Third-party apps that want HappyView to make PDS writes on behalf of their users use the DPoP key provisioning flow. This avoids browser-based redirects through HappyView's domain, which can be blocked by Firefox's Bounce Tracker Protection.

    +

    The idea: the app gets a DPoP keypair from HappyView, uses that keypair during its own OAuth flow with the user's PDS, then registers the resulting tokens back with HappyView. From that point on, XRPC requests authenticated with Authorization: DPoP <access_token> plus a DPoP proof header and X-Client-Key will have HappyView proxy writes using the stored session.

    +

    The client app and HappyView share the same DPoP keypair, so both can generate valid proofs that the PDS will accept. The PDS binds tokens to a key's thumbprint but it doesn't care who signs the proof, only that it was signed by the right key.

    +

    Flow overview​

    + +
    tip

    The JavaScript SDK handles this entire flow for you. The raw HTTP flow below is useful for understanding the protocol or building a non-JavaScript client.

    +

    API clients: confidential vs public​

    +

    API clients have a client_type field — either confidential (default) or public.

    +
      +
    • Confidential clients authenticate with X-Client-Key + X-Client-Secret headers on every /oauth/* request.
    • +
    • Public clients (browser apps that can't keep a secret) authenticate with X-Client-Key header + PKCE. The app sends a pkce_challenge (S256) in the body when provisioning a key, then proves possession with pkce_verifier when registering a session. Public clients also have allowed_origins — the Origin header must match.
    • +
    +

    The full flow​

    +

    1. Provision a DPoP key​

    +
    POST /oauth/dpop-keys
    X-Client-Key: hvc_...
    X-Client-Secret: hvs_...
    Content-Type: application/json

    {}
    +

    For public clients, omit X-Client-Secret and include the PKCE challenge in the body:

    +
    POST /oauth/dpop-keys
    X-Client-Key: hvc_...
    Origin: http://localhost:3000
    Content-Type: application/json

    { "pkce_challenge": "base64url..." }
    +

    Response:

    +
    {
    "provision_id": "hvp_...",
    "dpop_key": {
    "kty": "EC",
    "crv": "P-256",
    "x": "...",
    "y": "...",
    "d": "..."
    }
    }
    +

    The dpop_key is the private JWK. Use it to generate DPoP proofs during your OAuth flow with the user's PDS.

    +

    2. Run OAuth with the user's PDS​

    +

    Use the provisioned DPoP key as your DPoP keypair in a standard atproto OAuth flow with the user's PDS. HappyView is not involved in this step — the app talks directly to the PDS authorization server.

    +

    3. Register the session​

    +

    After the OAuth callback, register the token set with HappyView:

    +
    POST /oauth/sessions
    X-Client-Key: hvc_...
    X-Client-Secret: hvs_...
    Content-Type: application/json

    {
    "provision_id": "hvp_...",
    "did": "did:plc:user123",
    "access_token": "...",
    "refresh_token": "...",
    "expires_at": "2026-04-17T00:00:00Z",
    "scopes": "atproto transition:generic",
    "pds_url": "https://bsky.social",
    "issuer": "https://bsky.social"
    }
    +

    For public clients, omit X-Client-Secret and include the PKCE verifier in the body:

    +
    {
    "provision_id": "hvp_...",
    "pkce_verifier": "...",
    "did": "did:plc:user123",
    "access_token": "...",
    "refresh_token": "...",
    "expires_at": "2026-04-17T00:00:00Z",
    "scopes": "atproto transition:generic",
    "pds_url": "https://bsky.social",
    "issuer": "https://bsky.social"
    }
    +

    Response:

    +
    {
    "session_id": "uuid",
    "did": "did:plc:user123"
    }
    +

    4. Make XRPC requests​

    +

    With a registered session, send XRPC requests using DPoP auth:

    +
    curl -X POST 'https://happyview.example.com/xrpc/com.example.feed.createPost' \
    -H 'X-Client-Key: hvc_...' \
    -H 'Authorization: DPoP <access_token>' \
    -H 'DPoP: <proof_jwt>' \
    -H 'Content-Type: application/json' \
    -d '{"text": "Hello world"}'
    +

    HappyView validates the DPoP proof, looks up the stored session, and proxies the write to the user's PDS using the provisioned DPoP key to generate a fresh proof.

    +

    5. Logout​

    +

    Confidential clients authenticate with X-Client-Key + X-Client-Secret:

    +
    DELETE /oauth/sessions/did:plc:user123
    X-Client-Key: hvc_...
    X-Client-Secret: hvs_...
    +

    Public clients must provide a valid DPoP proof to prove they hold the key:

    +
    DELETE /oauth/sessions/did:plc:user123
    X-Client-Key: hvc_...
    Authorization: DPoP <access_token>
    DPoP: <proof_jwt>
    +

    This deletes the stored session and the associated DPoP key.

    +

    Security notes​

    +
      +
    • Private keys and tokens are encrypted at rest with AES-256-GCM using TOKEN_ENCRYPTION_KEY.
    • +
    • DPoP proofs are validated for method, URL, timestamp (5-minute window), access token binding, and JWK thumbprint.
    • +
    • Scopes requested must include atproto and must be a subset of the API client's registered scopes.
    • +
    +

    Next steps​

    +
    \ No newline at end of file diff --git a/getting-started/configuration/index.html b/getting-started/configuration/index.html index 6c03e34..ddec41f 100644 --- a/getting-started/configuration/index.html +++ b/getting-started/configuration/index.html @@ -2,20 +2,26 @@ - -Configuration | HappyView - - + +Configuration | HappyView + + - + -

    Configuration

    +

    Configuration

    HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.

    -

    Environment variables​

    -
    VariableRequiredDefaultDescription
    DATABASE_URLyes---Postgres connection string
    AIP_URLyes---AIP instance URL for OAuth token validation
    HOSTno0.0.0.0Bind host
    PORTno3000Bind port
    TAP_URLnohttp://localhost:2480Tap instance URL for real-time record streaming and backfill
    TAP_ADMIN_PASSWORDno---Shared secret for authenticating with Tap's admin endpoints
    RELAY_URLnohttps://bsky.networkRelay URL for backfill repo discovery
    PLC_URLnohttps://plc.directoryPLC directory URL for DID resolution
    EVENT_LOG_RETENTION_DAYSno30Number of days to keep event logs before automatic cleanup. Set to 0 to disable cleanup
    RUST_LOGnohappyview=debug,tower_http=debugLog filter (uses tracing_subscriber::EnvFilter)
    -

    Example .env​

    -
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview
    AIP_URL=http://localhost:8080

    # Optional overrides
    # HOST=0.0.0.0
    # PORT=3000
    # TAP_URL=http://localhost:2480
    # TAP_ADMIN_PASSWORD=your-secret-here
    # RELAY_URL=https://bsky.network
    # PLC_URL=https://plc.directory
    # EVENT_LOG_RETENTION_DAYS=30
    # RUST_LOG=happyview=debug,tower_http=debug
    +

    Environment variables​

    +
    VariableRequiredDefaultDescription
    DATABASE_URLyes---Database connection string. SQLite (sqlite://path/to/db?mode=rwc) or Postgres (postgres://user:pass@host/db)
    DATABASE_BACKENDnoauto-detectedForce sqlite or postgres. Auto-detected from DATABASE_URL scheme if not set
    PUBLIC_URLyes---Public-facing URL for HappyView (used for OAuth callbacks, e.g. https://happyview.example.com)
    SESSION_SECRETnodev defaultSecret key for signing session cookies (at least 64 characters). Must be set in production
    HOSTno0.0.0.0Bind host
    PORTno3000Bind port
    JETSTREAM_URLnowss://jetstream1.us-east.bsky.networkJetstream WebSocket URL for real-time record streaming
    RELAY_URLnohttps://bsky.networkRelay URL for backfill repo discovery
    PLC_URLnohttps://plc.directoryPLC directory URL for DID resolution
    STATIC_DIRno./web/outDirectory containing the built dashboard static assets
    EVENT_LOG_RETENTION_DAYSno30Number of days to keep event logs before automatic cleanup. Set to 0 to disable cleanup
    TOKEN_ENCRYPTION_KEYno---Base64-encoded 32-byte key for encrypting stored OAuth tokens. Strongly recommended in production
    DEFAULT_RATE_LIMIT_CAPACITYno100Default token bucket capacity used when registering a new API client
    DEFAULT_RATE_LIMIT_REFILL_RATEno2.0Default token bucket refill rate (tokens/second) for new API clients
    RUST_LOGnohappyview=debug,tower_http=debugLog filter (uses tracing_subscriber::EnvFilter)
    APP_NAMEno---Application name shown on OAuth authorization screens. Overridden by database setting if set via admin API
    LOGO_URIno---URL to application logo for OAuth screens. Overridden by database setting or logo upload
    TOS_URIno---URL to terms of service. Overridden by database setting if set via admin API
    POLICY_URIno---URL to privacy policy. Overridden by database setting if set via admin API
    +

    Example .env​

    +
    # SQLite (default — zero setup required)
    DATABASE_URL=sqlite://data/happyview.db?mode=rwc
    PUBLIC_URL=http://localhost:3000
    SESSION_SECRET=change-me-in-production

    # Or use Postgres instead:
    # DATABASE_URL=postgres://happyview:happyview@localhost/happyview

    # Optional overrides
    # HOST=0.0.0.0
    # PORT=3000
    # JETSTREAM_URL=wss://jetstream1.us-east.bsky.network
    # RELAY_URL=https://bsky.network
    # PLC_URL=https://plc.directory
    # STATIC_DIR=./web/out
    # EVENT_LOG_RETENTION_DAYS=30
    # TOKEN_ENCRYPTION_KEY=base64-encoded-32-byte-key
    # DEFAULT_RATE_LIMIT_CAPACITY=100
    # DEFAULT_RATE_LIMIT_REFILL_RATE=2.0
    # RUST_LOG=happyview=debug,tower_http=debug
    # APP_NAME=My App
    # LOGO_URI=https://example.com/logo.png
    # TOS_URI=https://example.com/tos
    # POLICY_URI=https://example.com/privacy
    +

    Next steps​

    +
    \ No newline at end of file diff --git a/getting-started/dashboard/index.html b/getting-started/dashboard/index.html index 1bcde15..380b2a2 100644 --- a/getting-started/dashboard/index.html +++ b/getting-started/dashboard/index.html @@ -2,39 +2,73 @@ - -Dashboard | HappyView - - + +Dashboard | HappyView + + - + -

    Dashboard

    -

    HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend.

    -

    Logging in for the first time​

    -

    The dashboard uses AT Protocol OAuth via AIP. If no admins exist in the database yet, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin.

    -

    Adding a lexicon​

    -

    Navigate to Lexicons > Add Lexicon and choose Local or Network.

    +

    Dashboard

    +

    HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers. It runs as a separate Next.js application alongside the Rust backend and authenticates via atproto OAuth.

    +

    On a fresh deployment with no users in the database, the first person to log in to the dashboard is automatically bootstrapped as the super user with all permissions — so log in with the handle you want to own the instance first.

    +

    Lexicons​

    +

    Navigate to Lexicons to see all uploaded lexicons. Each entry shows the NSID, type (record, query, procedure), and whether a Lua script is attached.

    +

    Adding a lexicon​

    +

    Click Add Lexicon and choose Local or Network.

    Local lexicons are defined by you. The editor shows two side-by-side panels (stacked on mobile):

    • Lexicon JSON (left): define your lexicon schema
    • Lua Script (right): write the handler for query/procedure types

    The Lua panel only appears when the lexicon's defs.main.type is query or procedure. For record-type lexicons, only the JSON panel is shown.

    -

    A default Lua script is auto-generated when you first set the type to query or procedure. The template updates automatically when the type changes, but once you manually edit the script your changes are preserved.

    +

    HappyView generates a default Lua script when you first set the type to query or procedure. The template updates when the type changes, but once you edit the script your changes are preserved.

    Toggle Enable backfill to index historical records when uploading a record-type lexicon.

    -

    Network lexicons are fetched from the AT Protocol network. Enter an NSID (e.g. xyz.statusphere.status) and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click Add to track it. Network lexicons are kept up to date via Tap. See Lexicons - Network lexicons for how resolution works.

    -

    JSON editor​

    -

    The JSON editor provides real-time validation against the AT Protocol Lexicon v1 schema:

    +

    Network lexicons are fetched from the atproto network. Enter an NSID (e.g. xyz.statusphere.status) and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click Add to track it. Network lexicons are kept up to date via the Jetstream subscription. See Lexicons - Network lexicons for how resolution works.

    +

    JSON editor​

    +

    The JSON editor provides real-time validation against the atproto Lexicon v1 schema:

    • Validation for Lexicon format
    • Auto-complete for definition types (record, query, procedure, subscription), property types (string, integer, boolean, ref, union, blob, cid-link, etc.), and schema structure (defs, main, properties, required)
    • Enforces the required top-level shape: lexicon, id, and defs.main
    -

    Lua editor​

    -

    The Lua editor provides context-aware code completions, including suggestions for the Record, db, input, and params APIs as well as Lua keywords, builtins, and standard library functions. It also offers snippet templates for common constructs like if, for, and function.

    -

    See Lua Scripting for the full runtime reference and examples.

    +

    Lua editor​

    +

    The Lua editor provides context-aware code completions, including suggestions for the Record, db, input, and params APIs as well as Lua keywords, builtins, and standard library functions. It also has snippets for if, for, function, etc.

    +

    See Lua Scripting for the full runtime reference and examples.

    +

    Records​

    +

    Navigate to Records to browse all indexed atproto records. Records are grouped by collection and searchable. Each record shows its AT URI, author DID, and the raw record JSON.

    +

    Backfill​

    +

    Navigate to Backfill to view and manage backfill jobs. You can start a new backfill for any record-type lexicon to import historical records from the network. The page shows job status, progress (repos processed / total), and record counts. See Backfill for how the process works.

    +

    Users​

    +

    Navigate to Users to manage who can access the admin API and dashboard. You can add users by DID, assign permissions individually or via a template (viewer, operator, manager, full_access), and remove users. The super user is highlighted and has all permissions by default. See Permissions for what each permission grants.

    +

    Events​

    +

    Navigate to Events to view the audit log of admin actions. Events include user creation, lexicon uploads, permission changes, backfill starts, and more. Each entry shows the event type, severity, actor, subject, and timestamp. Events are retained for the number of days configured by EVENT_LOG_RETENTION_DAYS (default 30).

    +

    Settings​

    +

    The Settings section contains several sub-pages:

    +

    General​

    +

    Configure instance-level settings: application name, logo, terms of service URL, and privacy policy URL. These values appear on OAuth authorization screens and can also be set via environment variables — dashboard values take precedence.

    +

    API Clients​

    +

    Register and manage third-party API clients. Each client gets an hvc_… client key and hvs_… client secret. You can configure the client type (confidential or public), allowed origins, scopes, and per-client rate limits. See Authentication — API client identification for how clients are used.

    +

    API Keys​

    +

    Create and revoke admin API keys for automation. Each key is scoped to specific permissions and tied to the creating user. See API Keys for details.

    +

    Users​

    +

    An alternative path to the top-level Users page for managing user accounts and permissions.

    +

    Plugins​

    +

    Manage installed plugins and configure plugin secrets. Plugins extend HappyView with additional functionality. Plugin secrets are encrypted at rest when TOKEN_ENCRYPTION_KEY is configured. See Plugins for details.

    +

    Labelers​

    +

    Configure labeler subscriptions for content labeling. See Labelers for details.

    +

    Environment Variables​

    +

    View the current values of all environment variables that affect HappyView's behavior. This is a read-only view — values are set via your deployment environment, not the dashboard.

    +

    Accounts​

    +

    Manage connected atproto accounts used by the instance.

    +

    Next steps​

    +
      +
    • Lexicons — how lexicons drive HappyView's indexing and routing
    • +
    • Lua Scripting — write custom query and procedure logic
    • +
    • Permissions — manage user access to admin features
    • +
    • Configuration — full list of environment variables
    • +
    \ No newline at end of file diff --git a/getting-started/deployment/docker/index.html b/getting-started/deployment/docker/index.html index 3704e49..fe7fa90 100644 --- a/getting-started/deployment/docker/index.html +++ b/getting-started/deployment/docker/index.html @@ -2,34 +2,32 @@ - -Local Development with Docker | HappyView - - + +Local Development with Docker | HappyView + + - + -

    Local Development with Docker

    -

    This guide runs the full HappyView stack locally using Docker Compose: Postgres, Tap, HappyView, and the web dashboard.

    -

    Prerequisites​

    +

    Local Development with Docker

    +

    This guide runs HappyView and the dashboard locally using Docker Compose.

    +

    Prerequisites​

    • Docker and Docker Compose
    • -
    • An AIP instance for OAuth. The Docker Compose config points at the public AIP instance at aip.gamesgamesgamesgames.games by default.
    -
    warning

    This public AIP instance is provided for development convenience only. Production deployments should run their own AIP instance or risk being blocked. See the AIP documentation for setup.

    -

    1. Clone and configure​

    -
    git clone https://github.com/graze-social/happyview.git
    cd happyview
    cp .env.example .env
    -

    Set TAP_ADMIN_PASSWORD in your .env. This shared secret is used by both Tap and HappyView:

    -
    TAP_ADMIN_PASSWORD=your-secret-here
    -

    The docker-compose.yml configures everything else (database URLs, service connections) automatically.

    -

    2. Start the stack​

    -
    docker compose up
    +

    1. Clone and configure​

    +
    git clone https://github.com/graze-social/happyview.git
    cd happyview
    cp .env.example .env
    +

    Edit .env and set at least PUBLIC_URL (e.g. http://localhost:3000) and SESSION_SECRET (at least 64 characters). The defaults work for everything else. See Configuration for the full list of environment variables.

    +

    2. Start the stack​

    +
    docker compose up

    This starts:

    -
    ServicePortDescription
    postgres5432PostgreSQL 17 (databases for both HappyView and Tap)
    tap2480Firehose consumer, backfill worker
    happyview3000HappyView API server
    web3001Next.js dashboard
    +
    ServicePortDescription
    happyview3000HappyView API server
    web3001Next.js dashboard

    HappyView runs migrations automatically on startup. The first build will take a few minutes while Rust compiles.

    -

    Next steps​

    -

    Your HappyView stack is running. Follow the Statusphere tutorial to upload lexicons, add custom query logic, and start indexing records from the network.

    +

    The happyview container serves its own bundled dashboard at http://localhost:3000, but that copy is baked in at container build time and only updates when you rebuild the image. For day-to-day development, use the dev dashboard at http://localhost:3001 — it hot-reloads on changes to the web/ source.

    +
    tip

    SQLite is the default and requires no extra services. To use Postgres instead, uncomment the postgres service in docker-compose.yml and update DATABASE_URL in .env. See the database setup guide.

    +

    Next steps​

    +

    Your HappyView stack is running. Follow the Statusphere tutorial to upload lexicons, add custom query logic, and start indexing records from the network.

    \ No newline at end of file diff --git a/getting-started/deployment/other/index.html b/getting-started/deployment/other/index.html index 546cb9c..2ee1577 100644 --- a/getting-started/deployment/other/index.html +++ b/getting-started/deployment/other/index.html @@ -2,38 +2,40 @@ - -Local Development from Source | HappyView - - + +Local Development from Source | HappyView + + - + -

    Local Development from Source

    -

    This guide runs HappyView directly with cargo run, with you managing Postgres, AIP, and Tap separately. If you'd rather use Docker Compose to run everything together, see Local Development with Docker.

    -

    Prerequisites​

    +

    Local Development from Source

    +

    This guide runs HappyView directly with cargo run. If you'd rather use Docker Compose, see Local Development with Docker.

    +

    Prerequisites​

    • Rust (stable)
    • -
    • PostgreSQL 17+
    • -
    • A running AIP instance (handles OAuth). See the AIP documentation for setup.
    • -
    • A running Tap instance (delivers real-time records and handles backfill). See the Tap documentation for setup.
    • +
    • (Optional) PostgreSQL 17+ if you prefer Postgres over the default SQLite
    -

    1. Clone and configure​

    -
    git clone https://github.com/graze-social/happyview.git
    cd happyview
    cp .env.example .env
    +

    1. Clone and configure​

    +
    git clone https://github.com/graze-social/happyview.git
    cd happyview
    cp .env.example .env

    Edit .env to point at your running services:

    -
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview
    AIP_URL=http://localhost:8080
    TAP_URL=http://localhost:2480
    TAP_ADMIN_PASSWORD=your-secret-here
    -

    See Configuration for all available variables.

    -

    2. Create the database​

    -
    createdb happyview
    +
    # SQLite (default — no setup needed, file created automatically)
    DATABASE_URL=sqlite://data/happyview.db?mode=rwc
    PUBLIC_URL=http://localhost:3000
    SESSION_SECRET=change-me-in-production
    +

    Or if you prefer Postgres:

    +
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview
    +

    See Configuration for all available variables and the database setup guide for details on both backends.

    +

    2. Create the database (Postgres only)​

    +

    If using SQLite, skip this step — HappyView creates the database file automatically.

    +

    If using Postgres:

    +
    createdb happyview

    Or if using a Postgres user with a password:

    -
    psql -c "CREATE DATABASE happyview;" -U postgres
    +
    psql -c "CREATE DATABASE happyview;" -U postgres

    HappyView runs migrations automatically on startup, so no manual migration step is needed.

    -

    3. Start HappyView​

    -
    cargo run
    +

    3. Start HappyView​

    +
    cargo run

    HappyView starts on port 3000 (configurable via the PORT environment variable).

    -

    Next steps​

    -

    Your HappyView instance is running. Follow the Statusphere tutorial to upload lexicons, add custom query logic, and start indexing records from the network.

    +

    Next steps​

    +

    Your HappyView instance is running. Follow the Statusphere tutorial to upload lexicons, add custom query logic, and start indexing records from the network.

    \ No newline at end of file diff --git a/getting-started/deployment/railway/index.html b/getting-started/deployment/railway/index.html index 61c6956..a1f519b 100644 --- a/getting-started/deployment/railway/index.html +++ b/getting-started/deployment/railway/index.html @@ -2,34 +2,38 @@ - -Deploy on Railway | HappyView - - + +Deploy on Railway | HappyView + + - + -

    Deploy on Railway

    -

    The fastest way to get HappyView running is with Railway. This template deploys HappyView, AIP (OAuth provider), Tap (real-time data and backfill), and Postgres with a single click:

    -

    Deploy on Railway

    -

    Required configuration​

    +

    Deploy on Railway

    +

    The fastest way to get HappyView running is with Railway. This template deploys HappyView and Postgres with a single click:

    +

    Deploy on Railway

    +

    Required configuration​

    After deploying the template, you'll need to configure a few things before the stack works properly:

    1. -

      Set your admin DID. In the AIP service variables, set ADMIN_DIDS to your AT Protocol DID (e.g. did:plc:abc123...). You can find your DID by looking up your handle on Internect.

      +

      Set your session secret. In the HappyView service variables, set SESSION_SECRET to a random string of at least 64 characters. This is used to sign session cookies.

      +
      openssl rand -base64 48
    2. -

      Generate AIP signing keys. The OAUTH_SIGNING_KEYS and ATPROTO_OAUTH_SIGNING_KEYS variables require multibase-encoded P-256 private keys. See the AIP Signing Keys documentation for generation instructions.

      +

      Assign a public domain. In the Railway dashboard, add a public domain to the HappyView service. The service needs a publicly accessible URL for OAuth callbacks. Set PUBLIC_URL to this domain (e.g. https://happyview-production.up.railway.app).

      +
      note

      Your instance can use a custom domain or Railway's generated URL with no additional configuration.

    3. -

      Assign public domains. In the Railway dashboard, add a public domain to both the HappyView and AIP services. The services need publicly accessible URLs to handle OAuth callbacks and XRPC requests.

      -
      note

      Your instances can use custom domains or Railway's generated URLs with no additional configuration. The domains are injected automatically to the containers.

      +

      Access your HappyView dashboard at the instance's public URL. The first user to log in is automatically bootstrapped as the super user.

    4. -
    5. -

      Access your HappyView dashboard at the instance's public URL.

      -
    6. -
    + +

    Next steps​

    +
    \ No newline at end of file diff --git a/getting-started/quickstart/index.html b/getting-started/quickstart/index.html index e79829c..897fa08 100644 --- a/getting-started/quickstart/index.html +++ b/getting-started/quickstart/index.html @@ -2,50 +2,48 @@ - -Quickstart | HappyView - - + +Quickstart | HappyView + + - + -

    Quickstart

    -

    This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints.

    -

    1. Deploy HappyView​

    +

    Quickstart

    +

    This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the atproto network and serves XRPC endpoints.

    +

    1. Deploy HappyView​

    Pick whichever option fits your situation:

    -
    OptionBest for
    RailwayFastest path — one-click deploy of the full stack (HappyView + AIP + Tap + Postgres)
    Docker ComposeLocal development with the full stack running in containers
    From sourceRunning HappyView with cargo run and managing dependencies yourself
    +
    OptionBest for
    RailwayFastest path — one-click deploy of HappyView + Postgres
    Docker ComposeLocal development with the full stack in containers
    From sourceRunning HappyView with cargo run and managing dependencies yourself

    If you're just trying HappyView for the first time, start with Railway.

    -

    2. Log in to the dashboard​

    -

    Open your HappyView instance in a browser. The built-in dashboard is served at the root URL.

    -

    Click Log in and authenticate with your AT Protocol identity. On a fresh deployment with no admins configured, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin.

    -

    3. Add your first lexicon​

    +

    2. Log in to the dashboard​

    +

    The built-in dashboard is served at your instance's root URL. Log in with your atproto identity — on a fresh deployment, the first handle to authenticate is automatically bootstrapped as the super user with all permissions, so use the handle you want to own the instance.

    +

    3. Add your first lexicon​

    Lexicons tell HappyView what data to index and what endpoints to serve. The quickest way to get started is to add one from the network:

    1. In the dashboard, go to Lexicons > Add Lexicon > Network
    2. Enter an NSID (e.g. xyz.statusphere.status)
    3. -
    4. HappyView resolves the schema from the AT Protocol network and shows a preview
    5. +
    6. HappyView resolves the schema from its authority domain records and shows a preview
    7. Click Add
    -

    HappyView immediately starts indexing records for that collection. A backfill job is created to fetch historical records, and new records stream in via Tap in real time.

    +

    HappyView starts indexing records for that collection. A backfill job fetches historical records, and new records stream in via Jetstream.

    You can also upload lexicons manually via the dashboard or the admin API. See Lexicons for the full details.

    -

    4. Verify records are being indexed​

    -

    Go to the Dashboard home page. The stat cards show the total record count and a breakdown by collection. You can also browse indexed records on the Records page.

    -

    To check backfill progress, go to the Backfill page. The Tap stats cards show how many repos and records Tap has processed.

    -

    5. Query your data​

    -

    Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to Lexicons > Add Lexicon > Local and create a query lexicon with target_collection set to your record collection's NSID.

    +

    4. Verify records are being indexed​

    +

    The dashboard home shows a live record count and a per-collection breakdown. For a deeper look, browse Records to inspect individual rows or Backfill to watch the historical fetch job drain.

    +

    5. Query your data​

    +

    Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to Lexicons > Add Lexicon > Local and create a query lexicon with target_collection set to your record collection's NSID. (target_collection is a HappyView-specific field that tells a query or procedure which record collection it operates on.)

    Without a Lua script, HappyView generates a default query endpoint that supports limit, cursor, did, and uri parameters:

    -
    GET /xrpc/xyz.statusphere.listStatuses?limit=5
    +
    GET /xrpc/xyz.statusphere.listStatuses?limit=5

    For custom query logic, attach a Lua script.

    -

    Next steps​

    -

    You now have a working AppView. Here's where to go from here:

    +

    Next steps​

    +

    Here's where to go from here:

    +
    \ No newline at end of file diff --git a/guides/api-keys/index.html b/guides/api-keys/index.html index e1cc595..a24691d 100644 --- a/guides/api-keys/index.html +++ b/guides/api-keys/index.html @@ -2,55 +2,56 @@ - -API Keys | HappyView - - + +API Keys | HappyView + + - + -

    API Keys

    +

    API Keys

    API keys let you authenticate with the admin API without going through the OAuth flow. They're useful for CI/CD pipelines, scripts, and any automation that needs to manage your HappyView instance programmatically.

    -

    How API keys work​

    +

    How API keys work​

    Each API key is a 35-character token with the format hv_ followed by 32 random hex characters:

    -
    hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4
    +
    hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4

    When you create a key, HappyView shows the full token once. After that, only the prefix (hv_a1b2c3d4) is stored for display — the key itself is SHA-256 hashed before being saved to the database. This means nobody (including you) can retrieve the full key after creation.

    -

    API keys inherit the permissions of the admin who created them. A revoked key immediately stops working.

    -

    Creating a key​

    +

    Each API key has its own set of scoped permissions. When you create a key, you specify which permissions it should have. The key's effective permissions are the intersection of the permissions assigned to the key and the permissions of the user who created it — a key can never have more access than its creator. A revoked key immediately stops working.

    +

    Creating a key​

      -
    1. Go to Settings in the dashboard
    2. -
    3. Select the API Keys tab
    4. +
    5. Go to Settings > API Keys in the dashboard sidebar
    6. Click Create API Key
    7. Enter a descriptive name (e.g., "CI Deploy", "Monitoring Script")
    8. +
    9. Select the permissions the key should have
    10. Copy the full key from the confirmation dialog — you won't see it again
    -

    Using a key​

    +

    Using a key​

    Pass the key as a Bearer token in the Authorization header:

    -
    curl http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
    -

    This works for all admin API endpoints — anything you can do with an OAuth token, you can do with an API key.

    -

    Revoking a key​

    +
    curl http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
    +

    This works for all admin API endpoints that the key has permissions for. Unlike OAuth tokens which carry the user's full permissions, API keys are limited to the specific permissions assigned at creation time.

    +

    Revoking a key​

    1. Go to Settings > API Keys
    2. Click Revoke next to the key
    3. Confirm in the dialog

    Revoked keys are soft-deleted: they remain visible in the table (with a strikethrough) for audit purposes but can no longer authenticate. Any service using the key will immediately receive 401 Unauthorized responses.

    -

    Tracking usage​

    +

    Tracking usage​

    The Last Used column in the API Keys table shows when each key was last used to authenticate a request. Keys that have never been used show "Never". This helps you identify unused keys that can be safely revoked.

    -

    Security considerations​

    +

    Security considerations​

      -
    • Treat API keys like passwords. Anyone with the key has full admin access to your HappyView instance.
    • +
    • Treat API keys like passwords. Anyone with the key can access your HappyView instance with the key's permissions.
    • +
    • Use the principle of least privilege. Only grant the permissions a key actually needs. A CI deploy key probably only needs lexicons:create and backfill:create, not full access.
    • Use descriptive names so you can identify which service uses which key.
    • Revoke keys you no longer need. If a key is compromised, revoke it immediately.
    • Don't commit keys to version control. Use environment variables or secret managers instead.
    -

    Next steps​

    +

    Next steps​

    +
    \ No newline at end of file diff --git a/guides/backfill/index.html b/guides/backfill/index.html index 6bb343a..49e6357 100644 --- a/guides/backfill/index.html +++ b/guides/backfill/index.html @@ -2,42 +2,42 @@ - -Backfill | HappyView - - + +Backfill | HappyView + + - + -

    Backfill

    -

    When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Tap. But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap.

    -

    When backfill runs​

    +

    Backfill

    +

    When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Jetstream. But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and fetches records directly from each user's PDS.

    +

    When backfill runs​

    • Automatically when a record-type lexicon is uploaded with backfill: true (the default). See Lexicons - Backfill flag.
    • Manually via POST /admin/backfill or the dashboard. You can scope a manual backfill to a specific collection, a specific DID, or both.
    -

    See the admin API for endpoint details.

    -

    How it works​

    +

    See the admin API for endpoint details.

    +

    How it works​

    1. Determine target collections: uses the specified collection, or all record lexicons with backfill: true
    2. -
    3. Discover DIDs: HappyView calls the relay's com.atproto.sync.listReposByCollection to find repos that contain records for each target collection (paginated, 1000 per page)
    4. -
    5. Delegate to Tap: HappyView sends discovered DIDs to Tap in batches of 1000 via its /repos/add endpoint
    6. -
    7. Tap fetches records: Tap handles the actual record fetching from each user's PDS and delivers them to HappyView via the WebSocket channel
    8. +
    9. Discover DIDs: HappyView calls the relay's com.atproto.sync.listReposByCollection to find repos that contain records for each target collection (paginated)
    10. +
    11. Resolve each PDS: for each discovered DID, HappyView resolves the DID document via PLC to find the user's PDS endpoint
    12. +
    13. Fetch records: HappyView calls com.atproto.repo.listRecords on each PDS for the target collection (paginated) and upserts each record into the local database
    14. +
    15. Track progress: counters for processed_repos and total_records are updated as the job runs
    -

    Job lifecycle​

    -

    HappyView marks a backfill job as "completed" once it finishes discovering repos and handing DIDs off to Tap (steps 1-3). This does not mean Tap has finished processing all the records. Tap works through them asynchronously after the handoff.

    -

    To see whether Tap is still working through the backlog, check the Tap stats on the dashboard's Backfill page or via GET /admin/tap/stats. The outbox buffer indicates how many events are still queued for delivery; a high number means Tap is actively processing.

    -

    Re-running backfills​

    -

    Re-running a backfill for a collection that's already been backfilled is safe. HappyView removes the discovered repos from Tap before re-adding them, which clears Tap's cached state and forces a full re-fetch of all records from each repo's PDS. This means re-running a backfill will restore any records that were previously deleted from HappyView, as well as pick up repos that were added to the network since the last run.

    -

    Restoring deleted records​

    -

    Deleting records from HappyView (via the dashboard or API) only removes them from the local database — the records still exist on the AT Protocol network. To restore deleted records, create a backfill job for the affected collection. The backfill will clear Tap's cache for the discovered repos and re-fetch all records from the network, restoring any that were previously deleted.

    -

    Next steps​

    +

    Job lifecycle​

    +

    A backfill job moves through pending → running → completed (or failed). Unlike earlier versions of HappyView that relied on Tap, the job is only marked completed once every discovered repo has been processed end-to-end — there is no separate downstream queue. Progress is visible in real time on the dashboard's Backfill page.

    +

    If a job fails midway, the error field contains the failure reason. Re-running the backfill resumes from scratch but is idempotent (records are upserted by URI).

    +

    Re-running backfills​

    +

    Re-running a backfill for a collection that's already been backfilled is safe. Each record is upserted by its AT URI, so existing records are refreshed in place and any new records discovered since the last run are added. This also picks up new repos that have joined the network since the previous backfill.

    +

    Restoring deleted records​

    +

    Deleting records from HappyView (via the dashboard or API) only removes them from the local database — the records still exist on the atproto network. To restore deleted records, create a backfill job for the affected collection. The backfill will re-discover the repos and re-fetch all records from each PDS, restoring any that were previously deleted.

    +

    Next steps​

    +
  • Admin API — Backfill: Full reference for backfill endpoints
  • +
    \ No newline at end of file diff --git a/guides/database-setup/index.html b/guides/database-setup/index.html new file mode 100644 index 0000000..4887a5d --- /dev/null +++ b/guides/database-setup/index.html @@ -0,0 +1,63 @@ + + + + + +Database Setup | HappyView + + + + + + + +

    Database Setup

    +

    HappyView supports two database backends: SQLite (default) and PostgreSQL. The backend is auto-detected from your DATABASE_URL scheme, or you can set DATABASE_BACKEND explicitly.

    +

    SQLite (default)​

    +

    SQLite requires zero setup. HappyView creates the database file automatically on first startup.

    +
    DATABASE_URL=sqlite://data/happyview.db?mode=rwc
    +

    The ?mode=rwc parameter tells SQLite to create the file if it does not exist. The path is relative to the working directory (or use an absolute path).

    +

    When to use SQLite:

    +
      +
    • Getting started or local development
    • +
    • Small to medium deployments
    • +
    • Single-server setups where simplicity is preferred
    • +
    +

    PostgreSQL (optional)​

    +

    For larger deployments or when you need concurrent write scalability, use Postgres.

    +
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview
    +

    You need to create the database before starting HappyView:

    +
    createdb happyview
    +

    HappyView runs migrations automatically on startup for both backends.

    +

    When to use Postgres:

    +
      +
    • High write concurrency from many simultaneous users
    • +
    • You need Postgres-specific features (e.g., advanced JSON queries in Lua scripts)
    • +
    • You already have a Postgres infrastructure
    • +
    +

    Environment variables​

    +
    VariableDescription
    DATABASE_URLConnection string. sqlite://... for SQLite, postgres://... for Postgres
    DATABASE_BACKENDOptional. Force sqlite or postgres. Auto-detected from DATABASE_URL if not set
    +

    Docker Compose​

    +

    The default docker-compose.yml ships with the Postgres service commented out. To use Postgres:

    +
      +
    1. Uncomment the postgres service and pgdata volume in docker-compose.yml
    2. +
    3. Uncomment the depends_on: postgres block in the happyview service
    4. +
    5. Update DATABASE_URL in .env: +
      DATABASE_URL=postgres://happyview:happyview@postgres/happyview
      +
    6. +
    7. Set the Postgres credentials: +
      POSTGRES_USER=happyview
      POSTGRES_PASSWORD=happyview
      POSTGRES_DB=happyview
      +
    8. +
    +

    Lua scripts​

    +

    Both backends support the same Lua database API (db.query, db.get, db.count). Write SQL in SQLite syntax by default. If you are using Postgres, HappyView automatically translates common SQLite patterns to Postgres equivalents at runtime.

    +

    If you are migrating existing Lua scripts from Postgres SQL syntax to SQLite syntax, see the Postgres to SQLite migration guide.

    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/developing-plugins/index.html b/guides/developing-plugins/index.html new file mode 100644 index 0000000..0f712f8 --- /dev/null +++ b/guides/developing-plugins/index.html @@ -0,0 +1,41 @@ + + + + + +Developing Plugins | HappyView + + + + + + + +

    Developing Plugins

    +

    This guide covers how to build your own HappyView WASM plugins. For installing and configuring plugins, see the Plugins guide.

    +

    See the happyview-plugins repository for examples and the plugin SDK.

    +

    Plugin Manifest​

    +

    Each plugin has a manifest.json that describes its metadata:

    +
    {
    "id": "steam",
    "name": "Steam",
    "version": "1.0.0",
    "api_version": "1",
    "description": "Import your Steam game library and playtime data.",
    "icon_url": "https://example.com/steam-icon.png",
    "auth_type": "openid",
    "wasm_file": "steam.wasm",
    "required_secrets": [
    {
    "key": "PLUGIN_STEAM_API_KEY",
    "name": "Steam Web API Key",
    "description": "Get your API key at steamcommunity.com/dev/apikey"
    }
    ]
    }
    +
    FieldDescription
    idUnique plugin identifier
    nameDisplay name
    versionSemantic version
    api_versionPlugin API version (currently "1")
    descriptionBrief description shown during install
    icon_urlOptional icon URL
    auth_typeAuthentication type: oauth2, openid, or api_key
    wasm_fileWASM binary filename (default: plugin.wasm)
    required_secretsArray of secrets the plugin needs
    +

    API Endpoints​

    +

    Public Endpoints​

    +
    EndpointDescription
    GET /external-auth/providersList available auth providers
    GET /external-auth/accountsList user's linked accounts
    GET /external-auth/{plugin}/authorizeStart OAuth flow
    GET /external-auth/{plugin}/callbackOAuth callback handler
    POST /external-auth/{plugin}/syncSync data from linked account
    POST /external-auth/{plugin}/unlinkUnlink account
    POST /external-auth/{plugin}/connectConnect with API key (for api_key auth type)
    +

    Admin Endpoints​

    +
    EndpointDescription
    GET /admin/pluginsList installed plugins
    POST /admin/pluginsInstall a plugin
    POST /admin/plugins/previewPreview plugin before installing
    GET /admin/plugins/officialBrowse the official plugin registry catalog
    DELETE /admin/plugins/{id}Remove a plugin
    POST /admin/plugins/{id}/reloadReload plugin from source
    POST /admin/plugins/{id}/check-updateCheck whether a newer version is available
    GET /admin/plugins/{id}/secretsGet configured secrets (masked)
    PUT /admin/plugins/{id}/secretsUpdate plugin secrets
    +

    The dashboard's Settings > Plugins page calls GET /admin/plugins/official to populate the install browser, and POST /admin/plugins/{id}/check-update to display update badges on installed plugins.

    +

    Plugin Exports​

    +

    Plugins must export these functions:

    +
    ExportSignatureDescription
    alloc(size: u32) -> u32Allocate memory
    dealloc(ptr: u32, size: u32)Deallocate memory
    get_authorize_url(ptr: u32, len: u32) -> i64Generate OAuth authorize URL
    handle_callback(ptr: u32, len: u32) -> i64Handle OAuth callback
    refresh_tokens(ptr: u32, len: u32) -> i64Refresh expired tokens
    get_profile(ptr: u32, len: u32) -> i64Get external profile info
    sync_account(ptr: u32, len: u32) -> i64Sync data and return records
    +

    Host Functions​

    +

    Plugins can import these host functions:

    +
    ImportDescription
    host_http_requestMake HTTP requests
    host_get_secretRead configured secrets
    host_logWrite to server logs
    host_kv_getRead from KV storage
    host_kv_setWrite to KV storage
    host_kv_deleteDelete from KV storage
    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/event-logs/index.html b/guides/event-logs/index.html index e45f178..7c1e314 100644 --- a/guides/event-logs/index.html +++ b/guides/event-logs/index.html @@ -2,45 +2,61 @@ - -Event Logs | HappyView - - + +Event Logs | HappyView + + - + -

    Event Logs

    -

    HappyView maintains an internal event log that records system activity — lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. Events are stored in a Postgres table and queryable via the admin API.

    -

    Event types​

    +

    Event Logs

    +

    HappyView maintains an internal event log that records system activity — lexicon changes, record operations, Lua script executions and errors, user actions, API key events, backfill jobs, and Jetstream connectivity. Events are stored in the database and queryable via the admin API.

    +

    Event types​

    Events follow a category.action naming convention. Each event has a severity level (info, warn, or error), an optional actor_did (the user who triggered it), an optional subject (what was affected), and a detail JSON object with event-specific data.

    -

    Lexicon events​

    +

    Lexicon events​

    Event TypeSeveritySubjectDetail
    lexicon.createdinfoLexicon NSIDrevision, has_script, source
    lexicon.updatedinfoLexicon NSIDrevision, has_script, source
    lexicon.deletedinfoLexicon NSID—
    -

    Logged when lexicons are uploaded, updated, or deleted via the admin API. The actor_did is the admin who performed the action.

    -

    Record events​

    +

    Logged when lexicons are uploaded, updated, or deleted via the admin API. The actor_did is the user who performed the action.

    +

    Record events​

    Event TypeSeveritySubjectDetail
    record.createdinfoRecord AT URIcollection, did, rkey
    record.deletedinfoRecord AT URIcollection, did, rkey
    -

    Logged when records are received from Tap and stored or removed from the local database. These are system-triggered events (actor_did is null). If a database error occurs during the operation, the same event type is logged with error severity and the error message is included in the detail.

    -

    Script events​

    +

    Logged when records are received from Jetstream and stored or removed from the local database. These are system-triggered events (actor_did is null). If a database error occurs during the operation, the same event type is logged with error severity and the error message is included in the detail.

    +

    Script events​

    Event TypeSeveritySubjectDetail
    script.executedinfoMethod NSIDmethod, caller_did, duration_ms
    script.errorerrorMethod NSIDerror, script_source, input, caller_did, method

    Logged when Lua scripts run for XRPC query or procedure endpoints. Script errors capture the full context needed to reproduce and debug the issue: the error message, the complete Lua script source, the input that triggered it, and the caller's DID.

    -
    note

    For query scripts (unauthenticated), caller_did and input are omitted from the detail since queries don't have an authenticated user or request body.

    -

    Admin events​

    -
    Event TypeSeveritySubjectDetail
    admin.createdinfoNew admin DID—
    admin.deletedinfoRemoved admin ID—
    admin.bootstrappedinfoBootstrapped admin DID—
    -

    The admin.bootstrapped event is logged when the first user is auto-promoted to admin (see Auth - Auto-bootstrap).

    -

    Backfill events​

    +
    note

    For query scripts (unauthenticated), caller_did and input are omitted from the detail since queries don't have an authenticated user or request body.

    +

    User events​

    +
    Event TypeSeveritySubjectDetail
    user.createdinfoNew user DIDtemplate (if used)
    user.deletedinfoRemoved user ID—
    user.bootstrappedinfoBootstrapped user DID—
    user.permissions_updatedinfoUser IDgranted, revoked
    user.super_transferredwarnNew super user IDfrom_user_id
    +

    The user.bootstrapped event is logged when the first user is auto-promoted to super user (see Auth - Auto-bootstrap).

    +

    Auth events​

    +
    Event TypeSeveritySubjectDetail
    auth.permission_deniederrorEndpoint pathrequired_permission, user_id
    +

    Logged when a user attempts to access an endpoint they don't have permission for.

    +

    API Key events​

    +
    Event TypeSeveritySubjectDetail
    api_key.createdinfoKey IDname, permissions
    api_key.revokedinfoKey IDname
    +

    Script Variable events​

    +
    Event TypeSeveritySubjectDetail
    script_variable.upsertedinfoVariable key—
    script_variable.deletedinfoVariable key—
    +

    Hook events​

    +
    Event TypeSeveritySubjectDetail
    hook.executedinfoRecord AT URIlexicon_id
    hook.dead_letterederrorRecord AT URIlexicon_id, error
    +

    Logged when index hooks run. Dead-lettered events indicate a hook failed all retry attempts.

    +

    Backfill events​

    Event TypeSeveritySubjectDetail
    backfill.startedinfoCollection NSIDjob_id
    backfill.completedinfoCollection NSIDjob_id, total_repos
    backfill.failederrorCollection NSIDjob_id, error

    See Backfill for background on backfill jobs.

    -

    Tap events​

    -
    Event TypeSeveritySubjectDetail
    tap.connectedinfo—url
    tap.disconnectedwarn—reason
    -

    Logged when the WebSocket connection to Tap is established or lost.

    -

    Querying events​

    +

    Jetstream events​

    +
    Event TypeSeveritySubjectDetail
    jetstream.connectedinfo—url
    jetstream.disconnectedwarn—reason
    +

    Logged when the WebSocket connection to Jetstream is established or lost.

    +

    Querying events​

    Use the admin API to query event logs with filters:

    -
    # Get all errors
    curl "http://localhost:3000/admin/events?severity=error" -H "$AUTH"

    # Get script errors for a specific lexicon
    curl "http://localhost:3000/admin/events?event_type=script.error&subject=com.example.feed.like" -H "$AUTH"

    # Get all lexicon-related events
    curl "http://localhost:3000/admin/events?category=lexicon" -H "$AUTH"

    # Paginate through results
    curl "http://localhost:3000/admin/events?limit=20&cursor=2026-03-01T11:59:00Z" -H "$AUTH"
    -

    See the Admin API reference for full parameter documentation.

    -

    Retention​

    +
    # Get all errors
    curl "http://localhost:3000/admin/events?severity=error" -H "$AUTH"

    # Get script errors for a specific lexicon
    curl "http://localhost:3000/admin/events?event_type=script.error&subject=com.example.feed.like" -H "$AUTH"

    # Get all lexicon-related events
    curl "http://localhost:3000/admin/events?category=lexicon" -H "$AUTH"

    # Paginate through results
    curl "http://localhost:3000/admin/events?limit=20&cursor=2026-03-01T11:59:00Z" -H "$AUTH"
    +

    See the Admin API reference for full parameter documentation.

    +

    Retention​

    Event logs are automatically cleaned up based on the EVENT_LOG_RETENTION_DAYS environment variable (default: 30 days). A background task runs hourly to delete events older than the configured retention period.

    Set EVENT_LOG_RETENTION_DAYS=0 to disable automatic cleanup and keep logs indefinitely.

    -

    See Configuration for all environment variables.

    +

    See Configuration for all environment variables.

    +

    Next steps​

    +
    \ No newline at end of file diff --git a/guides/index-hooks/index.html b/guides/index-hooks/index.html index ba79ebf..acc7bd0 100644 --- a/guides/index-hooks/index.html +++ b/guides/index-hooks/index.html @@ -2,41 +2,41 @@ - -Index Hooks | HappyView - - + +Index Hooks | HappyView + + - + -

    Index Hooks

    -

    Index hooks are Lua scripts that run automatically whenever a record in a collection is created, updated, or deleted on the network. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.

    -

    Unlike query and procedure scripts that run in response to XRPC requests, index hooks are triggered by the firehose.

    -

    Attaching a hook​

    -

    Each record-type lexicon can have one index hook. You can add it through the dashboard (click "Add Index Hook" on any record lexicon's detail page) or via the admin API by including the index_hook field when uploading a lexicon.

    -

    Script structure​

    +

    Index Hooks

    +

    Index hooks are Lua scripts that run whenever a record in a collection is created, updated, or deleted. They run before the record is indexed, giving you the ability to filter out unwanted records, transform record data before storage, or trigger side effects like syncing with external services.

    +

    Index hooks fire on all record events for the collection — including records created by HappyView procedure endpoints, not just events from the network. Unlike query and procedure scripts that run in response to XRPC requests, index hooks are triggered by incoming Jetstream events (which include events caused by HappyView's own PDS writes).

    +

    Attaching a hook​

    +

    Each record-type lexicon can have one index hook. You can add it through the dashboard (click "Add Index Hook" on any record lexicon's detail page) or via the admin API by including the index_hook field when uploading a lexicon.

    +

    Script structure​

    Like query and procedure scripts, index hooks must define a handle() function:

    -
    function handle()
    if action == "delete" then
    log("deleted " .. uri)
    else
    log(action .. " " .. uri)
    end
    end
    +
    function handle()
    if action == "delete" then
    log("deleted " .. uri)
    else
    log(action .. " " .. uri)
    end
    return true
    end

    The function is called once per record event. The return value controls what happens next:

    Return valueEffect
    nilThe record is not indexed (skipped entirely)
    A tableThat table is stored as the record instead
    trueThe original record is stored as-is
    (no hook)The original record is stored as-is

    On delete events, returning nil skips the delete (the record stays in the database).

    Important: If your hook has side effects (e.g. syncing to a search index) but you want normal indexing to proceed, return record or true — not nothing. A missing return statement returns nil, which skips indexing.

    If the hook errors after all retries, the system fails open — the original record is stored and the failed event is dead-lettered for later inspection.

    -

    Context globals​

    +

    Context globals​

    These globals are set before handle() is called:

    GlobalTypeDescription
    actionstring"create", "update", or "delete"
    uristringThe full AT URI (e.g. at://did:plc:abc/col/rkey)
    didstringThe repo DID
    collectionstringThe collection NSID
    rkeystringThe record key
    recordtable?The full record as a Lua table (nil on delete)
    -

    Index hooks do not have access to caller_did, input, params, method, or the Record API. They run from the firehose, not from a user request.

    -

    Available APIs​

    +

    Index hooks do not have access to caller_did, input, params, method, or the Record API. They run from the Jetstream event stream, not from a user request.

    +

    Available APIs​

    Index hooks have access to:

      -
    • Database API — db.query, db.get, db.search, db.backlinks, db.count, db.raw
    • -
    • HTTP API — http.get, http.post, http.put, http.patch, http.delete, http.head
    • -
    • JSON API — json.encode, json.decode
    • +
    • Database API — db.query, db.get, db.search, db.backlinks, db.count, db.raw
    • +
    • HTTP API — http.get, http.post, http.put, http.patch, http.delete, http.head
    • +
    • JSON API — json.encode, json.decode
    • Utility globals — log(), now(), TID(), toarray()
    -

    Error handling and retries​

    +

    Error handling and retries​

    Index hooks are designed to be resilient:

    1. If a hook fails, it retries up to 3 times with exponential backoff (1s, 2s, 4s delays).
    2. @@ -44,33 +44,33 @@
    3. On failure the system fails open — the original record is stored as-is so indexing is not permanently blocked.

    Failed hooks are logged as errors. Check the event logs or query the dead_letter_hooks table directly to find and replay failures.

    -

    Performance considerations​

    -

    Because hooks run synchronously before indexing, they block the firehose consumer while executing. With retry logic (1s + 2s + 4s backoff), a persistently failing hook could block for ~7 seconds per record. Keep hook scripts fast and ensure external services they depend on are reliable.

    -

    Dead letter table​

    +

    Performance considerations​

    +

    Because hooks run synchronously before indexing, they block the Jetstream consumer while executing. With retry logic (1s + 2s + 4s backoff), a persistently failing hook could block for ~7 seconds per record. Keep hook scripts fast and ensure external services they depend on are reliable.

    +

    Dead letter table​

    The dead_letter_hooks table stores events that failed all retry attempts:

    ColumnTypeDescription
    idUUIDPrimary key
    lexicon_idtextThe lexicon NSID
    uritextThe AT URI of the record
    didtextThe repo DID
    collectiontextThe collection NSID
    rkeytextThe record key
    actiontextcreate, update, or delete
    recordjsonbThe record data (null on delete)
    errortextThe error message from the last attempt
    attemptsintTotal number of attempts made
    created_attimestamptzWhen the failure was recorded
    -

    Examples​

    -

    Filter out records missing a required field​

    +

    Examples​

    +

    Filter out records missing a required field​

    Skip indexing any record that doesn't have a title field:

    -
    function handle()
    if action == "delete" then
    return record -- allow deletes to proceed
    end

    if record.title == nil or record.title == "" then
    return nil -- skip: no title
    end

    return record
    end
    -

    Transform a record before storage​

    +
    function handle()
    if action == "delete" then
    return record -- allow deletes to proceed
    end

    if record.title == nil or record.title == "" then
    return nil -- skip: no title
    end

    return record
    end
    +

    Transform a record before storage​

    Enrich a record with a computed field before it is stored:

    -
    function handle()
    if action == "delete" then
    return record
    end

    record.slug = string.lower(string.gsub(record.title or "", "%s+", "-"))
    return record
    end
    -

    Post to a webhook​

    -
    function handle()
    http.post("https://hooks.example.com/records", {
    headers = { ["Content-Type"] = "application/json" },
    body = json.encode({
    action = action,
    uri = uri,
    did = did,
    record = record
    })
    })
    return record
    end
    -

    Sync to Algolia​

    +
    function handle()
    if action == "delete" then
    return record
    end

    record.slug = string.lower(string.gsub(record.title or "", "%s+", "-"))
    return record
    end
    +

    Post to a webhook​

    +
    function handle()
    http.post("https://hooks.example.com/records", {
    headers = { ["Content-Type"] = "application/json" },
    body = json.encode({
    action = action,
    uri = uri,
    did = did,
    record = record
    })
    })
    return record
    end
    +

    Sync to Algolia​

    Push records to an Algolia search index on create/update, and remove them on delete:

    -
    function handle()
    local headers = {
    ["X-Algolia-API-Key"] = "your-api-key",
    ["X-Algolia-Application-Id"] = "your-app-id",
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers
    })
    else
    http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers,
    body = json.encode({
    objectID = uri,
    collection = collection,
    did = did,
    record = record
    })
    })
    end

    return record
    end
    +
    function handle()
    local headers = {
    ["X-Algolia-API-Key"] = "your-api-key",
    ["X-Algolia-Application-Id"] = "your-app-id",
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers
    })
    else
    http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers,
    body = json.encode({
    objectID = uri,
    collection = collection,
    did = did,
    record = record
    })
    })
    end

    return record
    end

    See the full Algolia sync reference for more detail.

    -

    Sync to Meilisearch​

    +

    Sync to Meilisearch​

    Push records to a self-hosted Meilisearch index on create/update, and remove them on delete:

    -
    function handle()
    local headers = {
    ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {
    headers = headers
    })
    else
    http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {
    headers = headers,
    body = json.encode(toarray({
    {
    id = uri,
    collection = collection,
    did = did,
    record = record
    }
    }))
    })
    end

    return record
    end
    +
    function handle()
    local headers = {
    ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {
    headers = headers
    })
    else
    http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {
    headers = headers,
    body = json.encode(toarray({
    {
    id = uri,
    collection = collection,
    did = did,
    record = record
    }
    }))
    })
    end

    return record
    end

    See the full Meilisearch sync reference for more detail.

    -

    Next steps​

    +

    Next steps​

    • Lua Scripting: Full reference for the sandbox, APIs, and debugging
    • Lexicons: Understand how record, query, and procedure lexicons work together
    • -
    • Admin API: Upload lexicons with index hooks via the API
    • -
    +
  • Admin API — Lexicons: Upload lexicons with index hooks via the API
  • +
    \ No newline at end of file diff --git a/guides/labelers/index.html b/guides/labelers/index.html new file mode 100644 index 0000000..495d38b --- /dev/null +++ b/guides/labelers/index.html @@ -0,0 +1,67 @@ + + + + + +Labelers | HappyView + + + + + + + +

    Labelers

    +

    Labelers are external services that apply content labels to records. They operate out-of-band — labeler data does not appear in repos or flow through relays. HappyView can subscribe to labelers and store the labels they emit, making them available on records in the admin dashboard and via Lua scripts.

    +

    How labelers work​

    +

    A labeler is identified by its DID. When you subscribe to a labeler, HappyView connects directly to the labeler's WebSocket and streams label events in real time. Each label targets a specific record URI and carries a value like nudity, spam, or any custom string the labeler defines.

    +

    Labels are stored in a labels table in the database. HappyView tracks a cursor per labeler subscription so it can resume from where it left off after a restart.

    +

    Records can also have self-labels — labels applied by the record's author and embedded directly in the record's labels.values array. These are not managed by external labelers but are displayed alongside external labels in the dashboard.

    +

    Adding a labeler​

    +
      +
    1. Go to Settings > Labelers in the dashboard sidebar
    2. +
    3. Click Add Labeler
    4. +
    5. Enter the labeler's DID (e.g., did:plc:ar7c4by46qjdydhdevvrndac)
    6. +
    7. Click Add
    8. +
    +

    HappyView begins consuming labels from the labeler immediately. The subscription appears in the table with an active status.

    +

    You can also add a labeler via the API:

    +
    curl -X POST http://localhost:3000/admin/labelers \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "did": "did:plc:ar7c4by46qjdydhdevvrndac" }'
    +

    Pausing and resuming​

    +

    You can pause a labeler subscription to temporarily stop consuming labels without losing your cursor position. Click the pause icon next to the labeler in the table, or use the API:

    +
    curl -X PATCH http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "status": "paused" }'
    +

    Resume by clicking the play icon or sending { "status": "active" }.

    +

    Deleting a labeler​

    +

    Deleting a labeler removes the subscription and all labels it has emitted. This cannot be undone.

    +
      +
    1. Click the trash icon next to the labeler
    2. +
    3. Confirm in the dialog
    4. +
    +

    Or via the API:

    +
    curl -X DELETE http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \
    -H "$AUTH"
    +

    Labels on records​

    +

    Labels appear in the Labels column on the Records page as color-coded badges:

    +
      +
    • Red — content warnings: nudity, sexual, graphic-media, violence, gore
    • +
    • Amber — moderation labels: spam, impersonation
    • +
    • Neutral — everything else
    • +
    +

    Self-labels (applied by the record author) use an outline badge style to distinguish them from external labels. Hover over a badge to see the source labeler's DID.

    +

    Labels are also available in the records API response and in Lua scripts via the atproto.get_labels and atproto.get_labels_batch functions.

    +

    Using labels in your AppView​

    +

    Labeler subscriptions give your AppView access to content moderation signals without building your own moderation system. Some ways to use them:

    +
      +
    • Content filtering: Use labels in query scripts to exclude or down-rank flagged content. Check labels with atproto.get_labels and filter results before returning them.
    • +
    • Moderation dashboards: Display labels alongside records in your admin dashboard to review flagged content. Labels appear automatically on the Records page once a labeler is subscribed.
    • +
    • Custom labelers: You can subscribe to any labeler that implements the atproto labeler spec, including community-run labelers or one you operate yourself for domain-specific moderation (e.g. labeling game content by age rating).
    • +
    +

    Permissions​

    +
    ActionPermission
    View labeler listlabelers:read
    Add or pause/resumelabelers:create
    Delete a labelerlabelers:delete
    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/lexicons/index.html b/guides/lexicons/index.html index 0916965..473433c 100644 --- a/guides/lexicons/index.html +++ b/guides/lexicons/index.html @@ -2,34 +2,34 @@ - -Lexicons | HappyView - - + +Lexicons | HappyView + + - + -

    Lexicons

    -

    Lexicons are the core building block of HappyView. They're AT Protocol schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.

    -

    You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the admin API or dashboard, or fetching them directly from the AT Protocol network via DNS authority resolution.

    -

    Supported lexicon types​

    -
    TypeEffect
    recordSyncs the collection filter to Tap and indexes records into Postgres. Supports index hooks
    queryRegisters a GET /xrpc/{nsid} endpoint that queries indexed records
    procedureRegisters a POST /xrpc/{nsid} endpoint that proxies writes to the user's PDS
    definitionsStored but does not generate routes or subscriptions
    +

    Lexicons

    +

    Lexicons are the core building block of HappyView. They're atproto schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.

    +

    You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the admin API or dashboard, or fetching them directly from the atproto network via DNS authority resolution.

    +

    Supported lexicon types​

    +
    TypeEffect
    recordAdds the collection to the Jetstream subscription filter and indexes records into the database. Supports index hooks
    queryRegisters a GET /xrpc/{nsid} endpoint that queries indexed records
    procedureRegisters a POST /xrpc/{nsid} endpoint that proxies writes to the user's PDS
    definitionsStored but does not generate routes or subscriptions

    A typical setup has three lexicons working together: a record lexicon that defines the data and triggers indexing, a query lexicon that exposes a read endpoint, and a procedure lexicon that exposes a write endpoint. The Statusphere tutorial walks through this pattern end-to-end.

    -

    Target collection​

    +

    Target collection​

    Query and procedure lexicons don't store data themselves. They operate on records stored by a record-type lexicon. The target_collection field tells HappyView which record collection to read from or write to. Without it, default queries and procedures won't know which DB records to operate on.

    For example, a query lexicon xyz.statusphere.listStatuses would set target_collection to xyz.statusphere.status to read from that record collection.

    -

    See the admin API for how to set target_collection when uploading.

    -
    note

    The target_collection is available in Lua scripts as the collection global, but it is not required if your endpoint uses a Lua script.

    -

    Backfill flag​

    +

    See the admin API for how to set target_collection when uploading.

    +
    note

    The target_collection is available in Lua scripts as the collection global, but it is not required if your endpoint uses a Lua script.

    +

    Backfill flag​

    When uploading a record-type lexicon, HappyView automatically creates a backfill job to discover existing records. If you only want to index new records going forward, you can set backfill to false.

    -

    Tap collection filters​

    -

    When record-type lexicons change (uploaded or deleted), HappyView automatically syncs the updated collection filter to Tap. HappyView always includes com.atproto.lexicon.schema in the filter to track network lexicon updates.

    -

    Deleting a lexicon updates Tap's collection filters (stopping live indexing for that collection) but does not remove previously indexed repos or their cached state from Tap. To fully reset a collection's state, delete the lexicon, re-add it, and run a backfill.

    -

    Network lexicons​

    -

    If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via Tap. If the publisher updates their schema, your instance will pick up the change.

    -

    NSID authority resolution​

    +

    Jetstream collection filters​

    +

    When record-type lexicons change (uploaded or deleted), HappyView reconnects to Jetstream with an updated collection filter. HappyView always includes com.atproto.lexicon.schema in the filter to track network lexicon updates.

    +

    Deleting a lexicon stops live indexing for that collection but does not remove previously indexed records from the database. If you want to start fresh, you'll need to delete the records separately (e.g. via the admin API or directly in the database) before re-adding the lexicon and running a backfill.

    +

    Network lexicons​

    +

    If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via the Jetstream subscription. If the publisher updates their schema, your instance will pick up the change.

    +

    NSID authority resolution​

    Lexicons are stored as records themselves with the com.atproto.lexicon.schema NSID and the rkey set to the lexicon's NSID. To find which repo holds a lexicon, HappyView resolves the NSID's authority:

    1. Extract the authority from the NSID (all segments except the last). For example, xyz.statusphere.status has authority xyz.statusphere.
    2. @@ -38,8 +38,8 @@
    3. Parse the TXT record for a did=<DID> value.
    4. Resolve the DID to a PDS endpoint via the PLC directory.
    -
    note

    The spec states that resolution must be non-hierarchical. Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. xyz.statusphere.status and xyz.statusphere.actor.profile), each level must have an explicit TXT record.

    -

    Fetching​

    +
    note

    The spec states that resolution must be non-hierarchical. Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. xyz.statusphere.status and xyz.statusphere.actor.profile), each level must have an explicit TXT record.

    +

    Fetching​

    Once the authority DID and PDS endpoint are known, HappyView calls com.atproto.repo.getRecord with:

    • repo = the authority DID
    • @@ -47,21 +47,38 @@
    • rkey = the NSID

    The value field of the response is the raw lexicon JSON.

    -

    Live updates via Tap​

    -

    Tap always subscribes to com.atproto.lexicon.schema alongside the dynamic record collections. When a record event arrives:

    +

    Live updates via Jetstream​

    +

    HappyView's Jetstream subscription always includes the com.atproto.lexicon.schema collection, so it receives real-time events whenever a lexicon schema record is created, updated, or deleted on the network. When an event arrives, HappyView checks whether the record's DID and rkey (the NSID) match any tracked network lexicon:

      -
    • create/update: If the event's DID and rkey match a tracked network lexicon (authority_did and nsid), the lexicon is parsed, upserted into the lexicons table and in-memory registry, and collection filters are updated if it's a record type.
    • -
    • delete: The lexicon is removed from the lexicons table and registry.
    • +
    • create/update: The new schema is parsed and upserted into the lexicons table and the in-memory registry. If it's a record-type lexicon, Jetstream collection filters are updated to include the new collection.
    • +
    • delete: The lexicon is removed from the lexicons table and registry, and collection filters are updated accordingly.
    -

    Startup re-fetch​

    +

    Startup re-fetch​

    On every startup, HappyView re-fetches all network lexicons from their respective PDSes. This ensures consistency even if events were missed while offline. Failures are logged as warnings but don't block startup.

    -

    Next steps​

    +

    XRPC routing for unknown methods​

    +

    When a client calls /xrpc/{method} and HappyView has a local lexicon for that NSID, the request is handled by the lexicon's Lua script (or HappyView's default behavior if no script is attached). Otherwise, HappyView attempts to proxy the request to the method's home authority using the same DNS-based authority resolution described above:

    +
      +
    1. Extract the authority from the NSID (all segments except the last). com.example.foo.getBar → authority com.example.foo.
    2. +
    3. Reverse it to form a domain: foo.example.com.
    4. +
    5. Look up the _lexicon.foo.example.com TXT record for the authority's DID.
    6. +
    7. Resolve that DID to a PDS endpoint via the PLC directory.
    8. +
    9. Proxy the request to {pds_endpoint}/xrpc/{method}.
    10. +
    +

    A few things to note:

    +
      +
    • HappyView does not proxy to the reversed hostname directly. foo.example.com is only the DNS host for the TXT record — the actual XRPC request goes to whatever PDS endpoint the authority DID resolves to.
    • +
    • Proxying applies equally to queries and procedures. For procedures, HappyView uses the caller's OAuth session to attach a DPoP-bound access token (see Authentication).
    • +
    • If authority resolution fails — no TXT record, unresolvable DID, or the target PDS doesn't support the method — the client gets an error back. HappyView does not fall back to any other routing strategy.
    • +
    • Tracking a network lexicon does not make HappyView handle requests for that NSID locally. Network lexicons are only about indexing record collections and keeping the schema up to date. If a client calls a query NSID that you've tracked as a network lexicon but haven't uploaded a local query lexicon for, HappyView still proxies the request out — it won't query your local record table. To serve a method locally, upload a local query or procedure lexicon with a matching target_collection.
    • +
    +

    In short: if you want to serve an XRPC method on your instance, you need a local lexicon for it. Otherwise HappyView attempts to proxy to the method's home authority.

    +

    Next steps​

    • Lua Scripting: Add custom query and procedure logic to your endpoints
    • Index Hooks: Run Lua scripts when records are indexed from the network
    • XRPC API: Understand how the generated endpoints behave
    • Backfill: Learn how historical records are indexed
    • Admin API: Full reference for lexicon management endpoints
    • -
    +
    \ No newline at end of file diff --git a/guides/permissions/index.html b/guides/permissions/index.html new file mode 100644 index 0000000..c702fba --- /dev/null +++ b/guides/permissions/index.html @@ -0,0 +1,90 @@ + + + + + +Permissions | HappyView + + + + + + + +

    Permissions

    +

    HappyView uses a granular permission system to control access to the admin API. Each user has a set of permissions that determine which endpoints they can access. Permissions can be assigned individually, via templates, or both.

    +

    Permission list​

    +

    HappyView defines 20 permissions organized by category:

    +

    Lexicons​

    +
    PermissionDescription
    lexicons:createUpload and upsert lexicons (local and network)
    lexicons:readList and view lexicon details
    lexicons:deleteDelete lexicons
    +

    Records​

    +
    PermissionDescription
    records:readList and view indexed records
    records:deleteDelete individual records
    records:delete-collectionBulk-delete all records in a collection
    +

    Script Variables​

    +
    PermissionDescription
    script-variables:createCreate and update script variables
    script-variables:readList script variables (values are masked)
    script-variables:deleteDelete script variables
    +

    Users​

    +
    PermissionDescription
    users:createAdd new users
    users:readList and view user details
    users:updateModify user permissions
    users:deleteRemove users
    +

    API Keys​

    +
    PermissionDescription
    api-keys:createCreate new API keys
    api-keys:readList API keys
    api-keys:deleteRevoke API keys
    +

    Operations​

    +
    PermissionDescription
    backfill:createStart backfill jobs
    backfill:readView backfill job status
    stats:readView record statistics
    events:readQuery the event log
    +

    Permission templates​

    +

    Templates are predefined sets of permissions that simplify user creation. Pass a template value when creating a user via POST /admin/users.

    +

    Viewer​

    +

    Read-only access. Can browse lexicons, records, stats, events, and user lists but cannot modify anything.

    +

    Includes: lexicons:read, records:read, script-variables:read, users:read, api-keys:read, backfill:read, stats:read, events:read

    +

    Operator​

    +

    Everything in Viewer, plus the ability to run backfill jobs and manage API keys.

    +

    Adds: backfill:create, api-keys:create, api-keys:delete

    +

    Manager​

    +

    Everything in Operator, plus the ability to manage lexicons, records, and script variables.

    +

    Adds: lexicons:create, lexicons:delete, script-variables:create, script-variables:delete, records:delete

    +

    Full Access​

    +

    All 20 permissions. Equivalent to granting every permission individually (but still not a super user).

    +

    Super user​

    +

    The super user is a special user created automatically when the first person logs in to a fresh HappyView instance. The super user:

    +
      +
    • Has unrestricted access to all endpoints, regardless of which permissions are assigned
    • +
    • Is the only user who can call POST /admin/users/transfer-super
    • +
    • Cannot be deleted
    • +
    • Cannot have their permissions modified by other users
    • +
    +

    There is always exactly one super user. Super status can be transferred to another user via the dashboard or transfer endpoint in the Admin API.

    +

    Escalation guards​

    +

    HappyView prevents privilege escalation:

    +
      +
    • When creating a user or API key, you can only grant permissions that you yourself have. Attempting to grant a permission you lack returns 403 Forbidden.
    • +
    • When updating a user's permissions, the same rule applies — you cannot grant permissions beyond your own.
    • +
    +

    Self-modification guards​

    +

    Users cannot modify their own account in destructive ways:

    +
      +
    • You cannot delete yourself
    • +
    • You cannot revoke your own permissions
    • +
    +

    These guards prevent accidental lockout.

    +

    API key permissions​

    +

    API keys have their own set of permissions, specified at creation time. The effective permissions of an API key are the intersection of:

    +
      +
    1. The permissions assigned to the key
    2. +
    3. The permissions of the user who owns the key
    4. +
    +

    This means if a user's permissions are later reduced, any API keys they created are also effectively reduced — even though the key's own permission list doesn't change.

    +

    For example, if a user with lexicons:create and lexicons:read creates a key with both permissions, and the user later loses lexicons:create, the key can only use lexicons:read.

    +

    Managing permissions​

    +

    Via the dashboard​

    +

    Go to Settings > Users to view and manage user permissions. Click on a user to see their current permissions and modify them. You can also assign templates when creating new users.

    +

    Via the API​

    +
      +
    • POST /admin/users — create a user with a template or explicit permissions
    • +
    • PATCH /admin/users/{id}/permissions — grant or revoke individual permissions
    • +
    • POST /admin/users/transfer-super — transfer super user status (super user only)
    • +
    +

    See the Admin API — Users for full details.

    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/plugins/index.html b/guides/plugins/index.html new file mode 100644 index 0000000..7c96099 --- /dev/null +++ b/guides/plugins/index.html @@ -0,0 +1,60 @@ + + + + + +Plugins | HappyView + + + + + + + +

    Plugins

    +

    HappyView uses WASM plugins to extend its functionality. Plugins can integrate with external platforms, sync data to users' atproto identities, and more. Auth plugins — the first supported plugin type — enable users to link accounts from platforms like Steam, Xbox, itch.io, and others, then sync data like game libraries.

    +

    Official plugins for Steam, Xbox, itch.io, and other platforms are available in the happyview-plugins repository.

    +

    Installing Plugins​

    +

    Via Dashboard​

    +
      +
    1. Go to Settings > Plugins
    2. +
    3. Click Add Plugin
    4. +
    5. Enter the URL to a plugin's manifest.json or .wasm file
    6. +
    7. Review the plugin details and click Install Plugin
    8. +
    9. Configure any required secrets using the settings button
    10. +
    +

    Via Environment Variables​

    +

    Set PLUGIN_URLS to load plugins at startup:

    +
    PLUGIN_URLS=steam|https://example.com/plugins/steam/manifest.json
    +

    Format: id|url or id|url|sha256:hash (comma-separated for multiple).

    +

    Via File System​

    +

    Place plugins in the ./plugins/ directory:

    +
    plugins/
    steam/
    manifest.json
    plugin.wasm
    +

    Plugin Configuration​

    +

    Plugins may require secrets (API keys, client credentials, etc.) to function. There are two ways to configure these:

    +

    Dashboard Configuration​

    +

    Click the settings icon next to a plugin to enter secrets. These are encrypted using AES-256-GCM and stored in the database.

    +

    Requires: TOKEN_ENCRYPTION_KEY environment variable (base64-encoded 32-byte key).

    +

    Generate one with:

    +
    openssl rand -base64 32
    +

    Environment Variables​

    +

    Set secrets as environment variables with the PLUGIN_<ID>_ prefix:

    +
    PLUGIN_STEAM_API_KEY=your-api-key
    PLUGIN_XBOX_CLIENT_ID=your-client-id
    PLUGIN_XBOX_CLIENT_SECRET=your-client-secret
    +

    These are only necessary if you can't configure variables via the dashboard. Dashboard-configured secrets take precedence over environment variables.

    +

    Security​

    +
      +
    • Sandboxed execution: Plugins run in isolated WASM environments
    • +
    • Limited host access: Plugins can only call approved host functions (HTTP requests, KV storage, secrets, logging)
    • +
    • Encrypted storage: OAuth tokens and secrets are encrypted at rest using AES-256-GCM
    • +
    • Scoped storage: Plugin KV storage is isolated per-plugin and per-user
    • +
    • No filesystem access: Plugins cannot access the host filesystem
    • +
    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/postgres-to-sqlite-migration/index.html b/guides/postgres-to-sqlite-migration/index.html new file mode 100644 index 0000000..8b49f29 --- /dev/null +++ b/guides/postgres-to-sqlite-migration/index.html @@ -0,0 +1,70 @@ + + + + + +Migrating from Postgres to SQLite | HappyView + + + + + + + +

    Migrating from Postgres to SQLite

    +

    This guide covers migrating an existing HappyView deployment from Postgres to SQLite. If you are staying on Postgres, no action is required.

    +

    Overview​

    +

    HappyView now defaults to SQLite and writes all internal SQL in SQLite syntax. When running against Postgres, HappyView translates queries automatically. However, if you have Lua scripts that contain raw Postgres SQL, those scripts need to be updated to use SQLite syntax instead.

    +

    Step 1: Export your data​

    +

    Back up your Postgres database before making any changes:

    +
    pg_dump -U happyview happyview > happyview_backup.sql
    +

    Step 2: Update environment variables​

    +

    Change your .env to use SQLite:

    +
    # Before
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview

    # After
    DATABASE_URL=sqlite://data/happyview.db?mode=rwc
    +

    If you had DATABASE_BACKEND set, update it as well:

    +
    DATABASE_BACKEND=sqlite
    +

    Step 3: Migrate Lua scripts​

    +

    If you have Lua scripts with raw SQL queries, they need to be converted from Postgres syntax to SQLite syntax. A codemod tool is provided to automate this.

    +

    Run the codemod tool​

    +
    cargo run --bin migrate-lua-sql -- /path/to/lua/scripts
    +

    The tool scans all .lua files in the given directory and rewrites Postgres SQL patterns to SQLite equivalents.

    +

    What the codemod converts automatically​

    +
      +
    • $1, $2, etc. parameter placeholders to ?
    • +
    • JSON operators (->, ->>) and ::jsonb casts to json_extract() calls
    • +
    • ILIKE to LIKE (SQLite LIKE is case-insensitive for ASCII by default)
    • +
    • NOW() to datetime('now')
    • +
    • NOW() + INTERVAL '...' / NOW() - INTERVAL '...' to datetime('now', '...')
    • +
    • TRUE/FALSE literals to 1/0
    • +
    +

    What it flags for manual review​

    +

    The tool prints warnings for patterns it cannot convert automatically:

    +
      +
    • JSONB ? (contains-key) operator — consider using json_each() with an EXISTS subquery
    • +
    • make_interval() — Postgres-specific, needs manual conversion
    • +
    • SIMILAR TO — use LIKE or GLOB instead
    • +
    • ANY() / ALL() array operators — no direct SQLite equivalent
    • +
    • Type casts other than ::jsonb (e.g., ::text, ::integer) — may need manual conversion to CAST(... AS ...)
    • +
    +

    Review the flagged lines and update them manually.

    +

    Step 4: Import data into SQLite​

    +

    Start HappyView with the new DATABASE_URL. It will create the SQLite database and run migrations automatically. If you need to import existing records, use the backfill feature to re-index from the network:

    +
      +
    1. Start HappyView with the new SQLite DATABASE_URL
    2. +
    3. Upload your lexicons via the dashboard or admin API
    4. +
    5. Run a backfill for each collection (dashboard or POST /admin/backfill)
    6. +
    +

    For small datasets, this is the simplest approach since backfill fetches all records fresh from the network.

    +

    Step 5: Update Docker Compose (if applicable)​

    +

    If you were running Postgres via Docker Compose, you can now comment out the postgres service since it is no longer needed. See the database setup guide for details.

    +

    Rollback​

    +

    To switch back to Postgres, revert your DATABASE_URL to the Postgres connection string. Your Postgres database remains unchanged — HappyView does not modify it during the migration to SQLite.

    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/guides/scripting/index.html b/guides/scripting/index.html index de9a707..0ba39e5 100644 --- a/guides/scripting/index.html +++ b/guides/scripting/index.html @@ -2,16 +2,16 @@ - -Lua Scripting | HappyView - - + +Lua Scripting | HappyView + + - + -

    Lua Scripting

    +

    Lua Scripting

    Without Lua scripts, HappyView's query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:

    • Add filtering logic
    • @@ -22,173 +22,71 @@

    Scripts are attached to query and procedure lexicons and run in a sandboxed Lua VM with access to the Record API, a database API, an HTTP client API, a JSON API, and a set of context globals.

    For scripts that react to record changes from the network (rather than XRPC requests), see Index Hooks.

    -

    Script structure​

    +

    Script structure​

    Every script must define a handle() function. HappyView calls it when the XRPC endpoint is hit and returns its result as JSON to the client.

    -
    function handle()
    -- your logic here
    return { key = "value" }
    end
    +
    function handle()
    -- your logic here
    return { key = "value" }
    end

    You can define helper functions and variables outside handle(). They're evaluated once when the script loads, then handle() is called per request.

    -

    Sandbox​

    +

    Sandbox​

    Scripts run in a restricted environment. The following standard Lua modules are removed and unavailable:

    -

    os, io, debug, package, require, dofile, loadfile, load, collectgarbage

    +

    io, debug, package, require, dofile, loadfile, load, collectgarbage

    +

    The os module is replaced with a safe subset exposing only os.time, os.date, os.difftime, and os.clock. Dangerous functions like os.execute, os.remove, os.rename, and os.exit are not available.

    An instruction limit of 1,000,000 prevents infinite loops. Exceeding it terminates the script with an error.

    -

    Context globals​

    +

    See the Standard Libraries reference for the full list of available Lua modules and builtins.

    +

    Context globals​

    These globals are set automatically before handle() is called.

    -

    Procedure globals​

    +

    Procedure globals​

    GlobalTypeDescription
    methodstringThe XRPC method name (e.g. xyz.statusphere.setStatus)
    inputtableParsed JSON request body
    caller_didstringDID of the authenticated user
    collectionstringTarget collection NSID
    -

    Query globals​

    +

    Query globals​

    GlobalTypeDescription
    methodstringThe XRPC method name
    paramstableQuery string parameters (all values are strings)
    collectionstringTarget collection NSID

    Queries are unauthenticated: there is no caller_did or input.

    -

    Utility globals​

    +

    Utility globals​

    Available in both queries and procedures:

    -
    FunctionReturnsDescription
    now()stringCurrent UTC timestamp in ISO 8601 format
    log(message)—Log a message (appears in server logs at debug level)
    TID()stringGenerate a fresh AT Protocol TID (13-character sortable identifier)
    toarray(table)tableMark a table as a JSON array for serialization (see below)
    -

    toarray​

    +
    FunctionReturnsDescription
    now()stringCurrent UTC timestamp in ISO 8601 format
    log(message)—Log a message (appears in server logs at debug level)
    TID()stringGenerate a fresh atproto TID (13-character sortable identifier)
    toarray(table)tableMark a table as a JSON array for serialization (see below)
    +

    toarray​

    Lua tables don't distinguish between arrays and objects. When a table is serialized to JSON, an empty table {} becomes a JSON object {} instead of an array []. The toarray() function marks a table so it always serializes as a JSON array — even when empty.

    -
    return { items = toarray(results) }
    -- With results: [{"name": "a"}, {"name": "b"}]
    -- Without results: {"items": []} (not {"items": {}})
    +
    return { items = toarray(results) }
    -- With results: [{"name": "a"}, {"name": "b"}]
    -- Without results: {"items": []} (not {"items": {}})

    You don't need toarray() on results from db.query, db.search, db.backlinks, or db.raw — those already return properly marked arrays. Use it when you build a table yourself with table.insert().

    -

    Record API​

    -

    The Record API is only available in procedure scripts. It handles creating, updating, loading, and deleting AT Protocol records. Writes are proxied to the caller's PDS and indexed locally.

    -

    Constructor​

    -
    local r = Record("xyz.statusphere.status", { status = "\ud83d\ude0a", createdAt = now() })
    -

    Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's _key_type is automatically set from the lexicon's key definition. Default values from the schema are populated for any missing fields.

    -

    Static methods​

    -
    -- Save multiple records in parallel
    Record.save_all({ record1, record2, record3 })

    -- Load a record from the local database by AT URI
    local r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")
    -- Returns nil if not found

    -- Load multiple records in parallel
    local records = Record.load_all({ uri1, uri2 })
    -- Returns nil entries for URIs not found
    -

    Instance methods​

    -
    -- Save (creates or updates depending on whether _uri is set)
    r:save()

    -- Delete from PDS and local database
    r:delete()

    -- Set the record key type (tid, any, nsid, or literal:*)
    r:set_key_type("tid")

    -- Set a specific record key
    r:set_rkey("my-key")

    -- Auto-generate a record key based on _key_type
    local key = r:generate_rkey()
    -

    Key type behavior for generate_rkey():

    -
    Key typeGenerated rkey
    tidSortable timestamp-based ID
    anySame as tid
    literal:valueThe literal value after the colon
    nsidError — use set_rkey() instead
    -

    Instance fields​

    -

    These fields are set automatically and are read-only (writes raise an error):

    -
    FieldTypeDescription
    _uristring?AT URI — set after save(), cleared after delete()
    _cidstring?Content hash — set after save(), cleared after delete()
    _key_typestring?Record key type from the lexicon definition
    _rkeystring?Record key — set via set_rkey() or generate_rkey()
    _collectionstringCollection NSID (always set)
    _schematable?Schema definition from the lexicon (used for validation)
    -

    Schema validation​

    -

    When a record has a schema (loaded from the lexicon):

    -
      -
    • On save: required fields are checked, and missing required fields raise an error
    • -
    • On construction: default values from schema properties are auto-populated
    • -
    • On save: only fields defined in the schema's properties are sent to the PDS
    • -
    -

    Save behavior​

    -

    r:save() auto-detects create vs update:

    -
      -
    • If _uri is nil → calls createRecord on the PDS
    • -
    • If _uri is set → calls putRecord on the PDS
    • -
    -

    After a successful save, _uri and _cid are updated on the record instance.

    -

    Database API​

    +

    Record API​

    +

    The Record API is only available in procedure scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller's PDS and indexed locally.

    +

    See the full Record API reference for constructor, static methods, instance methods, fields, schema validation, and save behavior.

    +

    Quick example:

    +
    function handle()
    local r = Record(collection, input)
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    +

    Database API​

    The db table provides access to the database. Available in both queries and procedures.

    -

    db.query​

    -
    local result = db.query({
    collection = "xyz.statusphere.status", -- required
    did = "did:plc:abc", -- optional: filter by DID
    limit = 20, -- optional: max 100, default 20
    offset = 0, -- optional: for pagination
    sort = "name", -- optional: field to sort by, default "indexed_at"
    sortDirection = "asc", -- optional: "asc" or "desc", default "desc"
    })

    -- result.records — array of record tables (each includes a "uri" field)
    -- result.cursor — present when more records exist
    -

    The sort field can be a top-level column (indexed_at, did, uri) or any field inside the record's value object (e.g. name, createdAt). Field names must contain only alphanumeric characters and underscores.

    -

    db.get​

    -
    local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")
    -- Returns the record table or nil
    -- The returned table includes a "uri" field
    -

    db.search​

    -
    local result = db.search({
    collection = "xyz.statusphere.status", -- required
    field = "displayName", -- required: record field to search
    query = "alice", -- required: search term
    limit = 10, -- optional: max 100, default 10
    })

    -- result.records — array of matching records, ranked by relevance:
    -- exact match > prefix match > contains match, then alphabetical
    - -

    Find records that reference a given AT URI anywhere in their data. Useful for finding likes on a post, replies to a thread, or any record that links to another.

    -
    local result = db.backlinks({
    collection = "xyz.statusphere.status", -- required
    uri = "at://did:plc:abc/xyz.statusphere.status/foo", -- required: the URI to find references to
    did = "did:plc:abc", -- optional: filter by DID
    limit = 20, -- optional: max 100, default 20
    offset = 0, -- optional: for pagination
    })

    -- result.records — array of records whose data contains the given URI
    -- result.cursor — present when more records exist
    -

    The search checks the full record data, so it works regardless of which field holds the reference (subject, parent, reply.root, etc.).

    -

    db.count​

    -
    local n = db.count("xyz.statusphere.status")
    local n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID
    -

    db.raw​

    -

    Run a raw SQL query against the database. Supports SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE statements.

    -
    -- Read query
    local rows = db.raw(
    "SELECT uri, did, record FROM records WHERE collection = $1 AND did = $2 LIMIT $3",
    { "xyz.statusphere.status", "did:plc:abc", 10 }
    )

    for _, row in ipairs(rows) do
    -- row.uri, row.did, row.record (JSONB is returned as a Lua table)
    end

    -- Write query (returns affected rows, if any)
    db.raw("CREATE TABLE IF NOT EXISTS my_table (id TEXT PRIMARY KEY, value TEXT NOT NULL)")
    db.raw("INSERT INTO my_table (id, value) VALUES ($1, $2) ON CONFLICT (id) DO UPDATE SET value = $2",
    { "key1", "hello" })
    -

    Parameters are passed as an array and bound to $1, $2, etc. Supported parameter types: strings, integers, numbers, booleans, and nil.

    -

    Column types are mapped automatically:

    -
    Postgres typeLua type
    TEXT, VARCHARstring
    INT4, INT8integer
    FLOAT4, FLOAT8number
    BOOLboolean
    JSON, JSONBtable
    TIMESTAMPTZstring (ISO 8601)
    Otherstring (fallback)
    -

    HTTP API​

    +

    See the full Database API reference for db.query, db.get, db.search, db.backlinks, db.count, and db.raw.

    +

    Quick example:

    +
    function handle()
    local result = db.query({ collection = collection, limit = 20 })
    return { records = result.records, cursor = result.cursor }
    end
    +

    HTTP API​

    The http table provides async HTTP client functions. Available in both queries and procedures.

    -

    Methods​

    -

    All methods take a URL and an optional options table, and return a response table.

    -
    http.get(url, opts?)
    http.post(url, opts?)
    http.put(url, opts?)
    http.patch(url, opts?)
    http.delete(url, opts?)
    http.head(url, opts?)
    -

    Options​

    -

    The optional second argument is a table with:

    -
    FieldTypeDescription
    headerstableRequest headers as key-value string pairs
    bodystringRequest body (ignored for GET and HEAD)
    -

    Response​

    -

    Every method returns a table with:

    -
    FieldTypeDescription
    statusintegerHTTP status code
    bodystringResponse body text (empty string for HEAD)
    headerstableResponse headers as key-value pairs (lowercase keys)
    -

    Examples​

    -
    -- Simple GET
    local resp = http.get("https://api.example.com/data")
    -- resp.status = 200, resp.body = "...", resp.headers["content-type"] = "application/json"

    -- GET with custom headers
    local resp = http.get("https://api.example.com/data", {
    headers = { ["authorization"] = "Bearer token123" }
    })

    -- POST with JSON body
    local resp = http.post("https://api.example.com/hook", {
    body = '{"key": "value"}',
    headers = { ["content-type"] = "application/json" }
    })

    -- PUT, PATCH, DELETE, HEAD follow the same pattern
    local resp = http.put(url, { body = data, headers = { ... } })
    local resp = http.patch(url, { body = data, headers = { ... } })
    local resp = http.delete(url, { headers = { ... } })
    local resp = http.head(url)
    -

    JSON API​

    -

    The json global provides JSON serialization and deserialization. Available in queries, procedures, and index hooks.

    -

    json.encode​

    -
    local str = json.encode({ key = "value", items = { 1, 2, 3 } })
    -- '{"key":"value","items":[1,2,3]}'
    -

    Converts a Lua table to a JSON string.

    -

    json.decode​

    -
    local tbl = json.decode('{"key": "value"}')
    -- tbl.key == "value"
    -

    Parses a JSON string into a Lua table. Returns an error if the input is not valid JSON.

    -

    Standard libraries​

    -

    The following Lua 5.4 standard library modules are available:

    -

    string

    -

    table

    -

    math

    -

    Standard builtins

    -

    Debugging​

    -

    Logging​

    +

    See the full HTTP API reference for all methods, options, and response format.

    +

    Quick example:

    +
    local resp = http.get("https://api.example.com/data")
    local data = json.decode(resp.body)
    +

    atproto API​

    +

    The atproto table provides atproto utility functions like DID resolution and label queries.

    +

    See the full atproto API reference for atproto.resolve_service_endpoint, atproto.get_labels, and atproto.get_labels_batch.

    +

    JSON API​

    +

    The json global provides JSON serialization and deserialization.

    +

    See the full JSON API reference for json.encode and json.decode.

    +

    Debugging​

    +

    Logging​

    Use log() to trace script execution. Output appears in the server logs at debug level with the field lua_log:

    -
    function handle()
    log("handle called with params: " .. tostring(params.limit))
    local result = db.query({ collection = collection, limit = params.limit })
    log("query returned " .. #result.records .. " records")
    return result
    end
    +
    function handle()
    log("handle called with params: " .. tostring(params.limit))
    local result = db.query({ collection = collection, limit = params.limit })
    log("query returned " .. #result.records .. " records")
    return result
    end

    To see log output, make sure your RUST_LOG environment variable includes debug level for HappyView (the default happyview=debug works). See Configuration.

    -

    Error messages​

    +

    Error messages​

    When a script fails, the client receives a generic 500 response:

    • {"error": "script execution failed"}: covers syntax errors, runtime errors, missing handle() function, and errors raised with error()
    • {"error": "script exceeded execution time limit"}: the script hit the 1,000,000 instruction limit

    The full error message is logged server-side at error level. Check the server logs to see the actual Lua error, including line numbers and stack traces.

    -

    Common mistakes​

    +

    Common mistakes​

    • Missing handle() function: Every script must define a global handle() function. If it's missing or misspelled, the script fails silently with "script execution failed".
    • Calling error() for expected conditions: Lua's error() triggers a 500 response. For expected conditions like "record not found", return a structured error response instead: return { error = "not found" }.
    • Infinite loops: The sandbox enforces a 1,000,000 instruction limit. If your script processes large data sets, paginate with db.query() limits instead of loading everything at once.
    • Forgetting params values are strings: All query string parameters arrive as strings. Use tonumber(params.limit) if you need a number.
    -

    Example scripts​

    +

    Example scripts​

    See the example script references for complete, ready-to-use scripts:

    Queries:

      @@ -211,12 +109,12 @@
      • Algolia sync — push records to an Algolia search index on create/update/delete
      -

      Next steps​

      +

      Next steps​

      • Index Hooks: React to record changes from the network in real time
      • Lexicons: Understand how record, query, and procedure lexicons work together
      • XRPC API: See how endpoints behave with and without Lua scripts
      • Dashboard: Use the web editor with context-aware completions
      • -
    +
    \ No newline at end of file diff --git a/guides/sqlite-to-postgres-migration/index.html b/guides/sqlite-to-postgres-migration/index.html new file mode 100644 index 0000000..b188cbf --- /dev/null +++ b/guides/sqlite-to-postgres-migration/index.html @@ -0,0 +1,62 @@ + + + + + +Migrating from SQLite to Postgres | HappyView + + + + + + + +

    Migrating from SQLite to Postgres

    +

    This guide covers migrating an existing HappyView deployment from SQLite to Postgres. If you are staying on SQLite, no action is required.

    +

    Overview​

    +

    HappyView writes all internal SQL in SQLite syntax and translates to Postgres automatically at runtime. This means your Lua scripts do not need any changes when switching from SQLite to Postgres — they continue to work as-is.

    +

    The main steps are: set up the Postgres database, update your environment variables, and re-index your data.

    +

    Step 1: Set up Postgres​

    +

    Create a Postgres database for HappyView:

    +
    createdb happyview
    +

    If you are using Docker Compose, uncomment the postgres service and pgdata volume in your docker-compose.yml. See the database setup guide for details.

    +

    Step 2: Back up your SQLite database​

    +

    Copy your SQLite database file before making any changes:

    +
    cp data/happyview.db data/happyview.db.backup
    +

    Step 3: Update environment variables​

    +

    Change your .env to use Postgres:

    +
    # Before
    DATABASE_URL=sqlite://data/happyview.db?mode=rwc

    # After
    DATABASE_URL=postgres://happyview:happyview@localhost/happyview
    +

    If you had DATABASE_BACKEND set, update it as well:

    +
    DATABASE_BACKEND=postgres
    +

    Step 4: Start HappyView​

    +

    Start HappyView with the new DATABASE_URL. It will connect to Postgres and run migrations automatically, creating all necessary tables.

    +

    Step 5: Re-index your data​

    +

    Since HappyView indexes records from the atproto network, the simplest way to populate your new Postgres database is to re-run the backfill:

    +
      +
    1. Upload your lexicons via the dashboard or admin API (or they will already be there if you exported and re-imported them)
    2. +
    3. Run a backfill for each collection (dashboard or POST /admin/backfill)
    4. +
    +

    Backfill fetches all records fresh from the network, so no data transfer between databases is needed.

    +
    tip

    If you have many lexicons, you can export them from the old instance before switching. Use GET /admin/lexicons to list them and POST /admin/lexicons to re-upload after switching to Postgres.

    +

    Step 6: Re-create admin settings​

    +

    Instance settings (app name, logo, TOS/privacy URIs), API keys, users, and labeler subscriptions are stored in the database and are not carried over automatically. Re-create these via the dashboard or admin API after switching.

    +

    Lua scripts​

    +

    No changes needed. Lua scripts use SQLite syntax by default, and HappyView translates to Postgres automatically at runtime. This includes:

    +
      +
    • ? placeholders (translated to $1, $2, etc.)
    • +
    • json_extract() calls (translated to Postgres JSON operators)
    • +
    • datetime('now') (translated to NOW())
    • +
    • Boolean literals 1/0 (work in both backends)
    • +
    +

    If you have scripts that already use Postgres-native syntax (e.g., from direct db.raw() calls), they will not work after switching — HappyView expects SQLite syntax. Use the codemod tool to convert them.

    +

    Rollback​

    +

    To switch back to SQLite, revert your DATABASE_URL to the SQLite connection string. Your SQLite database file remains unchanged — HappyView does not modify it during the migration to Postgres.

    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/index.html b/index.html index 4f0e853..cbfd266 100644 --- a/index.html +++ b/index.html @@ -2,52 +2,60 @@ - -HappyView - - + +HappyView + + - + -

    HappyView

    -

    HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.

    -

    Building an AppView from scratch means wiring up firehose connections, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app.

    -

    Features​

    +

    HappyView

    +

    HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.

    +

    Building an AppView from scratch means wiring up real-time event streams, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app.

    +

    Features​

      -
    • 📜 Lexicon-Driven: Upload your lexicon schemas and HappyView generates fully functional XRPC query and procedure endpoints automatically, no code required
    • -
    • 🔄 Real-Time Sync: Records stream in from the AT Protocol network in real-time via Tap, with cryptographic verification and backfill via the admin API
    • -
    • 🔐 OAuth Built In: AIP handles authentication, and writes are proxied back to the user's PDS, so there's no session management needed
    • -
    • 🌙 Lua Scripting: Add custom query and procedure logic with Lua scripts that have full access to the record database
    • -
    • 🗄️ Automatic Indexing: HappyView indexes relevant records into PostgreSQL as they arrive, ready to query
    • -
    • 🪝 Index Hooks: Attach Lua scripts to record collections that fire on every create, update, or delete — sync to search engines, trigger webhooks, or build materialized views in real time
    • -
    • 🌐 Network Lexicons: Fetch lexicon schemas directly from the AT Protocol network via DNS authority resolution
    • -
    • ⚡ Hot Reloading: Upload or update lexicons at runtime, and new endpoints are available immediately with no restart
    • -
    • 🛠️ Admin Dashboard: Manage lexicons, monitor record stats, and run backfill jobs through a built-in admin API
    • +
    • +

      Schema-driven endpoints: Upload a lexicon and HappyView generates XRPC query and procedure routes, storage, and indexing from it — updatable at runtime with no restart.

      +
    • +
    • +

      Network sync built in: Real-time record streaming via Jetstream, historical backfill from each user's PDS, and atproto OAuth with DPoP-bound proxy writes back to the PDS.

      +
    • +
    • +

      Customize with Lua, hooks, and plugins: Lua scripts for query and procedure logic, index hooks that fire on every record change, WASM plugins for external platform integration, and labeler subscriptions for content moderation.

      +
    • +
    • +

      Protocol-native: Works with any PDS, resolves DIDs through the directory, and fetches network lexicons via DNS authority resolution.

      +
    • +
    • +

      Full admin surface: Built-in dashboard and admin API for managing lexicons, users, API keys, API clients, backfill jobs, and plugins.

      +
    -

    Design Principles​

    +

    Design Principles​

    • Schema-first: Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe what your data looks like; HappyView figures out the rest.

    • -

      Zero boilerplate: HappyView handles AppView infrastructure (firehose, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing.

      +

      Zero boilerplate: HappyView handles AppView infrastructure (Jetstream, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing.

    • Runtime-configurable: Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time.

    • -

      Protocol-native: HappyView works with any PDS, resolves DIDs through the directory, and follows AT Protocol conventions. It's a first-class citizen of the network, not a wrapper around it.

      +

      Protocol-native: HappyView works with any PDS, resolves DIDs through the directory, and follows atproto conventions. It's a first-class citizen of the network, not a wrapper around it.

    -

    Next Steps​

    +

    Next Steps​

    • Quickstart: Deploy HappyView on Railway or run it locally
    • Lexicons: Upload lexicon schemas and start indexing records
    • Lua Scripting: Write custom query and procedure logic
    • Index Hooks: React to record changes in real time
    • +
    • Labelers: Subscribe to external labelers and manage content labels
    • +
    • Plugins: Integrate with external platforms using WASM plugins
    • Event Logs: Monitor system activity, debug script errors, and audit admin actions
    • -
    +
    \ No newline at end of file diff --git a/reference/admin-api/index.html b/reference/admin-api/index.html index f266e86..a804afb 100644 --- a/reference/admin-api/index.html +++ b/reference/admin-api/index.html @@ -2,139 +2,35 @@ - -Admin API | HappyView - - + +Admin API | HappyView + + - + -

    Admin API

    -

    The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under /admin and require an AIP-issued Bearer token from a DID that exists in the admins table. You can also manage all of this through the web dashboard.

    -

    Auth​

    +

    Admin API

    +

    The admin API lets you manage lexicons, monitor records, run backfill jobs, and control user access. All endpoints live under /admin and require authentication from a DID that exists in the users table, with the appropriate permissions for the endpoint being called. You can also manage all of this through the web dashboard.

    +

    Auth​

    The admin API supports two authentication methods:

      -
    1. OAuth (AIP) — the Bearer token is validated against AIP's /oauth/userinfo endpoint to retrieve the caller's DID.
    2. -
    3. API keys — read/write tokens starting with hv_. See the API Keys guide for details.
    4. +
    5. API keys — read/write tokens starting with hv_, passed as Authorization: Bearer hv_.... See the API Keys guide for details.
    6. +
    7. Service auth JWT — atproto inter-service authentication via signed JWTs.
    -

    In both cases the resolved DID is checked against the admins table.

    -

    Auto-bootstrap: If the admins table is empty, the first authenticated request automatically inserts the caller as the initial admin.

    -

    Non-admin DIDs receive a 403 Forbidden response.

    +

    In all cases the resolved DID is checked against the users table, and the user's permissions are loaded to authorize the request.

    +

    Auto-bootstrap: If the users table is empty, the first authenticated request automatically creates the caller as the super user with all permissions granted.

    +

    Non-user DIDs receive a 403 Forbidden response. Users without the required permission for a specific endpoint also receive 403 Forbidden.

    +

    Errors​

    All error responses return JSON with an error field:

    -
    {
    "error": "description of what went wrong"
    }
    -
    StatusMeaning
    400 Bad RequestInvalid input (missing required fields, malformed lexicon JSON)
    401 UnauthorizedMissing or invalid Bearer token. See AIP documentation for token issues
    403 ForbiddenAuthenticated DID is not in the admins table
    404 Not FoundLexicon, admin, or backfill job not found
    -
    # All examples assume $TOKEN is an AIP-issued access token or API key
    AUTH="Authorization: Bearer $TOKEN"
    -

    Lexicons​

    -

    Upload / upsert a lexicon​

    -
    POST /admin/lexicons
    -
    curl -X POST http://localhost:3000/admin/lexicons \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },
    "backfill": true,
    "target_collection": null
    }'
    -
    FieldTypeRequiredDescription
    lexicon_jsonobjectyesRaw lexicon JSON (must have lexicon: 1 and id)
    backfillbooleannoWhether uploading triggers historical backfill (default true)
    target_collectionstringnoFor query/procedure lexicons, the record collection they operate on
    scriptstringnoLua script for query/procedure endpoints
    index_hookstringnoIndex hook Lua script for record lexicons
    -

    Response: 201 Created (new) or 200 OK (upsert)

    -
    {
    "id": "xyz.statusphere.status",
    "revision": 1
    }
    -

    List lexicons​

    -
    GET /admin/lexicons
    -
    curl http://localhost:3000/admin/lexicons -H "$AUTH"
    -

    Response: 200 OK

    -
    [
    {
    "id": "xyz.statusphere.status",
    "revision": 1,
    "lexicon_type": "record",
    "backfill": true,
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2025-01-01T00:00:00Z"
    }
    ]
    -

    Get a lexicon​

    -
    GET /admin/lexicons/{id}
    -
    curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"
    -

    Response: 200 OK with full lexicon details including raw JSON.

    -

    Delete a lexicon​

    -
    DELETE /admin/lexicons/{id}
    -
    curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"
    -

    Response: 204 No Content

    -

    Network Lexicons​

    -

    Network lexicons are fetched from the AT Protocol network via DNS TXT resolution and kept updated via Tap. See Lexicons - Network lexicons for background.

    -

    Add a network lexicon​

    -
    POST /admin/network-lexicons
    -
    curl -X POST http://localhost:3000/admin/network-lexicons \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "nsid": "xyz.statusphere.status",
    "target_collection": null
    }'
    -
    FieldTypeRequiredDescription
    nsidstringyesThe NSID of the lexicon to watch
    target_collectionstringnoFor query/procedure lexicons, the record collection they operate on
    -

    HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it.

    -

    Response: 201 Created

    -
    {
    "nsid": "xyz.statusphere.status",
    "authority_did": "did:plc:authority",
    "revision": 1
    }
    -

    List network lexicons​

    -
    GET /admin/network-lexicons
    -
    curl http://localhost:3000/admin/network-lexicons -H "$AUTH"
    -

    Response: 200 OK

    -
    [
    {
    "nsid": "xyz.statusphere.status",
    "authority_did": "did:plc:authority",
    "target_collection": null,
    "last_fetched_at": "2025-01-01T00:00:00Z",
    "created_at": "2025-01-01T00:00:00Z"
    }
    ]
    -

    Remove a network lexicon​

    -
    DELETE /admin/network-lexicons/{nsid}
    -
    curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \
    -H "$AUTH"
    -

    Removes the network lexicon tracking and also deletes the lexicon from the lexicons table and in-memory registry.

    -

    Response: 204 No Content

    -

    Stats​

    -

    Record counts​

    -
    GET /admin/stats
    -
    curl http://localhost:3000/admin/stats -H "$AUTH"
    -

    Response: 200 OK

    -
    {
    "total_records": 12345,
    "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]
    }
    -

    Tap Stats​

    -

    Aggregate stats from the Tap instance. Useful for monitoring backfill progress. See Backfill - Job lifecycle for context.

    -

    Get Tap stats​

    -
    GET /admin/tap/stats
    -
    curl http://localhost:3000/admin/tap/stats -H "$AUTH"
    -

    Response: 200 OK

    -
    {
    "repo_count": 5234,
    "record_count": 1048576,
    "outbox_buffer": 42
    }
    -
    FieldTypeDescription
    repo_countnumberTotal repos Tap is tracking
    record_countnumberTotal records Tap has indexed
    outbox_buffernumberPending events awaiting delivery (high = Tap is busy)
    -

    Returns 502 Bad Gateway if Tap is unreachable.

    -

    Backfill​

    -

    Create a backfill job​

    -
    POST /admin/backfill
    -
    curl -X POST http://localhost:3000/admin/backfill \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "collection": "xyz.statusphere.status" }'
    -
    FieldTypeRequiredDescription
    collectionstringnoLimit to a single collection (backfills all if omitted)
    didstringnoLimit to a single DID (discovers all via relay if omitted)
    -

    Response: 201 Created

    -
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending"
    }
    -

    List backfill jobs​

    -
    GET /admin/backfill/status
    -
    curl http://localhost:3000/admin/backfill/status -H "$AUTH"
    -

    Response: 200 OK

    -
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "collection": "xyz.statusphere.status",
    "did": null,
    "status": "completed",
    "total_repos": 42,
    "processed_repos": 42,
    "total_records": 1000,
    "error": null,
    "started_at": "2025-01-01T00:01:00Z",
    "completed_at": "2025-01-01T00:05:00Z",
    "created_at": "2025-01-01T00:00:00Z"
    }
    ]
    -

    Event Logs​

    -

    HappyView records an audit trail of system events: lexicon changes, record operations, Lua script executions and errors, admin actions, backfill jobs, and Tap connectivity. See the Event Logs guide for details on event types and retention.

    -

    List event logs​

    -
    GET /admin/events
    -
    curl "http://localhost:3000/admin/events?severity=error&limit=10" -H "$AUTH"
    -
    ParamTypeRequiredDescription
    event_typestringnoFilter by exact event type (e.g. script.error)
    categorystringnoFilter by category prefix (e.g. lexicon matches all lexicon events)
    severitystringnoFilter by severity: info, warn, or error
    subjectstringnoFilter by subject (lexicon ID, record URI, admin DID, etc.)
    cursorstringnoPagination cursor (ISO 8601 timestamp from previous response)
    limitnumbernoResults per page (default 50, max 100)
    -

    Response: 200 OK

    -
    {
    "events": [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "event_type": "script.error",
    "severity": "error",
    "actor_did": "did:plc:abc123",
    "subject": "com.example.feed.like",
    "detail": {
    "error": "attempt to index nil value",
    "script_source": "function handle() ... end",
    "input": { "status": "hello" },
    "caller_did": "did:plc:abc123",
    "method": "com.example.feed.like"
    },
    "created_at": "2026-03-01T12:00:00Z"
    }
    ],
    "cursor": "2026-03-01T11:59:00Z"
    }
    -

    Events are returned in reverse chronological order (newest first). Pass the cursor value from the response to fetch the next page.

    -

    API Keys​

    -

    Manage API keys for programmatic access. See the API Keys guide for usage details.

    -

    Create an API key​

    -
    POST /admin/api-keys
    -
    curl -X POST http://localhost:3000/admin/api-keys \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "name": "CI Deploy" }'
    -
    FieldTypeRequiredDescription
    namestringyesA label to identify this key's usage
    -

    Response: 201 Created

    -
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "CI Deploy",
    "key": "hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "key_prefix": "hv_a1b2c3d4"
    }
    -

    The key field contains the full API key. It is only returned in this response — store it securely.

    -

    List API keys​

    -
    GET /admin/api-keys
    -
    curl http://localhost:3000/admin/api-keys -H "$AUTH"
    -

    Response: 200 OK

    -
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "CI Deploy",
    "key_prefix": "hv_a1b2c3d4",
    "created_at": "2026-03-01T00:00:00Z",
    "last_used_at": "2026-03-06T12:00:00Z",
    "revoked_at": null
    }
    ]
    -

    Only returns keys belonging to the authenticated admin. The full key is never included — only the prefix.

    -

    Revoke an API key​

    -
    DELETE /admin/api-keys/{id}
    -
    curl -X DELETE http://localhost:3000/admin/api-keys/550e8400-e29b-41d4-a716-446655440000 \
    -H "$AUTH"
    -

    Sets revoked_at on the key. The key remains in the database for audit purposes but can no longer authenticate.

    -

    Response: 204 No Content

    -

    Admin management​

    -

    Add an admin​

    -
    POST /admin/admins
    -
    curl -X POST http://localhost:3000/admin/admins \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "did": "did:plc:newadmin" }'
    -

    Response: 201 Created

    -
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "did": "did:plc:newadmin"
    }
    -

    List admins​

    -
    GET /admin/admins
    -
    curl http://localhost:3000/admin/admins -H "$AUTH"
    -

    Response: 200 OK

    -
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "did": "did:plc:admin",
    "created_at": "2025-01-01T00:00:00Z",
    "last_used_at": "2025-01-02T12:00:00Z"
    }
    ]
    -

    Remove an admin​

    -
    DELETE /admin/admins/{id}
    -
    curl -X DELETE http://localhost:3000/admin/admins/550e8400-e29b-41d4-a716-446655440000 \
    -H "$AUTH"
    -

    Response: 204 No Content

    +
    {
    "error": "description of what went wrong"
    }
    +
    StatusMeaning
    400 Bad RequestInvalid input (missing required fields, malformed lexicon JSON)
    401 UnauthorizedMissing or invalid API key or service auth JWT
    403 ForbiddenAuthenticated DID is not in the users table, or user lacks the required permission
    404 Not FoundLexicon, user, or backfill job not found
    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Endpoint groups​

    +
    GroupDescription
    LexiconsUpload, list, get, and delete lexicons and network lexicons
    StatsRecord counts by collection
    BackfillCreate and monitor historical backfill jobs
    Event LogsQuery the audit trail of system events
    API KeysCreate, list, and revoke API keys
    UsersCreate, list, update, and delete admin users
    LabelersManage external labeler subscriptions
    Instance SettingsConfigure app name, logo, and policy URLs
    DomainsManage domains and their OAuth client identities
    Script VariablesEncrypted key/value pairs for Lua scripts
    API ClientsRegister and manage third-party XRPC clients
    PluginsInstall, configure, and manage WASM plugins
    +

    Permissions​

    +

    Each admin API endpoint requires a specific permission. See the Permissions guide for the full list of permissions and templates.

    +
    EndpointRequired Permission
    POST /admin/lexiconslexicons:create
    GET /admin/lexiconslexicons:read
    GET /admin/lexicons/{id}lexicons:read
    DELETE /admin/lexicons/{id}lexicons:delete
    POST /admin/network-lexiconslexicons:create
    GET /admin/network-lexiconslexicons:read
    DELETE /admin/network-lexicons/{id}lexicons:delete
    GET /admin/statsstats:read
    POST /admin/backfillbackfill:create
    GET /admin/backfill/statusbackfill:read
    GET /admin/eventsevents:read
    POST /admin/api-keysapi-keys:create
    GET /admin/api-keysapi-keys:read
    DELETE /admin/api-keys/{id}api-keys:delete
    POST /admin/usersusers:create
    GET /admin/usersusers:read
    GET /admin/users/{id}users:read
    PATCH /admin/users/{id}/permissionsusers:update
    DELETE /admin/users/{id}users:delete
    POST /admin/users/transfer-superSuper user only
    GET /admin/script-variablesscript-variables:read
    POST /admin/script-variablesscript-variables:create
    DELETE /admin/script-variables/{key}script-variables:delete
    POST /admin/labelerslabelers:create
    GET /admin/labelerslabelers:read
    PATCH /admin/labelers/{did}labelers:create
    DELETE /admin/labelers/{did}labelers:delete
    GET /admin/settingssettings:manage
    PUT /admin/settings/{key}settings:manage
    DELETE /admin/settings/{key}settings:manage
    PUT /admin/settings/logosettings:manage
    DELETE /admin/settings/logosettings:manage
    GET /admin/pluginsplugins:read
    POST /admin/pluginsplugins:create
    POST /admin/plugins/previewplugins:read
    GET /admin/plugins/officialplugins:read
    DELETE /admin/plugins/{id}plugins:delete
    POST /admin/plugins/{id}/reloadplugins:create
    POST /admin/plugins/{id}/check-updateplugins:read
    GET /admin/plugins/{id}/secretsplugins:read
    PUT /admin/plugins/{id}/secretsplugins:create
    GET /admin/domainssettings:manage
    POST /admin/domainssettings:manage
    DELETE /admin/domains/{id}settings:manage
    POST /admin/domains/{id}/primarysettings:manage
    GET /admin/api-clientsapi-clients:view
    POST /admin/api-clientsapi-clients:create
    GET /admin/api-clients/{id}api-clients:view
    PUT /admin/api-clients/{id}api-clients:edit
    DELETE /admin/api-clients/{id}api-clients:delete
    \ No newline at end of file diff --git a/reference/admin/api-clients/index.html b/reference/admin/api-clients/index.html new file mode 100644 index 0000000..78f1975 --- /dev/null +++ b/reference/admin/api-clients/index.html @@ -0,0 +1,47 @@ + + + + + +Admin API: API Clients | HappyView + + + + + + + +

    Admin API: API Clients

    +

    API clients identify third-party applications that call HappyView's XRPC endpoints. Every request — authenticated or not — needs an X-Client-Key header (or client_key query param). Requests without one get 401 Unauthorized. The client key is HappyView's rate-limit bucket.

    +

    A single API client represents your application, not individual users. Create one client for your app and use the same client key across all instances. Users authenticate separately via OAuth — the client key identifies your app, not who is using it.

    +

    Each client has an hvc_-prefixed client key and an hvs_-prefixed client secret. The secret is only returned at creation and is sha256-hashed in the database. Server-to-server callers pass the secret as X-Client-Secret. Browser callers use the Origin header, which is matched against the client's client_uri. Mismatches currently log warnings rather than rejecting the request, but rate limiting applies either way. See Authentication — XRPC for the client-side view, and the API Keys guide for how admin API keys differ from API clients.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List API clients​

    +
    GET /admin/api-clients
    +

    Requires api-clients:view. Returns clients ordered by created_at descending. Secrets are never returned.

    +
    curl http://localhost:3000/admin/api-clients -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "01J9...",
    "client_key": "hvc_a1b2c3...",
    "name": "My Game Client",
    "client_id_url": "https://example.com/client-metadata.json",
    "client_uri": "https://example.com",
    "redirect_uris": ["https://example.com/callback"],
    "scopes": "atproto",
    "rate_limit_capacity": 200,
    "rate_limit_refill_rate": 5.0,
    "is_active": true,
    "created_by": "did:plc:...",
    "created_at": "2026-04-13T12:00:00Z",
    "updated_at": "2026-04-13T12:00:00Z"
    }
    ]
    +

    Create an API client​

    +
    POST /admin/api-clients
    +

    Requires api-clients:create. Generates a client_key and client_secret. Store the secret — it won't be shown again.

    +
    curl -X POST http://localhost:3000/admin/api-clients \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "name": "My Game Client",
    "client_id_url": "https://example.com/client-metadata.json",
    "client_uri": "https://example.com",
    "redirect_uris": ["https://example.com/callback"],
    "scopes": "atproto",
    "rate_limit_capacity": 200,
    "rate_limit_refill_rate": 5.0
    }'
    +
    FieldTypeRequiredDescription
    namestringyesHuman-readable display name
    client_id_urlstringyesURL to the client's published OAuth client metadata document
    client_uristringyesThe client's home/landing URL
    redirect_urisstring[]yesAllowed OAuth redirect URIs
    scopesstringnoSpace-separated OAuth scopes (default "atproto")
    rate_limit_capacityintegernoPer-client token bucket capacity. Falls back to DEFAULT_RATE_LIMIT_CAPACITY if unset
    rate_limit_refill_ratenumbernoTokens added per second. Falls back to DEFAULT_RATE_LIMIT_REFILL_RATE if unset
    +

    Response: 201 Created

    +
    {
    "id": "01J9...",
    "client_key": "hvc_a1b2c3...",
    "client_secret": "hvs_d4e5f6...",
    "name": "My Game Client",
    "client_id_url": "https://example.com/client-metadata.json"
    }
    +

    The new client is immediately registered with the OAuth registry and rate limiter, so it can authenticate without restarting HappyView.

    +

    Get an API client​

    +
    GET /admin/api-clients/{id}
    +

    Requires api-clients:view. Returns the same shape as the list endpoint, or 404 Not Found.

    +

    Update an API client​

    +
    PUT /admin/api-clients/{id}
    +

    Requires api-clients:edit. All fields are optional — only provided fields are changed. Updating either rate-limit field re-registers the client with the rate limiter using the new values.

    +
    FieldTypeDescription
    namestringNew display name
    client_uristringNew home URL
    redirect_urisstring[]Replace the allowed redirect URIs
    scopesstringReplace the OAuth scopes
    rate_limit_capacityintegerNew bucket capacity. Pass null to clear the override
    rate_limit_refill_ratenumberNew refill rate. Pass null to clear the override
    is_activebooleanDisable (false) or re-enable (true) the client without deleting it
    +

    Response: 204 No Content

    +

    The OAuth registry is updated in place. The client_id_url is immutable — to change it, delete and recreate the client.

    +

    Delete an API client​

    +
    DELETE /admin/api-clients/{id}
    +

    Requires api-clients:delete. Removes the client from the OAuth registry, the rate limiter, and the client identity store.

    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/admin/api-keys/index.html b/reference/admin/api-keys/index.html new file mode 100644 index 0000000..73489fb --- /dev/null +++ b/reference/admin/api-keys/index.html @@ -0,0 +1,39 @@ + + + + + +Admin API: API Keys | HappyView + + + + + + + +

    Admin API: API Keys

    +

    Manage API keys for programmatic access. See the API Keys guide for usage details.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Create an API key​

    +
    POST /admin/api-keys
    +

    Requires api-keys:create permission.

    +
    curl -X POST http://localhost:3000/admin/api-keys \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "name": "CI Deploy",
    "permissions": ["lexicons:read", "lexicons:create", "backfill:create"]
    }'
    +
    FieldTypeRequiredDescription
    namestringyesA label to identify this key's usage
    permissionsstring[]yesPermissions to grant the key (must be a subset of the creating user's own permissions)
    +

    Response: 201 Created

    +
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "CI Deploy",
    "key": "hv_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "key_prefix": "hv_a1b2c3d4",
    "permissions": ["lexicons:read", "lexicons:create", "backfill:create"]
    }
    +

    The key field contains the full API key. It is only returned in this response — store it securely. The key's effective permissions are the intersection of the permissions specified here and the creating user's permissions at the time of each request.

    +

    List API keys​

    +
    GET /admin/api-keys
    +

    Requires api-keys:read permission.

    +
    curl http://localhost:3000/admin/api-keys -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "CI Deploy",
    "key_prefix": "hv_a1b2c3d4",
    "permissions": ["lexicons:read", "lexicons:create", "backfill:create"],
    "created_at": "2026-03-01T00:00:00Z",
    "last_used_at": "2026-03-06T12:00:00Z",
    "revoked_at": null
    }
    ]
    +

    Only returns keys belonging to the authenticated user. The full key is never included — only the prefix.

    +

    Revoke an API key​

    +
    DELETE /admin/api-keys/{id}
    +

    Requires api-keys:delete permission.

    +
    curl -X DELETE http://localhost:3000/admin/api-keys/550e8400-e29b-41d4-a716-446655440000 \
    -H "$AUTH"
    +

    Sets revoked_at on the key. The key remains in the database for audit purposes but can no longer authenticate.

    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/admin/backfill/index.html b/reference/admin/backfill/index.html new file mode 100644 index 0000000..d47f58b --- /dev/null +++ b/reference/admin/backfill/index.html @@ -0,0 +1,29 @@ + + + + + +Admin API: Backfill | HappyView + + + + + + + +

    Admin API: Backfill

    +

    Create and monitor historical backfill jobs. See the Backfill guide for background.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Create a backfill job​

    +
    POST /admin/backfill
    +
    curl -X POST http://localhost:3000/admin/backfill \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "collection": "xyz.statusphere.status" }'
    +
    FieldTypeRequiredDescription
    collectionstringnoLimit to a single collection (backfills all if omitted)
    didstringnoLimit to a single DID (discovers all via relay if omitted)
    +

    Response: 201 Created

    +
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending"
    }
    +

    List backfill jobs​

    +
    GET /admin/backfill/status
    +
    curl http://localhost:3000/admin/backfill/status -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "collection": "xyz.statusphere.status",
    "did": null,
    "status": "completed",
    "total_repos": 42,
    "processed_repos": 42,
    "total_records": 1000,
    "error": null,
    "started_at": "2025-01-01T00:01:00Z",
    "completed_at": "2025-01-01T00:05:00Z",
    "created_at": "2025-01-01T00:00:00Z"
    }
    ]
    + + \ No newline at end of file diff --git a/reference/admin/domains/index.html b/reference/admin/domains/index.html new file mode 100644 index 0000000..4049258 --- /dev/null +++ b/reference/admin/domains/index.html @@ -0,0 +1,43 @@ + + + + + +Admin API: Domains | HappyView + + + + + + + +

    Admin API: Domains

    +

    Manage the domains a HappyView instance serves. Each domain gets its own atproto OAuth client identity. The primary domain is set from PUBLIC_URL on first boot. All endpoints require the settings:manage permission.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List domains​

    +
    GET /admin/domains
    +
    curl http://localhost:3000/admin/domains -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://gamesgamesgamesgames.games",
    "is_primary": true,
    "created_at": "2026-04-16T00:00:00Z",
    "updated_at": "2026-04-16T00:00:00Z"
    }
    ]
    +

    Add a domain​

    +
    POST /admin/domains
    +
    curl -X POST http://localhost:3000/admin/domains \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "url": "https://api.cartridge.dev" }'
    +
    FieldTypeRequiredDescription
    urlstringyesValid origin (scheme + host, no path or trailing slash). Must be https unless PUBLIC_URL is a loopback address.
    +

    Returns 400 Bad Request if the URL is invalid or already registered.

    +

    Response: 201 Created

    +
    {
    "id": "550e8400-e29b-41d4-a716-446655440001",
    "url": "https://api.cartridge.dev",
    "is_primary": false,
    "created_at": "2026-04-16T00:00:00Z",
    "updated_at": "2026-04-16T00:00:00Z"
    }
    +

    Also builds an OAuth client for the domain and updates the in-memory cache.

    +

    Remove a domain​

    +
    DELETE /admin/domains/{id}
    +
    curl -X DELETE http://localhost:3000/admin/domains/550e8400-e29b-41d4-a716-446655440001 \
    -H "$AUTH"
    +

    Returns 400 Bad Request if the domain is primary — set a different domain as primary first. Returns 404 Not Found if the domain doesn't exist.

    +

    Response: 204 No Content

    +

    Also removes the domain's OAuth client and cache entry.

    +

    Set primary domain​

    +
    POST /admin/domains/{id}/primary
    +
    curl -X POST http://localhost:3000/admin/domains/550e8400-e29b-41d4-a716-446655440001/primary \
    -H "$AUTH"
    +

    Sets the target domain as the primary. Unsets the current primary in a single operation. Returns 404 Not Found if the domain doesn't exist.

    +

    Response: 204 No Content

    +

    Also updates the in-memory cache and primary client reference.

    + + \ No newline at end of file diff --git a/reference/admin/events/index.html b/reference/admin/events/index.html new file mode 100644 index 0000000..f3003ce --- /dev/null +++ b/reference/admin/events/index.html @@ -0,0 +1,25 @@ + + + + + +Admin API: Event Logs | HappyView + + + + + + + +

    Admin API: Event Logs

    +

    HappyView logs system events — lexicon changes, record operations, script errors, user actions, and more. See the Event Logs guide for details on event types and retention.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List event logs​

    +
    GET /admin/events
    +
    curl "http://localhost:3000/admin/events?severity=error&limit=10" -H "$AUTH"
    +
    ParamTypeRequiredDescription
    event_typestringnoFilter by exact event type (e.g. script.error)
    categorystringnoFilter by category prefix (e.g. lexicon matches all lexicon events)
    severitystringnoFilter by severity: info, warn, or error
    subjectstringnoFilter by subject (lexicon ID, record URI, admin DID, etc.)
    cursorstringnoPagination cursor (ISO 8601 timestamp from previous response)
    limitnumbernoResults per page (default 50, max 100)
    +

    Response: 200 OK

    +
    {
    "events": [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "event_type": "script.error",
    "severity": "error",
    "actor_did": "did:plc:abc123",
    "subject": "com.example.feed.like",
    "detail": {
    "error": "attempt to index nil value",
    "script_source": "function handle() ... end",
    "input": { "status": "hello" },
    "caller_did": "did:plc:abc123",
    "method": "com.example.feed.like"
    },
    "created_at": "2026-03-01T12:00:00Z"
    }
    ],
    "cursor": "2026-03-01T11:59:00Z"
    }
    +

    Events are returned in reverse chronological order (newest first). Pass the cursor value from the response to fetch the next page.

    + + \ No newline at end of file diff --git a/reference/admin/labelers/index.html b/reference/admin/labelers/index.html new file mode 100644 index 0000000..0884a22 --- /dev/null +++ b/reference/admin/labelers/index.html @@ -0,0 +1,42 @@ + + + + + +Admin API: Labelers | HappyView + + + + + + + +

    Admin API: Labelers

    +

    Manage external labeler subscriptions. See the Labelers guide for background.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Add a labeler​

    +
    POST /admin/labelers
    +

    Requires labelers:create permission.

    +
    curl -X POST http://localhost:3000/admin/labelers \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "did": "did:plc:ar7c4by46qjdydhdevvrndac" }'
    +
    FieldTypeRequiredDescription
    didstringyesThe labeler's atproto DID
    +

    Response: 201 Created (empty body)

    +

    List labelers​

    +
    GET /admin/labelers
    +

    Requires labelers:read permission.

    +
    curl http://localhost:3000/admin/labelers -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "did": "did:plc:ar7c4by46qjdydhdevvrndac",
    "status": "active",
    "cursor": 1234,
    "created_at": "2026-03-15T00:00:00Z",
    "updated_at": "2026-03-15T00:00:00Z"
    }
    ]
    +
    FieldTypeDescription
    didstringThe labeler's DID
    statusstringactive or paused
    cursornumber|nullLast processed event cursor (null if never synced)
    created_atstringISO 8601 creation timestamp
    updated_atstringISO 8601 last-updated timestamp
    +

    Update a labeler​

    +
    PATCH /admin/labelers/{did}
    +

    Requires labelers:create permission.

    +
    curl -X PATCH http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "status": "paused" }'
    +
    FieldTypeRequiredDescription
    statusstringyesNew status: active or paused
    +

    Response: 200 OK

    +

    Delete a labeler​

    +
    DELETE /admin/labelers/{did}
    +

    Requires labelers:delete permission. Removes the subscription and all labels emitted by this labeler.

    +
    curl -X DELETE http://localhost:3000/admin/labelers/did:plc:ar7c4by46qjdydhdevvrndac \
    -H "$AUTH"
    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/admin/lexicons/index.html b/reference/admin/lexicons/index.html new file mode 100644 index 0000000..0141fbc --- /dev/null +++ b/reference/admin/lexicons/index.html @@ -0,0 +1,56 @@ + + + + + +Admin API: Lexicons | HappyView + + + + + + + +

    Admin API: Lexicons

    +

    Manage lexicons and network lexicons. See the Lexicons guide for background on how lexicons drive indexing and XRPC routing.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Upload / upsert a lexicon​

    +
    POST /admin/lexicons
    +
    curl -X POST http://localhost:3000/admin/lexicons \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },
    "backfill": true,
    "target_collection": null
    }'
    +
    FieldTypeRequiredDescription
    lexicon_jsonobjectyesRaw lexicon JSON (must have lexicon: 1 and id)
    backfillbooleannoWhether uploading triggers historical backfill (default true)
    target_collectionstringnoFor query/procedure lexicons, the record collection they operate on
    scriptstringnoLua script for query/procedure endpoints
    index_hookstringnoIndex hook Lua script for record lexicons
    +

    Response: 201 Created (new) or 200 OK (upsert)

    +
    {
    "id": "xyz.statusphere.status",
    "revision": 1
    }
    +

    List lexicons​

    +
    GET /admin/lexicons
    +
    curl http://localhost:3000/admin/lexicons -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "xyz.statusphere.status",
    "revision": 1,
    "lexicon_type": "record",
    "backfill": true,
    "created_at": "2025-01-01T00:00:00Z",
    "updated_at": "2025-01-01T00:00:00Z"
    }
    ]
    +

    Get a lexicon​

    +
    GET /admin/lexicons/{id}
    +
    curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"
    +

    Response: 200 OK with full lexicon details including raw JSON.

    +

    Delete a lexicon​

    +
    DELETE /admin/lexicons/{id}
    +
    curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"
    +

    Response: 204 No Content

    +

    Network Lexicons​

    +

    Network lexicons are fetched from the atproto network via DNS TXT resolution and kept updated via the Jetstream subscription. See Lexicons - Network lexicons for background.

    +

    Add a network lexicon​

    +
    POST /admin/network-lexicons
    +
    curl -X POST http://localhost:3000/admin/network-lexicons \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "nsid": "xyz.statusphere.status",
    "target_collection": null
    }'
    +
    FieldTypeRequiredDescription
    nsidstringyesThe NSID of the lexicon to watch
    target_collectionstringnoFor query/procedure lexicons, the record collection they operate on
    +

    HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it.

    +

    Response: 201 Created

    +
    {
    "nsid": "xyz.statusphere.status",
    "authority_did": "did:plc:authority",
    "revision": 1
    }
    +

    List network lexicons​

    +
    GET /admin/network-lexicons
    +
    curl http://localhost:3000/admin/network-lexicons -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "nsid": "xyz.statusphere.status",
    "authority_did": "did:plc:authority",
    "target_collection": null,
    "last_fetched_at": "2025-01-01T00:00:00Z",
    "created_at": "2025-01-01T00:00:00Z"
    }
    ]
    +

    Remove a network lexicon​

    +
    DELETE /admin/network-lexicons/{nsid}
    +
    curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \
    -H "$AUTH"
    +

    Removes the network lexicon tracking and also deletes the lexicon from the lexicons table and in-memory registry.

    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/admin/plugins/index.html b/reference/admin/plugins/index.html new file mode 100644 index 0000000..f86f8bf --- /dev/null +++ b/reference/admin/plugins/index.html @@ -0,0 +1,73 @@ + + + + + +Admin API: Plugins | HappyView + + + + + + + +

    Admin API: Plugins

    +

    Plugins extend HappyView with WebAssembly modules sourced from the official plugin registry or any URL serving a manifest.json. Most endpoints take a plugin manifest URL and load (or reload) the plugin in place — no restart needed. Encrypted plugin secrets require TOKEN_ENCRYPTION_KEY to be configured.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List installed plugins​

    +
    GET /admin/plugins
    +

    Requires plugins:read. Returns every loaded plugin with its source, required secrets, configuration status, and any pending updates from the official registry cache.

    +
    curl http://localhost:3000/admin/plugins -H "$AUTH"
    +

    Response: 200 OK

    +
    {
    "encryption_configured": true,
    "plugins": [
    {
    "id": "steam",
    "name": "Steam",
    "version": "1.2.0",
    "source": "url",
    "url": "https://example.com/plugins/steam/manifest.json",
    "sha256": null,
    "enabled": true,
    "auth_type": "openid",
    "required_secrets": [
    {
    "key": "PLUGIN_STEAM_API_KEY",
    "name": "Steam Web API Key",
    "description": "Get your API key at steamcommunity.com/dev/apikey"
    }
    ],
    "secrets_configured": true,
    "loaded_at": null,
    "update_available": false,
    "latest_version": "1.2.0",
    "pending_releases": []
    }
    ]
    }
    +

    secrets_configured is true if the plugin has no required secrets, or if a row exists for it in plugin_configs. update_available and pending_releases are populated from the cached official registry — call POST /admin/plugins/{id}/check-update to refresh them.

    +

    Preview a plugin before installing​

    +
    POST /admin/plugins/preview
    +

    Requires plugins:create. Fetches and parses a manifest without installing the plugin, so the dashboard can show what it would register.

    +
    curl -X POST http://localhost:3000/admin/plugins/preview \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "url": "https://example.com/plugins/steam/manifest.json" }'
    +

    Response: 200 OK

    +
    {
    "id": "steam",
    "name": "Steam",
    "version": "1.2.0",
    "description": "Import your Steam game library and playtime data.",
    "icon_url": "https://example.com/steam-icon.png",
    "auth_type": "openid",
    "required_secrets": [
    { "key": "PLUGIN_STEAM_API_KEY", "name": "Steam Web API Key", "description": "..." }
    ],
    "manifest_url": "https://example.com/plugins/steam/manifest.json",
    "wasm_url": "https://example.com/plugins/steam/steam.wasm"
    }
    +

    Returns 400 Bad Request if the manifest can't be fetched or parsed.

    +

    Install a plugin​

    +
    POST /admin/plugins
    +

    Requires plugins:create. Fetches the manifest, downloads the WASM, registers the plugin, and persists it.

    +
    curl -X POST http://localhost:3000/admin/plugins \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "url": "https://example.com/plugins/steam/manifest.json",
    "sha256": "abc123..."
    }'
    +
    FieldTypeRequiredDescription
    urlstringyesURL to the plugin's manifest.json
    sha256stringnoOptional sha256 of the WASM binary. If provided, install fails when the downloaded hash mismatches
    +

    Response: 200 OK returning the same PluginSummary shape as the list endpoint. secrets_configured will be false if the plugin requires any secrets — call PUT /admin/plugins/{id}/secrets to configure them before the plugin can run.

    +

    List official plugins​

    +
    GET /admin/plugins/official
    +

    Requires plugins:read. Returns the cached catalog of plugins from the official registry. The cache is refreshed periodically by the server; use POST /admin/plugins/{id}/check-update to force-refresh a single entry.

    +

    Response: 200 OK

    +
    {
    "last_refreshed_at": "2026-04-13T11:00:00Z",
    "plugins": [
    {
    "id": "steam",
    "name": "Steam",
    "description": "Import your Steam game library and playtime data.",
    "icon_url": "https://example.com/steam-icon.png",
    "latest_version": "1.2.0",
    "manifest_url": "https://example.com/plugins/steam/manifest.json"
    }
    ]
    }
    +

    Remove a plugin​

    +
    DELETE /admin/plugins/{id}
    +

    Requires plugins:delete. Unregisters the plugin from the runtime and deletes its row from the plugins table. Secrets stay in plugin_configs, so they're reused if you reinstall.

    +

    Response: 204 No Content. Returns 404 Not Found if no plugin with that id is loaded.

    +

    Reload a plugin​

    +
    POST /admin/plugins/{id}/reload
    +

    Requires plugins:create. Re-fetches the plugin from its current source URL and re-registers it. Useful after publishing a new version of a plugin you host yourself.

    +

    The body is optional. To point the plugin at a new URL, pass:

    +
    { "url": "https://example.com/plugins/steam/manifest.json" }
    +

    When a new URL is provided, the stored sha256 is cleared (the new version has its own hash). File-based plugins cannot be reloaded via this endpoint and return 400 Bad Request.

    +

    Response: 200 OK with the refreshed PluginSummary.

    +

    Check for plugin updates​

    +
    POST /admin/plugins/{id}/check-update
    +

    Requires plugins:create. Forces a cache refresh for one plugin from the official registry, then returns the updated PluginSummary with update_available, latest_version, and pending_releases reflecting the latest catalog state.

    +

    Response: 200 OK with a PluginSummary.

    +

    Get plugin secrets​

    +
    GET /admin/plugins/{id}/secrets
    +

    Requires plugins:read. Returns the plugin's configured secrets with values masked (last 4 characters shown for values longer than 8 characters, otherwise fully masked). Requires TOKEN_ENCRYPTION_KEY to be configured.

    +

    Response: 200 OK

    +
    {
    "plugin_id": "steam",
    "secrets": {
    "PLUGIN_STEAM_API_KEY": "********ABCD"
    }
    }
    +

    Update plugin secrets​

    +
    PUT /admin/plugins/{id}/secrets
    +

    Requires plugins:create. Encrypts the provided secret values with TOKEN_ENCRYPTION_KEY (AES-256-GCM) and upserts them into plugin_configs.

    +
    curl -X PUT http://localhost:3000/admin/plugins/steam/secrets \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "secrets": {
    "PLUGIN_STEAM_API_KEY": "your-new-api-key"
    }
    }'
    +

    Special handling:

    +
      +
    • Values starting with ******** are treated as masked placeholders and the existing encrypted value is preserved (so you can GET then PUT without re-typing every secret).
    • +
    • Empty string values are not stored — use them to clear a secret.
    • +
    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/admin/script-variables/index.html b/reference/admin/script-variables/index.html new file mode 100644 index 0000000..a596def --- /dev/null +++ b/reference/admin/script-variables/index.html @@ -0,0 +1,29 @@ + + + + + +Admin API: Script Variables | HappyView + + + + + + + +

    Admin API: Script Variables

    +

    Script variables are encrypted key/value pairs available to Lua scripts via the vars global. Use them for secrets like API tokens.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List script variables​

    +
    GET /admin/script-variables
    +

    Requires script-variables:read. Returns a list of variable keys (values are not returned).

    +

    Upsert a script variable​

    +
    POST /admin/script-variables
    +

    Requires script-variables:create.

    +
    curl -X POST http://localhost:3000/admin/script-variables \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "key": "ALGOLIA_API_KEY", "value": "..." }'
    +

    The value is encrypted at rest using TOKEN_ENCRYPTION_KEY.

    +

    Delete a script variable​

    +
    DELETE /admin/script-variables/{key}
    +

    Requires script-variables:delete.

    + + \ No newline at end of file diff --git a/reference/admin/settings/index.html b/reference/admin/settings/index.html new file mode 100644 index 0000000..165301c --- /dev/null +++ b/reference/admin/settings/index.html @@ -0,0 +1,31 @@ + + + + + +Admin API: Instance Settings | HappyView + + + + + + + +

    Admin API: Instance Settings

    +

    Instance settings override environment variables at runtime — things like app name, ToS URL, privacy policy URL, and logo. Settings stored here take precedence over their env var equivalents. All endpoints require the settings:manage permission.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    List settings​

    +
    GET /admin/settings
    +
    curl http://localhost:3000/admin/settings -H "$AUTH"
    +

    Returns all key/value pairs stored in the instance_settings table.

    +

    Upsert a setting​

    +
    PUT /admin/settings/{key}
    +
    curl -X PUT http://localhost:3000/admin/settings/app_name \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "value": "My HappyView" }'
    +

    Delete a setting​

    +
    DELETE /admin/settings/{key}
    +

    Removes the override; the corresponding environment variable (if any) takes effect again.

    + +
    PUT /admin/settings/logo
    DELETE /admin/settings/logo
    +

    PUT accepts a binary image body and stores it as the instance logo (served via the public dashboard). DELETE removes the stored logo.

    + + \ No newline at end of file diff --git a/reference/admin/stats/index.html b/reference/admin/stats/index.html new file mode 100644 index 0000000..49a054a --- /dev/null +++ b/reference/admin/stats/index.html @@ -0,0 +1,22 @@ + + + + + +Admin API: Stats | HappyView + + + + + + + +

    Admin API: Stats

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Record counts​

    +
    GET /admin/stats
    +
    curl http://localhost:3000/admin/stats -H "$AUTH"
    +

    Response: 200 OK

    +
    {
    "total_records": 12345,
    "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]
    }
    + + \ No newline at end of file diff --git a/reference/admin/users/index.html b/reference/admin/users/index.html new file mode 100644 index 0000000..3130399 --- /dev/null +++ b/reference/admin/users/index.html @@ -0,0 +1,54 @@ + + + + + +Admin API: Users | HappyView + + + + + + + +

    Admin API: Users

    +

    Manage admin users and their permissions. See the Permissions guide for available permissions and templates.

    +
    # All examples assume $TOKEN is an API key (hv_...)
    AUTH="Authorization: Bearer $TOKEN"
    +

    Create a user​

    +
    POST /admin/users
    +

    Requires users:create permission. You cannot grant permissions you don't have yourself (escalation guard).

    +
    curl -X POST http://localhost:3000/admin/users \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "did": "did:plc:newuser",
    "template": "operator"
    }'
    +
    FieldTypeRequiredDescription
    didstringyesThe atproto DID of the user to add
    templatestringnoPermission template: viewer, operator, manager, or full_access
    permissionsstring[]noExplicit list of permissions to grant (used instead of or in addition to template)
    +

    If neither template nor permissions is provided, the user is created with no permissions.

    +

    Response: 201 Created

    +
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "did": "did:plc:newuser",
    "is_super": false,
    "permissions": ["lexicons:read", "records:read", "script-variables:read", "users:read", "api-keys:read", "api-keys:create", "api-keys:delete", "backfill:read", "backfill:create", "stats:read", "events:read"]
    }
    +

    List users​

    +
    GET /admin/users
    +

    Requires users:read permission.

    +
    curl http://localhost:3000/admin/users -H "$AUTH"
    +

    Response: 200 OK

    +
    [
    {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "did": "did:plc:admin",
    "is_super": true,
    "permissions": ["lexicons:create", "lexicons:read", "lexicons:delete", "records:read", "records:delete", "records:delete-collection", "script-variables:create", "script-variables:read", "script-variables:delete", "users:create", "users:read", "users:update", "users:delete", "api-keys:create", "api-keys:read", "api-keys:delete", "backfill:create", "backfill:read", "stats:read", "events:read"],
    "created_at": "2025-01-01T00:00:00Z",
    "last_used_at": "2025-01-02T12:00:00Z"
    }
    ]
    +

    Get a user​

    +
    GET /admin/users/{id}
    +

    Requires users:read permission.

    +
    curl http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000 -H "$AUTH"
    +

    Response: 200 OK with the same shape as a single item from the list response.

    +

    Update user permissions​

    +
    PATCH /admin/users/{id}/permissions
    +

    Requires users:update permission. You cannot grant permissions you don't have yourself, and you cannot modify the super user's permissions.

    +
    curl -X PATCH http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000/permissions \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{
    "grant": ["lexicons:create", "lexicons:delete"],
    "revoke": ["records:delete"]
    }'
    +
    FieldTypeRequiredDescription
    grantstring[]noPermissions to add
    revokestring[]noPermissions to remove
    +

    Response: 200 OK with the updated user object.

    +

    Transfer super user​

    +
    POST /admin/users/transfer-super
    +

    Only the current super user can call this endpoint. Transfers super user status to another existing user.

    +
    curl -X POST http://localhost:3000/admin/users/transfer-super \
    -H "$AUTH" \
    -H "Content-Type: application/json" \
    -d '{ "target_user_id": "550e8400-e29b-41d4-a716-446655440000" }'
    +
    FieldTypeRequiredDescription
    target_user_idstringyesThe ID of the user to receive super status
    +

    Response: 200 OK

    +

    Delete a user​

    +
    DELETE /admin/users/{id}
    +

    Requires users:delete permission. You cannot delete the super user or yourself.

    +
    curl -X DELETE http://localhost:3000/admin/users/550e8400-e29b-41d4-a716-446655440000 \
    -H "$AUTH"
    +

    Response: 204 No Content

    + + \ No newline at end of file diff --git a/reference/architecture/index.html b/reference/architecture/index.html index e2251be..3cc38cf 100644 --- a/reference/architecture/index.html +++ b/reference/architecture/index.html @@ -2,45 +2,57 @@ - -Architecture | HappyView - - + +Architecture | HappyView + + - + -

    Architecture

    +

    Architecture

    Guide for contributors working on HappyView itself. For a user-facing overview, see the Introduction.

    -

    System overview​

    +

    System overview​

    -

    Reads flow top-down through the query handler to Postgres. Writes flow through the procedure handler to the user's PDS, then HappyView indexes the record locally. All record data enters the system through Tap, which handles both real-time firehose events and historical backfill. HappyView syncs collection filters to Tap and discovers repos via the relay for backfill, but Tap performs all record fetching.

    -

    Module overview​

    -
    src/
    main.rs Startup: config, DB, migrations, spawn Tap worker, start server
    lib.rs AppState struct, module declarations
    config.rs Environment variable loading
    error.rs AppError enum (Auth, BadRequest, Forbidden, Internal, NotFound, PdsError)
    server.rs Axum router: fixed routes + admin nest + XRPC catch-all + static files
    lexicon.rs ParsedLexicon, LexiconRegistry (Arc<RwLock<HashMap>>)
    profile.rs DID document resolution, PDS discovery, profile fetching
    tap.rs Tap WebSocket listener, collection filter sync, backfill delegation
    aip.rs AIP reverse proxy
    resolve.rs NSID authority resolution (DNS TXT → DID → PDS)
    auth/
    mod.rs Re-exports
    middleware.rs Claims extractor (validates Bearer token via AIP /oauth/userinfo)
    jwks.rs JWKS key fetching
    admin/
    mod.rs Admin route definitions
    auth.rs AdminAuth extractor (Claims + DID lookup + auto-bootstrap)
    admins.rs Admin CRUD handlers
    lexicons.rs Lexicon CRUD handlers
    network_lexicons.rs Network lexicon tracking (add, list, remove)
    records.rs Record listing handler
    stats.rs Record count stats
    backfill.rs Backfill job creation (relay discovery + Tap delegation)
    types.rs Request/response structs for admin endpoints
    lua/
    mod.rs Re-exports
    context.rs Lua context globals (method, params, input, caller_did, collection)
    db_api.rs Lua database API (db.query, db.get, db.count)
    execute.rs Script execution and sandbox setup
    record.rs Lua Record API (constructor, save, delete, load)
    sandbox.rs Restricted Lua environment (removed modules, instruction limit)
    tid.rs TID generation for Lua scripts
    repo/
    mod.rs Re-exports
    dpop.rs DPoP JWT proof generation (ES256/P-256)
    pds.rs PDS proxy helpers (JSON POST, blob POST, response forwarding)
    session.rs ATP session fetching from AIP
    upload_blob.rs Blob upload handler
    xrpc/
    mod.rs Re-exports
    query.rs Dynamic GET handler (Lua script or default: single record + list)
    procedure.rs Dynamic POST handler (Lua script or default: create vs put)
    -

    Request flow​

    -

    Reads (queries)​

    -
    Client GET /xrpc/{method}?params
    -> xrpc::xrpc_get()
    -> LexiconRegistry lookup (must be Query type)
    -> If Lua script attached: execute script (has access to db API)
    -> Else: default SQL query on records table (collection from target_collection)
    -> JSON response
    -

    Writes (procedures)​

    -
    Client POST /xrpc/{method} + Bearer token
    -> Claims extractor validates token via AIP /oauth/userinfo
    -> xrpc::xrpc_post()
    -> LexiconRegistry lookup (must be Procedure type)
    -> If Lua script attached: execute script (has access to Record API)
    -> Else: default create/update (auto-detect based on uri field)
    -> Fetch ATP session from AIP /api/atprotocol/session
    -> Generate DPoP proof (ES256)
    -> Proxy to user's PDS (createRecord or putRecord)
    -> Upsert record locally
    -> Forward PDS response
    -

    Admin endpoints​

    -
    Client request + Bearer token
    -> AdminAuth extractor:
    1. Claims validation via AIP
    2. DID lookup in admins table (auto-bootstrap if empty)
    3. 403 if not admin
    -> Admin handler
    -> JSON response
    -

    Data flow​

    -

    Real-time indexing​

    -
    Tap WebSocket connection (tap::spawn)
    -> Collection filters synced to Tap on startup and lexicon changes
    -> Record events:
    create/update -> UPSERT into records table
    delete -> DELETE from records table
    -> Lexicon schema events (com.atproto.lexicon.schema):
    -> Update tracked network lexicons in DB and registry
    -> Reconnects automatically on errors or collection filter changes
    -

    Backfill​

    -
    POST /admin/backfill
    -> Create backfill_jobs record (status = running)
    -> Relay listReposByCollection -> list of DIDs
    -> Send DIDs to Tap in batches of 1000 (POST /repos/add)
    -> Mark job as completed
    -> Tap fetches records asynchronously and delivers via WebSocket
    -

    Database schema​

    -

    records​

    +

    Queries go through the query handler to the database (SQLite by default, or Postgres). Writes go through the procedure handler to the user's PDS, then HappyView indexes the record locally. Real-time record events stream in via Jetstream; historical records are backfilled in-process by discovering repos via the relay's listReposByCollection and fetching records directly from each PDS. Labelers are external services that emit content labels over a direct WebSocket connection — they operate out-of-band, outside the relay/repo system.

    +

    Request flow​

    +

    Reads (queries)​

    + +

    Writes (procedures)​

    + +

    Admin endpoints​

    + +

    Data flow​

    +

    Real-time indexing​

    + +

    Backfill​

    + +

    Database schema​

    +

    records​

    ColumnTypeDescription
    uritext (PK)AT URI (at://did/collection/rkey)
    didtextAuthor DID
    collectiontextLexicon NSID
    rkeytextRecord key
    recordjsonbRecord value
    cidtextContent identifier
    indexed_attimestamptzWhen HappyView indexed this record
    -

    lexicons​

    +

    lexicons​

    ColumnTypeDescription
    idtext (PK)Lexicon NSID
    revisionintegerIncremented on upsert
    lexicon_jsonjsonbRaw lexicon definition
    lexicon_typetextrecord, query, procedure, definitions
    backfillbooleanWhether to backfill on upload
    target_collectiontextFor queries/procedures: which record collection
    created_attimestamptz
    updated_attimestamptz
    -

    admins​

    -
    ColumnTypeDescription
    iduuid (PK)
    didtext (unique)Admin's AT Protocol DID
    created_attimestamptz
    last_used_attimestamptzUpdated on each authenticated request
    -

    backfill_jobs​

    +

    users​

    +
    ColumnTypeDescription
    iduuid (PK)
    didtext (unique)User's atproto DID
    is_superbooleanWhether this is the super user (only one allowed)
    created_attimestamptz
    last_used_attimestamptzUpdated on each authenticated request
    +

    user_permissions​

    +
    ColumnTypeDescription
    user_iduuid (FK)References users.id
    permissiontextPermission string (e.g. lexicons:create)
    (PK)Composite primary key: (user_id, permission)
    +

    api_keys​

    +
    ColumnTypeDescription
    iduuid (PK)
    user_iduuid (FK)References users.id
    nametextDescriptive label
    key_hashtextSHA-256 hash of the full key
    key_prefixtextFirst 11 characters for display
    permissionstext[]Permissions granted to this key
    created_attimestamptz
    last_used_attimestamptz
    revoked_attimestamptzSet when revoked (soft delete)
    +

    oauth_sessions​

    +
    ColumnTypeDescription
    didtext (PK)User's atproto DID
    session_datatextSerialized OAuth session (managed by atrium)
    created_attimestamptz
    updated_attimestamptz
    +

    oauth_state​

    +
    ColumnTypeDescription
    state_keytext (PK)OAuth state parameter
    state_datatextSerialized state (managed by atrium)
    created_attimestamptz
    +

    instance_settings​

    +
    ColumnTypeDescription
    keytext (PK)Setting name (e.g. app_name)
    valuetextSetting value
    updated_attimestamptzLast modified
    +

    event_logs​

    +
    ColumnTypeDescription
    iduuid (PK)
    event_typetextCategory.action format (e.g. user.created)
    severitytextinfo, warn, or error
    actor_didtextDID of the user who triggered the event
    subjecttextWhat was affected (DID, NSID, URI, etc.)
    detailjsonbEvent-specific data
    created_attimestamptz
    +

    script_variables​

    +
    ColumnTypeDescription
    keytext (PK)Variable name
    valuetextVariable value (encrypted at rest)
    created_attimestamptz
    updated_attimestamptz
    +

    backfill_jobs​

    ColumnTypeDescription
    iduuid (PK)
    collectiontextTarget collection (null = all)
    didtextTarget DID (null = all)
    statustextpending, running, completed, failed
    total_reposinteger
    processed_reposinteger
    total_recordsinteger
    errortextError message if failed
    started_attimestamptz
    completed_attimestamptz
    created_attimestamptz
    -

    Testing​

    -
    # Unit tests (no database needed)
    cargo test --lib

    # All tests including end-to-end (requires Postgres)
    docker compose -f docker-compose.test.yml up -d
    TEST_DATABASE_URL=postgres://happyview:happyview@localhost:5433/happyview_test cargo test
    docker compose -f docker-compose.test.yml down
    -

    End-to-end tests use wiremock to mock external services (AIP, PLC directory, PDSes) and a real Postgres database for full integration coverage.

    +

    Testing​

    +
    # Unit tests (no database needed)
    cargo test --lib

    # All tests including end-to-end (SQLite by default)
    cargo test

    # Or run against Postgres
    docker compose -f docker-compose.test.yml up -d
    TEST_DATABASE_URL=postgres://happyview:happyview@localhost:5433/happyview_test cargo test
    docker compose -f docker-compose.test.yml down
    +

    End-to-end tests use wiremock to mock external services (PLC directory, PDSes) and a real database for full integration coverage. By default tests use SQLite; set TEST_DATABASE_URL to a Postgres connection string to test against Postgres.

    \ No newline at end of file diff --git a/reference/changelog/index.html b/reference/changelog/index.html index 57c04d4..5f7e0e8 100644 --- a/reference/changelog/index.html +++ b/reference/changelog/index.html @@ -2,57 +2,77 @@ - -Changelog | HappyView - - + +Changelog | HappyView + + - + -

    Changelog

    -

    v1.9.0 — Event Logs​

    +

    Changelog

    +

    v2.1.0 — Native OAuth & Instance Settings​

      -
    • Event logging — system-wide audit trail for lexicon changes, record operations, Lua script executions/errors, admin actions, backfill jobs, and Tap connectivity
    • +
    • Built-in OAuth — replaced external AIP OAuth dependency with native atrium-oauth integration; HappyView manages the full OAuth flow internally
    • +
    • Instance settings — new instance_settings key/value table for configurable instance metadata (app name, logo, ToS, privacy policy) with env var fallback
    • +
    • OAuth branding — authorization screens now show configurable app name, logo, terms of service, and privacy policy links via the /oauth-client-metadata.json endpoint
    • +
    • Logo upload — upload a logo image via PUT /admin/settings/logo (stored in DB, served at GET /settings/logo)
    • +
    • settings:manage permission — new permission for managing instance settings, included in Manager and Full Access templates
    • +
    • Redirect URI support — /auth/login accepts optional redirect_uri parameter for post-login navigation
    • +
    • CORS improvements — origin-mirroring CORS with credentials support for cross-origin auth flows
    • +
    +

    v2.0.0 — User Permissions & Settings Restructure​

    +
      +
    • User permissions system — replaced the admins table with a users table supporting 20 granular permissions, permission templates (Viewer, Operator, Manager, Full Access), and a super user concept with escalation and self-modification guards
    • +
    • API key permissions — API keys now have explicit scoped permissions instead of inheriting full admin access; effective permissions are the intersection of the key's permissions and the user's permissions
    • +
    • User handles — user handles are now displayed alongside DIDs throughout the dashboard
    • +
    • Settings sub-pages — Settings page restructured into Users, ENV Variables, and API Keys sub-pages with collapsible sidebar navigation
    • +
    • Dashboard route prefix — all dashboard pages now live under the /dashboard route prefix
    • +
    • New endpoints — GET /admin/users/{id}, PATCH /admin/users/{id}/permissions, POST /admin/users/transfer-super, GET/POST/DELETE /admin/script-variables
    • +
    • New event types — user.permissions_updated, user.super_transferred, auth.permission_denied, api_key.created, api_key.revoked, script_variable.upserted, script_variable.deleted, hook.executed, hook.dead_lettered
    • +
    +

    v1.9.0 — Event Logs​

    +
      +
    • Event logging — system-wide audit trail for lexicon changes, record operations, Lua script executions/errors, admin actions, backfill jobs, and Jetstream connectivity
    • GET /admin/events — query event logs with filtering by event type, category, severity, and subject, with cursor pagination
    • Lua error context — script errors capture full debugging context: error message, script source, input payload, and caller DID
    • Automatic retention cleanup — configurable via EVENT_LOG_RETENTION_DAYS (default 30 days)
    -

    v1.8.0 — Advanced Queries​

    +

    v1.8.0 — Advanced Queries​

    • db.backlinks() — find records that reference a given AT URI
    • db.raw() — run raw read-only SQL with parameterized queries and automatic column type mapping
    -

    v1.7.1 — Patch​

    +

    v1.7.1 — Patch​

    • Fixed Docker Compose database URLs for local dev
    -

    v1.7.0 — Lua DB API Improvements​

    +

    v1.7.0 — Lua DB API Improvements​

    • toarray() utility — force Lua tables to serialize as JSON arrays (fixes empty {} vs [])
    • db.search() — text search on record fields with relevance ranking
    • Array serialization fix — db.query() and db.search() now always return proper arrays for records
    -

    v1.6.2 — Patch​

    +

    v1.6.2 — Patch​

    • Fixed auth: use original auth scheme instead of hardcoded DPoP
    -

    v1.6.1 — Patch​

    +

    v1.6.1 — Patch​

    • Fixed broken dynamic page routes
    -

    v1.6.0 — Record Management​

    +

    v1.6.0 — Record Management​

    • Delete records from the dashboard and API (individual and bulk collection deletion)
    • "View Records" buttons on lexicon pages
    • Bug fixes: backfill now loads previously deleted records, empty collections shown in dropdown
    -

    v1.5.1 — Patch​

    +

    v1.5.1 — Patch​

    • Removed backfill toggle from query/procedure lexicons (only applies to record lexicons)
    -

    v1.5.0 — Lua Scripting & Dashboard Overhaul​

    +

    v1.5.0 — Lua Scripting & Dashboard Overhaul​

    • Lua scripting — attach custom Lua scripts to query and procedure lexicons
    • Docusaurus docs site with GitHub Pages deploy
    • @@ -62,6 +82,6 @@
    • Network and local lexicons merged into a unified view
    • Shiki code highlighting in the dashboard
    • Bug fixes: rogue record storage, collection dropdown, dynamic page builds
    • -
    +
    \ No newline at end of file diff --git a/reference/glossary/index.html b/reference/glossary/index.html index e0069e9..550331a 100644 --- a/reference/glossary/index.html +++ b/reference/glossary/index.html @@ -2,36 +2,38 @@ - -Glossary | HappyView - - + +Glossary | HappyView + + - + -

    Glossary

    -

    Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the official ATProto glossary.

    -

    AT Protocol terms​

    -

    AppView — A backend service that indexes AT Protocol records and serves them through an API. HappyView is an AppView. See the ATProto docs for more.

    +

    Glossary

    +

    Key terms used throughout the HappyView documentation. For a broader introduction to the atproto, see the official ATProto glossary.

    +

    atproto terms​

    +

    AppView — A backend service that indexes atproto records and serves them through an API. HappyView is an AppView. See the ATProto docs for more.

    DID (Decentralized Identifier) — A persistent, globally unique identifier for an account (e.g. did:plc:abc123).

    -

    Firehose — A real-time stream of all record events (creates, updates, deletes) across the AT Protocol network. HappyView consumes this via Tap.

    -

    Handle — A human-readable name for an account (e.g. user.bsky.social). Handles resolve to a DID via DNS or the PLC directory.

    -

    Lexicon — A schema definition for AT Protocol data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See Lexicons.

    +

    Firehose — A real-time stream of all record events (creates, updates, deletes) across the atproto network. HappyView consumes a filtered slice of this via Jetstream.

    +

    Handle — A human-readable name for an account (e.g. user.bsky.social). Handles resolve to a DID via a DNS TXT record or an HTTP .well-known/atproto-did lookup.

    +

    Lexicon — A schema definition for atproto data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See Lexicons.

    NSID (Namespaced Identifier) — A reverse-DNS identifier for a lexicon (e.g. xyz.statusphere.status). The authority is everything except the last segment.

    PDS (Personal Data Server) — The server that hosts a user's data. Users can be on any PDS — there's no single server. HappyView proxies writes back to each user's PDS.

    PLC directory — A public service (e.g. plc.directory) that maps DIDs to their DID documents, which contain the user's PDS endpoint and other metadata.

    -

    Record — A single piece of data in an AT Protocol repository, identified by an AT URI (e.g. at://did:plc:abc/xyz.statusphere.status/abc123).

    -

    Relay — A network service that aggregates repository data from many PDSes. HappyView queries the relay during backfill to discover which repos contain records for a given collection, then delegates the actual record fetching to Tap.

    +

    Record — A single piece of data in an atproto repository, identified by an AT URI (e.g. at://did:plc:abc/xyz.statusphere.status/abc123).

    +

    Relay — A network service that aggregates repository data from many PDSes. HappyView queries the relay during backfill to discover which repos contain records for a given collection, then fetches each repo's records directly from its PDS.

    rkey (Record Key) — The unique key for a record within a collection and repo. These are most commonly TIDs (timestamp-based) or NSIDs.

    TID (Timestamp Identifier) — A 13-character sortable identifier used as a record key. Generated from the current timestamp.

    -

    XRPC — The HTTP-based RPC protocol used by the AT Protocol. Query methods map to GET requests, procedure methods map to POST requests. See XRPC API.

    -

    HappyView-specific terms​

    -

    AIP — Authentication and Identity Provider. An external service that handles AT Protocol OAuth for HappyView. Issues Bearer tokens used for authentication.

    -

    Backfill — The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and delegates record fetching to Tap. Runs when a new record-type lexicon is uploaded or triggered manually. See Backfill.

    -

    Network lexicon — A lexicon fetched directly from the AT Protocol network via DNS authority resolution, rather than uploaded manually. See Lexicons - Network lexicons.

    -

    Tap — A firehose consumer and backfill worker that handles real-time record streaming, cryptographic verification, and historical record fetching. HappyView connects to Tap via WebSocket to receive record events, and delegates backfill work to Tap via its HTTP API.

    -

    Target collection — The record collection that a query or procedure lexicon operates on. Set via the target_collection field when uploading a lexicon.

    +

    XRPC — The HTTP-based RPC protocol used by the atproto. Query methods map to GET requests, procedure methods map to POST requests. See XRPC API.

    +

    Jetstream — A filtered firehose that delivers atproto record commit events as JSON over WebSocket. Not part of the core atproto spec, but widely used. HappyView subscribes to Jetstream with a collection filter built from its indexed record lexicons, and persists a cursor for resume on reconnect.

    +

    HappyView-specific terms​

    +

    Backfill — The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and fetches each repo's records directly from its PDS. Runs when a new record-type lexicon is uploaded or triggered manually. See Backfill.

    +

    Network lexicon — A lexicon fetched directly from the atproto network via DNS authority resolution, rather than uploaded manually. See Lexicons - Network lexicons.

    +

    Permission — A granular access control right that authorizes a specific action in the admin API. HappyView defines 20 permissions organized by category (e.g. lexicons:create, users:read). See Permissions.

    +

    Permission template — A predefined set of permissions that can be applied when creating a user. Templates are: Viewer (read-only access), Operator (viewer + backfill and API key management), Manager (operator + lexicon and record management), and Full Access (all 20 permissions).

    +

    Super user — The bootstrapped user created on first login to a fresh HappyView instance. The super user has unrestricted access to all endpoints regardless of permissions, can transfer super status to another user, and cannot be deleted.

    +

    Target collection — The record collection that a query or procedure lexicon operates on. Set via the target_collection field when uploading a lexicon.

    \ No newline at end of file diff --git a/reference/lua/atproto-api/index.html b/reference/lua/atproto-api/index.html new file mode 100644 index 0000000..0361549 --- /dev/null +++ b/reference/lua/atproto-api/index.html @@ -0,0 +1,38 @@ + + + + + +atproto API | HappyView + + + + + + + +

    atproto API

    +

    The atproto table provides atproto utility functions. Available in queries, procedures, and index hooks.

    +

    atproto.resolve_service_endpoint​

    +
    local endpoint = atproto.resolve_service_endpoint(did)
    +

    Resolves a DID to its atproto service endpoint URL by fetching the DID document. Supports both did:plc:* (via the PLC directory) and did:web:* (via .well-known/did.json).

    +
    ParameterTypeDescription
    didstringThe DID to resolve
    +

    Returns: The service endpoint URL as a string, or nil if resolution fails (DID not found, no PDS service in document, network error).

    +

    Examples​

    +
    -- Resolve a did:plc DID
    local endpoint = atproto.resolve_service_endpoint("did:plc:abc123")
    -- endpoint = "https://pds.example.com"

    -- Resolve a did:web DID
    local endpoint = atproto.resolve_service_endpoint("did:web:example.com")
    -- endpoint = "https://example.com"

    -- Handle resolution failure
    local endpoint = atproto.resolve_service_endpoint("did:plc:unknown")
    if not endpoint then
    return { error = "Could not resolve DID" }
    end

    -- Use with HTTP API to call a remote XRPC endpoint
    local endpoint = atproto.resolve_service_endpoint(did)
    if endpoint then
    local resp = http.get(endpoint .. "/xrpc/com.example.method")
    local data = json.decode(resp.body)
    end
    +

    atproto.get_labels​

    +
    local labels = atproto.get_labels(uri)
    +

    Returns an array of labels for a single AT URI. Merges external labels (from subscribed labelers) with self-labels (from the record's labels.values[] field).

    +
    ParameterTypeDescription
    uristringAT URI of the record to query
    +

    Each label in the array is a table with:

    +
    FieldTypeDescription
    srcstringDID of the labeler (or record author)
    uristringAT URI this label applies to
    valstringLabel value (e.g. "nsfw", "!hide")
    ctsstringTimestamp when the label was created
    +

    Expired labels are automatically filtered out. Returns an empty array if no labels exist.

    +

    atproto.get_labels_batch​

    +
    local labels_by_uri = atproto.get_labels_batch(uris)
    +

    Batch version of get_labels. Takes an array of AT URIs and returns a table keyed by URI, where each value is an array of labels.

    +
    ParameterTypeDescription
    uristableArray of AT URI strings
    +

    Returns: A table keyed by URI. Each value is an array of label tables (same shape as get_labels). URIs with no labels have an empty array.

    +

    Label examples​

    +
    -- Get labels for a single game
    local labels = atproto.get_labels("at://did:plc:abc/games.gamesgamesgamesgames.game/rkey1")
    for _, label in ipairs(labels) do
    if label.val == "!hide" then
    -- skip this game in feed results
    end
    end

    -- Batch fetch labels for multiple games (efficient for feed hydration)
    local uris = {}
    for _, item in ipairs(skeleton) do
    uris[#uris + 1] = item.game
    end

    local labels_by_uri = atproto.get_labels_batch(uris)
    for _, uri in ipairs(uris) do
    local labels = labels_by_uri[uri]
    for _, label in ipairs(labels) do
    if label.val == "!hide" then
    -- filter out this game
    end
    end
    end
    + + \ No newline at end of file diff --git a/reference/lua/database-api/index.html b/reference/lua/database-api/index.html new file mode 100644 index 0000000..95ffc8b --- /dev/null +++ b/reference/lua/database-api/index.html @@ -0,0 +1,39 @@ + + + + + +Database API | HappyView + + + + + + + +

    Database API

    +

    The db table provides access to the database. Available in queries, procedures, and index hooks.

    +

    db.query​

    +
    local result = db.query({
    collection = "xyz.statusphere.status", -- required
    did = "did:plc:abc", -- optional: filter by DID
    limit = 20, -- optional: max 100, default 20
    cursor = params.cursor, -- optional: opaque cursor from a previous response
    sort = "name", -- optional: field to sort by, default "indexed_at"
    sortDirection = "asc", -- optional: "asc" or "desc", default "desc"
    })

    -- result.records — array of record tables (each includes a "uri" field)
    -- result.cursor — present when more records exist (opaque string, pass back as-is)
    +

    The cursor is an opaque string returned in a previous response. Pass it through directly — don't parse or modify it. When no sort field is specified, db.query uses keyset pagination (based on created_at and uri), which is stable even when records are inserted between pages. When a custom sort field is specified, offset-based pagination is used instead.

    +

    The sort field can be a top-level column (indexed_at, did, uri) or any field inside the record's value object (e.g. name, createdAt). Field names must contain only alphanumeric characters and underscores.

    +

    db.get​

    +
    local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")
    -- Returns the record table or nil
    -- The returned table includes a "uri" field
    +

    db.search​

    +
    local result = db.search({
    collection = "xyz.statusphere.status", -- required
    field = "displayName", -- required: record field to search
    query = "alice", -- required: search term
    limit = 10, -- optional: max 100, default 10
    })

    -- result.records — array of matching records, ranked by relevance:
    -- exact match > prefix match > contains match, then alphabetical
    + +

    Find records that reference a given AT URI anywhere in their data. Useful for finding likes on a post, replies to a thread, or any record that links to another.

    +
    local result = db.backlinks({
    collection = "xyz.statusphere.status", -- required
    uri = "at://did:plc:abc/xyz.statusphere.status/foo", -- required: the URI to find references to
    did = "did:plc:abc", -- optional: filter by DID
    limit = 20, -- optional: max 100, default 20
    cursor = params.cursor, -- optional: opaque cursor from a previous response
    })

    -- result.records — array of records whose data contains the given URI
    -- result.cursor — present when more records exist (opaque string, pass back as-is)
    +

    The search checks the full record data, so it works regardless of which field holds the reference (subject, parent, reply.root, etc.).

    +

    db.count​

    +
    local n = db.count("xyz.statusphere.status")
    local n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID
    +

    db.raw​

    +

    Run a raw SQL query against the database. Supports SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE statements.

    +
    -- Read query
    local rows = db.raw(
    "SELECT uri, did, record FROM records WHERE collection = $1 AND did = $2 LIMIT $3",
    { "xyz.statusphere.status", "did:plc:abc", 10 }
    )

    for _, row in ipairs(rows) do
    -- row.uri, row.did, row.record (JSONB is returned as a Lua table)
    end

    -- Write query (returns affected rows, if any)
    db.raw("CREATE TABLE IF NOT EXISTS my_table (id TEXT PRIMARY KEY, value TEXT NOT NULL)")
    db.raw("INSERT INTO my_table (id, value) VALUES ($1, $2) ON CONFLICT (id) DO UPDATE SET value = $2",
    { "key1", "hello" })
    +

    Parameters are passed as an array and bound to $1, $2, etc. Supported parameter types: strings, integers, numbers, booleans, and nil.

    +

    SQL dialect​

    +

    Write SQL in SQLite syntax — HappyView translates it to Postgres at runtime if you're using Postgres. See Database Setup for details on what gets translated. If you need database-specific SQL that can't be translated, check db.is_postgres() at runtime.

    +

    Column type mapping​

    +
    SQLite typePostgres typeLua type
    TEXTTEXT, VARCHARstring
    INTEGERINT4, INT8integer
    REALFLOAT4, FLOAT8number
    INTEGER (0/1)BOOLboolean
    TEXT (JSON)JSON, JSONBtable
    TEXT (ISO 8601)TIMESTAMPTZstring (ISO 8601)
    OtherOtherstring (fallback)
    + + \ No newline at end of file diff --git a/reference/lua/http-api/index.html b/reference/lua/http-api/index.html new file mode 100644 index 0000000..c975c4c --- /dev/null +++ b/reference/lua/http-api/index.html @@ -0,0 +1,28 @@ + + + + + +HTTP API | HappyView + + + + + + + +

    HTTP API

    +

    The http table provides async HTTP client functions. Available in queries, procedures, and index hooks.

    +

    Methods​

    +

    All methods take a URL and an optional options table, and return a response table.

    +
    http.get(url, opts?)
    http.post(url, opts?)
    http.put(url, opts?)
    http.patch(url, opts?)
    http.delete(url, opts?)
    http.head(url, opts?)
    +

    Options​

    +

    The optional second argument is a table with:

    +
    FieldTypeDescription
    headerstableRequest headers as key-value string pairs
    bodystringRequest body (ignored for GET and HEAD)
    +

    Response​

    +

    Every method returns a table with:

    +
    FieldTypeDescription
    statusintegerHTTP status code
    bodystringResponse body text (empty string for HEAD)
    headerstableResponse headers as key-value pairs (lowercase keys)
    +

    Examples​

    +
    -- Simple GET
    local resp = http.get("https://api.example.com/data")
    -- resp.status = 200, resp.body = "...", resp.headers["content-type"] = "application/json"

    -- GET with custom headers
    local resp = http.get("https://api.example.com/data", {
    headers = { ["authorization"] = "Bearer token123" }
    })

    -- POST with JSON body
    local resp = http.post("https://api.example.com/hook", {
    body = '{"key": "value"}',
    headers = { ["content-type"] = "application/json" }
    })

    -- PUT, PATCH, DELETE, HEAD follow the same pattern
    local resp = http.put(url, { body = data, headers = { ... } })
    local resp = http.patch(url, { body = data, headers = { ... } })
    local resp = http.delete(url, { headers = { ... } })
    local resp = http.head(url)
    + + \ No newline at end of file diff --git a/reference/lua/json-api/index.html b/reference/lua/json-api/index.html new file mode 100644 index 0000000..55ee8ae --- /dev/null +++ b/reference/lua/json-api/index.html @@ -0,0 +1,23 @@ + + + + + +JSON API | HappyView + + + + + + + +

    JSON API

    +

    The json global provides JSON serialization and deserialization. Available in queries, procedures, and index hooks.

    +

    json.encode​

    +
    local str = json.encode({ key = "value", items = { 1, 2, 3 } })
    -- '{"key":"value","items":[1,2,3]}'
    +

    Converts a Lua table to a JSON string.

    +

    json.decode​

    +
    local tbl = json.decode('{"key": "value"}')
    -- tbl.key == "value"
    +

    Parses a JSON string into a Lua table. Returns an error if the input is not valid JSON.

    + + \ No newline at end of file diff --git a/reference/lua/record-api/index.html b/reference/lua/record-api/index.html new file mode 100644 index 0000000..5591dbb --- /dev/null +++ b/reference/lua/record-api/index.html @@ -0,0 +1,43 @@ + + + + + +Record API | HappyView + + + + + + + +

    Record API

    +

    The Record API is only available in procedure scripts. It handles creating, updating, loading, and deleting atproto records. Writes are proxied to the caller's PDS and indexed locally.

    +

    Constructor​

    +
    local r = Record("xyz.statusphere.status", { status = "\ud83d\ude0a", createdAt = now() })
    +

    Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's _key_type is automatically set from the lexicon's key definition. Default values from the schema are populated for any missing fields.

    +

    Static methods​

    +
    -- Save multiple records in parallel
    Record.save_all({ record1, record2, record3 })

    -- Load a record from the local database by AT URI
    local r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")
    -- Returns nil if not found

    -- Load multiple records in parallel
    local records = Record.load_all({ uri1, uri2 })
    -- Returns nil entries for URIs not found
    +

    Instance methods​

    +
    -- Save (creates or updates depending on whether _uri is set)
    r:save()

    -- Delete from PDS and local database
    r:delete()

    -- Set the record key type (tid, any, nsid, or literal:*)
    r:set_key_type("tid")

    -- Set a specific record key
    r:set_rkey("my-key")

    -- Auto-generate a record key based on _key_type
    local key = r:generate_rkey()
    +

    Key type behavior for generate_rkey():

    +
    Key typeGenerated rkey
    tidSortable timestamp-based ID
    anySame as tid
    literal:valueThe literal value after the colon
    nsidError — use set_rkey() instead
    +

    Instance fields​

    +

    These fields are set automatically and are read-only (writes raise an error):

    +
    FieldTypeDescription
    _uristring?AT URI — set after save(), cleared after delete()
    _cidstring?Content hash — set after save(), cleared after delete()
    _key_typestring?Record key type from the lexicon definition
    _rkeystring?Record key — set via set_rkey() or generate_rkey()
    _collectionstringCollection NSID (always set)
    _schematable?Schema definition from the lexicon (used for validation)
    +

    Schema validation​

    +

    When a record has a schema (loaded from the lexicon):

    +
      +
    • On save: required fields are checked, and missing required fields raise an error
    • +
    • On construction: default values from schema properties are auto-populated
    • +
    • On save: only fields defined in the schema's properties are sent to the PDS
    • +
    +

    Save behavior​

    +

    r:save() auto-detects create vs update:

    +
      +
    • If _uri is nil → calls createRecord on the PDS
    • +
    • If _uri is set → calls putRecord on the PDS
    • +
    +

    After a successful save, _uri and _cid are updated on the record instance.

    + + \ No newline at end of file diff --git a/reference/lua/standard-libraries/index.html b/reference/lua/standard-libraries/index.html new file mode 100644 index 0000000..efab822 --- /dev/null +++ b/reference/lua/standard-libraries/index.html @@ -0,0 +1,86 @@ + + + + + +Standard Libraries | HappyView + + + + + + + +

    Standard Libraries

    +

    The following Lua 5.4 standard library modules and builtins are available in the HappyView sandbox.

    +

    string​

    + +

    table​

    + +

    math​

    + +

    os (safe subset)​

    +

    Only the following safe functions are available from the os module:

    + +

    Dangerous functions like os.execute, os.remove, os.rename, and os.exit are not available.

    +

    Builtins​

    + +

    Removed modules​

    +

    The following standard Lua modules are removed and unavailable in the sandbox:

    +

    io, debug, package, require, dofile, loadfile, load, collectgarbage

    + + \ No newline at end of file diff --git a/reference/lua/utility-globals/index.html b/reference/lua/utility-globals/index.html new file mode 100644 index 0000000..d3c5eb7 --- /dev/null +++ b/reference/lua/utility-globals/index.html @@ -0,0 +1,32 @@ + + + + + +Utility Globals | HappyView + + + + + + + +

    Utility Globals

    +

    Global functions available in queries, procedures, and index hooks. These don't belong to a specific API table — they're available at the top level of any Lua script.

    +

    now​

    +
    local timestamp = now()
    -- "2026-04-19T15:30:00Z"
    +

    Returns the current UTC time as an ISO 8601 string. Use this for createdAt, updatedAt, and similar timestamp fields.

    +

    log​

    +
    log("processing record: " .. uri)
    log("count: " .. tostring(n))
    +

    Writes a message to the server logs at debug level. Useful for debugging scripts during development. Log output appears in HappyView's stdout — check your platform's log viewer (Railway logs, docker logs, terminal output) to see it.

    +

    TID​

    +
    local id = TID()
    -- "3abc123def456"
    +

    Generates a fresh atproto TID (Timestamp Identifier) — a 13-character, base32-sortable string derived from the current timestamp. TIDs are the standard record key format in atproto. Use this when creating records with a specific rkey:

    +
    local r = Record(collection, { text = "hello" })
    r:set_rkey(TID())
    r:save()
    +

    toarray​

    +
    return { items = toarray(results) }
    +

    Marks a Lua table so it serializes as a JSON array rather than a JSON object. This matters for empty tables — without toarray, an empty {} becomes a JSON object {} instead of an array [].

    +
    -- Without toarray:
    return { items = {} }
    -- → {"items": {}}

    -- With toarray:
    return { items = toarray({}) }
    -- → {"items": []}
    +

    You don't need toarray() on results from db.query, db.search, db.backlinks, or db.raw — those already return properly marked arrays. Use it when you build a table yourself with table.insert() or array-index assignment.

    + + \ No newline at end of file diff --git a/reference/production-deployment/index.html b/reference/production-deployment/index.html index 1e317e3..24c6cc2 100644 --- a/reference/production-deployment/index.html +++ b/reference/production-deployment/index.html @@ -2,40 +2,60 @@ - -Deployment | HappyView - - + +Production | HappyView + + - + -

    Deployment

    -

    HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.

    -

    Docker​

    -

    Build the image:

    -
    docker build -t happyview .
    -

    For local development, see Docker deployment.

    -

    Production Compose example​

    -
    note

    This example omits Tap, which is required for real-time record streaming and backfill. See the full docker-compose.yml in the repository for a complete configuration including Tap.

    -
    services:
    postgres:
    image: postgres:17
    environment:
    POSTGRES_USER: happyview
    POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
    POSTGRES_DB: happyview
    volumes:
    - pgdata:/var/lib/postgresql/data

    happyview:
    image: happyview:latest
    ports:
    - "3000:3000"
    environment:
    DATABASE_URL: "postgres://happyview:${POSTGRES_PASSWORD}@postgres/happyview"
    AIP_URL: "https://aip.example.com"
    depends_on:
    postgres:
    condition: service_healthy

    volumes:
    pgdata:
    -

    Railway / Fly.io / other platforms​

    -

    The general process for any hosting platform:

    -
      -
    1. Provision a Postgres 17+ database
    2. -
    3. Deploy an AIP instance (handles OAuth for your AppView)
    4. -
    5. Set DATABASE_URL and AIP_URL environment variables (see Configuration for all options)
    6. -
    7. Deploy the Docker image or build from source
    8. -
    9. HappyView listens on PORT (default 3000)
    10. -
    11. Health check: GET /health returns ok
    12. -
    -

    For Railway specifically, the Quickstart template handles all of this with a single click.

    -

    Database​

    -

    Migrations run automatically on startup via sqlx::migrate!(). No manual migration step is needed.

    -

    TLS​

    -

    HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS.

    -

    Logging​

    -

    HappyView uses the RUST_LOG environment variable to control log output. The default (happyview=debug,tower_http=debug) logs all HappyView activity and HTTP requests. For production, consider happyview=info,tower_http=info to reduce noise. See Configuration for details.

    +

    Production

    +

    This page covers what to change when taking a HappyView instance from local development to production. For setup instructions, see Deployment. This page assumes you already have a working deployment and focuses on hardening and operational concerns.

    +

    Session secret​

    +

    Set SESSION_SECRET to a random string of at least 64 characters. This signs the session cookies issued during OAuth login; rotating it invalidates every existing session.

    +
    openssl rand -base64 48
    +

    Never commit the secret to source control. Store it in your platform's secret manager (Railway variables, Docker secrets, Kubernetes secrets, etc.).

    +

    Token encryption key​

    +

    If you use plugins that require secrets (API keys, OAuth credentials), set TOKEN_ENCRYPTION_KEY to a base64-encoded 32-byte key. This encrypts plugin secrets at rest using AES-256-GCM:

    +
    openssl rand -base64 32
    +

    Without this variable, the dashboard's plugin secret fields are disabled and plugins can only read secrets from environment variables.

    +

    TLS and PUBLIC_URL​

    +

    HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, a platform-managed load balancer) and set PUBLIC_URL to the public HTTPS URL:

    +
    PUBLIC_URL=https://happyview.example.com
    +

    PUBLIC_URL is used to construct OAuth redirect URIs, so it must exactly match the URL users hit — including scheme. A mismatch breaks OAuth login.

    +

    Database​

    +

    SQLite is fine for small to medium instances and is the default. Switch to Postgres if you need:

    +
      +
    • Multiple HappyView replicas sharing one database
    • +
    • Larger-than-memory working sets
    • +
    • External tools that need direct read access to the records table
    • +
    +

    See the database setup guide for configuration details and Postgres → SQLite migration if you're moving the other direction. Migrations run automatically on startup regardless of backend.

    +

    Rate limits​

    +

    HappyView has a per-client token-bucket rate limiter for XRPC endpoints. The defaults (set via DEFAULT_RATE_LIMIT_CAPACITY and DEFAULT_RATE_LIMIT_REFILL_RATE) apply to any API client that doesn't have per-client overrides. Raise the defaults cautiously — they exist so one misbehaving integrator can't saturate the server.

    +

    Per-client overrides are set at client creation or via PUT /admin/api-clients/{id} (see Admin API — API Clients).

    +

    Logging​

    +

    The default RUST_LOG setting (happyview=debug,tower_http=debug) is noisy. For production, drop the verbosity:

    +
    RUST_LOG=happyview=info,tower_http=info
    +

    Structured logs go to stdout, so any platform that captures container stdout (Railway, Fly, ECS, Kubernetes) will ingest them without further configuration. For retention and querying, ship stdout to your usual log aggregator.

    +

    Event log retention​

    +

    The admin event log is stored in the same database as records. EVENT_LOG_RETENTION_DAYS (default 30) controls automatic cleanup. Set to 0 to keep events indefinitely — useful for compliance-sensitive deployments, but plan for database growth.

    +

    Health checks​

    +

    GET /health returns 200 ok when HappyView can bind its HTTP listener. Use it as the readiness/liveness probe for your platform.

    +

    For a deeper check, hit GET /xrpc/com.atproto.server.describeServer — this exercises the database and lexicon registry, and only returns 200 if HappyView can actually serve requests.

    +

    Backups​

    +
      +
    • SQLite: back up the database file (e.g. data/happyview.db) plus its -wal and -shm sidecar files. Use sqlite3 happyview.db ".backup '/path/backup.db'" for a consistent snapshot while HappyView is running.
    • +
    • Postgres: standard pg_dump / managed-Postgres snapshots.
    • +
    +

    Most of what HappyView stores is derivable from the network — lost records can be re-indexed via backfill. You can't recover from the network: user accounts and permissions, API keys, API clients, plugin secrets, and the Jetstream cursor. Prioritize those in your backup plan.

    +

    Next steps​

    +
      +
    • Configuration — full environment variable reference
    • +
    • Permissions — lock down admin access before exposing the dashboard publicly
    • +
    • Troubleshooting — diagnose issues with a running instance
    • +
    \ No newline at end of file diff --git a/reference/scripts/algolia-sync/index.html b/reference/scripts/algolia-sync/index.html index 95b3142..650d9e2 100644 --- a/reference/scripts/algolia-sync/index.html +++ b/reference/scripts/algolia-sync/index.html @@ -2,30 +2,30 @@ - -Index Hook: Algolia Sync | HappyView - - + +Index Hook: Algolia Sync | HappyView + + - + -

    Index Hook: Algolia Sync

    +

    Index Hook: Algolia Sync

    Push records to an Algolia search index whenever they are created, updated, or deleted on the network.

    Lexicon type: record (index hook)

    -
    function handle()
    local headers = {
    ["X-Algolia-API-Key"] = "your-api-key",
    ["X-Algolia-Application-Id"] = "your-app-id",
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers
    })
    else
    http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers,
    body = json.encode({
    objectID = uri,
    collection = collection,
    did = did,
    record = record
    })
    })
    end

    return record
    end
    -

    How it works​

    +
    function handle()
    local headers = {
    ["X-Algolia-API-Key"] = "your-api-key",
    ["X-Algolia-Application-Id"] = "your-app-id",
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers
    })
    else
    http.put("https://YOUR-APP.algolia.net/1/indexes/records/" .. uri, {
    headers = headers,
    body = json.encode({
    objectID = uri,
    collection = collection,
    did = did,
    record = record
    })
    })
    end

    return record
    end
    +

    How it works​

    1. On create or update: sends a PUT request to Algolia's index API with the record data, using the AT URI as the objectID. Algolia upserts the object — if it already exists, it's replaced.
    2. On delete: sends a DELETE request to remove the object from the index by its AT URI.

    The json.encode() function converts the Lua table into a JSON string for the request body. See JSON API.

    -

    Configuration​

    +

    Configuration​

    Replace the placeholder values:

    PlaceholderValue
    your-api-keyYour Algolia Admin API key (with write permissions)
    your-app-idYour Algolia Application ID
    YOUR-APPYour Algolia application subdomain (same as the Application ID)
    recordsThe Algolia index name (choose any name you like)
    -

    Use case​

    +

    Use case​

    This hook keeps an external search index in sync with your indexed records in real time. Users searching through Algolia get results that reflect the latest state of the network without polling or scheduled jobs.

    -

    Combine this with a query script that searches Algolia instead of the local database for a full-text search experience that goes beyond what db.search offers.

    +

    Combine this with a query script that searches Algolia instead of the local database for a full-text search experience that goes beyond what db.search offers.

    \ No newline at end of file diff --git a/reference/scripts/batch-save/index.html b/reference/scripts/batch-save/index.html index f63a114..4a190a6 100644 --- a/reference/scripts/batch-save/index.html +++ b/reference/scripts/batch-save/index.html @@ -2,28 +2,28 @@ - -Procedure: Batch Save | HappyView - - + +Procedure: Batch Save | HappyView + + - + -

    Procedure: Batch Save

    +

    Procedure: Batch Save

    Use Record.save_all() to create multiple records in parallel.

    Lexicon type: procedure

    -
    function handle()
    local records = {}
    for _, item in ipairs(input.items) do
    local r = Record(collection, item)
    records[#records + 1] = r
    end
    Record.save_all(records)

    local uris = {}
    for _, r in ipairs(records) do
    uris[#uris + 1] = r._uri
    end
    return { uris = uris }
    end
    -

    How it works​

    +
    function handle()
    local records = {}
    for _, item in ipairs(input.items) do
    local r = Record(collection, item)
    records[#records + 1] = r
    end
    Record.save_all(records)

    local uris = {}
    for _, r in ipairs(records) do
    uris[#uris + 1] = r._uri
    end
    return { uris = uris }
    end
    +

    How it works​

      -
    1. Iterate over input.items and create a Record instance for each item.
    2. -
    3. Call Record.save_all() to save all records in parallel, rather than one at a time.
    4. +
    5. Iterate over input.items and create a Record instance for each item.
    6. +
    7. Call Record.save_all() to save all records in parallel, rather than one at a time.
    8. Collect the resulting AT URIs and return them.
    -

    Usage​

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "items": [
    { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },
    { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }
    ]
    }'
    -

    Use case​

    -

    Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). save_all is significantly faster than calling r:save() in a loop because the PDS writes happen concurrently.

    +

    Usage​

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "items": [
    { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },
    { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }
    ]
    }'
    +

    Use case​

    +

    Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). save_all is significantly faster than calling r:save() in a loop because the PDS writes happen concurrently.

    \ No newline at end of file diff --git a/reference/scripts/cascading-delete/index.html b/reference/scripts/cascading-delete/index.html index 7127ea6..b02b274 100644 --- a/reference/scripts/cascading-delete/index.html +++ b/reference/scripts/cascading-delete/index.html @@ -2,31 +2,31 @@ - -Procedure: Cascading Delete | HappyView - - + +Procedure: Cascading Delete | HappyView + + - + -

    Procedure: Cascading Delete

    +

    Procedure: Cascading Delete

    Delete a record and all related records across collections.

    Lexicon type: procedure

    -
    function handle()
    if not input.uri then
    return { error = "uri is required" }
    end

    -- Load the primary record
    local primary = Record.load(input.uri)
    if not primary then
    return { error = "not found" }
    end

    -- Find related records that reference this URI
    local comments = db.query({
    collection = "xyz.statusphere.comment",
    did = caller_did,
    limit = 100,
    })

    -- Collect records to delete
    local to_delete = { primary }
    for _, comment in ipairs(comments.records) do
    if comment.postUri == input.uri then
    local r = Record.load(comment.uri)
    if r then
    to_delete[#to_delete + 1] = r
    end
    end
    end

    -- Delete all matched records
    for _, r in ipairs(to_delete) do
    r:delete()
    end

    return {
    deleted = #to_delete,
    }
    end
    -

    How it works​

    +
    function handle()
    if not input.uri then
    return { error = "uri is required" }
    end

    -- Load the primary record
    local primary = Record.load(input.uri)
    if not primary then
    return { error = "not found" }
    end

    -- Find related records that reference this URI
    local comments = db.query({
    collection = "xyz.statusphere.comment",
    did = caller_did,
    limit = 100,
    })

    -- Collect records to delete
    local to_delete = { primary }
    for _, comment in ipairs(comments.records) do
    if comment.postUri == input.uri then
    local r = Record.load(comment.uri)
    if r then
    to_delete[#to_delete + 1] = r
    end
    end
    end

    -- Delete all matched records
    for _, r in ipairs(to_delete) do
    r:delete()
    end

    return {
    deleted = #to_delete,
    }
    end
    +

    How it works​

    1. Load the primary record by URI. Return early if it doesn't exist.
    2. Query for related records, in this example comments by the same user that reference the primary record's URI.
    3. -
    4. Load each related record with Record.load to get a deletable Record instance.
    5. +
    6. Load each related record with Record.load to get a deletable Record instance.
    7. Delete everything. Each r:delete() removes the record from the user's PDS and the local index.
    -

    Usage​

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }'
    -
    {
    "deleted": 4
    }
    -

    Use case​

    +

    Usage​

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }'
    +
    {
    "deleted": 4
    }
    +

    Use case​

    Cascading deletes are useful when your data model has parent-child relationships across collections. For example, deleting a post should also clean up its comments, reactions, or metadata records. This keeps the user's repo and the local index consistent.

    -

    Note that this only deletes records owned by caller_did. AT Protocol records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting.

    +

    Note that this only deletes records owned by caller_did. atproto records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting.

    \ No newline at end of file diff --git a/reference/scripts/complex-mutations/index.html b/reference/scripts/complex-mutations/index.html index ea80ddb..bee286b 100644 --- a/reference/scripts/complex-mutations/index.html +++ b/reference/scripts/complex-mutations/index.html @@ -2,22 +2,22 @@ - -Procedure: Complex Mutations | HappyView - - + +Procedure: Complex Mutations | HappyView + + - + -

    Procedure: Complex Mutations

    +

    Procedure: Complex Mutations

    Load an existing record, apply multiple transformations, and save it back.

    Lexicon type: procedure

    -
    function handle()
    if not input.uri then
    return { error = "uri is required" }
    end

    local r = Record.load(input.uri)
    if not r then
    return { error = "not found" }
    end

    -- Increment a counter
    r.likeCount = (r.likeCount or 0) + 1

    -- Merge tags, deduplicating and capping at 10
    r.tags = r.tags or {}
    if input.tags then
    for _, tag in ipairs(input.tags) do
    local found = false
    for _, t in ipairs(r.tags) do
    if t == tag then
    found = true
    break
    end
    end
    if not found then
    r.tags[#r.tags + 1] = tag
    end
    end
    -- Keep only the last 10
    while #r.tags > 10 do
    table.remove(r.tags, 1)
    end
    end

    -- Normalize a string field
    if input.title then
    r.title = string.gsub(input.title, "^%s+", "")
    r.title = string.gsub(r.title, "%s+$", "")
    end

    -- Set a computed field
    r.updatedAt = now()

    r:save()

    return { uri = r._uri, cid = r._cid }
    end
    -

    How it works​

    +
    function handle()
    if not input.uri then
    return { error = "uri is required" }
    end

    local r = Record.load(input.uri)
    if not r then
    return { error = "not found" }
    end

    -- Increment a counter
    r.likeCount = (r.likeCount or 0) + 1

    -- Merge tags, deduplicating and capping at 10
    r.tags = r.tags or {}
    if input.tags then
    for _, tag in ipairs(input.tags) do
    local found = false
    for _, t in ipairs(r.tags) do
    if t == tag then
    found = true
    break
    end
    end
    if not found then
    r.tags[#r.tags + 1] = tag
    end
    end
    -- Keep only the last 10
    while #r.tags > 10 do
    table.remove(r.tags, 1)
    end
    end

    -- Normalize a string field
    if input.title then
    r.title = string.gsub(input.title, "^%s+", "")
    r.title = string.gsub(r.title, "%s+$", "")
    end

    -- Set a computed field
    r.updatedAt = now()

    r:save()

    return { uri = r._uri, cid = r._cid }
    end
    +

    How it works​

      -
    1. Load the existing record with Record.load. This gives you a mutable Record instance with all the current field values.
    2. +
    3. Load the existing record with Record.load. This gives you a mutable Record instance with all the current field values.
    4. Apply transformations directly on the record's fields:
      • Increment a counter: use or 0 to handle the field being nil on first access.
      • @@ -28,10 +28,10 @@
      • Call r:save(). Since _uri is set (from the load), this calls putRecord to update the record on the user's PDS.
    -

    Usage​

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",
    "tags": ["tutorial", "atproto"],
    "title": " My Post Title "
    }'
    -

    Use case​

    +

    Usage​

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",
    "tags": ["tutorial", "atproto"],
    "title": " My Post Title "
    }'
    +

    Use case​

    This pattern is useful when updates involve more than simple field replacement: counters, bounded lists, string normalization, or computed fields. All mutations happen in memory before the single r:save() call, so there's no partial save: either all changes are written or none are.

    -

    If the record has a schema, HappyView only sends fields defined in the schema's properties to the PDS on save. Extra fields you set on the record instance are ignored.

    +

    If the record has a schema, HappyView only sends fields defined in the schema's properties to the PDS on save. Extra fields you set on the record instance are ignored.

    \ No newline at end of file diff --git a/reference/scripts/create-record/index.html b/reference/scripts/create-record/index.html index e5544c8..4130350 100644 --- a/reference/scripts/create-record/index.html +++ b/reference/scripts/create-record/index.html @@ -2,28 +2,28 @@ - -Procedure: Create a Record | HappyView - - + +Procedure: Create a Record | HappyView + + - + -

    Procedure: Create a Record

    +

    Procedure: Create a Record

    The simplest write: take the request body, save it as a record, and return the URI.

    Lexicon type: procedure

    -
    function handle()
    local r = Record(collection, input)
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    -

    How it works​

    +
    function handle()
    local r = Record(collection, input)
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    +

    How it works​

      -
    1. Create a new Record instance from the target collection, populated with the fields from the request body.
    2. +
    3. Create a new Record instance from the target collection, populated with the fields from the request body.
    4. Call r:save(), which creates the record on the caller's PDS and indexes it locally.
    5. Return the AT URI and CID of the newly created record.
    -

    Usage​

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }'
    -

    Use case​

    -

    This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed.

    +

    Usage​

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }'
    +

    Use case​

    +

    This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed.

    \ No newline at end of file diff --git a/reference/scripts/expanded-query/index.html b/reference/scripts/expanded-query/index.html index d7f8485..25d4c00 100644 --- a/reference/scripts/expanded-query/index.html +++ b/reference/scripts/expanded-query/index.html @@ -2,32 +2,32 @@ - -Query: Expanded Query with Profiles | HappyView - - + +Query: Expanded Query with Profiles | HappyView + + - + -

    Query: Expanded Query with Profiles

    +

    Query: Expanded Query with Profiles

    List statuses and include the profile of each user who created one.

    Lexicon type: query

    -
    function handle()
    local limit = tonumber(params.limit) or 20
    if limit > 100 then limit = 100 end

    local result = db.query({
    collection = "xyz.statusphere.status",
    did = params.did,
    limit = limit,
    offset = tonumber(params.cursor) or 0,
    })

    -- Collect unique DIDs from the statuses
    local seen = {}
    local profile_uris = {}
    for _, status in ipairs(result.records) do
    local did = string.match(status.uri, "at://([^/]+)/")
    if did and not seen[did] then
    seen[did] = true
    profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"
    end
    end

    -- Load all profiles in parallel
    local profiles = {}
    if #profile_uris > 0 then
    local loaded = Record.load_all(profile_uris)
    for i, profile in ipairs(loaded) do
    if profile then
    profiles[#profiles + 1] = profile
    end
    end
    end

    return {
    statuses = result.records,
    profiles = profiles,
    cursor = result.cursor,
    }
    end
    -

    How it works​

    +
    function handle()
    local limit = tonumber(params.limit) or 20
    if limit > 100 then limit = 100 end

    local result = db.query({
    collection = "xyz.statusphere.status",
    did = params.did,
    limit = limit,
    cursor = params.cursor,
    })

    -- Collect unique DIDs from the statuses
    local seen = {}
    local profile_uris = {}
    for _, status in ipairs(result.records) do
    local did = string.match(status.uri, "at://([^/]+)/")
    if did and not seen[did] then
    seen[did] = true
    profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"
    end
    end

    -- Load all profiles in parallel
    local profiles = {}
    if #profile_uris > 0 then
    local loaded = Record.load_all(profile_uris)
    for i, profile in ipairs(loaded) do
    if profile then
    profiles[#profiles + 1] = profile
    end
    end
    end

    return {
    statuses = result.records,
    profiles = profiles,
    cursor = result.cursor,
    }
    end
    +

    How it works​

    1. Query statuses from the target collection with pagination, same as a normal list query.
    2. Extract the unique DIDs from the returned status URIs using string.match.
    3. Build an AT URI for each DID's app.bsky.actor.profile/self record (this is where Bluesky profiles live).
    4. -
    5. Load all profiles in parallel with Record.load_all. Profiles that aren't indexed locally return nil and are skipped.
    6. +
    7. Load all profiles in parallel with Record.load_all. Profiles that aren't indexed locally return nil and are skipped.
    8. Return statuses and profiles as separate keys, with the cursor from the status query.
    -

    Usage​

    -
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=20&limit=20
    -
    {
    "statuses": [
    { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "😊", "createdAt": "..." },
    { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "🌟", "createdAt": "..." }
    ],
    "profiles": [
    { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },
    { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }
    ],
    "cursor": "10"
    }
    -

    Use case​

    -

    This pattern avoids N+1 queries (fetching each author's profile individually) on the client side. Instead of fetching statuses and then making a separate request for each user's profile, the client gets everything in one call. The deduplication step ensures each profile is loaded only once even if multiple statuses are from the same user.

    -

    Note that Record.load_all reads from HappyView's local index. Profiles only appear if app.bsky.actor.profile is also being indexed. If a profile hasn't been indexed yet, it's silently omitted from the response.

    +

    Usage​

    +
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc
    GET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=<opaque>&limit=20
    +
    {
    "statuses": [
    { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "😊", "createdAt": "..." },
    { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "🌟", "createdAt": "..." }
    ],
    "profiles": [
    { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },
    { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }
    ],
    "cursor": "MjAyNi0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."
    }
    +

    Use case​

    +

    This avoids N+1 queries on the client side — the client gets statuses and profiles in one call. The deduplication step loads each profile only once even if multiple statuses share an author.

    +

    Record.load_all reads from HappyView's local index. Profiles only appear if app.bsky.actor.profile is also indexed. Missing profiles are skipped.

    \ No newline at end of file diff --git a/reference/scripts/get-record/index.html b/reference/scripts/get-record/index.html index 05bf9d7..d5f632c 100644 --- a/reference/scripts/get-record/index.html +++ b/reference/scripts/get-record/index.html @@ -2,28 +2,28 @@ - -Query: Get a Single Record | HappyView - - + +Query: Get a Single Record | HappyView + + - + -

    Query: Get a Single Record

    +

    Query: Get a Single Record

    Fetch a single record by its AT URI.

    Lexicon type: query

    -
    function handle()
    if not params.uri then
    return { error = "uri parameter is required" }
    end

    local record = db.get(params.uri)
    if not record then
    return { error = "not found" }
    end

    return { record = record }
    end
    -

    How it works​

    +
    function handle()
    if not params.uri then
    return { error = "uri parameter is required" }
    end

    local record = db.get(params.uri)
    if not record then
    return { error = "not found" }
    end

    return { record = record }
    end
    +

    How it works​

    1. Check that the uri query parameter is present. Return a structured error if missing.
    2. -
    3. Look up the record with db.get, which returns the record table or nil.
    4. +
    5. Look up the record with db.get, which returns the record table or nil.
    6. Return the record wrapped in an object.
    -

    Usage​

    -
    GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123
    -

    Use case​

    -

    A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling error(), so the client gets a 200 with an error field it can handle gracefully rather than a 500.

    +

    Usage​

    +
    GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123
    +

    Use case​

    +

    A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling error(), so the client gets a 200 with an error field it can handle gracefully rather than a 500.

    \ No newline at end of file diff --git a/reference/scripts/list-or-fetch/index.html b/reference/scripts/list-or-fetch/index.html index b7e7e0c..c518ba5 100644 --- a/reference/scripts/list-or-fetch/index.html +++ b/reference/scripts/list-or-fetch/index.html @@ -2,27 +2,27 @@ - -Query: List or Fetch Records | HappyView - - + +Query: List or Fetch Records | HappyView + + - + -

    Query: List or Fetch Records

    +

    Query: List or Fetch Records

    This query handles both single-record lookups (when a uri param is provided) and paginated listing.

    Lexicon type: query

    -
    function handle()
    if params.uri then
    local record = db.get(params.uri)
    if not record then
    return { error = "record not found" }
    end
    return { record = record }
    end

    return db.query({
    collection = collection,
    did = params.did,
    limit = tonumber(params.limit) or 20,
    offset = tonumber(params.cursor) or 0,
    })
    end
    -

    How it works​

    +
    function handle()
    if params.uri then
    local record = db.get(params.uri)
    if not record then
    return { error = "record not found" }
    end
    return { record = record }
    end

    return db.query({
    collection = collection,
    did = params.did,
    limit = tonumber(params.limit) or 20,
    cursor = params.cursor,
    })
    end
    +

    How it works​

      -
    1. If a uri query parameter is provided, fetch that single record with db.get and return it. If it doesn't exist, return a structured error (using error() would trigger a 500 response).
    2. -
    3. Otherwise, list records from the target collection using db.query, with optional filtering by did and pagination via limit/offset. Since query parameters arrive as strings, tonumber() converts them to numbers.
    4. +
    5. If a uri query parameter is provided, fetch that single record with db.get and return it. If it doesn't exist, return a structured error (using error() would trigger a 500 response).
    6. +
    7. Otherwise, list records from the target collection using db.query, with optional filtering by did and cursor-based pagination. The cursor is an opaque string from a previous response — pass it through directly. Since limit arrives as a string, tonumber() converts it to a number.
    -

    Usage​

    -
    GET /xrpc/xyz.statusphere.listRecords?limit=10
    GET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc
    GET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123
    -

    Use case​

    -

    This is a good default query script when you want a single endpoint that serves double duty: list browsing for feeds/timelines and direct record fetching for detail views.

    +

    Usage​

    +
    GET /xrpc/xyz.statusphere.listRecords?limit=10
    GET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc
    GET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123
    +

    Use case​

    +

    Useful when one endpoint needs to handle both listing and single-record fetches.

    \ No newline at end of file diff --git a/reference/scripts/meilisearch-sync/index.html b/reference/scripts/meilisearch-sync/index.html index 000f389..347d2aa 100644 --- a/reference/scripts/meilisearch-sync/index.html +++ b/reference/scripts/meilisearch-sync/index.html @@ -2,32 +2,32 @@ - -Index Hook: Meilisearch Sync | HappyView - - + +Index Hook: Meilisearch Sync | HappyView + + - + -

    Index Hook: Meilisearch Sync

    +

    Index Hook: Meilisearch Sync

    Push records to a Meilisearch search index whenever they are created, updated, or deleted on the network.

    Lexicon type: record (index hook)

    -
    function handle()
    local headers = {
    ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {
    headers = headers
    })
    else
    http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {
    headers = headers,
    body = json.encode(toarray({
    {
    id = uri,
    collection = collection,
    did = did,
    record = record
    }
    }))
    })
    end

    return record
    end
    -

    How it works​

    +
    function handle()
    local headers = {
    ["Authorization"] = "Bearer " .. env.MEILISEARCH_API_KEY,
    ["Content-Type"] = "application/json"
    }

    if action == "delete" then
    http.delete(env.MEILISEARCH_URL .. "/indexes/records/documents/" .. uri, {
    headers = headers
    })
    else
    http.post(env.MEILISEARCH_URL .. "/indexes/records/documents", {
    headers = headers,
    body = json.encode(toarray({
    {
    id = uri,
    collection = collection,
    did = did,
    record = record
    }
    }))
    })
    end

    return record
    end
    +

    How it works​

    1. On create or update: sends a POST request to Meilisearch's document API with the record data wrapped in an array. Meilisearch upserts by id — if a document with the same AT URI already exists, it's replaced.
    2. On delete: sends a DELETE request to remove the document from the index by its AT URI.

    The toarray() function ensures the table is encoded as a JSON array (Meilisearch expects an array of documents). See JSON API.

    -

    Configuration​

    +

    Configuration​

    This script uses script variables instead of hardcoded values. Set these via the admin API or dashboard:

    VariableValue
    MEILISEARCH_URLYour Meilisearch instance URL (e.g. http://meilisearch.railway.internal:7700)
    MEILISEARCH_API_KEYA Meilisearch API key with write permissions

    Script variables are stored in the script_variables table and accessible as env.* in Lua.

    -

    Use case​

    +

    Use case​

    This hook keeps an external search index in sync with your indexed records in real time. Users searching through Meilisearch get results that reflect the latest state of the network without polling or scheduled jobs.

    Meilisearch is a good fit for self-hosted deployments — colocate it alongside HappyView (e.g. on the same Railway project) for sub-millisecond network latency.

    -

    Combine this with a query script that searches Meilisearch instead of the local database for a full-text search experience that goes beyond what db.search offers.

    +

    Combine this with a query script that searches Meilisearch instead of the local database for a full-text search experience that goes beyond what db.search offers.

    \ No newline at end of file diff --git a/reference/scripts/paginated-list/index.html b/reference/scripts/paginated-list/index.html index 8b7244b..cd41d27 100644 --- a/reference/scripts/paginated-list/index.html +++ b/reference/scripts/paginated-list/index.html @@ -2,28 +2,28 @@ - -Query: Paginated List | HappyView - - + +Query: Paginated List | HappyView + + - + -

    Query: Paginated List

    +

    Query: Paginated List

    List records from a collection with cursor-based pagination and an optional DID filter.

    Lexicon type: query

    -
    function handle()
    local limit = tonumber(params.limit) or 20
    if limit > 100 then limit = 100 end

    local result = db.query({
    collection = collection,
    did = params.did,
    limit = limit,
    offset = tonumber(params.cursor) or 0,
    })

    return result
    end
    -

    How it works​

    +
    function handle()
    local limit = tonumber(params.limit) or 20
    if limit > 100 then limit = 100 end

    local result = db.query({
    collection = collection,
    did = params.did,
    limit = limit,
    cursor = params.cursor,
    })

    return result
    end
    +

    How it works​

    1. Parse limit from the query string, defaulting to 20 and capping at 100.
    2. -
    3. Call db.query with the target collection, optional DID filter, and offset-based pagination.
    4. -
    5. Return the result directly. db.query returns { records = [...], cursor = "..." } where cursor is present when more records exist.
    6. +
    7. Call db.query with the target collection, optional DID filter, and cursor for pagination.
    8. +
    9. Return the result directly. db.query returns { records = [...], cursor = "..." } where cursor is an opaque string present when more records exist.
    -

    Usage​

    -
    GET /xrpc/xyz.statusphere.listStatuses
    GET /xrpc/xyz.statusphere.listStatuses?limit=50
    GET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10
    GET /xrpc/xyz.statusphere.listStatuses?cursor=20&limit=20
    -

    Use case​

    -

    A straightforward list endpoint for feeds, timelines, or browsing records by collection. The cursor value returned by db.query is an offset. Clients pass it back as the cursor parameter to fetch the next page. Since all query parameters arrive as strings, use tonumber() to convert limit and cursor to numbers.

    +

    Usage​

    +
    GET /xrpc/xyz.statusphere.listStatuses
    GET /xrpc/xyz.statusphere.listStatuses?limit=50
    GET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10
    GET /xrpc/xyz.statusphere.listStatuses?cursor=<opaque>&limit=20
    +

    Use case​

    +

    A straightforward list endpoint for feeds, timelines, or browsing records by collection. The cursor value returned by db.query is an opaque string. Clients pass it back as the cursor parameter to fetch the next page — don't parse or modify it.

    \ No newline at end of file diff --git a/reference/scripts/sidecar-records/index.html b/reference/scripts/sidecar-records/index.html index e15be55..2f5d678 100644 --- a/reference/scripts/sidecar-records/index.html +++ b/reference/scripts/sidecar-records/index.html @@ -2,33 +2,33 @@ - -Procedure: Create Sidecar Records | HappyView - - + +Procedure: Create Sidecar Records | HappyView + + - + -

    Procedure: Create Sidecar Records

    +

    Procedure: Create Sidecar Records

    Create two records with different collection NSIDs but the same rkey, linking them together by key.

    Lexicon type: procedure

    -
    function handle()
    local rkey = TID()

    local post = Record("xyz.statusphere.post", {
    text = input.text,
    createdAt = now(),
    })
    post:set_rkey(rkey)

    local metadata = Record("xyz.statusphere.postMetadata", {
    lang = input.lang or "en",
    source = input.source or "web",
    createdAt = now(),
    })
    metadata:set_rkey(rkey)

    Record.save_all({ post, metadata })

    return {
    post = { uri = post._uri, cid = post._cid },
    metadata = { uri = metadata._uri, cid = metadata._cid },
    }
    end
    -

    How it works​

    +
    function handle()
    local rkey = TID()

    local post = Record("xyz.statusphere.post", {
    text = input.text,
    createdAt = now(),
    })
    post:set_rkey(rkey)

    local metadata = Record("xyz.statusphere.postMetadata", {
    lang = input.lang or "en",
    source = input.source or "web",
    createdAt = now(),
    })
    metadata:set_rkey(rkey)

    Record.save_all({ post, metadata })

    return {
    post = { uri = post._uri, cid = post._cid },
    metadata = { uri = metadata._uri, cid = metadata._cid },
    }
    end
    +

    How it works​

    1. Generate a single TID() to use as the rkey for both records.
    2. Create a Record for each collection and call r:set_rkey() with the shared rkey.
    3. -
    4. Save both records in parallel with Record.save_all().
    5. +
    6. Save both records in parallel with Record.save_all().
    7. Return both URIs so the client knows the identity of each record.
    -

    Usage​

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "text": "Hello world", "lang": "en", "source": "web" }'
    +

    Usage​

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "text": "Hello world", "lang": "en", "source": "web" }'

    The response includes URIs for both the post and its metadata:

    -
    {
    "post": {
    "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",
    "cid": "bafyrei..."
    },
    "metadata": {
    "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",
    "cid": "bafyrei..."
    }
    }
    -

    Use case​

    +
    {
    "post": {
    "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",
    "cid": "bafyrei..."
    },
    "metadata": {
    "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",
    "cid": "bafyrei..."
    }
    }
    +

    Use case​

    Sidecar records are useful when you want to associate related data across collections without embedding everything in a single record. Because they share an rkey, you can derive one URI from the other:

    -
    at:// did:plc:abc /xyz.statusphere.post         /3abc123
    at:// did:plc:abc /xyz.statusphere.postMetadata /3abc123
    ^^^^^^^ same rkey
    -

    This is a common AT Protocol pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection.

    +
    at:// did:plc:abc /xyz.statusphere.post /3abc123
    at:// did:plc:abc /xyz.statusphere.postMetadata /3abc123
    ^^^^^^^ same rkey
    +

    This is a common atproto pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection.

    \ No newline at end of file diff --git a/reference/scripts/update-or-delete/index.html b/reference/scripts/update-or-delete/index.html index f15c880..a680676 100644 --- a/reference/scripts/update-or-delete/index.html +++ b/reference/scripts/update-or-delete/index.html @@ -2,28 +2,28 @@ - -Procedure: Update or Delete | HappyView - - + +Procedure: Update or Delete | HappyView + + - + -

    Procedure: Update or Delete

    +

    Procedure: Update or Delete

    A single endpoint that handles create, update, and delete based on the input fields.

    Lexicon type: procedure

    -
    function handle()
    if input.delete and input.uri then
    local r = Record.load(input.uri)
    if r then r:delete() end
    return { success = true }
    end

    if input.uri then
    -- Update existing
    local r = Record.load(input.uri)
    if not r then error("not found") end
    r.status = input.status
    r:save()
    return { uri = r._uri, cid = r._cid }
    end

    -- Create new
    local r = Record(collection, input)
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    -

    How it works​

    +
    function handle()
    if input.delete and input.uri then
    local r = Record.load(input.uri)
    if r then r:delete() end
    return { success = true }
    end

    if input.uri then
    -- Update existing
    local r = Record.load(input.uri)
    if not r then error("not found") end
    r.status = input.status
    r:save()
    return { uri = r._uri, cid = r._cid }
    end

    -- Create new
    local r = Record(collection, input)
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    +

    How it works​

      -
    1. If input.delete is truthy and input.uri is provided, load the record with Record.load and delete it.
    2. -
    3. If only input.uri is provided, load the existing record with Record.load, update its fields, and save it back. Since _uri is already set, r:save() calls putRecord instead of createRecord.
    4. +
    5. If input.delete is truthy and input.uri is provided, load the record with Record.load and delete it.
    6. +
    7. If only input.uri is provided, load the existing record with Record.load, update its fields, and save it back. Since _uri is already set, r:save() calls putRecord instead of createRecord.
    8. If neither condition matches, create a new record from the input.
    -

    Usage​

    -
    # Create
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "hello" }'

    # Update
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }'

    # Delete
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }'
    -

    Use case​

    -

    This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of uri and delete fields in the input determines the action.

    +

    Usage​

    +
    # Create
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "hello" }'

    # Update
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }'

    # Delete
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }'
    +

    Use case​

    +

    This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of uri and delete fields in the input determines the action.

    \ No newline at end of file diff --git a/reference/scripts/upsert-record/index.html b/reference/scripts/upsert-record/index.html index 400d183..41b06b3 100644 --- a/reference/scripts/upsert-record/index.html +++ b/reference/scripts/upsert-record/index.html @@ -2,29 +2,29 @@ - -Procedure: Upsert a Record | HappyView - - + +Procedure: Upsert a Record | HappyView + + - + -

    Procedure: Upsert a Record

    +

    Procedure: Upsert a Record

    Create a new record, or update an existing one if the client provides its rkey.

    Lexicon type: procedure

    -
    function handle()
    local rkey = input.rkey or TID()
    local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey

    local r = Record.load(uri)
    if r then
    -- Update existing record
    r.status = input.status
    r.updatedAt = now()
    r:save()
    else
    -- Create new record
    r = Record(collection, {
    status = input.status,
    createdAt = now(),
    updatedAt = now(),
    })
    r:set_rkey(rkey)
    r:save()
    end

    return { uri = r._uri, cid = r._cid }
    end
    -

    How it works​

    +
    function handle()
    local rkey = input.rkey or TID()
    local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey

    local r = Record.load(uri)
    if r then
    -- Update existing record
    r.status = input.status
    r.updatedAt = now()
    r:save()
    else
    -- Create new record
    r = Record(collection, {
    status = input.status,
    createdAt = now(),
    updatedAt = now(),
    })
    r:set_rkey(rkey)
    r:save()
    end

    return { uri = r._uri, cid = r._cid }
    end
    +

    How it works​

    1. Use the client-provided input.rkey if present, otherwise generate a new TID(). This means omitting rkey always creates, while providing one enables updates.
    2. -
    3. Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with Record.load.
    4. +
    5. Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with Record.load.
    6. If the record exists, update its fields and save. Since _uri is already set, r:save() calls putRecord.
    7. If it doesn't exist, create a new record, set the rkey explicitly with r:set_rkey(), and save. This calls createRecord with the specified rkey.
    -

    Usage​

    -
    # Create: no rkey, so a new TID is generated
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "hello" }'
    # → { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }

    # Update: pass the rkey back to update the same record
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "rkey": "3abc123", "status": "updated" }'
    # → { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }
    -

    Use case​

    -

    This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits rkey for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates.

    +

    Usage​

    +
    # Create: no rkey, so a new TID is generated
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "hello" }'
    # → { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }

    # Update: pass the rkey back to update the same record
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "rkey": "3abc123", "status": "updated" }'
    # → { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }
    +

    Use case​

    +

    This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits rkey for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates.

    \ No newline at end of file diff --git a/reference/troubleshooting/index.html b/reference/troubleshooting/index.html index d70f930..ada5d39 100644 --- a/reference/troubleshooting/index.html +++ b/reference/troubleshooting/index.html @@ -2,18 +2,18 @@ - -Troubleshooting | HappyView - - + +Troubleshooting | HappyView + + - + -

    Troubleshooting

    +

    Troubleshooting

    Common issues and how to resolve them.

    -

    XRPC endpoint returns 404​

    +

    XRPC endpoint returns 404​

    Symptom: GET /xrpc/your.method.name returns {"error": "method not found"}.

    Causes:

      @@ -21,31 +21,39 @@
    • The lexicon's defs.main.type doesn't match the HTTP method. Queries are GET, procedures are POST.
    • The NSID in the URL doesn't match the id field in the uploaded lexicon JSON.
    -

    Queries return empty results​

    +

    Queries return empty results​

    Symptom: The XRPC query endpoint returns {"records": []} even though records should exist.

    Causes:

    • The query lexicon is missing a target_collection. Without it, the query doesn't know which records to read. See Lexicons - target_collection.
    • The record-type lexicon hasn't finished backfilling. Check backfill status with GET /admin/backfill/status or the dashboard.
    • -
    • Records exist on the network but HappyView hasn't indexed them yet. Tap only picks up new events from when the collection filter was added. Use backfill for historical records.
    • +
    • Records exist on the network but HappyView hasn't indexed them yet. Jetstream only delivers events from after the collection was added to the filter. Use backfill to import historical records.
    -

    Procedure returns 401 Unauthorized​

    +

    Procedure returns 401 Unauthorized​

    Symptom: POST /xrpc/your.method.name returns {"error": "..."} with status 401.

    Causes:

      -
    • The Authorization: Bearer <token> header is missing or malformed.
    • -
    • The token has expired or is invalid. Tokens are validated against AIP's /oauth/userinfo endpoint.
    • -
    • AIP is unreachable. Check that AIP_URL is set correctly and the AIP service is running.
    • +
    • No Authorization: DPoP header or X-Client-Key header is present.
    • +
    • The DPoP proof is invalid or expired.
    • +
    • The API client key is not registered or is inactive.
    -

    For AIP-specific issues, see the AIP documentation.

    -

    Admin endpoints return 403 Forbidden​

    +

    Admin endpoints return 403 Forbidden​

    Symptom: Admin API calls return {"error": "forbidden"}.

    Causes:

      -
    • Your DID is not in the admins table. Ask an existing admin to add you via POST /admin/admins.
    • -
    • If this is a fresh deployment with no admins, the first authenticated request to any admin endpoint automatically bootstraps you as admin. Make sure you're sending a valid Bearer token.
    • +
    • Your DID is not in the users table. Ask an existing user with users:create permission to add you via POST /admin/users.
    • +
    • If this is a fresh deployment with no users, the first authenticated request to any admin endpoint automatically bootstraps you as the super user. Make sure you're logged in via the dashboard or using a valid API key.
    • +
    • You may be in the users table but lack the required permission for the endpoint you're calling. Check your permissions with GET /admin/users or ask a user with users:update permission to grant the permission you need.
    -

    Lua script errors​

    +

    Permission denied errors​

    +

    Symptom: Admin API calls return {"error": "insufficient permissions"} with status 403, even though you can access other endpoints.

    +

    Causes:

    +
      +
    • Your user account doesn't have the specific permission required by the endpoint. Each endpoint requires a specific permission — see the permissions table.
    • +
    • If using an API key, the key's effective permissions are the intersection of the key's permissions and your user permissions. A key can never have more access than the user who created it.
    • +
    • Only the super user can call POST /admin/users/transfer-super. This endpoint cannot be accessed with any permission — it requires super user status.
    • +
    +

    Lua script errors​

    Symptom: An XRPC endpoint returns {"error": "script execution failed"} or {"error": "script exceeded execution time limit"}.

    What to do:

      @@ -54,7 +62,7 @@
    1. If you hit the execution limit, your script likely has an infinite loop or is processing too much data. See Lua Scripting - Sandbox.

    See Lua Scripting - Debugging for more.

    -

    Backfill job stuck in "pending" or "running"​

    +

    Backfill job stuck in "pending" or "running"​

    Symptom: A backfill job doesn't progress or stays in pending.

    Causes:

      @@ -63,23 +71,47 @@
    • Individual PDS fetches can fail silently. The worker logs warnings and continues. Check server logs for details.

    See Backfill for how the process works.

    -

    Records not appearing in real time​

    +

    Records not appearing in real time​

    Symptom: New records created on the network don't show up in queries.

    Causes:

      -
    • HappyView receives real-time events via Tap. Make sure Tap is running and connected to HappyView. See the Tap documentation for configuration.
    • +
    • HappyView receives real-time events via Jetstream. Verify the JETSTREAM_URL is reachable and check server logs for jetstream.disconnected events.
    • No record-type lexicon exists for the collection. HappyView only indexes collections that have a corresponding record-type lexicon.
    • -
    • The Tap connection hasn't synced the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors.
    • +
    • The Jetstream subscription hasn't reconnected with the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors.
    • +
    +

    Lua script can't find records​

    +

    Symptom: db.query or db.get returns empty results inside a Lua script, even though the admin dashboard shows records exist.

    +

    Causes:

    +
      +
    • The collection global is only set when the lexicon has a target_collection. If you're using db.raw with a hardcoded collection name, double-check the spelling matches exactly.
    • +
    • db.get expects a full AT URI (at://did:plc:abc/collection/rkey), not just an rkey.
    • +
    • If querying by DID, make sure you're passing the full DID string including the did:plc: or did:web: prefix.
    • +
    +

    Plugin secrets not working​

    +

    Symptom: A plugin fails with authentication errors even though you've configured its secrets.

    +

    Causes:

    +
      +
    • TOKEN_ENCRYPTION_KEY is not set. Plugin secrets are encrypted at rest and cannot be read without this key. See Plugins - Configuration.
    • +
    • If TOKEN_ENCRYPTION_KEY changed since the secrets were saved, the existing encrypted values are unreadable. Re-enter the secrets via the dashboard or PUT /admin/plugins/{id}/secrets.
    • +
    • Environment variable secrets (PLUGIN_<ID>_<KEY>) are overridden by dashboard-configured secrets. If you've set both, the dashboard values take precedence.
    -

    OAuth or login issues​

    -

    OAuth is handled entirely by AIP. If users can't log in or tokens aren't working:

    +

    OAuth or login issues​

    +

    HappyView handles atproto OAuth internally via the atrium-oauth library. If users can't log in:

      -
    1. Verify AIP is running and reachable at the configured AIP_URL.
    2. -
    3. Check that AIP has valid signing keys configured (OAUTH_SIGNING_KEYS).
    4. -
    5. Check that both HappyView and AIP have public URLs assigned (required for OAuth callbacks).
    6. +
    7. Verify PUBLIC_URL is set correctly and the URL is publicly accessible (required for OAuth callbacks).
    8. +
    9. Check that the user's PDS authorization server is reachable.
    10. +
    11. Verify SESSION_SECRET hasn't changed since sessions were created (changing it invalidates all existing dashboard sessions).
    12. +
    13. Check server logs for OAuth-specific error messages.
    -

    See the AIP documentation for setup and debugging.

    -

    Database connection errors​

    +

    Third-party app can't authenticate​

    +

    Symptom: A third-party app using DPoP authentication gets 401 errors on XRPC endpoints.

    +

    Causes:

    +
      +
    • The app hasn't registered an API client. Every XRPC request needs an X-Client-Key header with a valid hvc_-prefixed client key. Register one via Settings > API Clients or POST /admin/api-clients.
    • +
    • The DPoP proof is malformed or expired. Proofs include a timestamp and are valid for a short window.
    • +
    • The API client has been deactivated (is_active: false). Re-enable it via the dashboard or PUT /admin/api-clients/{id}.
    • +
    +

    Database connection errors​

    Symptom: HappyView fails to start or returns 500 errors.

    Causes:

      @@ -87,6 +119,18 @@
    • The database user doesn't have sufficient permissions. HappyView needs to create tables (migrations run automatically on startup).
    • Postgres version is too old. HappyView requires Postgres 17+.
    -

    See Configuration for environment variable details.

    +

    See Configuration for environment variable details.

    +

    Switching databases loses data​

    +

    Symptom: After changing DATABASE_URL from SQLite to Postgres (or vice versa), all records, lexicons, and users are gone.

    +

    Explanation: Each database is independent. Switching DATABASE_URL points HappyView at a fresh database. Your old data is still in the previous database file or Postgres instance.

    +

    Recovery: Re-upload your lexicons and run backfills to re-index records from the network. Admin settings, users, and API keys need to be re-created manually. See the SQLite → Postgres or Postgres → SQLite migration guides.

    +

    Jetstream disconnects frequently​

    +

    Symptom: Server logs show repeated jetstream.disconnected / jetstream.connected events.

    +

    Causes:

    +
      +
    • Network instability between HappyView and the Jetstream server. Verify JETSTREAM_URL is reachable.
    • +
    • The default Jetstream instance may be under heavy load. Consider pointing JETSTREAM_URL at a different instance if available.
    • +
    • HappyView reconnects automatically and resumes from its last cursor, so brief disconnections don't cause data loss. Prolonged outages may require a backfill to catch up on missed records.
    • +
    \ No newline at end of file diff --git a/reference/xrpc-api/index.html b/reference/xrpc-api/index.html index dea127b..e41ef8c 100644 --- a/reference/xrpc-api/index.html +++ b/reference/xrpc-api/index.html @@ -2,87 +2,87 @@ - -XRPC API | HappyView - - + +XRPC API | HappyView + + - + -

    XRPC API

    -

    XRPC is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/{nsid} routes, procedure lexicons become POST /xrpc/{nsid} routes.

    +

    XRPC API

    +

    XRPC is the HTTP-based RPC protocol used by the atproto. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/{nsid} routes, procedure lexicons become POST /xrpc/{nsid} routes.

    If a query or procedure lexicon has a Lua script attached, the script handles the request. Otherwise, HappyView uses built-in default behavior (described below).

    -

    Auth​

    +

    Auth​

    • Queries (GET /xrpc/{method}): unauthenticated
    • -
    • Procedures (POST /xrpc/{method}): require an AIP-issued Authorization: Bearer <token> header
    • +
    • Procedures (POST /xrpc/{method}): require DPoP authentication (Authorization: DPoP + DPoP proof header + X-Client-Key)
    • getProfile: requires auth
    • uploadBlob: requires auth
    -

    Fixed endpoints​

    +

    Fixed endpoints​

    These endpoints are always available regardless of which lexicons are loaded.

    -

    Health check​

    -
    GET /health
    -
    curl http://localhost:3000/health
    +

    Health check​

    +
    GET /health
    +
    curl http://localhost:3000/health

    Response: 200 OK with body ok

    -

    Get profile​

    -
    GET /xrpc/app.bsky.actor.getProfile
    +

    Get profile​

    +
    GET /xrpc/app.bsky.actor.getProfile

    Returns the authenticated user's profile, resolved from their PDS via PLC directory lookup.

    -
    curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \
    -H "Authorization: Bearer $TOKEN"
    +
    curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN"

    Response: 200 OK

    -
    {
    "did": "did:plc:abc123",
    "handle": "user.bsky.social",
    "displayName": "User Name",
    "description": "Bio text",
    "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"
    }
    -

    Upload blob​

    -
    POST /xrpc/com.atproto.repo.uploadBlob
    +
    {
    "did": "did:plc:abc123",
    "handle": "user.bsky.social",
    "displayName": "User Name",
    "description": "Bio text",
    "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"
    }
    +

    Upload blob​

    +
    POST /xrpc/com.atproto.repo.uploadBlob

    Proxies a blob upload to the authenticated user's PDS. Maximum size: 50MB.

    -
    curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: image/png" \
    --data-binary @image.png
    +
    curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: image/png" \
    --data-binary @image.png

    Response: proxied from the user's PDS.

    -

    Dynamic query endpoints​

    +

    Dynamic query endpoints​

    Query endpoints are generated from lexicons with type: "query". Without a Lua script, they support two built-in modes depending on whether a uri parameter is provided.

    -

    Single record​

    -
    GET /xrpc/{method}?uri={at-uri}
    -
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123"
    +

    Single record​

    +
    GET /xrpc/{method}?uri={at-uri}
    +
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123" \
    -H "X-Client-Key: $CLIENT_KEY"

    Response: 200 OK

    -
    {
    "record": {
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "$type": "xyz.statusphere.status",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    }
    }
    +
    {
    "record": {
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "$type": "xyz.statusphere.status",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    }
    }

    Media blobs are automatically enriched with a url field pointing to the user's PDS.

    -

    List records​

    -
    GET /xrpc/{method}?limit=20&cursor=0&did=optional
    -
    ParamTypeDefaultDescription
    limitinteger20Max records to return (max 100)
    cursorstring0Pagination cursor (opaque, pass from previous response)
    didstring---Filter records by DID
    -
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc"
    +

    List records​

    +
    GET /xrpc/{method}?limit=20&cursor=<opaque>&did=optional
    +
    ParamTypeDefaultDescription
    limitinteger20Max records to return (max 100)
    cursorstring---Opaque pagination cursor from a previous response
    didstring---Filter records by DID
    +
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc" \
    -H "X-Client-Key: $CLIENT_KEY"

    Response: 200 OK

    -
    {
    "records": [
    {
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    }
    ],
    "cursor": "10"
    }
    -

    The cursor field is present only when more records exist.

    -

    Dynamic procedure endpoints​

    +
    {
    "records": [
    {
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    }
    ],
    "cursor": "MjAyNS0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."
    }
    +

    The cursor field is an opaque string present only when more records exist. Pass it back as-is to fetch the next page.

    +

    Dynamic procedure endpoints​

    Procedure endpoints are generated from lexicons with type: "procedure". Without a Lua script, HappyView auto-detects create vs update based on whether the request body contains a uri field.

    -

    Create a record​

    -
    POST /xrpc/{method}
    +

    Create a record​

    +
    POST /xrpc/{method}

    When the body does not contain a uri field, a new record is created.

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "\ud83d\ude0a", "createdAt": "2025-01-01T12:00:00Z" }'
    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "\ud83d\ude0a", "createdAt": "2025-01-01T12:00:00Z" }'

    HappyView proxies this to the user's PDS as com.atproto.repo.createRecord, then indexes the created record locally.

    -

    Update a record​

    +

    Update a record​

    When the body contains a uri field, the existing record is updated.

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "status": "\ud83c\udf1f",
    "createdAt": "2025-01-01T13:00:00Z"
    }'
    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",
    "status": "\ud83c\udf1f",
    "createdAt": "2025-01-01T13:00:00Z"
    }'

    HappyView proxies this to the user's PDS as com.atproto.repo.putRecord, then upserts the record locally.

    Response for both: proxied from the user's PDS.

    -

    Errors​

    +

    Errors​

    All error responses return JSON with an error field:

    -
    {
    "error": "description of what went wrong"
    }
    -
    StatusMeaningCommon causes
    400 Bad RequestInvalid inputMissing required fields, malformed JSON, invalid AT URI
    401 UnauthorizedAuthentication failedMissing or invalid Bearer token. See AIP documentation for token issues
    404 Not FoundMethod or record not foundXRPC method has no matching lexicon, or the requested record doesn't exist
    500 Internal Server ErrorServer-side failureLua script error, database error, or upstream PDS failure
    -

    Lua script errors​

    +
    {
    "error": "description of what went wrong"
    }
    +
    StatusMeaningCommon causes
    400 Bad RequestInvalid inputMissing required fields, malformed JSON, invalid AT URI
    401 UnauthorizedAuthentication failedMissing or invalid client identification or DPoP authentication
    404 Not FoundMethod or record not foundXRPC method has no matching lexicon, or the requested record doesn't exist
    500 Internal Server ErrorServer-side failureLua script error, database error, or upstream PDS failure
    +

    Lua script errors​

    When a Lua script fails, the response is 500 with one of:

    • {"error": "script execution failed"}: syntax error, runtime error, or missing handle() function
    • {"error": "script exceeded execution time limit"}: the script hit the 1,000,000 instruction limit

    The full error details are logged server-side but not exposed to the client. See Lua Scripting - Debugging for how to diagnose script issues.

    -

    PDS errors​

    +

    PDS errors​

    When a procedure proxies a write to the user's PDS and the PDS returns an error, HappyView forwards the PDS response status code and body directly to the client.

    -

    Next steps​

    +

    Next steps​

    • Lua Scripting: Override the default query and procedure behavior with custom logic
    • Lexicons: Understand how lexicons generate these endpoints
    • Admin API: Manage lexicons and monitor your instance
    • -
    +
    \ No newline at end of file diff --git a/sdk/lex-agent/index.html b/sdk/lex-agent/index.html new file mode 100644 index 0000000..e654355 --- /dev/null +++ b/sdk/lex-agent/index.html @@ -0,0 +1,34 @@ + + + + + +Lex Agent | HappyView + + + + + + + +

    Lex Agent

    +

    The Lex agent adapter is the recommended way to interact with HappyView from JavaScript. It creates an @atproto/lex Agent from a HappyViewSession, so you can use @atproto/lex's type-safe Client to make XRPC calls with HappyView's DPoP authentication. All requests are routed to your HappyView instance, which handles its own lexicons locally and proxies standard atproto methods (e.g., com.atproto.repo.createRecord) to the user's PDS.

    +

    The adapter gives you lexicon-level type checking on parameters, input bodies, and responses, and works with any library or tool that accepts an @atproto/lex Agent.

    +

    Installation​

    +
    npm install @happyview/lex-agent @atproto/lex
    +

    @atproto/lex is a peer dependency (>=0.0.20).

    +

    Usage​

    +
    import { Client } from "@atproto/lex";
    import { HappyViewBrowserClient } from "@happyview/oauth-client-browser";
    import { createAgent } from "@happyview/lex-agent";

    const client = new HappyViewBrowserClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    });

    // Authenticate (or restore a session)
    const session = await client.restore();

    // Create a Lex agent from the session
    const agent = createAgent(session);
    const lex = new Client(agent);
    +

    Type-safe XRPC calls​

    +

    With a Client instance, you can make type-safe XRPC calls using lexicon definitions:

    +
    // Query
    const result = await lex.xrpc(myLexicons.com.example.getGame, {
    params: { slug: "celeste" },
    });

    // Procedure
    await lex.xrpc(myLexicons.com.example.createPost, {
    input: { text: "Hello from HappyView!" },
    });
    +

    The Client validates parameters and return types against the lexicon schema at the type level, so your IDE catches mismatches before runtime.

    +

    API​

    +

    createAgent(session: HappyViewSession): Agent​

    +

    Creates an @atproto/lex Agent from a HappyViewSession.

    +
      +
    • agent.did — the session user's DID
    • +
    • agent.fetchHandler(path, init) — delegates to session.fetchHandler, which attaches DPoP authentication headers and prepends the HappyView instance URL to relative paths
    • +
    + + \ No newline at end of file diff --git a/sdk/oauth-client-browser/index.html b/sdk/oauth-client-browser/index.html new file mode 100644 index 0000000..f7f2e3f --- /dev/null +++ b/sdk/oauth-client-browser/index.html @@ -0,0 +1,60 @@ + + + + + +Browser Client | HappyView + + + + + + + +

    Browser Client

    +

    The browser client handles the full OAuth redirect flow for browser apps authenticating with a HappyView instance. It wraps the OAuth Client with Web Crypto, localStorage, and atproto handle/DID resolution.

    +

    If you're starting a new app, consider using @happyview/lex-agent with @atproto/lex instead — it provides type-safe XRPC calls and is the recommended way to interact with HappyView. This package is primarily useful if your app already uses @atproto/oauth-client-browser and you want to add HappyView authentication alongside it.

    +

    Installation​

    +
    npm install @happyview/oauth-client-browser
    +

    Setup​

    +
    import { HappyViewBrowserClient } from "@happyview/oauth-client-browser";

    const client = new HappyViewBrowserClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    });
    +

    The client uses Web Crypto and localStorage by default. You can override either:

    +
    const client = new HappyViewBrowserClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    crypto: myCustomCryptoAdapter,
    storage: myCustomStorageAdapter,
    });
    +
    note

    The API client must be registered as a public client (no secret) with your app's origin in allowed_origins. See Authentication — API clients.

    +

    Login​

    +

    login() resolves the user's handle, discovers their PDS, provisions a DPoP key, and redirects the browser to the PDS authorization server:

    +
    await client.login("alice.bsky.social");
    // Browser redirects — code stops here
    +

    If you need the authorization URL without redirecting (e.g., for a popup or custom UI), use prepareLogin():

    +
    const { authorizationUrl, did, state } =
    await client.prepareLogin("alice.bsky.social");

    // Open in a popup, new tab, etc.
    window.open(authorizationUrl);
    +

    What happens during login​

    +
      +
    1. The handle is resolved to a DID via resolveHandleToDid.
    2. +
    3. The DID document is fetched to find the PDS URL.
    4. +
    5. The PDS's OAuth authorization server metadata is fetched.
    6. +
    7. A DPoP key is provisioned from HappyView.
    8. +
    9. PKCE challenge/verifier pairs are generated (one for HappyView's DPoP provisioning, one for the PDS authorization server).
    10. +
    11. The pending auth state is stored in localStorage.
    12. +
    13. The browser is redirected to the PDS authorization endpoint.
    14. +
    +

    OAuth callback​

    +

    Your app needs an /oauth/callback route. On that page, call callback() to complete the token exchange:

    +
    // On /oauth/callback
    const session = await client.callback();
    // Session is now stored in localStorage and ready to use
    +

    callback() reads the code and state from the URL query string, exchanges the code for tokens at the PDS token endpoint, and registers the session with HappyView. The pending auth state is cleaned up automatically.

    +

    Restore session​

    +

    On subsequent page loads, restore the session from localStorage instead of re-authenticating:

    +
    const session = await client.restore();
    if (session) {
    // User is still logged in
    }
    +

    Returns null if no stored session is found.

    +

    Authenticated requests​

    +

    The session's fetchHandler attaches DPoP proof headers automatically:

    +
    const response = await session.fetchHandler(
    "/xrpc/com.example.getStuff?limit=10",
    { method: "GET" },
    );

    const data = await response.json();
    +

    Pass a relative path (prepends the HappyView instance URL) or a full URL (used as-is).

    +

    Logout​

    +
    await client.logout(session.did);
    +

    Resolution utilities​

    +

    The browser client exports the resolution functions it uses internally. These are useful if you need to resolve handles or discover PDS URLs outside of the login flow:

    +
    import {
    resolveHandleToDid,
    resolveDidDocument,
    resolvePdsUrl,
    resolveAuthServerMetadata,
    } from "@happyview/oauth-client-browser";

    const did = await resolveHandleToDid("alice.bsky.social");
    const doc = await resolveDidDocument(did);
    const pdsUrl = resolvePdsUrl(doc);
    const authMeta = await resolveAuthServerMetadata(pdsUrl);
    +

    Re-exports​

    +

    This package re-exports everything from @happyview/oauth-client, so you don't need to install the core package separately. All types, error classes, and utilities are available:

    +
    import {
    HappyViewBrowserClient,
    HappyViewSession,
    ApiError,
    type CryptoAdapter,
    type StorageAdapter,
    } from "@happyview/oauth-client-browser";
    + + \ No newline at end of file diff --git a/sdk/oauth-client/index.html b/sdk/oauth-client/index.html new file mode 100644 index 0000000..41c3e7d --- /dev/null +++ b/sdk/oauth-client/index.html @@ -0,0 +1,55 @@ + + + + + +OAuth Client | HappyView + + + + + + + +

    OAuth Client

    +

    The core OAuth client handles DPoP key provisioning, session registration, and session restoration against a HappyView instance. It's platform-agnostic — you provide a CryptoAdapter and optional StorageAdapter for your environment.

    +

    If you're building a browser app, use the Browser Client instead. It wraps this package with Web Crypto, localStorage, and a complete OAuth redirect flow.

    +

    Installation​

    +
    npm install @happyview/oauth-client
    +

    Setup​

    +
    import { HappyViewOAuthClient } from "@happyview/oauth-client";

    const client = new HappyViewOAuthClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    clientSecret: "hvs_your_secret", // optional, for confidential clients
    crypto: myCryptoAdapter,
    storage: myStorageAdapter, // optional, defaults to in-memory
    });
    +

    The clientSecret parameter makes this a confidential client. Omit it for public clients (browser apps), which use PKCE instead. See Authentication — API clients for details.

    +

    DPoP key provisioning​

    +

    Request a DPoP keypair from the HappyView instance. This is the first step of the DPoP key provisioning flow.

    +
    const { provisionId, dpopKey, pkceVerifier } =
    await client.provisionDpopKey();
    +

    For public clients, pkceVerifier is included and must be passed back when registering the session. For confidential clients it will be undefined.

    +

    Use the returned dpopKey (a private JWK) as your DPoP keypair during your atproto OAuth flow with the user's PDS.

    +

    Session registration​

    +

    After completing OAuth authorization with the user's PDS, register the session with HappyView:

    +
    const session = await client.registerSession({
    provisionId,
    pkceVerifier, // required for public clients
    did: "did:plc:abc123",
    accessToken: tokens.access_token,
    refreshToken: tokens.refresh_token,
    scopes: "atproto",
    pdsUrl: "https://bsky.social",
    issuer: tokens.iss,
    dpopKey,
    });
    +

    The returned HappyViewSession is ready to make authenticated requests. The session data is also persisted to the StorageAdapter for later restoration.

    +

    Making authenticated requests​

    +

    HappyViewSession.fetchHandler works like fetch but automatically attaches DPoP proof, authorization, and client key headers:

    +
    // Relative path — prepends the HappyView instance URL
    const response = await session.fetchHandler(
    "/xrpc/com.example.getStuff?limit=10",
    { method: "GET" },
    );

    // Absolute URL — used as-is
    const response = await session.fetchHandler(
    "https://other-service.example.com/xrpc/test.method",
    { method: "GET" },
    );
    +

    Session restoration​

    +

    Restore a previously stored session without re-authenticating:

    +
    // Restore the last active session
    const session = await client.restore();

    // Restore a specific user's session
    const session = await client.restoreSession("did:plc:abc123");
    +

    Returns null if no stored session is found.

    +

    Logout​

    +
    await client.deleteSession("did:plc:abc123");
    +

    This deletes the session from both HappyView and local storage.

    +

    Adapters​

    +

    CryptoAdapter​

    +

    Implement this interface for your platform's cryptographic primitives:

    +
    interface CryptoAdapter {
    generatePkceVerifier(): Promise<string>;
    computePkceChallenge(verifier: string): Promise<string>;
    signEs256(privateKey: JsonWebKey, payload: Uint8Array): Promise<Uint8Array>;
    sha256(data: Uint8Array): Promise<Uint8Array>;
    getRandomValues(length: number): Uint8Array;
    }
    +

    StorageAdapter​

    +

    Implement this interface to persist sessions:

    +
    interface StorageAdapter {
    get(key: string): Promise<string | null>;
    set(key: string, value: string): Promise<void>;
    delete(key: string): Promise<void>;
    }
    +

    If no StorageAdapter is provided, sessions are stored in memory and won't survive page reloads or process restarts.

    +
    note

    The built-in MemoryStorage is exported for testing. In production, always provide a persistent storage adapter.

    +

    Error handling​

    +

    All errors extend HappyViewError:

    +
    ErrorWhen
    ApiErrorHappyView API returned a non-OK response (has status and body)
    AuthenticationErrorAuthentication failed (default status 401)
    InvalidStateErrorMissing or invalid OAuth state
    TokenExchangeErrorToken exchange with the PDS failed (has status and body)
    ResolutionErrorHandle or DID resolution failed
    +
    import { ApiError } from "@happyview/oauth-client";

    try {
    await client.registerSession(params);
    } catch (err) {
    if (err instanceof ApiError) {
    console.error(`API error ${err.status}:`, err.body);
    }
    }
    + + \ No newline at end of file diff --git a/sdk/overview/index.html b/sdk/overview/index.html new file mode 100644 index 0000000..9cc0cab --- /dev/null +++ b/sdk/overview/index.html @@ -0,0 +1,40 @@ + + + + + +JavaScript SDK | HappyView + + + + + + + +

    JavaScript SDK

    +

    HappyView provides JavaScript packages for building third-party apps that authenticate with a HappyView instance and make XRPC requests on behalf of users.

    +
    PackagePurpose
    @happyview/lex-agentRecommended — type-safe XRPC via @atproto/lex Client with HappyView DPoP auth
    @happyview/oauth-clientPlatform-agnostic core — DPoP key provisioning, session management, authenticated fetch
    @happyview/oauth-client-browserBrowser OAuth wrapper for apps already using @atproto/oauth-client-browser
    +

    Which package do I need?​

    +

    Starting a new app? Use @happyview/lex-agent with @atproto/lex. It gives you type-safe XRPC calls through a Client that routes requests to your HappyView instance with DPoP authentication. This is the recommended way to interact with HappyView from JavaScript.

    +

    Already using @atproto/oauth-client-browser? Add @happyview/oauth-client-browser to get a HappyViewBrowserClient that handles the HappyView-specific DPoP key provisioning and session registration on top of the standard atproto OAuth flow.

    +

    Building a server-side app or something more custom? Use @happyview/oauth-client directly and provide your own CryptoAdapter and StorageAdapter.

    +

    How it works​

    +

    Third-party apps authenticate using HappyView's DPoP key provisioning flow:

    +
      +
    1. The SDK requests a DPoP keypair from the HappyView instance.
    2. +
    3. Your app runs a standard atproto OAuth flow with the user's PDS using that keypair.
    4. +
    5. The SDK registers the resulting tokens with HappyView.
    6. +
    7. All subsequent XRPC requests are authenticated with DPoP proofs — HappyView handles its own lexicons locally and proxies standard atproto writes to the user's PDS.
    8. +
    +

    Quick start​

    +
    npm install @happyview/lex-agent @happyview/oauth-client-browser @atproto/lex
    +
    import { Client } from "@atproto/lex";
    import { HappyViewBrowserClient } from "@happyview/oauth-client-browser";
    import { createAgent } from "@happyview/lex-agent";

    // Set up the OAuth client
    const oauthClient = new HappyViewBrowserClient({
    instanceUrl: "https://happyview.example.com",
    clientKey: "hvc_your_client_key",
    });

    // Login — redirects to the user's PDS
    await oauthClient.login("alice.bsky.social");

    // On /oauth/callback — complete the flow
    const session = await oauthClient.callback();

    // Create a type-safe Lex client
    const agent = createAgent(session);
    const lex = new Client(agent);

    // Make type-safe XRPC calls
    const result = await lex.xrpc(myLexicons.com.example.getGame, {
    params: { slug: "celeste" },
    });
    +

    Next steps​

    +
    + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 743d9e7..f5323e2 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://happyview.dev/getting-started/authenticationweekly0.5https://happyview.dev/getting-started/configurationweekly0.5https://happyview.dev/getting-started/dashboardweekly0.5https://happyview.dev/getting-started/deployment/dockerweekly0.5https://happyview.dev/getting-started/deployment/otherweekly0.5https://happyview.dev/getting-started/deployment/railwayweekly0.5https://happyview.dev/getting-started/quickstartweekly0.5https://happyview.dev/guides/api-keysweekly0.5https://happyview.dev/guides/backfillweekly0.5https://happyview.dev/guides/event-logsweekly0.5https://happyview.dev/guides/index-hooksweekly0.5https://happyview.dev/guides/lexiconsweekly0.5https://happyview.dev/guides/scriptingweekly0.5https://happyview.dev/reference/admin-apiweekly0.5https://happyview.dev/reference/architectureweekly0.5https://happyview.dev/reference/changelogweekly0.5https://happyview.dev/reference/glossaryweekly0.5https://happyview.dev/reference/production-deploymentweekly0.5https://happyview.dev/reference/scripts/algolia-syncweekly0.5https://happyview.dev/reference/scripts/batch-saveweekly0.5https://happyview.dev/reference/scripts/cascading-deleteweekly0.5https://happyview.dev/reference/scripts/complex-mutationsweekly0.5https://happyview.dev/reference/scripts/create-recordweekly0.5https://happyview.dev/reference/scripts/expanded-queryweekly0.5https://happyview.dev/reference/scripts/get-recordweekly0.5https://happyview.dev/reference/scripts/list-or-fetchweekly0.5https://happyview.dev/reference/scripts/meilisearch-syncweekly0.5https://happyview.dev/reference/scripts/paginated-listweekly0.5https://happyview.dev/reference/scripts/sidecar-recordsweekly0.5https://happyview.dev/reference/scripts/update-or-deleteweekly0.5https://happyview.dev/reference/scripts/upsert-recordweekly0.5https://happyview.dev/reference/troubleshootingweekly0.5https://happyview.dev/reference/xrpc-apiweekly0.5https://happyview.dev/tutorials/statusphereweekly0.5https://happyview.dev/weekly0.5 \ No newline at end of file +https://happyview.dev/getting-started/authenticationweekly0.5https://happyview.dev/getting-started/configurationweekly0.5https://happyview.dev/getting-started/dashboardweekly0.5https://happyview.dev/getting-started/deployment/dockerweekly0.5https://happyview.dev/getting-started/deployment/otherweekly0.5https://happyview.dev/getting-started/deployment/railwayweekly0.5https://happyview.dev/getting-started/quickstartweekly0.5https://happyview.dev/guides/api-keysweekly0.5https://happyview.dev/guides/backfillweekly0.5https://happyview.dev/guides/database-setupweekly0.5https://happyview.dev/guides/developing-pluginsweekly0.5https://happyview.dev/guides/event-logsweekly0.5https://happyview.dev/guides/index-hooksweekly0.5https://happyview.dev/guides/labelersweekly0.5https://happyview.dev/guides/lexiconsweekly0.5https://happyview.dev/guides/permissionsweekly0.5https://happyview.dev/guides/pluginsweekly0.5https://happyview.dev/guides/postgres-to-sqlite-migrationweekly0.5https://happyview.dev/guides/scriptingweekly0.5https://happyview.dev/guides/sqlite-to-postgres-migrationweekly0.5https://happyview.dev/reference/admin-apiweekly0.5https://happyview.dev/reference/admin/api-clientsweekly0.5https://happyview.dev/reference/admin/api-keysweekly0.5https://happyview.dev/reference/admin/backfillweekly0.5https://happyview.dev/reference/admin/domainsweekly0.5https://happyview.dev/reference/admin/eventsweekly0.5https://happyview.dev/reference/admin/labelersweekly0.5https://happyview.dev/reference/admin/lexiconsweekly0.5https://happyview.dev/reference/admin/pluginsweekly0.5https://happyview.dev/reference/admin/script-variablesweekly0.5https://happyview.dev/reference/admin/settingsweekly0.5https://happyview.dev/reference/admin/statsweekly0.5https://happyview.dev/reference/admin/usersweekly0.5https://happyview.dev/reference/architectureweekly0.5https://happyview.dev/reference/changelogweekly0.5https://happyview.dev/reference/glossaryweekly0.5https://happyview.dev/reference/lua/atproto-apiweekly0.5https://happyview.dev/reference/lua/database-apiweekly0.5https://happyview.dev/reference/lua/http-apiweekly0.5https://happyview.dev/reference/lua/json-apiweekly0.5https://happyview.dev/reference/lua/record-apiweekly0.5https://happyview.dev/reference/lua/standard-librariesweekly0.5https://happyview.dev/reference/lua/utility-globalsweekly0.5https://happyview.dev/reference/production-deploymentweekly0.5https://happyview.dev/reference/scripts/algolia-syncweekly0.5https://happyview.dev/reference/scripts/batch-saveweekly0.5https://happyview.dev/reference/scripts/cascading-deleteweekly0.5https://happyview.dev/reference/scripts/complex-mutationsweekly0.5https://happyview.dev/reference/scripts/create-recordweekly0.5https://happyview.dev/reference/scripts/expanded-queryweekly0.5https://happyview.dev/reference/scripts/get-recordweekly0.5https://happyview.dev/reference/scripts/list-or-fetchweekly0.5https://happyview.dev/reference/scripts/meilisearch-syncweekly0.5https://happyview.dev/reference/scripts/paginated-listweekly0.5https://happyview.dev/reference/scripts/sidecar-recordsweekly0.5https://happyview.dev/reference/scripts/update-or-deleteweekly0.5https://happyview.dev/reference/scripts/upsert-recordweekly0.5https://happyview.dev/reference/troubleshootingweekly0.5https://happyview.dev/reference/xrpc-apiweekly0.5https://happyview.dev/sdk/lex-agentweekly0.5https://happyview.dev/sdk/oauth-clientweekly0.5https://happyview.dev/sdk/oauth-client-browserweekly0.5https://happyview.dev/sdk/overviewweekly0.5https://happyview.dev/tutorials/statusphereweekly0.5https://happyview.dev/weekly0.5 \ No newline at end of file diff --git a/tutorials/statusphere/index.html b/tutorials/statusphere/index.html index a47aa84..9c63475 100644 --- a/tutorials/statusphere/index.html +++ b/tutorials/statusphere/index.html @@ -2,20 +2,20 @@ - -Tutorial: Statusphere with HappyView | HappyView - - + +Tutorial: Statusphere with HappyView | HappyView + + - + -

    Tutorial: Statusphere with HappyView

    -

    Statusphere is an example AT Protocol application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting.

    -

    In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have automatically indexed records and automatically generated XPRC endpoints.

    -
    tip

    This tutorial assumes you have a running HappyView instance. If you don't, start with the Quickstart or one of the local development guides (Docker, from source).

    -

    The Statusphere lexicon​

    +

    Tutorial: Statusphere with HappyView

    +

    Statusphere is an example atproto application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting.

    +

    In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have indexed records and working XRPC endpoints.

    +
    tip

    This tutorial assumes you have a running HappyView instance. If you don't, start with the Quickstart or one of the local development guides (Docker, from source).

    +

    The Statusphere lexicon​

    Statusphere uses a single record type, xyz.statusphere.status. Each record has two fields:

    • status: a single emoji
    • @@ -23,58 +23,88 @@

    Users can set their status as many times as they want. Each status is a new record in their repository, keyed by a TID (timestamp-based identifier). The most recent record is their "current" status.

    For more background on how the app works, see the ATProto Statusphere guide.

    -

    Step 1: Upload the record lexicon​

    -

    First, upload the xyz.statusphere.status lexicon to HappyView. This tells HappyView to start indexing Statusphere records from across the network as they're created, updated, or deleted.

    -

    The examples below use $TOKEN as a placeholder for an AIP-issued access token. See Authentication for how to get one.

    -
    curl -X POST http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "lexicon_json": {
    "lexicon": 1,
    "id": "xyz.statusphere.status",
    "defs": {
    "main": {
    "type": "record",
    "key": "tid",
    "record": {
    "type": "object",
    "required": ["status", "createdAt"],
    "properties": {
    "status": { "type": "string", "maxGraphemes": 1 },
    "createdAt": { "type": "string", "format": "datetime" }
    }
    }
    }
    }
    },
    "backfill": true
    }'
    -

    HappyView now subscribes to xyz.statusphere.status via Tap. The backfill flag tells HappyView to also index existing status records from the network. You can monitor progress with GET /admin/backfill/status or the dashboard.

    -
    tip

    Since the xyz.statusphere.status lexicon is published on the AT Protocol network, you can also add it as a network lexicon instead of uploading the JSON manually:

    curl -X POST http://localhost:3000/admin/network-lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "nsid": "xyz.statusphere.status" }'
    -

    Step 2: Verify records are being indexed​

    -

    Once the backfill starts processing, you should see records appearing. Check the stats:

    -
    curl http://localhost:3000/admin/stats \
    -H "Authorization: Bearer $TOKEN"
    -
    {
    "total_records": 1234,
    "collections": [{ "collection": "xyz.statusphere.status", "count": 1234 }]
    }
    -

    Step 3: Add a query lexicon for listing statuses​

    -

    Now add a query endpoint to read the indexed data. Upload a query lexicon with target_collection pointing at the record collection from Step 1:

    -
    curl -X POST http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "lexicon_json": {
    "lexicon": 1,
    "id": "xyz.statusphere.listStatuses",
    "defs": {
    "main": {
    "type": "query",
    "output": { "encoding": "application/json" }
    }
    }
    },
    "target_collection": "xyz.statusphere.status"
    }'
    +

    Step 1: Add the record lexicon​

    +

    First, tell HappyView to start indexing Statusphere records. Since xyz.statusphere.status is published on the atproto network, you can add it directly from the dashboard:

    +
      +
    1. Go to Lexicons > Add Lexicon > Network
    2. +
    3. Enter xyz.statusphere.status
    4. +
    5. HappyView resolves the schema from its authority domain records and shows a preview
    6. +
    7. Enable the Backfill toggle so HappyView fetches existing records from the network
    8. +
    9. Click Add
    10. +
    +

    HappyView now subscribes to xyz.statusphere.status via Jetstream and kicks off a backfill job to index historical records.

    +
    tip

    You can also add lexicons via the admin API. This is useful for automation or CI/CD workflows:

    curl -X POST http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
    "lexicon_json": {
    "lexicon": 1,
    "id": "xyz.statusphere.status",
    "defs": {
    "main": {
    "type": "record",
    "key": "tid",
    "record": {
    "type": "object",
    "required": ["status", "createdAt"],
    "properties": {
    "status": { "type": "string", "maxGraphemes": 1 },
    "createdAt": { "type": "string", "format": "datetime" }
    }
    }
    }
    }
    },
    "backfill": true
    }'
    +

    Step 2: Verify records are being indexed​

    +

    Once the backfill starts, you should see records appearing in the dashboard:

    +
      +
    1. The home page shows a live record count and per-collection breakdown
    2. +
    3. Go to Records to browse individual indexed statuses
    4. +
    5. Go to Backfill to watch the backfill job progress — you'll see the number of repos processed and records fetched
    6. +
    +

    Step 3: Add a query lexicon for listing statuses​

    +

    Now add a query endpoint to read the indexed data:

    +
      +
    1. Go to Lexicons > Add Lexicon > Local
    2. +
    3. Set the NSID to xyz.statusphere.listStatuses
    4. +
    5. Set the type to Query
    6. +
    7. Set target_collection to xyz.statusphere.status — this tells the query which record collection it operates on (target_collection is a HappyView-specific field, not part of the lexicon spec)
    8. +
    9. Click Add
    10. +

    This creates a GET /xrpc/xyz.statusphere.listStatuses endpoint. Without a Lua script, it uses HappyView's built-in default behavior: listing records with limit, cursor, and did parameters, or fetching a single record by uri. Try it:

    -
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5"
    -
    {
    "records": [
    {
    "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    },
    {
    "uri": "at://did:plc:def/xyz.statusphere.status/3def456",
    "status": "\ud83c\udf1f",
    "createdAt": "2025-01-01T11:30:00Z"
    }
    ],
    "cursor": "5"
    }
    +
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5" \
    -H "X-Client-Key: $CLIENT_KEY"
    +
    {
    "records": [
    {
    "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",
    "status": "\ud83d\ude0a",
    "createdAt": "2025-01-01T12:00:00Z"
    },
    {
    "uri": "at://did:plc:def/xyz.statusphere.status/3def456",
    "status": "\ud83c\udf1f",
    "createdAt": "2025-01-01T11:30:00Z"
    }
    ],
    "cursor": "MjAyNS0wMS0wMVQxMjowMDowMFp8YXQ6Ly9kaWQ6..."
    }

    See XRPC API for the full default query behavior.

    -

    Step 4: Enhance the query with a Lua script​

    -

    The default query behavior works, but let's customize it with a Lua script. Here's a script that handles single-record lookups by URI and paginated listing with an optional DID filter:

    -
    function handle()
    if params.uri then
    local record = db.get(params.uri)
    if not record then
    return { error = "not found" }
    end
    return { record = record }
    end

    return db.query({
    collection = collection,
    did = params.did,
    limit = tonumber(params.limit) or 20,
    offset = tonumber(params.cursor) or 0,
    })
    end
    -

    Re-upload the lexicon with parameters defined in the schema and the script attached:

    -
    LEXICON='{
    "lexicon": 1,
    "id": "xyz.statusphere.listStatuses",
    "defs": {
    "main": {
    "type": "query",
    "parameters": {
    "type": "params",
    "properties": {
    "uri": { "type": "string" },
    "did": { "type": "string" },
    "limit": { "type": "integer" },
    "cursor": { "type": "string" }
    }
    },
    "output": { "encoding": "application/json" }
    }
    }
    }'

    SCRIPT='function handle()
    if params.uri then
    local record = db.get(params.uri)
    if not record then
    return { error = "not found" }
    end
    return { record = record }
    end

    return db.query({
    collection = collection,
    did = params.did,
    limit = tonumber(params.limit) or 20,
    offset = tonumber(params.cursor) or 0,
    })
    end'

    curl -X POST http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{
    \"lexicon_json\": $LEXICON,
    \"target_collection\": \"xyz.statusphere.status\",
    \"script\": \"$SCRIPT\"
    }"
    +

    Step 4: Enhance the query with a Lua script​

    +

    The default query behavior works, but let's customize it with a Lua script. The script will handle single-record lookups by URI and paginated listing with an optional DID filter.

    +
      +
    1. Click on xyz.statusphere.listStatuses in the lexicon list to open its detail page
    2. +
    3. The Lua script editor is at the bottom of the page
    4. +
    5. Paste in the following script:
    6. +
    +
    function handle()
    if params.uri then
    local record = db.get(params.uri)
    if not record then
    return { error = "not found" }
    end
    return { record = record }
    end

    return db.query({
    collection = collection,
    did = params.did,
    limit = tonumber(params.limit) or 20,
    cursor = params.cursor,
    })
    end
    +
      +
    1. Click Save
    2. +

    The endpoint now uses your custom logic. Filter by a specific user:

    -
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1"
    +
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1" \
    -H "X-Client-Key: $CLIENT_KEY"

    Fetch a single record by URI:

    -
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123"
    -

    Step 5: Add a procedure lexicon for setting status​

    -

    Add a write endpoint so users can set their status through your AppView. This creates a POST /xrpc/xyz.statusphere.setStatus endpoint that proxies writes to the user's PDS.

    -

    The Lua script auto-fills createdAt and uses the authenticated user's DID:

    -
    function handle()
    local r = Record(collection, {
    status = input.status,
    createdAt = now(),
    })
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    -

    Upload the procedure lexicon with this script:

    -
    LEXICON='{
    "lexicon": 1,
    "id": "xyz.statusphere.setStatus",
    "defs": {
    "main": {
    "type": "procedure",
    "input": { "encoding": "application/json" },
    "output": { "encoding": "application/json" }
    }
    }
    }'

    SCRIPT='function handle()
    local r = Record(collection, {
    status = input.status,
    createdAt = now(),
    })
    r:save()
    return { uri = r._uri, cid = r._cid }
    end'

    curl -X POST http://localhost:3000/admin/lexicons \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{
    \"lexicon_json\": $LEXICON,
    \"target_collection\": \"xyz.statusphere.status\",
    \"script\": \"$SCRIPT\"
    }"
    -

    Step 6: Test the procedure endpoint​

    -

    Set a status (requires authentication):

    -
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "status": "\ud83d\ude80" }'
    -
    {
    "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",
    "cid": "bafyreiabc123..."
    }
    +
    curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123" \
    -H "X-Client-Key: $CLIENT_KEY"
    +

    Step 5: Add a procedure lexicon for setting status​

    +

    Add a write endpoint so users can set their status through your AppView:

    +
      +
    1. Go to Lexicons > Add Lexicon > Local
    2. +
    3. Set the NSID to xyz.statusphere.setStatus
    4. +
    5. Set the type to Procedure
    6. +
    7. Set target_collection to xyz.statusphere.status
    8. +
    9. A default Lua script is generated — replace it with:
    10. +
    +
    function handle()
    local r = Record(collection, {
    status = input.status,
    createdAt = now(),
    })
    r:save()
    return { uri = r._uri, cid = r._cid }
    end
    +
      +
    1. Click Add
    2. +
    +

    This creates a POST /xrpc/xyz.statusphere.setStatus endpoint that creates records on the user's PDS and indexes them locally.

    +

    Step 6: Test the procedure endpoint​

    +

    Set a status. This requires DPoP authentication — the JavaScript SDK handles this for you, but you can test with curl if you have a token:

    +
    curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \
    -H "X-Client-Key: $CLIENT_KEY" \
    -H "Authorization: DPoP $TOKEN" \
    -H "DPoP: $DPOP_PROOF" \
    -H "Content-Type: application/json" \
    -d '{ "status": "\ud83d\ude80" }'
    +
    {
    "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",
    "cid": "bafyreiabc123..."
    }

    The record is created on your PDS and immediately indexed by HappyView.

    -

    What you've built​

    -

    With three lexicon uploads and a few lines of Lua, you have a complete Statusphere AppView:

    +

    What you've built​

    +

    With three lexicons and a few lines of Lua, you have a complete Statusphere AppView:

      -
    • Real-time indexing of xyz.statusphere.status records from the entire AT Protocol network
    • +
    • Real-time indexing of xyz.statusphere.status records from the entire atproto network
    • Historical backfill of existing status records
    • A query endpoint (xyz.statusphere.listStatuses) with filtering, pagination, and single-record lookups
    • A write endpoint (xyz.statusphere.setStatus) that creates records on the user's PDS and indexes them locally
    -

    Next steps​

    +

    Everything was done through the dashboard — no server restarts, no config files, no deploys. For automation and CI/CD, the same operations are available via the admin API.

    +

    Next steps​

    +
    \ No newline at end of file